Abstract
Detecting anomalies in multi-variate time series (MVTS) data is critical for industrial monitoring but remains challenging due to complex temporal dependencies and inter-variable correlations. This paper introduces TRL-CPC (Time-series Representational Learning through Contrastive Predictive Coding), a self-supervised framework that learns robust system representations by predicting future states. By contrasting these predictions against actual observations using the InfoNCE loss, TRL-CPC effectively captures the "normal" rhythm of high-dimensional sensor data, allowing for precise anomaly detection.
Introduction
In modern industrial environments, such as water treatment plants or manufacturing floors, hundreds of sensors report data simultaneously. Identifying failures or cyber-attacks in these Multi-variate Time Series (MVTS) is difficult because a "normal" state is defined by both temporal patterns (history) and spatial correlations (relationships between sensors).
Traditional deep learning models often struggle to scale or fail to outperform simple univariate autoencoders (UAE). TRL-CPC addresses this by using predictive coding as a proxy task: a model that accurately predicts the near future must inherently understand the underlying system dynamics. When the system enters an anomalous state, the model's predictive capability drops, providing a clear signal for detection.
Methodology: TRL-CPC Architecture
The TRL-CPC framework employs a three-part architecture designed to compress and model high-dimensional sensor data:
- Encoder ($E$): Maps raw sensor data into a lower-dimensional latent space.
- Auto-regressor ($AR$): Processes a sequence of latent points to produce a context vector summarizing recent history.
- Prediction Network ($P$): Generates predicted latent representations for future time steps based on the context vector.
The core of the learning process is Contrastive Learning via the InfoNCE loss. Instead of reconstructing noisy raw values, the model is trained to maximize the similarity between its predicted future state and the actual future state (positive pair), while minimizing similarity with random states from other time windows (negative pairs). For anomaly scoring, a Gaussian distribution is fitted to the latent representations of normal data; points with low likelihood during testing are flagged as anomalies.
Experimental Evaluation
The model was evaluated on three benchmark datasets representing different industrial scales: Damadics (32 channels), WADI (123 channels), and SKAB (8 channels). These datasets provide a rigorous test for the model's ability to handle varying dimensionality and anomaly types.
Comparative Results
TRL-CPC demonstrated strong performance, particularly in reclaiming the lead for multivariate methods over univariate baselines in complex scenarios.
On the SKAB dataset, TRL-CPC achieved an F1 score of 0.70, significantly beating OmniAnomaly (0.46). In the Damadics benchmark, it tied for the top performance with an F1 score of 0.60. While it trailed the UAE baseline on the WADI dataset (0.25 vs 0.35), it remained competitive with other sophisticated multivariate models like USAD and OmniAnomaly.
Discussion and Limitations
A key insight from this work is that joint optimization of the encoder and auto-regressor ensures the latent space is specifically tuned for temporal trends. However, the authors note a limitation regarding "Constant-to-Fluctuating" transitions. If a sensor remains static during training, the model expects zero variance and may incorrectly flag normal fluctuations as anomalies during testing. Future research will focus on making the representation learning more robust to these "cold-start" sensor behaviors.
Summary updated