Abstract
Researchers at Xiaomi have developed a streamlined sequence-to-sequence (seq-to-seq) model for keyword spotting (KWS) that outperforms traditional attention-based architectures. By moving away from arbitrary sliding windows and complex attention mechanisms, their model achieves a 3.05% False Rejection Rate (FRR) with a tiny footprint of just 73K parameters, making it ideal for "always-on" wake-word detection in mobile devices.
Introduction
Keyword spotting (KWS) is the core technology enabling "always-on" voice assistants. For effective deployment on mobile and IoT devices, KWS models must maintain a "small-footprint"—minimizing memory and CPU usage while ensuring high accuracy and low latency.
Existing "end-to-end" models often struggle with two primary issues:
- Latency: Reliance on sliding windows forces the system to wait for audio chunks to complete before processing.
- Training Mismatch: Attention-based models often exhibit a discrepancy between sequence-level training and frame-by-frame real-time inference.
This research proposes a sequence-to-sequence architecture designed to handle frame-wise alignments directly, improving detection "naturalness" and removing the need for artificial windows.
Methods
The proposed model utilizes a high-performance encoder (based on LSTM or GRU layers) that maps input audio features directly to a sequence of labels. Unlike standard translation models, it avoids the complexity of a separate decoder or explicit attention mechanism.
Frame-wise Labeling and Ambiguity Handling
A key innovation is the frame-wise labeling strategy. Instead of a single prediction for an entire clip, the model predicts a label for every frame. A '1' is output when a frame completes the keyword, and '0' otherwise. To handle "fuzzy" transitions where a keyword is only partially spoken, the authors introduced a '-1' label for ambiguous frames. These frames are assigned zero weight during training, preventing the model from being penalized for uncertainty during transitions.
Technical Enhancements
- Decode Smoothing: To prevent accidental triggers from noisy frames, a moving average of probabilities is calculated over $n$ consecutive frames.
- PCEN Normalization: Per-Channel Energy Normalization (PCEN) is applied to input Mel-spectrograms to enhance robustness against varying volume levels and background noise.
Results
The seq-to-seq model was evaluated on a large-scale dataset from the MI AI Speaker, focusing on the keyword "Xiao-ai-tong-xue."
The results demonstrate that the seq-to-seq approach significantly outperforms baseline attention-based models. The Seq-to-seq GRU achieved a 3.05% FRR at 0.1 False Alarms (FA) per hour, representing a ~20% relative improvement over the baseline GRU (4.47% FRR).
Furthermore, the best-performing model (GRU 1-128) utilizes only ~73K parameters, fitting comfortably within the constraints of mobile hardware. The researchers also found that increasing network "width" (units per layer) was more effective for accuracy than increasing "depth" (number of layers).
Discussion and Conclusion
One of the most significant findings is that the seq-to-seq model learns "auditory attention" implicitly. While explicit attention mechanisms can be distracted by the start of a word, this model naturally waits until the entire keyword is perceived before the output probability spikes. By simplifying the architecture and removing explicit attention, the researchers reduced parameter counts while simultaneously improving performance.
While highly effective, future work could further explore noise robustness in diverse environments and the model's generalizability to shorter keywords in other languages. Nonetheless, this streamlined seq-to-seq architecture provides a robust and efficient solution for modern small-footprint keyword spotting.
Summary updated