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

Abstract

Large self-supervised models are effective feature extractors, but their application is challenging under on-device budget constraints and biased dataset collection, especially in keyword spotting (KWS). To address this, we proposed a knowledge distillation-based self-supervised speech representation learning (S3RL) architecture for on-device KWS. Our approach utilizes a teacher-student framework to transfer knowledge from a larger, more complex model to a lightweight student model using dual-view cross-correlation distillation and the teacher's codebook as learning objectives. Evaluated on an Alexa keyword spotting task using a 16.6k-hour in-house dataset, our technique demonstrated exceptional performance in both normal and noisy conditions. This work highlights the efficacy of knowledge distillation in constructing efficient self-supervised models for KWS while adhering to strict on-device resource constraints.

Introduction

Self-supervised speech representation learning (S3RL) has revolutionized audio processing by enabling models to learn robust features from unlabeled data. However, state-of-the-art S3RL models, such as Wav2vec 2.0, often exceed 95 million parameters, making them impractical for low-power edge devices like smart speakers or wearables. Furthermore, industrial KWS datasets are frequently "biased," heavily weighted toward specific wake words. When training self-supervised models on such data, they often overfit to background noise or spurious patterns rather than learning universal speech features.

This paper presents a framework to bridge the gap between high-performance S3RL and on-device constraints. By distilling the "wisdom" of a large, general-purpose teacher model into a specialized 1.6M-parameter student model, we achieve significant accuracy gains while reducing model size by 98%.

Methodology

Teacher-Student Framework

Our architecture employs a large Wav2vec 2.0 model (pre-trained on the 960-hour LibriSpeech dataset) as a teacher to guide a compact 3-layer Transformer student model. We introduce two novel distillation mechanisms to ensure the student captures essential phonetic information without the overhead of the full teacher model.

Dual-View Cross-Correlation Distillation (DVCC)

Inspired by the "Barlow Twins" approach in computer vision, DVCC operates on the entire utterance rather than individual 20ms frames. This global perspective helps the model capture the context necessary to distinguish keywords from background chatter. The method employs two views:

  1. Feature-view: Reduces redundancy by ensuring different feature dimensions do not repeat the same information.
  2. Batch-view: Ensures that features from different audio samples remain distinct, promoting more robust representations for classification.

Teacher Codebook Distillation

Standard Wav2vec models utilize a codebook—a set of representative speech sounds—to learn. To combat data bias in KWS datasets, we force the student model to use the teacher’s codebook, which was trained on the diverse LibriSpeech dataset. This acts as a powerful regularizer, instructing the student to focus on universal speech sounds rather than the specific noise profiles of the keyword dataset.

Layer Selection and Optimization

Empirical analysis revealed that the middle layers of the teacher model (specifically layers 5–8) contain the most useful phonetic information for KWS. While final layers are often too abstract, these "sweet spot" layers provide the ideal targets for distillation, allowing for high performance with minimal computation.

Experimental Setup

The student model was trained and evaluated using a massive, de-identified in-house dataset comprising 16,600 hours of Alexa keyword recordings. To test real-world robustness, the evaluation set was bifurcated into Normal (clean speech) and Playback (noisy or echoic conditions) environments.

Results and Discussion

Accuracy and Robustness

The proposed dual-view approach significantly outperformed baseline student models trained without distillation. We observed a relative False Acceptance Rate (FAR) improvement of 14.6% in normal conditions and 21.3% in noisy conditions. The combination of DVCC and teacher codebook distillation proved particularly effective in "Playback" environments, demonstrating the model's ability to ignore environmental interference.

Extreme Compression

Our framework successfully compressed the model from 95M parameters to just 1.6M parameters—a 98% reduction. Remarkably, this tiny model outperformed a much larger 21M-parameter baseline by 10%, proving that targeted knowledge distillation is more effective than simply increasing model capacity when data is biased or resources are limited.

Conclusion

This research demonstrates that on-device self-supervised speech representation learning is viable for keyword spotting through strategic knowledge distillation. By focusing on utterance-level correlations and leveraging teacher-derived codebooks, we can create models that are both extremely small and highly robust. Future work will explore the generalizability of these techniques to other on-device tasks, such as emotion recognition and speaker identification.

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