TS2Vec-Ensemble: An Enhanced Self-Supervised Framework for Time Series Forecasting

Ganeshan Niroshan, Uthayasanker ThayasivamarXiv 2025 · DOI

Introduction

Self-supervised learning (SSL) has fundamentally changed the landscape of representation learning across various domains. In the context of time series analysis, models like TS2Vec have established a new state-of-the-art by utilizing contrastive learning to distinguish between different data segments. However, a significant challenge remains: TS2Vec’s primary objective is instance discrimination, which excels at identifying unique non-linear patterns but often overlooks deterministic components such as seasonality and trends.

In long-term forecasting, these periodic cycles—daily or weekly rhythms—are frequently the most reliable predictors. This creates a "capability gap" where purely contrastive models struggle to capture the very features that are critical for accurate long-horizon predictions. TS2Vec-Ensemble addresses this by adaptively fusing implicitly learned dynamics with explicitly engineered temporal features.

Methodology

The TS2Vec-Ensemble framework operates through a three-phase pipeline designed to combine deep representation learning with classical feature engineering.

1. Representation Learning

The process begins with a pre-trained TS2Vec encoder. This encoder utilizes dilated convolutions and a hierarchical contrastive loss to generate high-dimensional embeddings. These embeddings are designed to be scale-invariant, capturing complex dynamics across multiple temporal resolutions.

The TS2Vec architecture employs hierarchical contrasting to learn robust representations across different time scales.

2. Dual-Feature Engineering

For each timestamp $t$, the framework constructs two distinct feature sets:

  • Original Features: The raw embeddings $z_t$ produced by the TS2Vec encoder.
  • Enhanced Features: The original embeddings concatenated with engineered sinusoidal features ($sin(2\pi t/24)$ and $cos(2\pi t/24)$). These features act as an explicit "clock," providing the model with a direct signal of periodic seasonality.

3. Adaptive Ensemble

The core innovation lies in the adaptive weighting of two parallel Ridge regression heads. Model A focuses on the learned dynamics (Original Features), while Model B focuses on seasonality (Enhanced Features).

Rather than a simple average, the framework employs a horizon-adaptive weighting scheme. By optimizing weights $(\omega_1, \omega_2)$ on a validation set for each specific forecast horizon $H$, the model can prioritize "intuition" (learned dynamics) for short-term fluctuations and "the calendar" (seasonality) for long-term stability.

Experimental Results

The framework was evaluated using the Electricity Transformer Temperature (ETT) datasets (ETTh1, ETTh2, and ETTm1), which are standard benchmarks for Long-Term Time Series Forecasting (LTSF).

Performance Analysis

TS2Vec-Ensemble consistently outperforms the standard TS2Vec baseline and other prominent models such as Informer, LogTrans, and N-BEATS. As shown in the comparison below, the ensemble approach provides significant gains, particularly in long-horizon scenarios.

Comparison of TS2Vec-Ensemble against the baseline and other hybrid approaches across different horizons.

Key observations from the results include:

  • Univariate Forecasting: The model achieved an average MSE of 0.110, a notable improvement over the baseline's 0.116. On the ETTm1 dataset at a 672-hour horizon, the improvement in MSE reached 16%.
  • Multivariate Forecasting: The gains were even more pronounced, with an average MSE of 0.962 compared to the baseline's 0.994.
  • The Contrastive-Generative Conflict: Interestingly, adding a Masked Signal Modeling (MSM) objective—a common generative SSL technique—actually degraded performance. This suggests that forcing the encoder to reconstruct local noise conflicts with the goal of learning global, scale-invariant features.

Conclusion and Future Work

TS2Vec-Ensemble demonstrates that rather than forcing a self-supervised encoder to learn seasonality through complex loss functions, it is more effective to provide these deterministic priors directly to the prediction head. The horizon-adaptive ensemble allows the model to maintain stability even as the forecast horizon extends.

Future research will focus on reducing the computational overhead of the grid-search for optimal weights and exploring end-to-end optimization of the entire pipeline. Additionally, the authors intend to validate the framework across a broader range of domains, including finance and meteorology, to further establish its generalizability.

Summary updated

BibTeX
@misc{niroshan2025ts,
  author = {Ganeshan Niroshan and Uthayasanker Thayasivam},
  title = {{TS2Vec-Ensemble: An Enhanced Self-Supervised Framework for Time Series Forecasting}},
  year = {2025},
  eprint = {2511.22395},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.22395},
}
Figure