RoseCDL: Robust and Scalable Convolutional Dictionary Learning for rare-event and anomaly detection

Jad Yehya, Mansour Benbakoura, Cédric Allain, Benoît Malézieux, Matthieu Kowalski, Thomas Moreau

TL;DR

This paper introduces ROSECDL, a novel Convolutional Dictionary Learning (CDL) algorithm designed to efficiently and robustly detect rare events and anomalies in large-scale signals. By combining stochastic windowing for scalability and inline outlier detection for robustness, ROSECDL significantly improves upon existing CDL methods, making them practical for real-world applications.

What Problem Does This Paper Address?

Detecting rare events and anomalies is crucial across many scientific domains, from astronomy to healthcare. A common approach is to first identify recurring "normal" patterns and then flag deviations from these patterns as anomalies. Convolutional Dictionary Learning (CDL) is a powerful technique for learning these local patterns. However, traditional CDL methods struggle with two major challenges: they are computationally expensive, making them impractical for large datasets, and they are highly sensitive to outliers, which can lead to misidentification of patterns and poor anomaly detection. This paper aims to overcome these limitations by developing a CDL algorithm that is both scalable and robust.

Methods

ROSECDL introduces two key innovations to address the limitations of traditional CDL:

  • Stochastic Windowing: Instead of processing entire long signals at once, ROSECDL processes the signal in smaller, randomly sampled windows. This significantly reduces computational load, making the algorithm scalable to large datasets. The dictionary is updated based on local computations from these windows.
  • Inline Outlier Detection: To enhance robustness, ROSECDL incorporates an outlier detection mechanism directly into the training process. It leverages the local reconstruction error: patches of the signal that are poorly explained by the learned dictionary are flagged as potential outliers. These outliers are then excluded from the loss calculation during dictionary updates, preventing them from negatively impacting the learning of common patterns. This same mechanism can be used at inference time to identify anomalies.

The algorithm uses an alternating minimization scheme, updating the dictionary and approximate sparse codes iteratively. For sparse coding, it employs an approximate method (NFISTA) within the stochastic windows, and for dictionary updates, it uses a stochastic gradient descent approach with a line search for step size optimization.

Datasets

The paper evaluates ROSECDL on a variety of datasets, including:

  • Simulated 1D multivariate signals: Used for testing scalability and the influence of regularization.
  • 2D grayscale images: Used for evaluating scalability and dictionary recovery.
  • Physionet Apnea-ECG dataset: A real-world biomedical dataset used for demonstrating robustness and anomaly detection.
  • ROSE+Z dataset: A semi-synthetic dataset of images created by the authors to specifically test robustness to rare events and outliers.
  • TSB-UAD and TSB-AD benchmarks: Standard datasets for time-series anomaly detection, including both univariate and multivariate cases (e.g., ECG, SVDB, Daphnet, MITDB, Dodgers, MSL, SMAP).

Key Insights and Ideas

  • Reframing CDL: The paper proposes reframing CDL not just as a reconstruction problem, but as a method for estimating the distribution of local signal patterns. This perspective naturally leads to anomaly detection via deviations from this learned distribution.
  • Stochasticity as a Feature: Rather than a limitation, the stochastic nature introduced by windowing is leveraged to improve scalability and enable efficient training on massive datasets.
  • Reconstruction Error as an Anomaly Signal: The core idea that anomalies will have higher reconstruction errors than normal patterns is fundamental. ROSECDL exploits this by using it both to improve training (by trimming outliers) and for detection (by flagging high-error regions).
  • Robustness through Trimming: The inline outlier detection effectively "trims" the influence of anomalous patches during training, allowing the algorithm to learn the common patterns more accurately, even in the presence of significant noise or rare events.

Key Results

  • Scalability: ROSECDL demonstrates sublinear scaling with signal length and significantly outperforms AlphaCSC, being over two orders of magnitude faster than deep baselines on large datasets.
  • Robustness: Experiments show that ROSECDL, with its inline outlier detection, is significantly more robust to outliers and rare events compared to methods without this module. This leads to improved dictionary recovery and more stable training.
  • Anomaly Detection Performance: ROSECDL achieves competitive or superior AUC-PR scores on pattern anomaly datasets, validating its core principle of leveraging local structures. It performs well on datasets with clear patterns but remains competitive on others.
  • Dictionary Recovery: ROSECDL matches or surpasses the dictionary recovery performance of DeepCDL, indicating high-quality pattern learning.

Limitations and Future Work

  • Non-Convex Objective: Like most CDL methods, ROSECDL relies on a non-convex objective function, meaning convergence to a global optimum is not guaranteed. However, the paper notes that the optimization scheme builds on established principles with observed convergence to meaningful local minima.
  • Conservative Trimming: The trimming strategy, while robust, can be conservative, potentially flagging many segments as atypical. This makes ROSECDL better suited for robust representation learning and rare event detection than for high-precision anomaly scoring.
  • Future Work: The paper suggests that the reframing of CDL as pattern distribution estimation provides a principled foundation for anomaly and rare-event detection, implying further research in this direction. The authors also highlight the potential for extending this approach to more complex signal types and anomaly scenarios.

Summary updated

BibTeX
@inproceedings{yehya2026rosecdl,
  author = {Jad Yehya and Mansour Benbakoura and Cédric Allain and Benoît Malézieux and Matthieu Kowalski and Thomas Moreau},
  title = {{RoseCDL: Robust and Scalable Convolutional Dictionary Learning for rare-event and anomaly detection}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=4XMkOFxxfb},
}
Figure