Contrastive Time Series Forecasting with Anomalies

📅 2025-12-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Real-world time-series forecasting models struggle to distinguish the persistent impact of anomalous events from transient noise, leading to either excessive sensitivity to noise or failure to capture genuine distribution shifts. To address this, we propose an anomaly-aware robust forecasting framework featuring dual contrastive enhancement mechanisms—applied at both the input level and the input-output level—that jointly impose alignment losses in the latent and output spaces. This design synergistically optimizes model invariance to noise while preserving sensitivity to sustained anomalies. The method integrates contrastive learning, temporal data augmentation, and explicit distribution shift modeling. Extensive experiments on Traffic, Electricity, and real-world cash demand datasets demonstrate significant error reduction under anomalous conditions, without compromising accuracy during normal periods. To our knowledge, this is the first approach to simultaneously improve both anomaly discrimination capability and forecasting performance.

Technology Category

Application Category

📝 Abstract
Time series forecasting predicts future values from past data. In real-world settings, some anomalous events have lasting effects and influence the forecast, while others are short-lived and should be ignored. Standard forecasting models fail to make this distinction, often either overreacting to noise or missing persistent shifts. We propose Co-TSFA (Contrastive Time Series Forecasting with Anomalies), a regularization framework that learns when to ignore anomalies and when to respond. Co-TSFA generates input-only and input-output augmentations to model forecast-irrelevant and forecast-relevant anomalies, and introduces a latent-output alignment loss that ties representation changes to forecast changes. This encourages invariance to irrelevant perturbations while preserving sensitivity to meaningful distributional shifts. Experiments on the Traffic and Electricity benchmarks, as well as on a real-world cash-demand dataset, demonstrate that Co-TSFA improves performance under anomalous conditions while maintaining accuracy on normal data. An anonymized GitHub repository with the implementation of Co-TSFA is provided and will be made public upon acceptance.
Problem

Research questions and friction points this paper is trying to address.

Distinguishes lasting vs. short-lived anomalies in forecasting
Prevents overreaction to noise while detecting persistent shifts
Improves forecasting accuracy under anomalous conditions
Innovation

Methods, ideas, or system contributions that make the work stand out.

Contrastive regularization framework for anomaly distinction
Generates input-only and input-output augmentations for anomalies
Uses latent-output alignment loss for sensitivity adjustment
🔎 Similar Papers
No similar papers found.
J
Joel Ekstrand
Center for Applied Intelligent Systems Research, Halmstad University, Sweden
Z
Zahra Taghiyarrenani
Center for Applied Intelligent Systems Research, Halmstad University, Sweden
Slawomir Nowaczyk
Slawomir Nowaczyk
Professor, Center for Applied Intelligent Systems Research, Halmstad University
Artificial IntelligenceMachine LearningKnowledge Representation