Abstract
Modern self-supervised speech models generate variable-length sequences of feature vectors, necessitating a "pooling" mechanism to produce fixed-size embeddings for downstream classification tasks. While Average Pooling is the standard unsupervised approach, it fails to account for the varying information density in speech. This paper proposes a novel, unsupervised pooling method leveraging the Vector Quantization (VQ) modules inherent in architectures like wav2vec 2.0. By introducing "squashing" and "weighting" strategies based on discrete codebook indices, the proposed method significantly outperforms Average Pooling and achieves performance comparable to supervised attention-based methods.
Introduction
Self-supervised learning (SSL) has revolutionized speech processing, with models like wav2vec 2.0 providing powerful representations. However, these models output a sequence of vectors corresponding to audio frames. Since audio duration varies, the sequence length varies accordingly. To perform utterance-level tasks—such as keyword spotting, intent classification, or emotion recognition—these sequences must be aggregated into a single, fixed-size vector.
The conventional approach is Average Pooling (AP), which treats every frame with equal importance. This is suboptimal for speech, where redundant segments (e.g., long vowels) are over-represented compared to transient but informative segments (e.g., consonants). While supervised attention mechanisms can learn to weigh frames, they require labeled data. This work explores unsupervised alternatives that utilize the discrete latent space already learned by SSL models.
Methodology: VQ-Based Pooling
The core innovation lies in using the Vector Quantization (VQ) layer as an unsupervised tokenizer. The VQ layer maps continuous features to a finite set of codebook indices. The authors propose two primary strategies: Squashing and Weighting.
Squashing Strategies
Squashing aims to reduce redundancy by merging adjacent frames that map to the same or similar VQ indices. This process effectively collapses steady-state sounds into single representative units. The paper defines several variants based on how indices across multiple codebooks are handled:
- VQ-Squash: Merges adjacent frames sharing indices.
- VQ-AllSquash: Merges all frames in an utterance sharing the same indices, regardless of adjacency.
- AND/OR Logic: In multi-codebook settings, "AND" requires all indices to match for a merge, while "OR" requires only one index to match.
Weighting Strategies
Inspired by NLP techniques like TF-IDF, the authors propose weighting frames based on the "rarity" of their VQ indices.
- VQ-LP (Local Probability): Weights frames inversely to their frequency within the current utterance, penalizing long, repetitive sounds.
- VQ-GP (Global Probability): Weights frames inversely to their frequency across the entire training dataset, penalizing common background noise or generic speech patterns.
- VQ-BP (Both): A combination of local and global penalties.
Experimental Evaluation
The methods were evaluated using wav2vec 2.0 (base/large) and XLS-R backbones across four tasks: Keyword Spotting (KWS), Speaker Identification (SID), Intent Classification (IC), and Emotion Recognition (ER). To ensure a purely unsupervised evaluation of the representations, a Nearest Neighbor classifier was employed to measure accuracy without fine-tuning.
Key Results and Insights
The proposed unsupervised methods demonstrate substantial improvements over the baseline:
- Performance Gains: On the wav2vec 2.0 base model, VQ-LP achieved an average accuracy of 48.40%, compared to 38.11% for Average Pooling. The improvement was most dramatic in Intent Classification, where VQ-BP doubled the accuracy of AP.
- Emergent Attention: Qualitative analysis reveals that VQ-LP weights closely mirror those of supervised attention (SAP). The unsupervised weights naturally emphasize discriminative phonetic transitions while ignoring redundant steady-state vowels.
- Local vs. Global Context: Local probability (LP) was found to be more impactful than global probability (GP), indicating that intra-utterance redundancy is the primary bottleneck for simple averaging.
Conclusion
This work demonstrates that the VQ modules in self-supervised speech models provide a "free" and effective way to perform intelligent pooling without labels. By treating VQ indices as acoustic tokens, NLP-inspired weighting and squashing techniques can significantly enhance representation quality. Future work will investigate the applicability of these methods to non-VQ models like HuBERT through post-hoc discretization.
Summary updated