NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Attentive Merging of Hidden Embeddings from Pre-trained Speech Model for Anti-spoofing Detection

Zihan Pan, Tianchi Liu, Hardik B. Sailor, Qiongqiong Wang · DOI

Abstract

This paper presents Attentive Merging (AttM), a novel framework designed to enhance audio anti-spoofing detection by intelligently combining hidden embeddings from the WavLM self-supervised learning (SSL) model. Contrary to the common practice of using only the final layer's output, our research identifies that early-to-middle layers contain the most discriminative information for identifying synthetic speech. By utilizing an attention-based weighting mechanism, the proposed AttM method achieves state-of-the-art performance on ASVspoof benchmarks while significantly reducing computational costs by pruning redundant upper layers.

Introduction

As synthetic speech (Text-to-Speech) and voice conversion (VC) technologies become increasingly sophisticated, distinguishing genuine human speech from malicious "spoofing" attacks has become a critical challenge. Traditional detection methods often struggle to generalize to unseen attack types. While SSL models like WavLM have shown promise in general speech tasks, they are typically treated as black boxes, with researchers utilizing only the final layer's output. This approach likely discards crucial acoustic information buried deeper in the model. This study investigates which specific layers of WavLM are most discriminative for anti-spoofing and proposes an efficient method to combine them.

Methods

The proposed Attentive Merging (AttM) framework leverages the hierarchical nature of WavLM Large (24 transformer layers) to optimize feature extraction for anti-spoofing.

The AttM architecture: (a) input audio, (b) SSL feature extraction, (c) hidden embeddings, (d-g) the AttM mechanism, (h) merged features, (i-k) classification.

The AttM mechanism consists of several key stages:

  1. Squeezing and Excitation: Hidden embeddings from selected layers are averaged across time and processed through a fully connected layer with SWISH activation to "squeeze" the dimensions. This representation generates "attentive weights" for each layer via a sigmoid function, indicating which layers are most relevant for a given audio clip.
  2. Merging: The layers are re-weighted, concatenated, and passed through a 3-layer linear bottleneck network to reduce dimensionality.
  3. Classification: The final representation is fed into a classifier, such as an LSTM or an ECAPA-TDNN, to distinguish genuine from spoofed speech.

The authors also utilized a warm-up fine-tuning strategy, initially freezing the WavLM model to train the merging and classifier blocks before unfreezing the transformer layers for end-to-end optimization.

Key Insights: The "Middle-Layer" Sweet Spot

A major finding of this work is that early-to-middle layers (specifically around layer 12 of the 24-layer WavLM Large) contribute the most to anti-spoofing performance. The final layers, which often capture high-level semantic or linguistic meaning, are less effective at detecting the subtle acoustic artifacts characteristic of synthetic speech.

Heatmap showing the attentive weights across 24 layers for different model configurations. Higher weights (red) are concentrated in the middle layers.

This "less is more" insight allows for significant efficiency gains. By discarding the upper half of the model and using only the first 12 layers (the "12L-WavLM" configuration), the researchers achieved better results than using the full 24 layers, while saving substantial memory and computational resources.

Results and Performance

The AttM method was evaluated using the industry-standard ASVspoof benchmarks (2019LA, 2021LA, and 2021DF). The results demonstrate that the proposed approach achieves state-of-the-art (SOTA) or highly competitive performance across all sets.

Dataset Model Configuration Equal Error Rate (EER)
ASVspoof 2019LA 12L-WavLM + AttM-LSTM 0.65%
ASVspoof 2021LA 12L-WavLM + AttM-LSTM 3.50%
ASVspoof 2021DF 12L-WavLM + AttM-LSTM 3.19%

Notably, the 10-layer configuration (10L-WavLM) achieved an EER of 4.37% on the 2021DF set, which represents a significant improvement over existing public models for this challenging evaluation set. Fine-tuning the pre-trained model specifically for anti-spoofing consistently outperformed using a fixed pre-trained model.

Conclusion

The Attentive Merging technique highlights the importance of hierarchical feature selection in large SSL models. By focusing on the most discriminative internal layers, the AttM framework provides a more accurate and computationally efficient solution for audio spoofing detection. Future research may explore applying this technique to other downstream speech tasks, such as emotion recognition or speaker diarization, where hierarchical information is equally vital.

Summary updated

BibTeX
@inproceedings{pan2024attentive,
  author = {Zihan Pan and Tianchi Liu and Hardik B. Sailor and Qiongqiong Wang},
  title = {{Attentive Merging of Hidden Embeddings from Pre-trained Speech Model for Anti-spoofing Detection}},
  booktitle = {Interspeech},
  year = {2024},
  url = {https://openreview.net/forum?id=npbCZHJ4sT},
}
Figure