Abstract
Time series anomaly detection is a critical task in various domains, typically framed as a reconstruction problem using Recurrent Autoencoders (RAEs). However, standard RAEs suffer from sequential error accumulation and a tendency to overfit to local noise. This paper presents RAMED (Recurrent Autoencoder with Multiresolution Ensemble Decoding), a novel framework that reconstructs data at multiple temporal scales. By integrating coarse-to-fine information fusion and a multiresolution shape-forcing loss based on Soft Dynamic Time Warping (sDTW), RAMED effectively captures global structural patterns while mitigating drift. Experimental results on nine real-world datasets demonstrate that RAMED consistently outperforms existing state-of-the-art methods.
Introduction
Time series anomaly detection often relies on learning the underlying distribution of "normal" data. Models like Recurrent Autoencoders (RAEs) are trained to compress and reconstruct normal sequences; high reconstruction errors in unseen data then serve as indicators of anomalies. Despite their popularity, standard RAEs face two significant hurdles. First, error accumulation occurs because RNN decoders generate sequences step-by-step; a minor deviation at the start of a long sequence can snowball, leading to poor reconstructions of normal data. Second, standard Mean Squared Error (MSE) loss encourages overfitting to local noise, forcing the model to memorize insignificant fluctuations rather than learning the essential structural "shape" of the signal.
Methodology
RAMED addresses these challenges through three primary innovations in its decoding stage:
- Multiresolution Ensemble Decoding: Instead of a single decoder, RAMED employs an ensemble where each decoder operates at a different temporal resolution. A "coarse" decoder might represent a long sequence with only a few points to capture macro trends, while "finer" decoders provide increasing levels of detail.
- Coarse-to-Fine Fusion: To prevent the high-resolution decoders from drifting, information flows from coarser layers to finer ones. A fusion mechanism updates the hidden states of fine-grained decoders with context from their lower-resolution counterparts, ensuring the "big picture" guides local reconstruction.
- Multiresolution Shape-Forcing Loss: Beyond point-wise MSE, the authors utilize Soft Dynamic Time Warping (sDTW) as a loss function. sDTW allows for slight temporal shifts, encouraging the model to match the global geometric shape of the input rather than just exact point values.
Experimental Setup and Datasets
The model was rigorously evaluated on nine real-world benchmark datasets, including:
- ECG (6 datasets): Detecting anomalous heartbeats in electrocardiogram readings.
- 2D-gesture: Identifying failures in robotic "grab and holster" hand movements.
- Power-demand: Analyzing a year of electricity consumption records.
- Yahoo’s S5 Webscope: Real production traffic with manually labeled anomalies.
These datasets encompass both univariate and bivariate time series, providing a comprehensive test of the model's robustness.
Key Results
RAMED demonstrated superior performance against strong baselines, including standard RAEs, Recurrent Reconstructive Networks (RRN), and GAN-based models like BeatGAN. Across all metrics (AUROC, AUPRC, and F1-score) and all nine datasets, RAMED achieved an average rank of 1.00, indicating it was the top performer in every category. In contrast, the next best baseline, RAE-ensemble, achieved average ranks between 2.44 and 2.67.
Ablation studies confirmed that both the coarse-to-fine fusion and the shape-forcing loss are critical. Removing either component resulted in a significant performance drop. Sensitivity analysis (shown below) indicates that even a small weight for the shape-forcing loss ($\lambda$) significantly improves AUROC compared to a baseline without it ($\lambda=0$).
Conclusion and Future Work
RAMED effectively mitigates the drift and noise-overfitting issues inherent in standard recurrent reconstruction models. By forcing the ensemble to maintain a "map" of the macro-level signal, the model remains robust over long sequences. While the current implementation relies on RNNs, the authors suggest that this multiresolution approach is architecture-agnostic and could be extended to Transformers or other sequence models in the future. Future research may also focus on automating the tuning of hyperparameters like the resolution factor and fusion weights.
Summary updated