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

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

TL;DR

This paper investigates how self-supervised speech Transformers encode speaker information, pinpointing specific neurons within the feed-forward layers that are crucial for this. By identifying these "speaker neurons" using unsupervised clustering of speech features and i-vectors, the authors demonstrate that protecting them during model pruning significantly preserves speaker identification performance, even allowing for substantial parameter reduction.

What Problem Does This Paper Address?

Self-supervised learning (SSL) models, particularly Transformers, have revolutionized speech processing, achieving state-of-the-art results across various tasks. While their effectiveness is well-established, a significant gap exists in understanding how these models internally represent and encode specific types of information, such as speaker identity. Existing research has largely focused on probing classifiers or has been limited in scope. This paper aims to bridge this gap by specifically identifying and analyzing the neurons within the feed-forward layers (FFNs) of SSL Transformers that are responsible for speaker information. The motivation stems from prior work suggesting that FFNs are particularly sensitive to speaker-related tasks, making them a prime target for investigation.

Methods

The core of this work builds upon a methodology for identifying "property neurons" in Transformers. The authors adapt this by:

  1. Clustering Speech Features: They apply k-means clustering to self-supervised features extracted from models like MelHuBERT and wav2vec 2.0. These clusters are hypothesized to capture broad phonetic categories.
  2. Clustering i-vectors: Simultaneously, they cluster i-vectors, which are known to represent speaker characteristics in a label-free manner. This provides a complementary view of speaker-related information.
  3. Identifying "Speaker Neurons": Neurons are identified as "speaker neurons" if their activation patterns strongly correlate with these discovered clusters. This correlation is quantified by measuring the probability of a neuron being activated given a specific cluster.
  4. Pruning and Protection: The identified "speaker neurons" are then protected during model pruning. The authors evaluate two pruning strategies: one-shot pruning (removing neurons in a single step) and iterative pruning (gradually removing neurons with fine-tuning). The effectiveness of protecting these neurons is measured by the performance degradation on downstream tasks, particularly speaker identification.

The paper also explores several alternatives for identifying i-vector cluster neurons, including taking unions or intersections of cluster assignments, to find the most effective approach.

Datasets

The paper utilizes pre-trained self-supervised models, MelHuBERT and wav2vec 2.0, which were trained on large, unlabelled speech datasets. For evaluation, they employ the SUPERB benchmark, specifically focusing on:

  • Speaker Identification (SID)
  • Phoneme Recognition (PR)
  • Emotion Recognition (ER)
  • Intent Classification (IC)

Key Insights and Ideas

  • FFNs are Speaker Information Hubs: The research strongly supports the hypothesis that feed-forward layers in SSL Transformers are critical for encoding speaker information. Protecting neurons in these layers during pruning yields significant performance recovery.
  • Unsupervised Clustering is Effective: The paper demonstrates that unsupervised clustering of SSL features (for phonetic information) and i-vectors (for speaker information) can effectively identify neurons relevant to speaker identity, without requiring explicit speaker labels.
  • Phonetic and Speaker Information Interplay: The findings suggest that speaker-related neurons benefit from conditioning on both phonetic and speaker-related clusters, highlighting the interplay between these two types of information in speech representation.
  • One-Shot Pruning Benefits Greatly: Protecting identified "speaker neurons" is particularly impactful for one-shot pruning, allowing for substantial parameter reduction (up to 70%) with minimal performance loss. This suggests that these neurons are essential for preserving the model's ability to generalize after aggressive pruning.

Key Results

  • Performance Recovery: Protecting identified "cluster neurons" (SSL and i-vector clusters) during one-shot pruning on MelHuBERT and wav2vec 2.0 recovered a significant portion of the performance loss observed with regular pruning, especially for speaker identification. For instance, on wav2vec 2.0, one-shot pruning with protected neurons achieved 70.67% SID accuracy, compared to 63.42% with regular pruning.
  • Outperforming Prior Work: The unsupervised approach for identifying speaker neurons, when protecting them during pruning, often matched or surpassed the performance of methods that relied on supervised labels (as in [20]).
  • Pruning Efficiency: The method allows for pruning approximately 70% of FFN parameters in a single step without significant performance degradation.
  • Phonetic vs. Speaker Neuron Importance: For speaker identification, protecting SSL cluster neurons (related to phonetics) was found to be more critical than protecting i-vector cluster neurons.

Limitations and Future Work

  • Number of Clusters Impact: The paper notes that using a large number of clusters for k-means can lead to a significant decrease in the number of identified neurons, especially in middle layers. This is identified as an inherent drawback of the approach.
  • Alternative Identification Methods: While the proposed method of conditioning and intersecting cluster assignments for i-vectors performed well, other alternatives were explored, with varying degrees of success across tasks. Further investigation into optimal identification strategies could be beneficial.
  • Generalizability: While the approach is shown to be applicable to other models like HuBERT and WavLM, the lack of publicly released pre-training targets for these models made direct evaluation difficult. Future work could explore this further.
  • Broader Applications: While the focus is on speaker identification, the identified "speaker neurons" could potentially be leveraged for other speaker-centric tasks or for understanding model behavior more broadly.

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