Knowledge Distillation from BERT Transformer to Speech Transformer for Intent Classification

Yidi Jiang, Bidisha Sharma, Maulik C. Madhavi, Haizhou Li

Introduction

Traditional Spoken Language Understanding (SLU) systems, which power modern voice assistants, typically rely on a cascaded pipeline: Automatic Speech Recognition (ASR) followed by Natural Language Understanding (NLU). While robust, this approach is susceptible to error propagation and high computational overhead. End-to-end (E2E) models offer a streamlined alternative by mapping audio directly to intent. However, E2E models often struggle to match the linguistic depth of text-based models like BERT due to the scarcity of labeled speech data compared to text.

This paper, presented at INTERSPEECH 2021, proposes a Speech Transformer Distillation (STD) framework. The core idea is to transfer the rich linguistic knowledge embedded in a pre-trained BERT model (the teacher) into a compact Speech Transformer (the student) to enhance intent classification performance and robustness.

Methodology

The researchers employed a teacher-student training strategy to bridge the modality gap between text and speech.

The proposed Speech Transformer Distillation (STD) framework, illustrating the multi-level distillation process between BERT and the Speech Transformer.

The framework consists of:

  • Teacher Model: A fixed BERT-base model with 12 layers processing text transcripts.
  • Student Model: A trainable 4-layer Speech Transformer processing acoustic embeddings from a pre-trained ASR model.
  • Multi-Level Distillation: Knowledge is transferred at two internal levels:
  • Attention Distillation: The student learns to replicate BERT's attention maps, helping it identify linguistically significant segments within audio sequences.
  • Hidden State Distillation: Internal representations of the student are mapped to BERT's hidden states via a learnable transformation matrix.
  • Layer Mapping: To account for the size difference, knowledge from every third layer of the 12-layer BERT model is distilled into the corresponding layer of the 4-layer Speech Transformer.

Experimental Setup

The STD framework was evaluated on two benchmark datasets:

  • Fluent Speech Commands (FSC): Contains common smart-home commands (e.g., "put on the music").
  • ATIS (Airline Travel Information System): Features complex flight-related inquiries.

Results and Discussion

The proposed STD method significantly outperformed non-distilled baselines, achieving an accuracy of 99.10% on FSC and 88.79% on ATIS. A key insight is that attention mechanisms serve as a modality-agnostic bridge, allowing the speech model to focus on phonetic sequences with high semantic weight.

One of the most notable findings was the model's enhanced robustness in noisy environments. When tested with "babble noise," the distilled model maintained significantly higher stability than the baseline.

Intent classification accuracy (%) under various noise levels (dB) for FSC and ATIS datasets.

As shown in the table above, at a 0dB Signal-to-Noise Ratio (SNR)—where noise is as loud as the speech—the STD model consistently outperformed the baseline, demonstrating that linguistic anchoring from BERT helps the model ignore acoustic interference.

Conclusion and Future Work

The Speech Transformer Distillation framework successfully transfers deep linguistic "understanding" from text models to speech models. This results in a more efficient, accurate, and noise-robust E2E intent classification system suitable for on-device deployment.

Future research directions include exploring more sophisticated temporal alignment to match the timing of spoken words with text tokens and investigating "co-distillation" where the teacher model is also adapted to the nuances of spoken language.

Summary updated

BibTeX
@inproceedings{jiang2021knowledge,
  author = {Yidi Jiang and Bidisha Sharma and Maulik C. Madhavi and Haizhou Li},
  title = {{Knowledge Distillation from BERT Transformer to Speech Transformer for Intent Classification}},
  booktitle = {Interspeech},
  year = {2021},
  doi = {10.21437/interspeech.2021-402},
}
Figure