Improving Anomalous Sound Detection Via Low-Rank Adaptation Fine-Tuning of Pre-Trained Audio Models

Xinhu Zheng, Anbai Jiang, Bing Han, Yanmin Qian, Pingyi Fan, Jia Liu, Wei-Qiang Zhang

Introduction

In the realm of industrial automation, Anomalous Sound Detection (ASD) serves as a critical diagnostic tool. The ability to identify subtle deviations in machine acoustics—such as the irregular whirring of a fan or the rhythmic clinking of a conveyor belt—can prevent catastrophic equipment failure. However, developing robust ASD systems is fraught with challenges: actual failure data is scarce, factory environments are inherently noisy, and models often struggle with "domain shift," where a system trained in a controlled environment fails when deployed on a vibrating, echoing factory floor.

Historically, researchers have attempted to bridge the data gap by using pre-trained speech models like Wav2Vec2. However, these models are optimized for human phonemes rather than mechanical sounds. This paper explores a more effective alternative: fine-tuning audio-specific pre-trained models using Low-Rank Adaptation (LoRA) to achieve superior performance with minimal computational overhead.

Methodology

The proposed pipeline integrates specialized audio pre-training with an efficient adaptation strategy and a distance-based detection back-end.

Audio-Centric Pre-training

Recognizing that mechanical sounds differ fundamentally from human speech, the authors transitioned from speech-centric models to those pre-trained on general environmental audio (e.g., AudioSet), specifically BEATs and CED. These models provide a more relevant feature set for industrial soundscapes.

Low-Rank Adaptation (LoRA)

To avoid the overfitting common in full fine-tuning—especially given the limited "normal" data available in industrial settings—the researchers employed LoRA. This technique keeps the original model weights frozen and injects small, trainable low-rank matrices into the Transformer layers. This approach significantly reduces the number of trainable parameters while acting as a regularizer.

Proxy Classification and ArcFace

Because anomaly labels are typically unavailable during training, the task is framed as a proxy classification problem (e.g., identifying machine types or specific attributes). The authors utilized ArcFace loss, which maximizes the angular margin between classes in the embedding space, thereby forcing the model to learn highly discriminative features.

KNN Back-end

For the detection phase, a K-Nearest Neighbors (KNN) approach is used. An anomaly score is derived by calculating the distance between a new sound's embedding and the "normal" embeddings established during the training phase.

Experimental Framework

The method was evaluated using the DCASE 2023 Task 2 dataset, a rigorous benchmark featuring 14 machine types (including pumps, fans, and sliders). The dataset is designed to test generalization across "Source" and "Target" domains, where models are trained on one set of conditions but must perform in different acoustic environments with only 10 clips of target domain data provided for adaptation.

Results and Analysis

The proposed method established a new state-of-the-art (SOTA) for the DCASE 2023 benchmark, achieving a 77.75% harmonic mean (hmean) score—a 6.48% improvement over previous methods. Performance was particularly strong in specific categories, such as "ToyNscale" and "Vacuum," which reached Area Under the Curve (AUC) scores of 95.97% and 98.18%, respectively.

Key Insights

  • Domain Relevance: Models pre-trained on general audio (BEATs) significantly outperformed speech-specific models, confirming that mechanical health features are more closely aligned with environmental sounds than human language.
  • Optimal Rank: While a LoRA rank ($r$) of 4 or 8 is standard in Natural Language Processing, this study found that $r=64$ was optimal for ASD. This suggests that capturing the nuances of industrial noise requires more complex hidden state adjustments.
  • Layer Sensitivity: Ablation studies revealed that applying LoRA to the Value ($v$) and Query ($q$) matrices in the Transformer's attention mechanism was more effective than tuning the Key ($k$) matrix. Furthermore, layers closer to the output had a more significant impact on performance, indicating that high-level semantic features require the most adaptation for ASD tasks.

Conclusion

By combining audio-centric pre-training with LoRA fine-tuning, this research demonstrates a highly effective and parameter-efficient path for industrial anomaly detection. The method not only sets a new benchmark for accuracy but also provides better generalization than full fine-tuning. Future work will focus on automating hyperparameter selection for different machine types and optimizing these large Transformer models for real-time deployment on edge computing devices.

Summary updated

BibTeX
@inproceedings{zheng2024improving,
  author = {Xinhu Zheng and Anbai Jiang and Bing Han and Yanmin Qian and Pingyi Fan and Jia Liu and Wei-Qiang Zhang},
  title = {{Improving Anomalous Sound Detection Via Low-Rank Adaptation Fine-Tuning of Pre-Trained Audio Models}},
  booktitle = {SLT},
  year = {2024},
  url = {https://openreview.net/forum?id=vgzhDUtwhF},
}
Figure