TL;DR
Real-world time series are full of gaps—sensors sleep, networks lag, and retail transactions pause overnight. Current forecasting models quietly cheat by assuming an oracle tells them when future data points will occur, leaving them only to guess what the values will be. This paper introduces Timeflies, a framework that treats missingness not as a defect to be patched, but as a vital signal, jointly predicting whether a future observation will exist alongside what value it will take.
What Problem Does This Paper Address?
Imagine forecasting server load or regional e-commerce sales. In reality, data doesn't arrive on a neat, uniform conveyor belt; it arrives in bursts, separated by silence.
Historically, time series forecasting handled this in two ways. Generation I ("impute-then-forecast") forced messy data onto a rigid grid by guessing the missing historical values—treating gaps purely as noise. Generation II ("irregular-aware" models like Neural ODEs) ditched the rigid grid to model continuous trajectories over arbitrary time intervals.
Yet, Generation II hides a major catch: perfect foresight. At test time, you have to hand the model the exact future timestamps where valid observations will happen. In real deployments, you rarely know if a sensor will trigger or a transaction will occur at 3:00 AM tomorrow. Knowing whether a measurement will exist is just as critical for decision-making as predicting its numerical value.
Methods
To drop the oracle assumption, the authors propose Timeflies, a dual-stream Transformer architecture that processes two tracks in parallel: a Value Stream (tracking numerical state evolution) and an Observation Stream (tracking binary observation masks and the time elapsed since the last missing event).
While standard building blocks like self-attention, residual fusion, and focal loss are used, the novelty lies in how the two streams are coupled across three stages:
- Reliability-Aware Patch Embedding: Normalization stats are computed only over observed points so zero-filled gaps don't skew the math. Time series are grouped into patches, and each patch gets a "reliability score" based on how dense its data is. Sparse, noisy patches are damped before feeding into the value stream.
- Observation-Guided Value Attention: Standard self-attention struggles when data density shifts wildly. Here, the attention map of the observation stream—weighted by patch reliability—is injected directly into the value stream's attention mechanism, steering focus toward trustworthy historical regions.
- Dual Prediction Head: Both streams merge to predict the probability of a future observation ($\hat{p}_{\text{obs}}$). That probability then acts as a soft gate to refine the final numerical forecast.
To evaluate both tasks simultaneously, the authors also introduce OVJE (Observation-Value Joint Entropy). It combines binary cross-entropy (did we correctly predict data existence?) with a symmetric relative error (sMAPE) evaluated on actual observed points.
Datasets
Synthetic random masking doesn't reflect how real systems fail or rest. To test realistic conditions, the authors built the Shadow benchmark, spanning 31 datasets across four missingness regimes—from 0% up to >89% missing data:
- 15 Public Datasets (sourced from GIFT-Eval), covering weather, cloud servers, energy, air quality, and retail (5-minute to monthly frequencies).
- 16 Proprietary Industrial Datasets from a live global e-commerce platform, recording hourly transaction volumes across 16 regions with strictly natural missingness (off-peak lulls, holidays, and pipeline outages).
Key Insights and Ideas
- Missingness is a feature, not a bug: Historical gaps rarely happen by pure coin flip; they encode system rhythms like sleep cycles or load thresholds. Decoding this rhythm helps anticipate future system states.
- Observability context helps pure regression—even without predicting future masks: When the authors stripped away the future-observability classification head and tested pure value forecasting, Timeflies still beat all baselines. Simply feeding historical observation patterns into the attention mechanism kept the model grounded.
- No magic bullets for random noise: Controlled experiments showed that predicting future observability boosts value accuracy only when the missingness mechanism actually carries state-relevant information. If data drops out completely at random (IID), predicting the mask won't magically improve your numerical forecast.
Key Results
Across 10 Transformer, Linear, and CNN baselines on the Shadow benchmark:
- Joint Forecasting: Timeflies achieved the best (lowest) OVJE score across all four sparsity regimes, beating the strongest overall baseline (FACT) by ~22.5% on average (e.g., dropping OVJE from 0.823 to 0.611 in High Missing, and 1.176 to 0.914 in Medium Missing).
- Observation Accuracy: In high-sparsity settings, Timeflies reached a ROC-AUC of 0.805 for predicting whether future observations would occur, well ahead of the runner-up OLinear (0.740).
- Value-Only Regression: Without the classification head, Timeflies still achieved the lowest MSE and MAE across every regime, peaking at a 17.1% MAE reduction over OLinear under medium missingness.
- Efficiency: Despite its dual-stream setup, Timeflies ran faster and used less memory than competing Transformer and CNN architectures.
Limitations and Future Work
The authors are commendably candid about where their approach hits a ceiling:
- Mechanism-Dependent Gains: Jointly supervising future observability does not universally lower MSE or MAE. Under random, value-independent missingness, or certain block-missingness shifts, simpler mask-aware baselines can match or outperform joint supervision on value error.
- Metric Trade-offs & Calibration: Ablating residual fusion improved MSE under high missingness even as it worsened MAE, AUC, and OVJE. Furthermore, while Focal Loss boosts discrimination (AUC) on imbalanced masks, it does not guarantee well-calibrated probabilities.
- Hyperparameter Tuning: Balancing the value loss and observation loss ($\eta$) depends heavily on the dataset's sparsity and requires tuning (with $\eta \in [1.0, 3.0]$ suggested as a starting point). Future work is invited to build upon this bridge between irregular observability and state regression.
Summary updated