On-Device Constrained Self-Supervised Speech Representation Learning for Keyword Spotting via Knowledge Distillation

Gene-Ping Yang, Yue Gu, Qingming Tang, Dongsu Du, Yuzong Liu

Self-supervised learning (SSL) has revolutionized speech processing, enabling models like wav2vec 2.0 to learn robust audio representations without extensive human labeling. However, these models are typically massive—often exceeding 90 million parameters—making them unsuitable for resource-constrained edge devices like smart speakers. Furthermore, training these models for keyword spotting (KWS) is challenging due to the inherent data bias in KWS datasets, which often consist of repetitive recordings of specific wake words.

In this work, researchers from the University of Edinburgh, Amazon, and Zoom present a knowledge distillation framework designed to shrink these large-scale models into lightweight, on-device versions that maintain high performance in real-world conditions.

The Challenges of On-Device KWS

Deploying state-of-the-art speech models on-device faces two primary hurdles:

  1. Hardware Constraints: Models like wav2vec 2.0 are computationally and memory-intensive. Effective deployment requires significant parameter reduction without compromising accuracy.
  2. Data Bias: KWS datasets are often biased toward specific keywords (e.g., "Alexa"). Training SSL models from scratch on such data can lead to overfitting on specific acoustic patterns rather than learning generalizable speech representations.

Proposed Methodology

The authors employ a Teacher-Student framework. The "Teacher" is a pre-trained wav2vec 2.0 model (95M parameters) trained on the LibriSpeech corpus. The "Student" is a significantly smaller 3-layer Transformer (available in 21M and 1.6M parameter versions).

The proposed knowledge distillation framework, illustrating the interaction between the Wav2vec 2.0 teacher and the student model, including the use of a shared teacher codebook.

To bridge the performance gap, two key innovations were introduced:

Dual-View Cross-Correlation Distillation (DVCC)

Inspired by the "Barlow Twins" approach, DVCC optimizes the student's representations through two lenses:

  • Feature-view: Encourages the student to reduce redundancy between different feature dimensions, leading to more compact representations.
  • Batch-view: Ensures that features from the same audio segment are similar while maintaining distinctiveness across different segments.

Teacher Codebook Distillation

Instead of the student learning its own codebook from biased KWS data, it "borrows" the teacher's diverse codebook. This allows the student to benefit from the teacher's exposure to a wide variety of linguistic units, mitigating the impact of training on limited keyword sets.

Experimental Setup and Results

The framework was evaluated using a 16,600-hour in-house Alexa dataset. Performance was measured using the relative False Acceptance Rate (FAR) under "Normal" (clean) and "Playback" (noisy/echoey) conditions.

Performance comparison (Relative FAR) of various distillation methods and model sizes. Lower values indicate better performance.

Key Insights

  • Significant Compression: The 1.6M parameter student achieves a 98% reduction in size compared to the teacher.
  • Superior Performance: The 21M parameter student outperformed a non-distilled baseline by 14.6% in normal conditions and 21.3% in noisy conditions.
  • Benchmarking: The DVCC method outperformed existing techniques like DistilHuBERT by over 8% in relative FAR.
  • Optimal Layer Selection: Analysis revealed that middle layers (layers 5–8) of the teacher model provide the most useful information for KWS, as deeper layers tend to become overly specialized for the original pre-training task.

Conclusion

This research demonstrates that through strategic knowledge distillation and innovative correlation techniques, massive self-supervised models can be effectively compressed for on-device applications. By leveraging a teacher's diverse codebook and minimizing feature redundancy, even ultra-lightweight models can achieve high robustness in challenging acoustic environments.

Summary updated

BibTeX
@inproceedings{yang2023device,
  author = {Gene-Ping Yang and Yue Gu and Qingming Tang and Dongsu Du and Yuzong Liu},
  title = {{On-Device Constrained Self-Supervised Speech Representation Learning for Keyword Spotting via Knowledge Distillation}},
  booktitle = {Interspeech},
  year = {2023},
  doi = {10.21437/interspeech.2023-2362},
}
Figure