Weighted Contrastive Learning for Anomaly-Aware Time-Series Forecasting

Joel Ekstrand, Tor Mattsson, Zahra Taghiyarrenani, Slawomir Nowaczyk, Jens Lundström +1 more
12/8/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Reliable forecasting of multivariate time series under anomalous conditions is crucial in applications such as ATM cash logistics, where sudden demand shifts can disrupt operations. Modern deep forecasters achieve high accuracy on normal data but often fail when distribution shifts occur. We propose Weighted Contrastive Adaptation (WECA), a Weighted contrastive objective that aligns normal and anomaly-augmented representations, preserving anomaly-relevant information while maintaining consistency under benign variations. Evaluations on a nationwide ATM transaction dataset with domain-informed anomaly injection show that WECA improves SMAPE on anomaly-affected data by 6.1 percentage points compared to a normally trained baseline, with negligible degradation on normal data. These results demonstrate that WECA enhances forecasting reliability under anomalies without sacrificing performance during regular operations.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ekstrand2025weighted,
  title  = {Weighted Contrastive Learning for Anomaly-Aware Time-Series Forecasting},
  author = {Joel Ekstrand and Tor Mattsson and Zahra Taghiyarrenani and Slawomir Nowaczyk and Jens Lundström and Mikael Lindén},
  year   = {2025},
  eprint = {2512.07569},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.07569v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.07569.svg)](https://codeofpaper.com/paper/2512.07569)

Discussion