Abstract
We introduce a novel modeling approach for time series imputation and forecasting, tailored to address the challenges often encountered in real-world data, such as irregular samples, missing data, or unaligned measurements from multiple sensors. Our method relies on a continuous-time-dependent model of the series' evolution dynamics. It leverages adaptations of conditional, implicit neural representations for sequential data. A modulation mechanism, driven by a meta-learning algorithm, allows adaptation to unseen samples and extrapolation beyond observed time-windows for long-term predictions. The model provides a highly flexible and unified framework for imputation and forecasting tasks across a wide range of challenging scenarios. It achieves state-of-the-art performance on classical benchmarks and outperforms alternative time-continuous models.
Introduction
Real-world sensor data often deviates from the "regular grid" assumption required by most modern time series models, such as Transformers. Sensors frequently fail, operate on different sampling frequencies, or experience intermittent connectivity, leading to irregular intervals and missing values. While continuous-time models like Neural ODEs or Gaussian Processes exist, they often underperform compared to discrete models on standard benchmarks. This work introduces TimeFlow, a framework that treats time series as continuous functions $f(t)$, bridging the gap between the flexibility of continuous modeling and the performance of state-of-the-art discrete architectures.
Methodology
TimeFlow represents a time series as a continuous function using Implicit Neural Representations (INRs). The architecture consists of three primary components:
- INR-based Continuous Functions: The core is a Multi-Layer Perceptron (MLP) that maps a time coordinate $t$ to an output value $x_t$. To capture the high-frequency periodicities common in time series, the model employs Fourier Features to embed the temporal input before it enters the MLP.
- Conditional Shift Modulations: To generalize across diverse time series within a dataset, TimeFlow uses a "shift modulation" mechanism. A per-sample latent code $z^{(j)}$ is processed by a linear hypernetwork $h_w$ to adjust the biases of the main INR. This allows the model to adapt to the specific "shape" of an individual series without altering global parameters.
- Meta-Learning and Auto-Decoding: The model is trained using a meta-learning framework. In the inner loop, the latent code $z^{(j)}$ is optimized via a few gradient descent steps (auto-decoding) to fit observed data points. In the outer loop, the global weights of the INR ($\theta$) and the hypernetwork ($w$) are updated to ensure the model can rapidly adapt to new, unseen series.
Experiments and Results
The model was evaluated on three large-scale multivariate datasets: Electricity (hourly load for 321 customers), Traffic (hourly road occupancy at 862 locations), and Solar (10-minute interval power production). The evaluation focused on two primary tasks: data imputation (filling missing values) and long-term forecasting.
TimeFlow demonstrates superior performance in imputation, particularly in sparse data scenarios. When only 5% of data is observed ($\tau = 0.05$), TimeFlow achieves relative improvements of 15% to 50% over the best-performing baselines, including both discrete (e.g., SAITS, BRITS) and continuous (e.g., mTAN, DeepTime) methods.
In forecasting tasks on regular grids, TimeFlow performs on par with state-of-the-art discrete models like PatchTST and outperforms other continuous models like DeepTime by approximately 3.7%. Notably, TimeFlow maintains stable performance even when the look-back window is missing 90% of its data, a scenario where discrete models typically struggle.
Discussion and Limitations
By modeling time continuously, TimeFlow unifies imputation and forecasting into a single task: evaluating $f(t)$ at any desired coordinate. The use of Fourier features and shift modulation provides a balance between expressive power and computational efficiency.
However, the model has limitations. The auto-decoding process at inference time makes it significantly slower (10x to 100x) than simple forward-pass models. Additionally, it currently assumes a degree of homogeneity within the dataset and requires a substantial number of training samples to learn effective meta-parameters. Future work will focus on improving inference efficiency and extending the model to more heterogeneous data sources.
Summary updated