Introduction
Detecting anomalies in multivariate time series data—such as sensor readings from complex industrial systems or space missions—presents a significant challenge. Traditional models often struggle with overlapping patterns like trends and seasonal cycles. Furthermore, many existing approaches fall into the "MSE Trap," where optimizing for Mean Squared Error (MSE) makes the model overly sensitive to noise, hindering its ability to distinguish true anomalies from background fluctuations.
To address these issues, this paper introduces TransDe (Transformer based on Decomposition). TransDe is a novel framework that combines signal decomposition, multi-scale patching, and a unique contrastive learning strategy to identify anomalies robustly without relying on noise-sensitive error metrics.
The TransDe Architecture
The TransDe framework processes time series data through a structured pipeline designed to simplify complex signals and capture multi-scale dependencies.
1. Signal Decomposition
Before entering the neural network, the input signal is processed using a Hodrick-Prescott (HP) filter. This step decomposes the time series into two distinct components: a smooth trend and a fluctuating cyclical component. By isolating these, the model can focus on specific patterns without the interference of long-term shifts.
2. Multi-Scale Patching and Dual-View Attention
Rather than analyzing individual time points, TransDe breaks the sequences into "patches" of varying lengths. This multi-scale approach allows the model to observe patterns at different granularities. For each patch, the model calculates two types of representations:
- Intra-patch: Captures relationships within a single patch.
- Inter-patch: Captures relationships between different patches.
3. Asynchronous Contrastive Learning
The core innovation of TransDe is its training strategy. Instead of requiring difficult-to-obtain negative samples, the model aligns the Intra-patch and Inter-patch views of the same normal data. It utilizes KL Divergence as a similarity metric and employs a stop-gradient operation to prevent representation collapse, ensuring the model learns meaningful features.
Experimental Evaluation
The model was rigorously evaluated against 12 baseline methods (including AnomalyTrans and TranAD) across five real-world benchmarks:
- MSL & SMAP: NASA rover and satellite sensor data.
- PSM: eBay server metrics.
- SMD: Industrial server machine data.
- SWaT: Secure Water Treatment testbed data.
Key Results and Insights
TransDe demonstrated state-of-the-art performance, achieving the highest F1 scores on four out of five datasets. Notable improvements included a 3.82% increase on SWaT and a 0.71% increase on PSM compared to the strongest baselines.
Key takeaways from the research include:
- Decomposition Efficiency: Isolating trends from cycles significantly reduces modeling complexity.
- Contrastive Learning without Negatives: The stop-gradient strategy allows for effective training using only positive pairs, reducing computational overhead.
- Symmetry Matters: Symmetrical KL divergence proved more effective than asymmetrical versions for capturing discriminative features.
Conclusion and Future Work
While TransDe excels at identifying pattern-based anomalies, it faced challenges with the SMD dataset, which contains many "single-point anomalies" that lack distinctive temporal patterns. Future research will explore incorporating frequency-domain information (such as Fourier transforms) and validating the framework across a broader range of industrial sectors to improve its generalization to diverse anomaly types.
Summary updated