TL;DR
Filling in missing gaps in continuous time series data usually means either stuffing awkward placeholder zeros into your network or waiting forever for a continuous diffusion model to denoise Gaussian static. This paper flips the script by turning continuous numbers into discrete tokens, allowing a Masked Diffusion model to treat missing sensor readings just like blanked-out words in a sentence. The result is a model that predicts missing values directly, understands uncertainty, and runs orders of magnitude faster than standard diffusion approaches.
What Problem Does This Paper Address?
Real-world sensor data is messy—wires fray, packets drop, and ICU monitors get unplugged. Recovering those missing values (imputation) is critical, yet current deep learning methods stumble over two subtle mismatches between how models are built and what imputation actually asks for:
- The Representation Problem: How do you tell a neural network that a data point is missing? Usually, we feed in a placeholder value (like
0.0) alongside a binary mask, or we use an attention mask to hide the gap. If you use a placeholder, it lives in the exact same mathematical space as a real0.0, forcing the network to spend capacity learning to ignore it. If you use an attention mask to hide the missing spot, the rest of the sequence becomes blind to where the gaps are and how big they are. - The Objective Problem: Continuous diffusion models (like CSDI) generate great probabilistic imputations, but they work by corrupting data with Gaussian noise and learning to denoise it step-by-step. You only get the actual imputed values after integrating a long, slow chain of reverse steps.
In Natural Language Processing, Masked Diffusion Models (MDMs) replace missing words with a dedicated [MASK] token and predict the clean words directly in one shot. That sounds tailor-made for imputation—except time series are continuous and ordered (3.6 is close to 3.7, not an arbitrary category), whereas text tokens are discrete. Naive rounding destroys precision and severs numerical order.
Methods
To bridge continuous signals and discrete masked diffusion, the authors introduce MDTIM (Masked Diffusion Time-series Imputation Model). While the backbone relies on a standard Diffusion Transformer (DiT) alternating attention across time and sensor channels, the magic lies in how continuous data enters and exits this discrete engine:
- Stochastic Discretization (New): After normalizing a window using only observed values, continuous numbers are mapped onto a grid of $K=40$ bins. Crucially, before rounding to the nearest integer token, the authors inject uniform random noise $\epsilon \sim \mathcal{U}(-0.5, 0.5)$. A value of
3.6becomes token460% of the time and token340% of the time—preserving exact continuous precision in expectation. - Structural
[MASK]Token: Missing entries get mapped to token0([MASK]), giving them an embedding completely orthogonal to valid numbers while allowing observed points to "see" the shape of the gaps via attention. - Ordinal-Aware Soft Labeling (New): Standard classification treats guessing bin
4vs. bin30as equally wrong when the answer is3. MDTIM replaces hard one-hot targets with a truncated Gaussian distribution centered on the true token, teaching the network numerical proximity. - Spectral Consistency & Expectation Decoding: During training, an auxiliary Fast Fourier Transform (FFT) loss keeps global frequencies aligned. At inference, rather than picking the single most likely bin (
argmax), MDTIM averages predictions across $M=10$ noise realizations and computes the probability-weighted expected value over all bin centers to reconstruct smooth continuous numbers.
Datasets
No new datasets are introduced; the authors evaluate on five established benchmarks spanning diverse domains:
- Standard Multivariate Benchmarks: Energy, ETTh (electricity transformer temperature), and Weather, plus a synthetic periodic Sine dataset. Missingness is simulated at 30%, 50%, and 70% rates using both random (Uniform) drops and contiguous (Geometric) blackouts.
- Real-World Sparse Clinical Data: PhysioNet 2012, an irregular ICU dataset where ~80% of data is naturally missing, tested by masking additional entries on top.
Key Insights and Ideas
- "Seeing" the gap matters: In a clever ablation, replacing the
[MASK]token with an attention mask (hiding missing keys from observed queries) degraded performance across every single dataset. Knowing where sensors went dark—and for how long—helps observed points contextualize the signal. - Well-calibrated uncertainty for free: Because a single forward pass outputs a full probability distribution over value bins, MDTIM naturally gauges its own confidence. When multiple correlated channels drop out simultaneously, its predicted variance widens; when neighboring channels remain intact, uncertainty shrinks.
- Expectation beats quantization: Computing the expected value over output probabilities slashes reconstruction error compared to picking the top bin, effectively recovering sub-bin continuous resolution from a modest 40-token vocabulary.
Key Results
Tested against 19 deterministic and generative baselines, MDTIM achieves state-of-the-art Mean Absolute Error (MAE) across nearly all benchmarks:
- Accuracy & Speed: On the Energy dataset (Large scale), MDTIM achieves an MAE of 0.044 (30% missing) in 12.63 seconds, whereas the continuous diffusion baseline CSDI scores 0.074 and takes 894.76 seconds (~70x slower). Even a tiny 0.65M-parameter MDTIM (4.05s inference, 0.046 MAE) outperforms an 88.24M-parameter SAITS Transformer (0.177 MAE).
- Real-World Irregularity: On PhysioNet 2012 (30% uniform mask), MDTIM hits 0.236 MAE, beating SAITS (0.283) and frequency-heavy diffusion models like FGTI (0.338), which struggle when irregular sampling breaks dominant spectral patterns.
- Downstream Impact: Feeding MDTIM's imputed Energy data into a frozen PatchTST forecaster cuts downstream prediction error by 19–26% over SAITS and 16–19% over CSDI.
Limitations and Future Work
- Per-sample quantization loss: While Stochastic Discretization is unbiased in expectation, any single tokenization pass is still lossy, and the fixed vocabulary size ($K=40$) isn't adapted dynamically to local data distributions.
- Fragile spectral assumptions: The FFT spectral consistency loss assumes stable underlying frequencies. On ultra-sparse, irregular datasets like PhysioNet (80% missing), the authors had to manually turn it off ($\lambda=0$). Adaptive frequency weighting is left for future work.
- Parameter scaling with channels: Giving every variable its own embedding table scales parameters linearly with channel count, $O(CKD)$, which could get heavy on datasets with thousands of sensors.
Summary updated