File size: 2,831 Bytes
c085019
 
0e7a564
883d9ab
 
c085019
776877d
c085019
 
 
 
 
 
776877d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: DynaMix
emoji: πŸŒ€
colorFrom: red
colorTo: blue
sdk: gradio
sdk_version: 5.43.1
app_file: app.py
pinned: false
license: cc-by-4.0
short_description: Zero-shot forecasting of Dynamical Systems using DynaMix
---

# DynaMix: Zero-shot Forecasting of Dynamical Systems

This DynaMix demo is an interactive Gradio app for zero-shot dynamical systems reconstruction using the DynaMix architecture (accepted NeurIPS 2025 paper [![arXiv](https://img.shields.io/badge/arXiv-2505.13192-b31b1b.svg)](https://arxiv.org/abs/2505.13192)). It loads pretrained models from the Hugging Face Hub (see [DynaMix model](https://huggingface.co/DurstewitzLab/dynamix)) and provides predictions from uploaded context data.

### Key Features
- **Zero-shot forecasting**: Powered by DynaMix model architecture
- **Custom Context Upload**: Upload your CSV/NPY data or choose a preset (Lorenz63, Noisy Sine, Chua, Selkov)
- **Interactive Settings**: Configure forecast settings
- **Visualizations**: Plots of context data and forecast
- **Exports**: Download forecast as CSV and NPY


## Using the Application

### Data Input
You can either upload your own data or choose a preset dataset from the left panel.

- **Upload**: Accepts `.csv` or `.npy` files
- **Presets**: `Noisy Sine`, `Lorenz63`, `Chua`, `Selkov`

Supported data formats:
- **NPY files**: Numpy array of shape `(time_steps, dimensions)`. 1D time series arrays are auto-expanded to `(time_steps, 1)`; otherwise must be 2D with at least 2 time steps and β‰₯1 dimension.

- **CSV files**: Each column is a dimension; each row is a time step. Only numeric columns are used. Data must be 2D with at least 2 time steps and β‰₯1 dimension.

Example CSV format:
```csv
dim_1,dim_2,dim_3
0.1,0.2,0.3
0.4,0.5,0.6
0.7,0.8,0.9
```

### Forecast Settings
- **Model Selection**: Select the pretrained model to use for forecasting.

- **Forecast Length**: Number of future steps to generate (`1`–`2001`, step `100`, default `512`)

- **Advanced Settings**
  - **Preprocessing Method**: Method to use for preprocessing the context data (for cases where input dims < model dims)
  - **Standardize**: Normalize context to zero mean and unit variance (default: enabled)
  - **Fit Nonstationary**: Account for non-stationary trends in the data (default: disabled)
  - **Context Steps**: Maximum number of last steps from the uploaded data to use as context. If your uploaded sequence is longer, it will be truncated to the most recent `Context Steps`. (default `2048`)

### Outputs
- **Interactive Plot**: Shows historical context (blue) and forecast (red) per dimension, up to 15 dimensions.
- **Files**:
  - `forecast.csv`: Full forecast for all dimensions.
  - `forecast.npy`: Full forecast ndarray including all dimensions.


## License
This project is released under the **CC BY 4.0** license.