Identifying Speaker Information in Feed-Forward Layers of Self-Supervised Speech Transformers

Tzu-Quan Lin, Hsi-Chun Cheng, Hung-yi Lee, Hao Tang · DOI

Introduction

Self-supervised learning (SSL) models, such as wav2vec 2.0 and HuBERT, have revolutionized speech processing by learning powerful representations from unlabeled data. Despite their success, these architectures often function as "black boxes," with the internal mechanisms for storing and processing specific information—like speaker identity—remaining poorly understood. Recent research has posited that the Feed-Forward Networks (FFNs) within Transformer layers act as a "key-value memory." However, pinpointing the specific neurons responsible for speaker traits typically necessitates human-annotated labels.

This paper introduces a novel, unsupervised methodology to identify "speaker-specific neurons" within the FFN layers of speech Transformers. By leveraging unsupervised clustering and "protected pruning," the researchers demonstrate that speaker information is localized within specific neurons, which can be preserved to maintain model performance even after significant parameter reduction.

Methodology: Unsupervised Neuron Identification

The core challenge addressed is identifying property-specific neurons without relying on manual labels (e.g., phoneme or gender tags). The authors propose a four-step pipeline:

  1. Activation Mapping: The researchers monitor the activation patterns of neurons across the FFN layers, focusing on the "top 1%" of neurons that fire for any given audio frame.
  2. Unsupervised Clustering: To categorize the audio without labels, the team employs k-means clustering on two distinct feature sets:
  3. SSL Features: These capture broad phonetic information, such as the distinction between vowels and consonants.
  4. i-vectors: A traditional speech processing technique used to capture speaker-level characteristics (e.g., gender, vocal tract length) in an unsupervised manner.
  5. Neuron Identification: By intersecting these clusters, the authors identify neurons that consistently activate for specific combinations, such as a particular phonetic sound produced by a specific speaker group (e.g., "Vowel + Male Speaker").
  6. Validation via Pruning: To verify the importance of these neurons, the researchers perform "one-shot" pruning. They remove the least significant neurons based on weight magnitude but explicitly "protect" the identified speaker neurons from deletion. If the model retains its performance, the identified neurons were indeed the critical ones.

Experimental Framework

The study evaluates two prominent models: MelHuBERT and wav2vec 2.0. Performance is measured using the SUPERB benchmark, with a primary focus on Speaker Identification (SID). Other tasks, including Phoneme Recognition (PR), Emotion Recognition (ER), and Intent Classification (IC), are used to assess the broader impact of the pruning process and ensure the model remains functional across multiple domains.

Key Insights

FFNs as Speaker Memory

The results reinforce the hypothesis that FFN layers are the primary repository for speaker-related information. Interestingly, the identification of these neurons is most effective when conditioned on both phonetic and speaker clusters. This suggests that the model’s internal representation of a speaker is deeply intertwined with how that speaker articulates specific phonetic units.

The Efficacy of Unsupervised Clustering

Despite the lack of human labels, the k-means clusters showed remarkable alignment with physical categories. The i-vector clusters achieved 90–97% purity regarding gender. Furthermore, the researchers found that using a small number of clusters (e.g., $k=3$ for SSL features and $k=2$ for i-vectors) was more effective for neuron isolation. As the number of clusters increases, the statistical signal for any single neuron to fire consistently for a specific class weakens, making them harder to isolate.

Results and Performance

The "protected pruning" approach yielded significant results in model compression and interpretability:

  • Massive Parameter Reduction: The authors successfully pruned approximately 70% of the total parameters within the FFN layers in a single pass.
  • Performance Retention: When the identified speaker neurons were protected, MelHuBERT maintained a Speaker Identification accuracy of 62.96%. In contrast, standard magnitude-based pruning without protection saw accuracy drop to 54.08%.
  • Comparison to Supervised Methods: The unsupervised approach performed on par with, and in some instances outperformed, previous methods that required expensive manual annotations for phonemes and gender.

Conclusion and Future Work

This research provides a robust framework for interpreting and compressing SSL speech models without the need for labeled data. By identifying and protecting "memory" neurons within the FFN layers, it is possible to strip away the majority of a model's parameters while preserving its core capabilities in speaker identification.

Future research directions include expanding the analysis beyond the 9th layer to see how speaker information is distributed throughout the entire depth of the Transformer. Additionally, investigating whether similar "property neurons" exist within the Attention heads could provide a more comprehensive understanding of the Transformer architecture. Finally, overcoming the "cluster scaling" issue—where identifying neurons for specific individuals (high $k$) remains difficult—is a key hurdle for future iterations of this work.

Summary updated

BibTeX
@misc{lin2025identifying,
  author = {Tzu-Quan Lin and Hsi-Chun Cheng and Hung-yi Lee and Hao Tang},
  title = {{Identifying Speaker Information in Feed-Forward Layers of Self-Supervised Speech Transformers}},
  year = {2025},
  eprint = {2506.21712},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.21712},
}
Figure