Contrastive Time Series Forecasting with Anomalies
Ekstrand, Joel, Taghiyarrenani, Zahra, Nowaczyk, Slawomir
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-TSF A (Co ntrastive T ime-Series F orecasting with A nomalies), 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 at this anonymized GitHub repository and will be made public upon acceptance. Sequence 1 shows an input-only anomaly that should not affect the forecast, whereas Sequence 2 shows an input anomaly that persists into the output (forecast-relevant).
Dec-15-2025
- Country:
- Europe > Sweden
- Halland County > Halmstad (0.04)
- North America
- Trinidad and Tobago > Trinidad
- United States > California (0.04)
- Europe > Sweden
- Genre:
- Research Report (1.00)
- Technology: