RoseCDL: Robust Convolutional Dictionary Learning
- RoseCDL is a scalable convolutional dictionary learning method that uses stochastic windowing and trimming to efficiently process large, long signals.
- It integrates inline outlier detection by excluding high-error patches, thereby isolating rare events while preserving common signal patterns.
- The algorithm leverages stochastic line search and FFT-based convolutions to achieve robust and sublinear scaling compared to conventional methods.
RoseCDL is a scalable and robust Convolutional Dictionary Learning (CDL) algorithm designed for unsupervised rare event detection in long signals, introduced to address the high computational cost and sensitivity to artifacts and outliers that limit CDL in this setting (Yehya et al., 9 Sep 2025). It combines stochastic windowing for efficient training on large datasets with inline outlier detection to enhance robustness and isolate anomalous patterns, thereby reframing CDL as a practical tool for event discovery and characterization in real-world signals and extending its role beyond traditional tasks like compression or denoising (Yehya et al., 9 Sep 2025).
1. Formal problem setting
RoseCDL is formulated for a long signal , or in the multichannel case, with a convolutional sparse representation
where is a dictionary of atoms , each satisfying , and are the activation maps (Yehya et al., 9 Sep 2025). The canonical single-signal CDL objective is
When multiple long signals are available, or when one signal is very long, the population-risk form is
In the rare-event detection setting, the signal model is written as
0
where 1 is a common pattern, 2 is a rare pattern occurring with low probability 3, and 4 is unpredictable “outlier” noise (Yehya et al., 9 Sep 2025). The goal is twofold: recover the common dictionary atom 5 robustly in the presence of 6 and 7, and detect, and later learn, the rare events 8.
This formulation places RoseCDL at the intersection of sparse coding, convolutional representation learning, and unsupervised anomaly detection. A plausible implication is that the method is intended not merely to fit background structure, but to use reconstruction failure itself as a signal for rare-event isolation.
2. Optimization objective and robust trimming
RoseCDL departs from expected-risk CDL by stochastic windowing and by “trimming” high-error patches (Yehya et al., 9 Sep 2025). Let 9 be length-0 windows sampled uniformly, with overlap, from the full signal. The patch-level surrogate objective is
1
To guard against outliers and rare events during training, RoseCDL computes for each patch its reconstruction cost
2
forms the set of “inliers”
3
where 4 trims the top 5 of errors, and optimizes the trimmed loss
6
The central operational idea is that local reconstruction errors are used inline during training, rather than only in post hoc anomaly scoring. In this design, high-error patches are simultaneously a nuisance for dictionary estimation and a candidate signal of rare or anomalous structure. This suggests that RoseCDL does not separate representation learning and event detection into two independent stages; instead, it couples them through trimming.
A common misconception is that robustness in CDL can be treated as a secondary implementation detail. In RoseCDL, robustness is embedded directly in the objective by excluding the top 7 of high-error patches from the learning signal (Yehya et al., 9 Sep 2025). The paper’s framing indicates that this is not only a defense against artifacts, but also a mechanism for isolating rare patterns.
3. Algorithmic structure
The RoseCDL algorithm takes as input the signal(s) 8, atom length 9, window size 0, batch of windows 1, sparse-coder iterations 2, regularizer 3, and trim rate 4 (Yehya et al., 9 Sep 2025). Starting from an initialization 5, each iteration performs four steps.
First, it samples 6 windows 7. Second, for each window 8, it computes an approximate sparse code
9
via 0 steps of FISTA: 1 It then computes reconstruction errors 2 for each patch in 3, forms a mask of inliers 4, and computes gradients 5, but only summing over inlier patches (Yehya et al., 9 Sep 2025).
Third, RoseCDL aggregates the window-gradients and chooses the step-size 6 via Stochastic Line Search (SLS). Fourth, it updates the dictionary by projected gradient descent: 7
The algorithm therefore combines approximate sparse coding, local reconstruction-error screening, stochastic optimization, and atom-norm projection in a single loop. The final summary in the paper characterizes this as a combination of stochastic windowing for 8-sized local updates scalable to very long signals, inline outlier trimming based on local reconstruction error for robustness and rare-event isolation, and a one-step SGD-style dictionary update stabilized by SLS (Yehya et al., 9 Sep 2025).
4. Theoretical properties and computational scaling
The theoretical analysis includes a proposition on the stability of the common pattern in a simplified 1D model with one atom (9), two generating atoms 0 with overlap 1, rare-event rate 2, and noiseless data (Yehya et al., 9 Sep 2025). In this setting, classical CDL has 3 as a stationary point only if 4. By contrast, RoseCDL with trimming proportion 5 admits 6 as a fixed point for any 7 (Yehya et al., 9 Sep 2025).
The proof sketch is that, without trimming, the rare-event samples bias the gradient away from 8, whereas trimming discards the 9-fraction of high-loss patches and the gradient aligns with 0 (Yehya et al., 9 Sep 2025). This establishes a formal distinction between robustness as an empirical regularization effect and robustness as a property of the optimization dynamics.
The complexity result is equally central. By fixing window size 1, each SGD iteration processes 2 windows in 3 using FFT-based convolutions (Yehya et al., 9 Sep 2025). Empirically, runtimes scale sublinearly in 4, enabling processing of signals up to 5 samples. In the reported signal-length scaling experiment, RoseCDL runtime grows sublinearly up to 6, whereas 7CSC becomes infeasible beyond 8 (Yehya et al., 9 Sep 2025).
These results clarify two distinct claims. The first is a robustness claim: trimming can preserve convergence toward the common pattern even when rare patterns are strongly correlated with it. The second is a systems claim: stochastic windowing changes the effective training cost from dependence on the full signal length to dependence on fixed-size local windows.
5. Implementation regime
The implementation details reported for RoseCDL specify dictionary size, atom length, window size, sparse coding budget, regularization, trimming rate, optimizer, training duration, and framework (Yehya et al., 9 Sep 2025).
| Component | Reported setting |
|---|---|
| Dictionary size 9 | synthetic 1D 0, 2D letters 1, ECG 2 |
| Atom length 3 | synthetic 4, ECG 5 sampling-rate × 1 s, 2D patches 6 |
| Window size 7 | 8 |
| Sparse coding steps | 9 |
| Regularization | 0, where 1 yields zero activations |
| Trimming rate | 2, often 3 |
| Optimizer | Stochastic Line Search (SLS) for dictionary update; Adam also tested |
| Training iterations | 2000–5000 for synthetic, 1000 for real ECG |
| Framework | PyTorch on NVIDIA A40 GPU |
The batch size 4 is adjusted so that 5 is constant for full GPU utilization (Yehya et al., 9 Sep 2025). This detail is operationally important because it ties the stochastic windowing strategy to throughput optimization rather than treating window size as a purely statistical hyperparameter.
The regularization study reports best recovery at 6 (Yehya et al., 9 Sep 2025). Without trimming, small 7 yields overfitting in the form of spurious atoms, whereas large 8 yields underfitting. This indicates that trimming interacts with sparsity control: reconstruction-error filtering and 9 regularization are complementary rather than interchangeable mechanisms.
6. Experimental evaluation
The experimental program covers scalability, dictionary recovery, regularization sensitivity, rare-event detection on 2D data, and real-world ECG analysis (Yehya et al., 9 Sep 2025).
In the scalability and dictionary recovery setting without outliers, the synthetic multivariate 1D experiments use 20 signals with 0, 1 channels, 2, and 3, while the semi-synthetic 2D experiments use 4 images with 4 character templates (Yehya et al., 9 Sep 2025). The baselines are 5CSC (SpaRSA), SPORCO, and DeepCDL (unrolled). The reported metrics are test-set cost 6 versus wall-clock time and convolutional cosine “dictionary recovery” score in 7. RoseCDL converges 4–8× faster than 8CSC and SPORCO, and matches or slightly outperforms them in final recovery score (Yehya et al., 9 Sep 2025). In the window scaling study, even 9 yields 00 higher loss than full-signal 01CSC, but in 02 of the runtime.
The regularization sensitivity experiment varies 03, with best recovery at 04 (Yehya et al., 9 Sep 2025). The paper attributes poor behavior at small 05 without trimming to overfitting and at large 06 to underfitting.
For rare-event detection on the 2D “ROSE+Z” dataset, the experiments use 5000 text-like images built from letters 07, with 10% of windows containing rare “Z” (Yehya et al., 9 Sep 2025). Inline outlier detection methods include quantile (08), 09-score, and MAD (10). The metric is F1-score of the inlier versus rare-event mask after each epoch. RoseCDL + MAD trimming achieves F1 11 within 50 epochs, significantly outperforming no-trimming, and trimming also reduces variance of dictionary recovery (Yehya et al., 9 Sep 2025).
In real-world ECG on Physionet Apnea-ECG, the data consist of 10 min ECG segments with artifact blocks and no preprocessing (Yehya et al., 9 Sep 2025). The model learns 12 atoms of length 1 s, and uses an outlier threshold via modified 13-score (14). Qualitatively, without trimming, atoms collapse to noise; with trimming, ECG-like P–QRS–T waveforms emerge (Yehya et al., 9 Sep 2025). For anomaly detection baselines on the TSB-UAD benchmark, the comparison includes MP, autoencoder (AE), and OC-SVM. The AUC ROC result reported in Table 5 is that RoseCDL is best or on-par on three of four datasets, with average runtime 15 s versus hundreds–thousands of seconds for others (Yehya et al., 9 Sep 2025).
7. Interpretation, scope, and qualitative findings
The qualitative findings reinforce the paper’s central claim that reconstruction-error trimming is not only a robustness device but an event-localization mechanism (Yehya et al., 9 Sep 2025). Figure 1 shows the inline outlier mask on ECG, where trim blocks coincide with artifacts. Figure 2 shows that rare “Z” patches yield sharply elevated errors, enabling their F1 detection via MAD thresholding. Figure 3 contrasts learned ECG atoms, where trimmed learning recovers physiologically meaningful waveforms. Figure 4 demonstrates that trimming stabilizes training and concentrates recovery scores toward 1.0 across regularization choices (Yehya et al., 9 Sep 2025).
The scope of the method is unsupervised rare event detection in long signals, with explicit examples from astronomy, physical simulations, and biomedical science given as motivating domains (Yehya et al., 9 Sep 2025). The paper also emphasizes that CDL had offered a powerful framework for modeling local structures in signals, but that its use for detecting rare or anomalous events had remained largely unexplored before this formulation.
A possible misconception is that RoseCDL is merely a faster solver for conventional CDL. The reported objective, algorithm, theory, and experiments indicate a narrower and more specific agenda: robust recovery of common structure while isolating anomalous patterns through inline trimming (Yehya et al., 9 Sep 2025). Another possible misconception is that the trimming stage simply suppresses rare events as nuisance points. The paper instead states a twofold goal: recover the common atom robustly and detect, and later learn, the rare events (Yehya et al., 9 Sep 2025). This suggests a sequential interpretation in which initial trimming protects dictionary estimation, while the excluded high-error regions become candidates for subsequent characterization.
In summary, RoseCDL augments standard CDL with stochastic windowing for local updates scalable to very long signals, inline outlier trimming based on local reconstruction error, and an SGD-style dictionary update stabilized by stochastic line search (Yehya et al., 9 Sep 2025). Within the evidence reported, this yields a practical unsupervised pipeline for discovering both common and rare patterns in large, noisy datasets.