Skip to content

Commit 47eb321

Browse files
committed
Update documentation
1 parent 873a6cd commit 47eb321

17 files changed

Lines changed: 3538 additions & 936 deletions
146 KB
Loading
47.5 KB
Loading

_sources/index.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
---
2-
edit_url: null
3-
---
1+
<head><meta property="og:image" content="https://raw.githubusercontent.com/interpretingdl/speech-interpretability-tutorial/refs/heads/main/book/images/tutorial-overview.png"></head>
2+
3+
# Interpretability Techniques for Speech Models
44

55
Pre-trained foundation models have revolutionized speech technology like many other adjacent fields. The combination of their capability and opacity has sparked interest in researchers trying to interpret the models in various ways. While interpretability in fields such as computer vision and natural language processing has made significant progress towards understanding model internals and explaining their decisions, speech technology has lagged behind despite the widespread use of complex, black-box neural models. Recent studies have begun to address this gap, marked by a growing body of literature focused on interpretability in the speech domain. This tutorial provides a structured overview of interpretability techniques, their applications, implications, and limitations when applied to speech models, aiming to help researchers and practitioners better understand, evaluate, debug, and optimize speech models while building trust in their predictions. In hands-on sessions, participants will explore how speech models encode distinct features (e.g., linguistic information) and utilize them in their inference. By the end, attendees will be equipped with the tools and knowledge to start analyzing and interpreting speech models in their own research, potentially inspiring new directions.
66

@@ -32,9 +32,15 @@ We will present our tutorial about _Interpretability Techniques for Speech Model
3232

3333
## Tutorial contents
3434

35-
> **Representational Analysis methods** for speech model interpretability: <br> Probing <br> {cite}`bentumProcessingStressEndEnd2024,shen-etal-2024-encoding,deheerklootsWhatSelfsupervisedSpeech2025,cormacenglishDomainInformedProbingWav2vec2022` <br> Representation space comparisons <br> RSA {cite}`chrupala-etal-2020-analyzing,shenWaveSyntaxProbing2023a`, CCA {cite}`Pasad2021`, CKA {cite}`pmlr-v97-kornblith19a`) <br> CTC & Decoder lenses <br>{cite}`deheerklootsHumanlikeLinguisticBiases2024,langedijkDecoderLensLayerwiseInterpretation2024` <br> Embedding similarities (ABX tests) <br> {cite}`schatz2016,algayresDPParseFindingWord2022,seysselDiscriminatingFormMeaning2025` <br>
35+
**Representational Analysis methods**:
36+
- Probing{cite}`cormacenglishDomainInformedProbingWav2vec2022, choEvidenceVocalTract2023,bentumProcessingStressEndEnd2024,shen-etal-2024-encoding,bentum25_interspeech,deheerklootsWhatSelfsupervisedSpeech2025,cormacenglishDomainInformedProbingWav2vec2022`
37+
- Representation space comparisons: RSA{cite}`chrupala-etal-2020-analyzing,shenWaveSyntaxProbing2023a`, CCA{cite}`Pasad2021`, CKA{cite}`pmlr-v97-kornblith19a`)
38+
- CTC & Decoder lenses{cite}`deheerklootsHumanlikeLinguisticBiases2024,langedijkDecoderLensLayerwiseInterpretation2024`
39+
- Embedding similarities (ABX tests){cite}`schatz2016,algayresDPParseFindingWord2022,seysselDiscriminatingFormMeaning2025`
3640

37-
> **Feature Importance Scoring methods** for speech model interpretability, including: <br> Context-mixing <br> Attention {cite}`yangUnderstandingSelfAttentionSelfSupervised2020a,shimUNDERSTANDINGROLESELF2022,alastrueyLocalityAttentionDirect2022,audhkhasiAnalysisSelfAttentionHead2022,kobayashiAttentionNotOnly2020a`, Value-Zeroing {cite}`mohebbiHomophoneDisambiguationReveals2023a`), <br> Feature attribution {cite}`fucciExplainabilitySpeechModels2024,shenReliabilityFeatureAttribution2025` (Gradient-based {cite}`prasadHowAccentsConfound2020,guptaPhonemeDiscretizedSaliency2024` & Perturbation-based {cite}`wuExplanationsforASR2023,pastor-etal-2024-explaining`) <br>
41+
**Feature Importance Scoring methods**:
42+
- Context-mixing: Attention{cite}`yangUnderstandingSelfAttentionSelfSupervised2020a,shimUNDERSTANDINGROLESELF2022,alastrueyLocalityAttentionDirect2022,audhkhasiAnalysisSelfAttentionHead2022`, Attention Norm{cite}`kobayashiAttentionNotOnly2020a`, Value-Zeroing {cite}`mohebbiHomophoneDisambiguationReveals2023a`
43+
- Feature attribution {cite}`fucciExplainabilitySpeechModels2024,shenReliabilityFeatureAttribution2025` (Gradient-based {cite}`prasadHowAccentsConfound2020,guptaPhonemeDiscretizedSaliency2024` & Perturbation-based {cite}`wuExplanationsforASR2023,pastor-etal-2024-explaining`
3844

3945
## References
4046

_sources/interspeech2025/feature-importance-scoring/context_mixing.ipynb

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5495,29 +5495,25 @@
54955495
{
54965496
"cell_type": "markdown",
54975497
"source": [
5498-
"# **Quantifying Context-Mixing in Speech Transformers**\n",
5498+
"# Quantifying Context-Mixing in Speech Transformers\n",
54995499
"\n",
55005500
"---\n",
55015501
"\n",
55025502
"Author: Hosein Mohebbi\n",
55035503
"\n",
5504+
"_Thanks to Martijn Bentum, Tom Lentz, and Willem Zuidema for their helpful feedback during the notebook's preparation._\n",
5505+
"\n",
55045506
"---\n",
55055507
"\n",
5506-
"This notebook is based on EMNLP 2023 paper: [\"Homophone Disambiguation Reveals Patterns of Context Mixing in Speech Transformers\"](https://aclanthology.org/2023.emnlp-main.513.pdf) and part of the [_Interspeech2025_](https://www.interspeech2025.org/home) tutorial on [_\"Interpretability Techniques for Speech Models.\"_](https://interpretingdl.github.io/speech-interpretability-tutorial/) The notebook explores the ways to quantify patterns of *context-mixing* in speech ASR models at word-level.\n"
5508+
"This notebook is based on the EMNLP 2023 paper: [\"Homophone Disambiguation Reveals Patterns of Context Mixing in Speech Transformers\"](https://aclanthology.org/2023.emnlp-main.513.pdf) and part of the [Interspeech 2025](https://www.interspeech2025.org/home) tutorial on [_Interpretability Techniques for Speech Models_](https://interpretingdl.github.io/speech-interpretability-tutorial/).\n",
5509+
"\n",
5510+
"The notebook explores the ways to quantify patterns of *context-mixing* in speech ASR models at word-level.\n",
5511+
"\n"
55075512
],
55085513
"metadata": {
55095514
"id": "HEEmFEbkeS3K"
55105515
}
55115516
},
5512-
{
5513-
"cell_type": "markdown",
5514-
"source": [
5515-
"****"
5516-
],
5517-
"metadata": {
5518-
"id": "YVAmPe4Aq6Fo"
5519-
}
5520-
},
55215517
{
55225518
"cell_type": "markdown",
55235519
"source": [
@@ -5572,7 +5568,7 @@
55725568
{
55735569
"cell_type": "markdown",
55745570
"source": [
5575-
"# **Dataset**"
5571+
"# **Homophone Dataset**"
55765572
],
55775573
"metadata": {
55785574
"id": "eoiDquxxkA8K"
@@ -5782,7 +5778,7 @@
57825778
{
57835779
"cell_type": "markdown",
57845780
"source": [
5785-
"# **Models**"
5781+
"# **ASR Models**"
57865782
],
57875783
"metadata": {
57885784
"id": "q2CMbl_FlLk9"
@@ -6273,7 +6269,7 @@
62736269
"\n",
62746270
"- **Attention**\n",
62756271
"\n",
6276-
"- **Value Zeroing**"
6272+
"- **Value Zeroing** [(Mohebbi et al., 2023)](https://aclanthology.org/2023.eacl-main.245.pdf)"
62776273
],
62786274
"metadata": {
62796275
"id": "vM3PE030g1Sg"
@@ -6379,7 +6375,7 @@
63796375
"S_{i \\leftarrow j}=\\frac{1}{|\\mathcal{I}|} \\sum_{n \\in \\mathcal{I}} \\cos \\left(\\tilde{\\boldsymbol{x}}_{n}, \\tilde{\\boldsymbol{x}}_{n}^{\\neg j}\\right)\n",
63806376
"$$\n",
63816377
"\n",
6382-
"__Note #1__: Unlike generic perturbation approaches, our proposed method does not remove the input token representations $x_i$ from the input of a transformer layer! Since any changes in the input vectors will lead to changes in the query and key vectors in the multi-head attention module, resulting in a change in the attention distribution. So, there will be a discrepancy between the alternative attention weights that we analyze and those we initially had for the original context. So, basically, we won't analyze the same model anymore! By zeroing only the value vector in the weighted sum, the token representation maintains its identity within the layer, but it does not contribute to forming other token representations.\n",
6378+
"__Note #1__: Unlike generic perturbation approaches, our proposed method does not remove the input token representations $x_i$ from the input of a transformer layer! Since any changes in the input vectors will lead to changes in the query and key vectors in the multi-head attention module, resulting in a change in the attention distribution. So, there will be a discrepancy between the alternative attention weights that we analyze and those we initially had for the original context; So, basically, we won't analyze the same model anymore! By zeroing only the value vector in the weighted sum, the token representation maintains its identity within the layer, not leading to OOD problem, while not contributing to conttext-mixing to from other token representations.\n",
63836379
"\n",
63846380
"__Note #2__: Since Value Zeroing is computed from the layer's outputs, it incorporates all the components inside a Transformer layer, inlcuding feed-forwards, layer normalization, and residual connection.\n"
63856381
],
@@ -6925,15 +6921,6 @@
69256921
}
69266922
}
69276923
]
6928-
},
6929-
{
6930-
"cell_type": "code",
6931-
"source": [],
6932-
"metadata": {
6933-
"id": "5nuh51ZqxuQa"
6934-
},
6935-
"execution_count": null,
6936-
"outputs": []
69376924
}
69386925
]
69396926
}

_sources/interspeech2025/feature-importance-scoring/feature_attribution.ipynb

Lines changed: 2266 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)