TL;DR
DiM-TS (Diffusion Mamba for Time Series) is a novel generative framework that combines the power of diffusion models with the efficiency of Selective State Space Models (Mamba). By introducing specialized modules to capture periodic temporal "lags" and reorder channels for better correlation modeling, it sets a new state-of-the-art for generating high-fidelity, realistic synthetic time series data.
What Problem Does This Paper Address?
Generating high-quality synthetic time series is essential for fields like finance and healthcare, where privacy concerns or data scarcity limit access to real-world datasets. While Diffusion Probabilistic Models (DDPMs) have become the gold standard for generative tasks, their typical "backbone"—the Transformer—has two major flaws when applied to time series:
- Permutation Invariance: Transformers treat sequences as sets, often failing to capture the strict temporal dependencies inherent in time-ordered data.
- Computational Cost: The self-attention mechanism scales quadratically with sequence length, making long-range modeling expensive.
State Space Models (SSMs) like Mamba offer a promising alternative due to their linear scaling and sequence-modeling prowess. However, standard Mamba struggles with time series because its "unidirectional scanning" ignores periodic patterns (like weekly cycles) and fails to capture complex interactions between channels that aren't adjacent in the input. DiM-TS was designed specifically to bridge these gaps.
Methods
The authors propose a dual-path encoder-decoder architecture based on the Diffusion Mamba (DiM-TS) framework. The core innovations lie in two "Enhanced Mamba" modules:
- Lag Fusion Mamba (LSF): Inspired by the Autocorrelation Function (ACF), this module explicitly fuses the current latent state with states from previous periodic intervals (lags). This introduces an inductive bias that helps the model "remember" and replicate cyclic patterns (e.g., a peak that happens every 24 hours).
- Permutation Scanning Mamba (CPS): Since Mamba processes data in a specific order, it can miss correlations between distant variables. CPS calculates a similarity matrix between channels and reorders them so that highly correlated variables are scanned together, significantly improving inter-channel dependency modeling.
Furthermore, the model uses a Multi-feature Loss function. Beyond the standard denoising loss, it incorporates a Fourier-based loss to preserve frequency-domain properties and a Maximum Mean Discrepancy (MMD) loss to ensure the statistical correlations between channels in the synthetic data match the original.
Datasets
The model was evaluated on four diverse public datasets:
- Stocks: Daily Google stock data (6 features).
- ETTh: Hourly electricity transformer data (7 features).
- Energy: UCI appliances energy consumption data (28 features).
- KDD-Cup: Hourly air quality data from London (59 features).
- Traffic: A univariate dataset used specifically to test periodic pattern preservation.
Key Insights and Ideas
- The "Lag" Inductive Bias: Standard SSMs exhibit "unidirectional attenuation," meaning they naturally lose track of information as they move forward. By forcing the model to look back at specific, mathematically determined lags, the authors effectively "anchor" the model to the data's natural periodicity.
- Channel Ordering is a Hidden Bottleneck: In multivariate time series, the order in which you feed variables into a sequence model is usually arbitrary. The authors show that by treating channel ordering as an optimization problem (grouping similar variables), you can unlock much better performance from Mamba-based architectures.
- Unified Matrix Framework: A key theoretical contribution is proving that both LSF and CPS can be expressed within the same structured matrix multiplication framework as the original Mamba. This suggests these aren't just "hacks," but principled extensions of State Space theory.
Key Results
DiM-TS consistently outperformed competitive baselines (including PaD-TS, Diffusion-TS, and TimeGAN) across multiple metrics:
- Fidelity: It improved the Context-FID score (a measure of how well synthetic data matches real distribution) by over 60% and correlation scores by over 35% compared to previous state-of-the-art models.
- Downstream Utility: In "Predictive Score" tests (where a model is trained on synthetic data and tested on real data), DiM-TS achieved the lowest error, proving the synthetic data is highly useful for real-world applications.
- Visual Success: t-SNE visualizations show that DiM-TS generates data points that almost perfectly overlap with the original data distribution, whereas other models often produce "clumpy" or shifted results.
Limitations and Future Work
While DiM-TS shows superior performance, the paper notes that the Permutation Scanning strategy relies on a pre-calculated similarity matrix. In highly dynamic systems where correlations change over time, a static permutation might be less effective.
Future research could explore dynamic permutation strategies that adapt during the denoising process. Additionally, while the model excels at unconditional generation, extending this architecture to conditional forecasting (e.g., "given the last 24 hours, generate the next 12") would be a logical and highly valuable next step for the industry.
Summary updated