CLaST: Context-aware Contrastive VAE for Probabilistic Time Series Forecasting

Alexander Marusov, Dmitry Anikin, Petr Sokerin, Vitaliy Pozdnyakov, Ilya Kuleshov, Alexey ZaytsevarXiv 2026

TL;DR

CLaST (Context-aware Contrastive VAE) is a novel generative framework for probabilistic multivariate time series forecasting. By replacing unstable neural mutual information estimators with a theoretically grounded contrastive loss function, CLaST forces latent embeddings to preserve the "contextual similarity" of the input data, delivering massive performance gains in both short- and long-term forecasting benchmarks.

What Problem Does This Paper Address?

Probabilistic time series forecasting is vital for industries ranging from finance to energy management because it predicts not just future values, but also the uncertainty around them. Deep generative models, particularly Variational Autoencoders (VAEs), have become popular tools for this task.

However, standard VAEs often suffer from "latent collapse," where the learned representations become overly smooth and lose track of complex temporal dynamics. To fix this, previous state-of-the-art models (like LaST) used neural Mutual Information (MI) estimators to maximize the information trapped in the latent space. Unfortunately, these MI estimators are notoriously unstable, computationally heavy, and slow to converge in high-dimensional settings.

Furthermore, existing models struggle to capture contextual similarity—the idea that two timestamps might share a semantic regime (like two consecutive hot summer days) even if their raw statistical correlation varies.

Methods

To solve these issues, the authors introduce CLaST (Contrastive LaST), which completely ditches traditional MI estimation in favor of a contrastive alignment strategy.

The core methodology relies on three main pillars:

  1. The LINTS Process Assumption: The authors define a class of time series called Lag-Invariant Non-stationary Time Series (LINTS), where the covariance between two observations depends strictly on their temporal lag ($\delta$), while a time-varying mean accounts for real-world non-stationarity.
  2. Ground Truth Similarity Matrix ($G$): Using Bayesian decision theory, the authors mathematically prove that under a LINTS process, the optimal way to map raw data correlations to a similarity space is via a logistic (sigmoid) function. This matrix defines how close observations should be in the latent space.
  3. Estimated Similarity Matrix ($\hat{G}$): The model infers its own similarity matrix from the learned latent embeddings. By framing this as a Laplacian estimation problem from graph signal processing, the authors derive a clean, closed-form solution for $\hat{G}$ based on pairwise distances in the embedding space.

The final CLaST objective minimizes the discrepancy (Frobenius norm) between the ground truth matrix $G$ and the estimated matrix $\hat{G}$ for both the trend and seasonal latent components independently.

Fig. 1: Connection between the original feature space and the contextual similarity space. In the feature space, xt is the observation at the current time step, and xt+1 and xt+2 are the inputs at the subsequent time steps. In our formulation, the correlation coefficient r between normalized observations corresponds to the cosine of the angle between them (r = cos θ). Correlations are mapped to contextual similarity scores via a sigmoid with a lower bound smin, yielding a smooth notion of contextual proximity.

Datasets

The authors evaluated CLaST across nine widely recognized multivariate time series benchmarks spanning multiple domains:

  • ETT (ETTh1, ETTh2, ETTm1, ETTm2): Electricity Transformer Temperature datasets (hourly and 15-minute resolutions).
  • Electricity & Traffic: High-dimensional datasets tracking hourly consumption and road occupancy.
  • Weather: Climatological recordings.
  • Solar & ERCOT: Energy-domain datasets used specifically for long-term forecasting evaluations.

Key Insights and Ideas

  • Sigmoid is Mathematically Optimal: Instead of guessing a similarity heuristic (like ReLU or absolute value), the authors proved that a sigmoid mapping with a lower bound ($s_{min}$) is the Bayes-optimal posterior mapping for lag-dependent data.
  • Preventing Latent Collapse: By forcing the latent space to mirror the structural patterns of the input sequence, CLaST prevents the encoder from outputting homogeneous embeddings. As shown in the paper's analysis, CLaST yields a highly distinct, sharp diagonal pattern in its embedding similarity matrix compared to the blurry, overly smooth matrix produced by LaST.
Embedding similarity matrix comparison

Key Results

CLaST was tested against strong baselines including PatchTST, TSDiff, TFM, and $K^2$VAE using two primary metrics: CRPS (for uncertainty calibration) and NMAE (for point accuracy).

  • Short-Term Forecasting ($L=24$): CLaST consistently outperformed the competition on the majority of datasets, achieving relative improvements of up to 16.4% in CRPS and 14.4% in NMAE over the second-best method.
  • Long-Term Forecasting ($L=720$): The contrastive regularization shined brightest here, outperforming the second-best method by up to 48.6% in CRPS and 25.1% in NMAE on challenging datasets like ETTh2.

Limitations and Future Work

  • Stationary Covariance Assumption: The LINTS formulation assumes that while the mean changes over time, the underlying covariance structure depends only on the temporal lag, not absolute time. This might not hold true during sudden structural breaks or regime shifts (e.g., a sudden market crash).
  • Computational Complexity: Constructing full pairwise similarity matrices introduces an $O(N^2)$ complexity relative to the context window length ($N$). While the authors note that this only makes CLaST ~28% slower per epoch than LaST in practice, scaling to extremely long context windows could become a bottleneck.

Summary updated

BibTeX
@misc{marusov2026clast,
  author = {Alexander Marusov and Dmitry Anikin and Petr Sokerin and Vitaliy Pozdnyakov and Ilya Kuleshov and Alexey Zaytsev},
  title = {{CLaST: Context-aware Contrastive VAE for Probabilistic Time Series Forecasting}},
  year = {2026},
  eprint = {2608.20025},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.20025},
}
Figure