Noisy-ArcMix: Optimized Unsupervised Sound Anomaly Detection
- The paper introduces Noisy-ArcMix, which combines noisy angular margin loss with mixup to significantly improve anomalous sound detection performance.
- It enhances intra-class compactness and angular separation by asymmetrically applying the angular margin to the target sample, refining the decision boundaries.
- Incorporating temporal attention via TASTgramNet, the method focuses on salient audio regions to boost key metrics such as AUC, pAUC, and mAUC.
Noisy-ArcMix is a training technique for unsupervised anomalous sound detection (ASD) that combines an additive noisy angular margin loss with mixup-based data augmentation. The method is designed to improve the representation of normal and anomalous sound events by increasing intra-class compactness and enhancing angular separation in the embedding space. It leverages an asymmetric application of the angular margin in the loss function to mitigate the collapse of anomaly detection decision boundaries and introduces a model architecture that employs temporal attention to focus on salient audio regions. Experimental evaluations demonstrate state-of-the-art performance on the DCASE 2020 Challenge Task 2 dataset, establishing Noisy-ArcMix as an advanced approach for robust ASD (Choi et al., 2023).
1. Problem Formulation in Anomalous Sound Detection
Unsupervised ASD systems are tasked with recognizing anomalous machine-sound events without access to anomalous examples during training. The system is trained exclusively on normal operational sounds and must subsequently identify deviations indicative of anomalies. Two key geometric properties are critical in the learned embedding space:
- Intra-class compactness: Embeddings of normal sounds (within the same machine type and ID) should be tightly clustered, ensuring that small, potentially anomalous deviations are distinguishable.
- Angular separation: Embeddings of normal and abnormal sounds should be separated by high cosine (angular) distance, yielding steeper and more reliable decision boundaries.
Conventional ASD methods often inadequately address both properties, resulting in possible overlap between unseen anomalies and normal data clusters, which compromises false negative rates (Choi et al., 2023).
2. Additive Noisy Angular Margin Loss Formulation
The Noisy-ArcMix technique builds directly upon ArcFace loss [1], which enforces intra-class compactness and inter-class angular separation by applying an additive angular margin to the true class logits: where is a scaling factor and is the angular margin. The angular term is , with and normalized.
Mixup [7] extends this by generating new training examples through convex combinations of normal samples, with mix coefficient . For ArcMix, the ArcFace loss is symmetrically applied to both constituent samples: Noisy-ArcMix modifies this approach by asymmetrically applying the angular margin only to one side of the mix—the "target" sample $i"—while the margin encourages separation in the presence of convexly combined noise: $L_{\rm NAMix}(\mathbf{h}^{ij}, \mathbf{y}^{ij}) = -\sum_{k=1}^K y^{ij}_k \log \frac{\exp[s \cos(\theta_k^{ij} + m y^i_k)]}{\sum_{\ell=1}^K \exp[s \cos(\theta_\ell^{ij} + m y^i_\ell)]}L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$0 is applied where $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$1. When $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$2 is large, strong intra-class compactness is achieved; when $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$3 is small, the margin penalizes noise, reinforcing anomaly sensitivity. Typical hyperparameter settings are $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$4, $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$5, $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$6 (Choi et al., 2023).
3. TASTgramNet Architecture and Temporal Attention
Noisy-ArcMix is instantiated within the TASTgramNet architecture, which incorporates temporal attention mechanisms to focus on salient audio segments:
- Input Preprocessing: Raw waveform $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$7 is converted into a log-Mel spectrogram $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$8 with $L_{\rm AF}(\mathbf{h},\,\mathbf{y}) = -\sum_{k=1}^K y_k \log\frac{\exp[s\,\cos(\theta_k + m)]}{\exp[s\,\cos(\theta_k + m)] + \sum_{j\neq k}\exp[s\,\cos(\theta_j)]}$9 frequency bins and $s$0 time frames.
- Temporal Features (Tgram): A small CNN extracts additional temporal features $s$1 from $s$2.
- Temporal Attention (TAgram): Average and max pooling are performed across frequency bins, summed, and passed through a sigmoid to generate an attention mask $s$3. This mask is broadcast and multiplied with the Mel spectrogram to emphasize key frames.
- Feature Concatenation: The attended spectrogram, original Mel spectrogram, and temporal feature outputs are concatenated into $s$4.
- Backbone Classifier: MobileFaceNet computes normalized embeddings with linear heads, facilitating angular margin loss application.
This architecture enables dynamic focusing on temporally critical regions, further bolstering discriminative capacity for ASD (Choi et al., 2023).
4. Training Regimen and Experimental Protocol
Training employs the DCASE 2020 Task 2 dataset (MIMII + ToyADMOS), encompassing 41 machine IDs and 6 machine types. Only normal (non-anomalous) operational data is used for training, with batch size 64, AdamW optimizer (learning rate $s$5), and 300 training epochs. Mixup is performed with $s$6, while margin and scale parameters are set to $s$7, $s$8.
Evaluation is based on:
- AUC (Area Under ROC Curve)
- pAUC (partial AUC for FPR $s$9)
- mAUC (minimum AUC across machine IDs, i.e., worst-case performance)
5. Performance Analysis and Ablation
Comparison with state-of-the-art methods demonstrates that Noisy-ArcMix yields improved detection metrics:
| Method | Avg AUC (%) | Avg pAUC (%) | mAUC (%) |
|---|---|---|---|
| CLP-SCF [5] | 93.75 | 88.48 | 87.62 |
| STgram-MFN (ArcFace) | - | - | 84.86 |
| TASTgram-MFN (NAMix) | 94.65 (+0.90) | 89.31 (+0.83) | 89.78 (+2.16) |
Ablation studies reveal:
- ArcFace loss enforces greater intra-class compactness relative to cross-entropy.
- ArcMix (symmetric margin on both mix inputs) enhances compactness but causes normal/anomaly mingling.
- Noisy-ArcMix (asymmetric margin) yields more compact normal clusters with pronounced angular separation from anomalies.
- Replacing STgram with TASTgram (temporal attention) consistently enhances AUC and pAUC by approximately 0.5%, highlighting the importance of temporal region focus (Choi et al., 2023).
6. Comparative Methodological Context
Noisy-ArcMix extends foundational methods:
- ArcFace Loss [1]: Original additive angular margin loss for deep face recognition, transferred here to machine sound embeddings.
- Mixup [7]: Data-agnostic convex mixture augmentation, adapted in ASD to synthesize intermediate normal states.
- CLP-SCF [5]: Contrastive Learning Pretraining with machine ID supervision, previously state-of-the-art for ASD.
The innovation lies in the tailored application of angular margin under mixup augmentation and the dynamic attention-based architecture, resulting in combined improvements in both mean and worst-case detection performance.
7. Limitations, Open Challenges, and Prospects
- The current method depends on classification with explicit machine IDs; deploying in genuinely unlabeled scenarios would require robust pseudo-label induction, which remains unresolved.
- Mixup augmentation is restricted to normal data; semi-supervised extensions with limited anomaly access may further enhance detection robustness.
- A plausible implication is that domain-generalized Noisy-ArcMix—training across diverse machine domains—and exploration of alternative noise distributions for adaptive angular margins constitute promising research directions (Choi et al., 2023).