Abstract
Anomalous Sound Detection (ASD) is a critical component of industrial predictive maintenance, yet it faces the fundamental challenge of data imbalance: while normal operational sounds are abundant, anomalous samples are rare or non-existent during training. This paper discusses a novel two-stage framework, CLP-SCF (Contrastive Learning based Pretraining and Self-supervised Classification based Fine-tuning), which leverages machine metadata to learn more discriminative audio representations. By utilizing Machine IDs as anchors for contrastive learning, the method achieves state-of-the-art performance on the DCASE 2020 Challenge Task 2 benchmark, particularly improving detection stability across diverse machine types.
Introduction
In industrial settings, the first indicator of mechanical failure is often an acoustic anomaly—a subtle change in the rhythmic or spectral signature of a pump, fan, or conveyor belt. Automating the detection of these "off" notes is the goal of Anomalous Sound Detection (ASD). However, because industrial machines rarely fail, training models to recognize anomalies is difficult; models must learn to define "normal" so precisely that any deviation is flagged.
Existing self-supervised learning (SSL) approaches typically rely on sample-based contrastive learning (e.g., SimCLR) or standard classification using Machine IDs. While effective, these methods often fail to capture the fine-grained internal consistency of a specific machine's sound profile. This paper introduces a method that treats Machine IDs not just as labels, but as the foundational structure for contrastive feature learning.
Methodology
The proposed CLP-SCF framework operates in two distinct stages to maximize the discriminative power of the learned features.
Stage 1: Metadata-based Contrastive Pretraining (CL-Meta)
Traditional contrastive learning often compares a sound clip to an augmented version of itself. In contrast, the CL-Meta loss utilizes machine metadata. The model is tasked with pulling embeddings from the same Machine ID closer together in the feature space while simultaneously pushing embeddings from different IDs further apart. This approach forces the model to identify the unique physical "fingerprint" of a specific machine rather than just general spectral characteristics.
Stage 2: ArcFace Fine-tuning
Following pretraining, the model undergoes fine-tuning using an ArcFace loss classifier. ArcFace is designed to enhance intra-class compactness and inter-class discrepancy. By applying this to Machine ID classification, the model ensures that the features for "normal" operation are tightly clustered, making even minor deviations (anomalies) more apparent as they fall outside these dense clusters.
Backbone Architecture
The framework utilizes the STgram-MFN backbone, a specialized architecture designed to fuse spectral and temporal features. This ensures the model captures both the tonal qualities (frequency) and the rhythmic patterns (time) of the machinery.
Experimental Setup
The method was evaluated using the DCASE 2020 Challenge Task 2 dataset, which comprises recordings from the MIMII and ToyADMOS datasets. The data includes sounds from six types of machines: Fans, Pumps, Sliders, Valves, ToyCars, and ToyConveyors, spanning 41 different machine IDs. Each audio clip is approximately 10 seconds long.
Performance was measured using the Area Under the Curve (AUC) and partial AUC (pAUC). Crucially, the authors also tracked mAUC (minimum AUC) to evaluate the stability of the model across the most difficult machine instances.
Results and Discussion
The CLP-SCF method demonstrated significant improvements over existing state-of-the-art models, including the baseline STgram-MFN (ArcFace) without contrastive pretraining.
- Detection Accuracy: The model achieved an average AUC of 93.75% and a pAUC of 88.48%, representing gains of 1.39% and 2.14% respectively over previous benchmarks.
- Stability: The average mAUC improved from 84.86% to 87.62%. This suggests that the contrastive pretraining helps mitigate the "weakest link" problem, where certain machine IDs are significantly harder to monitor than others.
- Feature Visualization: t-SNE visualizations confirmed that the CLP-SCF method produces tighter, more distinct clusters for individual machine IDs. Anomalous sounds were shown to fall clearly outside the boundaries of these normal clusters, validating the sensitivity of the learned representations.
Conclusion
By integrating machine metadata into a contrastive learning objective, the CLP-SCF framework provides a more robust solution for anomalous sound detection. The method's ability to create compact feature representations for normal machine states allows for higher sensitivity to subtle failures. Future work may involve testing the framework against "domain shift" scenarios—where environmental noise or operational speeds change—to further enhance its applicability in dynamic factory environments.
Summary updated