Continuous-time Autoencoders for Regular and Irregular Time Series Imputation

Hyowon Wi, Yehjin Shin, Noseong Park

TL;DR

Researchers have developed a new model called the Continuous-time Autoencoder (CTA) that treats time series data as a continuous flow rather than a sequence of discrete steps. By leveraging Neural Controlled Differential Equations (NCDEs), CTA encodes irregular and incomplete data into a continuous "hidden path," allowing it to outperform state-of-the-art models in data imputation while using significantly fewer parameters.

What Problem Does This Paper Address?

Time series data—like stock prices, weather readings, or medical vitals—is rarely perfect. Sensors fail, networks drop, and observations happen at irregular intervals. Most machine learning models require "complete" data, so we use imputation to fill in the blanks.

Existing methods (like RNNs, GANs, or Transformers) usually treat time as a series of discrete "ticks." When data is missing or irregularly sampled, these models rely on heuristics like "time decay" or filling gaps with zeros, which introduces noise and ignores the underlying continuous nature of the physical world. The challenge is to create a model that naturally understands time as a continuum, handling gaps and irregular spacing without clunky workarounds.

Methods

The authors introduce the Continuous-time Autoencoder (CTA). Its core innovation is moving away from encoding data into a single "hidden vector" (a snapshot) and instead encoding it into a continuous hidden path $H(t)$.

Key technical components include:

  • Neural Controlled Differential Equations (NCDEs): Instead of updating a hidden state step-by-step, CTA uses NCDEs to model how the hidden state evolves continuously based on an interpolated path of the input data.
  • Continuous Variational Autoencoder: The model generalizes the Variational Autoencoder (VAE) framework to continuous time. It produces a continuous mean and standard deviation path, allowing for an "infinite" number of autoencoders at any point $t$.
  • Dual-Layer Architecture: Inspired by the success of multi-layer Transformers, the authors use two CTAs in a row. The first provides an initial imputation, and the second refines it using a learnable weighted sum.
  • Log-Variance Trick: To stabilize training, the model predicts the log-variance of the hidden path, which prevents the exponential functions in the ODE solver from exploding.

Datasets

The model was evaluated on four diverse real-world datasets:

  1. AirQuality: Hourly air pollutant concentrations.
  2. Stocks: Daily stock price data.
  3. Electricity: Hourly electricity consumption.
  4. Energy: Energy consumption of appliances in a low-energy house.

The authors tested these under challenging conditions, intentionally removing 30%, 50%, and 70% of the data to see how well the models could reconstruct the missing pieces.

Key Insights and Ideas

  • Path vs. Vector: Most autoencoders compress a whole sequence into one fixed-size vector. CTA creates a path that exists for every moment in time. This provides much higher "representation flexibility"—the model doesn't have to cram everything into one bottleneck; it can store information across the entire timeline.
  • Natural Irregularity: Because NCDEs operate on an interpolated continuous path of the input, they don't care if observations are 1 second or 1 hour apart. The math remains the same, making it natively suited for "irregular" time series.
  • Efficiency through Continuity: By solving an "Augmented ODE," the model can calculate the encoder, the decoder, and the loss function (KL Divergence) simultaneously in a single pass of an ODE solver.

Key Results

  • Superior Accuracy: CTA achieved the lowest Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) in almost all test cases across the four datasets, outperforming 19 baselines including the previous state-of-the-art, SAITS.
  • Massive Parameter Efficiency: In the "Stocks" and "Energy" datasets, CTA's model size was 2 to 3 orders of magnitude smaller than the leading Transformer-based models. For example, on the Stocks dataset, CTA used only 0.02 million parameters compared to SAITS's 12.64 million, while still delivering better accuracy.
  • Robustness to High Missing Rates: Even when 70% of the data was missing, CTA maintained high performance, whereas RNN-based methods like BRITS saw their error rates climb rapidly.

Limitations and Future Work

  • Interpolation Dependency: The model relies on an initial interpolation (like natural cubic splines) to create the continuous input path. If the initial interpolation is extremely poor, it could limit the NCDE's performance.
  • Computational Overhead of ODE Solvers: While parameter-efficient, solving ODEs can sometimes be more computationally intensive in terms of wall-clock time compared to simple discrete matrix multiplications.
  • Expansion to Other Tasks: The authors focused strictly on imputation. Future work could involve applying this continuous hidden path approach to time series classification, forecasting, or synthesis.

Summary updated

BibTeX
@inproceedings{wi2024continuous,
  author = {Hyowon Wi and Yehjin Shin and Noseong Park},
  title = {{Continuous-time Autoencoders for Regular and Irregular Time Series Imputation}},
  booktitle = {WSDM},
  year = {2024},
  doi = {10.1145/3616855.3635831},
}
Figure