Manuscript Offprint
arXiv:2609.10645Sparse Weight and Edge Circuit Discovery in Transformer-based Acoustic Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Jiankun Wei
Department of Computer Science
University of Toronto
Toronto, Canada
0009-0006-4926-3815
Ewan Dunbar
Department of Computer Science
University of Toronto
Toronto, Canada
0000-0001-9603-953X
Gerald Penn
Department of Computer Science
University of Toronto
Toronto, Canada
0000-0003-3553-8305
Abstract—Transformer-based foundation models are powerful but opaque, motivating Mechanistic Interpretation methods to uncover the black-box by identifying small computation subgraphs responsible for a task. DiscoGP is a joint weight-and-edge circuit discovery framework originally developed for text decoders. We extend DiscoGP to speech encoders and present, to our knowledge, the first circuit discovery study for modern speech foundation models. Across HuBERT and Wav2Vec 2.0 on several speech classification tasks, we find that the discovered circuits are extremely compact, yet often match or even exceed the performance of the full pretrained encoder with the same downstream head. Through ablations, we show that these circuits reflect pretrained computation rather than random structure or task-head artifacts. We also introduce a memory-efficient DiscoGP variant that reduces the GPU memory cost of edge-circuit discovery at runtime from quartic to cubic. Overall, our results broaden Mechanistic Interpretation beyond text decoders and show that circuit-level analysis can reveal both explanatory structure and unexpected functional behavior in speech encoders.
Index Terms—Circuit Discovery, Mechanistic Interpretation, Self-Supervised Speech Models, Speech Representation Learning
I. INTRODUCTION
Transformer-based foundation models [1]–[6] have become central to modern language and speech systems, yet they remain difficult to interpret or modify in a targeted way. Mechanistic interpretation seeks to address this by mapping model behavior to concrete computations inside the network. Circuit discovery is a particularly useful approach: instead of asking whether individual neurons or layers are meaningful in isolation, it aims to identify small task-relevant computation subgraphs whose collective behavior explains a model's output. Early work relied on manual activation patching and analysis [7]; later methods such as ACDC automated circuit search in GPT-2 and showed that very small edge sets can recover known behaviors [8]. More recent work has extended circuit discovery with gradient-based methods and modular circuit composition [9]–[12]. DiscoGP [13] advances this line of work by jointly learning weight masks and edge masks, producing isolated circuits that preserve task behavior.
Despite these advances, circuit discovery has largely been studied in decoder-only text models, leaving encoder-style architectures and speech foundation models unexplored. This matters for two reasons. First, encoder representations are not directly exposed through autoregressive logits, so circuit discovery requires an auxiliary task head and a careful check that the discovered structure is not an artifact of that head. Second, no prior work has demonstrated circuit discovery in modern speech encoders at scale. We address this gap by adapting DiscoGP to HuBERT [14] and Wav2Vec 2.0 [15] and evaluating the discovered circuits on vowel, consonant, and voicing classification, keyword spotting, emotion recognition, and spoof detection across multiple datasets. We emphasize that this work is about circuit discovery for mechanistic interpretability, not model compression. While DiscoGP often yields sparse subgraphs, our focus is on whether these subgraphs faithfully recover task-relevant computation in pretrained speech encoders, rather than on reducing parameters or deployment cost.
Our results show that speech encoders also admit tiny, task-specific circuits similar to their text decoder counterparts. Across tasks, DiscoGP consistently finds sparse subgraphs that preserve performance and in many cases outperform the full pretrained encoder with the same downstream head. Ablations with random and frozen models show that these circuits are not accidental artifacts of the architecture or head, but reflect meaningful pretrained computation.
In summary, this work makes two contributions. It is, to our knowledge, the first large-scale circuit discovery study for speech encoders, and it provides a memory-efficient variant of DiscoGP that enables circuit search under tighter hardware constraints. Together, these results broaden mechanistic interpretability beyond text decoders and show that speech models contain compact, task-relevant circuits with both explanatory and practical value.

(a) Overview of DiscoGP

(b) Discovering edge circuits
Fig. 1: (a) DiscoGP is the first mechanistic interpretation algorithm that combines the discovery of weight circuits and edge circuits. In this paper we extend DiscoGP to Encoder architectures and speech language models. (b) Edge circuits are subgraphs of the directed computation graph of a model. In this example, the MLP edge is cut to form a subgraph.
Olsson et al. [17] define the resulting composed QK and OV matrices as query-key and output-value circuits, respectively.
Following these developments, Wang et al. [7] treat individual attention heads within a transformer block as circuits and attempt to manually identify task-relevant circuits through activation patching: they corrupt the output of a single head with a counterfactual value and measure the resulting change in model output. More recently, Conmy et al. [8] represent the computations of a transformer layer as a directed acyclic graph (computational graph) and search for subgraphs responsible for a specific behavior, enabling an automated form of circuit discovery that naturally leads to edge circuits.
A. Directed Acyclic Graph and Edge Circuit Discovery
A transformer block consists of an attention module and an MLP module, and multiple blocks are stacked to form the encoder or decoder of a Transformer network. Let be the output of the (i-1)st transformer block (with denoting the input), let be the set of attention heads in block i, and , its MLP layer. The output is defined as:
Treating each term as an edge, and noting that each head computes , we obtain direct edges for . For deeper layers, each occurrence of can be recursively unrolled back to the initial input , resulting in a quadratic number of indirect edges.
Edge circuit discovery aims to reduce this combinatorial explosion by identifying the smallest set of edges that forms a functional information-flow path from the input, through the stacked transformer blocks, to the final output by learning a binary mask over both direct and indirect edges.
B. Weight Circuit Discovery
At the same time, a substantial body of work in interpretation research focuses on weight circuits discovery: methods that single out compact subnetworks (specific subsets of a model's parameters) that are responsible for particular functions or tasks [19]–[23]. This research trajectory was originally motivated by the Lottery Ticket Hypothesis [24], which posits that dense, randomly initialized neural networks contain “winning ticket” subnetworks that, when executed alone, can reach test accuracy comparable to the original network. However, weight circuits can equally be found in pre-trained models, allowing us to identify task-specific circuits created during training: [25] adapted ideas of weight circuits to transformer-based language models and developed procedures such as continuous sparsification that can extract functional subnetworks directly from a trained model, preserving task performance without fully retraining [26].
C. DiscoGP
DiscoGP discovers task-specific circuits by jointly discovering both model weights and edges circuits. Let denote the model's computation graph and , its parameters. DiscoGP learns a pair of binary masks:
that gate weight parameters and edges; these masks are optimized by gradient-based learning.
Gradient-based binary masks. Following prior work on gradient-based mask learning [19]–[21], [27], [28] each mask entry is modeled as a random variable from a Gumbel–sigmoid distribution parameterized by a learnable logit .
DiscoGP first computes a continuous score by injecting Gumbel noise and applying a temperatured sigmoid:
where is the temperature and denotes the logistic sigmoid. To obtain a binary mask while retaining the gradient signal, DiscoGP applies the straight-through estimator to form the discrete gating variable:
where blocks gradients. The resulting is therefore a discrete variable differentiable with respect to the logit .
Sheaf search objectives. Given a task dataset where denotes the original model's output (or label), DiscoGP optimizes a composed objective that encourages three properties: (i) the discovered subnetwork should reproduce the original model's behavior on (fidelity), (ii) the complement of the discovered circuit should perform poorly (completeness), and (iii) the circuit should be small (sparsity).
Here, denotes the complementary mask and , the number of labels; therefore drives the complementary subnetwork toward near-uniform (random) predictions on . The per-coordinate in serves as a continuous proxy for mask size.
The final training objective is a weighted sum: , with hyperparameters controlling the trade-offs between faithfulness, completeness, and compactness.
III. EXPERIMENTAL SETUP
Datasets and tasks. We evaluate DiscoGP on several speech-encoding tasks using four datasets. For each experiment, we run three times and take the average except for emotion recognition where we perform 5-fold cross validation as there are no splits given. The Articulatory Index corpus [29], originally collected by [30], contains pronunciations of CV and VC monosyllables from 20 English speakers (12 male, 8 female). For this dataset, we perform the following classification tasks:
• Vowel classification: classify the nucleus (15 vowels)
• Consonant classification: classify the onset/offset (24 consonants)
• Voicing classification: onset/offset is voiced or unvoiced
To evaluate DiscoGP on longer inputs and under real-world settings, we perform circuit discovery on a keyword spotting task (by classifying the pronounced word with one of 10 keywords or unknown) with the widely used Speech Commands dataset v1.0 dataset [31], an emotion recognition task (predicting one of the four emotions: neutral, happy, sad, or angry from the speech input) using the IEMOCAP dataset [32], and spoof detection using the ASVspoof 2019 dataset [33].
Models and experimental setups. We apply DiscoGP to two widely used speech encoders: HuBERT and Wav2Vec 2.0. For each, we evaluate four DiscoGP circuit discovery setups, and compare two baselines with no weight or edge circuits discovered:
• DiscoGP: the base encoder is frozen and a one-layer feedforward network (FFN) is trained as the classification head
• DiscoGP-W: the first experiment with discovering only weight circuit (no edge circuit)
• Random head: the classification head is randomly initialized and kept fixed while the base encoder is unchanged
• Random Baseline: both the base encoder and the classification head are randomly initialized and kept fixed (a random baseline).
• Frozen: the base encoder is frozen and a one-layer feedforward network (FFN) is trained as the classification head
• Finetuned: the top two layers of the base encoder are finetuned together with the classification head.
We further identified the quartic growth in runtime memory occupancy of DiscoGP as a major bottleneck in deploying DiscoGP on larger models, datasets or smaller GPUs. in Section V we identify the redundancy in residual connections is the main culprit of this quartic growth, and proposed multiple ways to cut the residual connections. The accuracy-memory tradeoff is then reported in Table I.
IV. RESULTS
Table I summarizes the results for HuBERT and Wav2Vec 2.0. For each dataset and task we run DiscoGP three times and report the average accuracy on the train and test splits, as well as the average final circuit density in terms of retained weights and edges. In what follows we highlight the key findings, analyze ablation results, and offer hypotheses for notable behaviors.
A. Analysis and Discussion
- DiscoGP learns sparse, task-relevant circuits: Across datasets and tasks, DiscoGP isolates extremely compact sub-networks while retaining test accuracy comparable to the frozen baseline. This shows the method can identify a small, task-relevant computation subgraph and weight parameters inside speech foundation models.
In addition, circuits discovered in randomly initialized models perform above chance but typically underperform circuits discovered in pretrained models by a substantial margin (commonly 10% absolute, up to 50%). If circuit discovery were merely constructing task networks “out of noise,” then
| Classification Task | Setup | HuBERT | Wav2Vec 2.0 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Train Acc. | Test Acc. | Weight Circuit | Edge Circuit | Train Acc. | Test Acc. | Weight Circuit | Edge Circuit | ||
| Articulatory Index | |||||||||
| Voicing Classification | Frozen | 94.9% | 94.1% | 100% | 100% | 84% | 84.3% | 100% | 100% |
| Finetuned | 98.1% | 96.9% | 100% | 100% | 95.5% | 94.4% | 100% | 100% | |
| DiscoGP () | 98.1% | 96.9% | 1.7% | 0.8% | 99.2% | 97.7% | 1.6% | 0.3% | |
| DiscoGP-W | 98.8% | 97.2% | 1.7% | 100% | 99.4% | 97.9% | 1.6% | 100% | |
| Random Head | 97.6% | 96.8% | 1.2% | 0.6% | 99.4% | 97.6% | 1.3% | 0.3% | |
| Random Baseline | 86.4% | 86.5% | 1.7% | 0.4% | 89.6% | 90.1% | 1.2% | 0.3% | |
| QK DiscoGP (1/3) | 98.7% | 97.1% | 1.7% | 2% | 99% | 97.2% | 1.6% | 0.5% | |
| QKV () | 98.8% | 97.4% | 1.7% | 2.7% | 97.2% | 96.1% | 1.6% | 0.8% | |
| QKV-MLP () | 95.2% | 94.6% | 1.7% | 1.7% | 91.4% | 91.3% | 1.6% | 0.4% | |
| Vowel Classification | Frozen | 86.4% | 79.8% | 100% | 100% | 57.6% | 55.3% | 100% | 100% |
| Finetuned | 91.4% | 82.5% | 100% | 100% | 81% | 77.8% | 100% | 100% | |
| DiscoGP () | 91.8% | 89.2% | 7.6% | 3.3% | 87.6% | 85.6% | 3.1% | 0.6% | |
| DiscoGP-W | 87.7% | 84.9% | 6.1% | 100% | 90.1% | 88.4% | 3.1% | 100% | |
| Random Head | 91.1% | 88% | 6.1% | 1.8% | 87.3% | 85.3% | 2.4% | 2.7% | |
| Random Baseline | 76.7% | 77.3% | 7.9% | 1.1% | 75% | 74.3% | 3.8% | 0.4% | |
| QK DiscoGP (1/3) | 98.7% | 97.1% | 1.7% | 2% | 99% | 97.2% | 1.6% | 0.5% | |
| QKV () | 98.8% | 97.4% | 1.7% | 2.7% | 97.2% | 96.1% | 1.6% | 0.8% | |
| QKV-MLP () | 95.2% | 94.6% | 1.7% | 1.7% | 91.4% | 91.3% | 1.6% | 0.4% | |
| Consonant Classification | Frozen | 85.7% | 78.2% | 100% | 100% | 51.2% | 48.1% | 100% | 100% |
| Finetuned | 92.4% | 85.5% | 100% | 100% | 82.7% | 75.7% | 100% | 100% | |
| DiscoGP () | 84.5% | 79.4% | 6.5% | 7% | 85.5% | 81.2% | 3.9% | 0.9% | |
| DiscoGP-W | 87.2% | 83.4% | 6.5% | 100% | 85% | 80.8% | 3.9% | 100% | |
| Random Head | 89.1% | 85% | 4.3% | 2.8% | 84.2% | 81.4% | 2.9% | 1% | |
| Random Baseline | 60.3% | 57.4% | 4.8% | 0.7% | 60.7% | 57.6% | 5% | 0.8% | |
| QK DiscoGP (1/3) | 83.5% | 75.1% | 6.5% | 4.1% | 87.3% | 82.5% | 3.9% | 1.2% | |
| QKV () | 75.9% | 71.3% | 6.5% | 6.2% | 87.4% | 83.6% | 3.9% | 1.5% | |
| QKV-MLP () | 8.8% | 8.3% | 6.5% | 4.2% | 37.1% | 35.7% | 3.9% | 1.7% | |
| Speech Commands dataset v1.0 | |||||||||
| Keyword Spotting | Frozen | 98.1% | 97.8% | 100% | 100% | 91.6% | 89.8% | 100% | 100% |
| Finetuned | 98.7% | 98.2% | 100% | 100% | 98% | 97.6% | 100% | 100% | |
| DiscoGP () | 93.7% | 91.4% | 5% | 3.1% | 95.9% | 94.1% | 2.7% | 1.6% | |
| DiscoGP-W | 91.3% | 89.2% | 5% | 100% | 95.6% | 94.2% | 2.7% | 100% | |
| Random Head | 96.7% | 93.9% | 2.7% | 1.3% | 96.2% | 94.1% | 1.4% | 0.6% | |
| Random Baseline | 80.6% | 79.7% | 4.6% | 1.7% | 79.1% | 78.1% | 2.8% | 1.7% | |
| QK DiscoGP (1/3) | 92.8% | 90.5% | 5% | 4.2% | 95.6% | 93.7% | 2.7% | 2.3% | |
| QKV () | 93.6% | 91.1% | 5% | 3.9% | 95.8% | 93.6% | 2.7% | 2% | |
| QKV-MLP () | 71.7% | 70.1% | 5% | 4.9% | 75% | 73.4% | 2.7% | 2.6% | |
| IEMOCAP | |||||||||
| Emotion Recognition | Frozen | 66% | 63.4% | 100% | 100% | 60.7% | 59.6% | 100% | 100% |
| Finetuned | 79.5% | 70.7% | 100% | 100% | 66% | 61.7% | 100% | 100% | |
| DiscoGP () | 62.8% | 63.5% | 1.9% | 1.7% | 64.9% | 64% | 1.2% | 1.1% | |
| DiscoGP-W | 64.3% | 62.8% | 1.7% | 100% | 63.7% | 63% | 1.2% | 100% | |
| Random Head | 64.7% | 63.5% | 1.7% | 2.2% | 67.4% | 65.3% | 0.8% | 2.1% | |
| Random Baseline | 59.2% | 58.4% | 2% | 0.7% | 58.8% | 58.5% | 1.4% | 0.7% | |
| QK DiscoGP (1/3) | 61% | 60.8% | 1.9% | 2.6% | 64.9% | 64.5% | 1.2% | 1.6% | |
| QKV () | 60.3% | 60.7% | 1.9% | 3.3% | 64.6% | 64.8% | 1.2% | 3.5% | |
| QKV-MLP () | 58.1% | 59% | 1.9% | 3.2% | 59.8% | 59.9% | 1.2% | 3% | |
| ASVspoof 2019 | |||||||||
| Spoof Detection | Frozen | 97.6% | 95% | 100% | 100% | 94.3% | 92% | 100% | 100% |
| Finetuned | 99.9% | 99.6% | 100% | 100% | 99.9% | 99.6% | 100% | 100% | |
| DiscoGP () | 95.1% | 96% | 0.6% | 2.4% | 90% | 88.7% | 1.4% | 1.3% | |
| DiscoGP-W | 96.1% | 93% | 0.6% | 100% | 90.9% | 89% | 1.4% | 100% | |
| Random Head | 92.4% | 93% | 0.9% | 0.6% | 90.6% | 90% | 0.4% | 2.3% | |
| Random Baseline | 90% | 89% | 0.3% | 1.5% | 90% | 89% | 0.5% | 1.6% | |
| QK DiscoGP (1/3) | 97.6% | 96% | 0.6% | 3.2% | 90.8% | 90% | 1.4% | 2.4% | |
| QKV () | 94.7% | 95.8% | 0.6% | 1.4% | 97.8% | 95% | 1.4% | 1.6% | |
| QKV-MLP () | 89.7% | 89.7% | 0.6% | 1% | 93.8% | 92% | 1.4% | 2% | |
TABLE I: Performance and task competent circuit densities of HuBERT and Wav2Vec 2.0. We also show the result and corresponding asymptotic memory occupancies of circuit discovery with corresponding residual connections cut.
completely randomly initialized networks should be able to match the performance of DiscoGP circuits, but they do not. This demonstrates that pretraining of HuBERT or Wav2Vec 2.0 carries useful, recoverable circuits into the weights and computational graphs. This shows meaningful circuits are present in the pretrained model, and the gap between completely randomly initialized networks and DiscoGP quantifies how much of task performance is attributable to learned weight structure (not just architecture or mask selection).
-
Ablation study: Role of the classification head: We replaced the learned classification head by a fixed random linear projection, since previous work using DiscoGP did not make use of encoder-only models and thus did not need task heads. This yields similar train and test accuracy, suggesting that the task-relevant computation is encoded in the foundation model activations and that circuit selection is representation-and encoding-driven rather than an artifact of a specific trained head.
-
DiscoGP equalizes model performance gaps: HuBERT generally gives stronger frozen baselines than Wav2Vec 2.0. Nevertheless, DiscoGP yields larger relative improvements for Wav2Vec 2.0. Masking makes specialized circuits emerge from its more general parameters. Discovered circuits for Wav2Vec 2.0 give comparable performance to frozen HuBERT and generally far exceed frozen Wav2Vec 2.0.
-
DiscoGP can improve generalization: The discovered circuits mostly outperform the frozen baseline on test sets, and often maintain their high performance towards the end. Two mechanisms may explain this: (1) extra parameters and training: circuit discovery introduces additional trainable variables (mask logits for weights and edges) and typically runs extra optimization steps, which provide a constrained but nontrivial adaptation capacity similar to finetuning; (2) implicit regularization: binary masking removes parameters that may overfit or carry noisy signals (we observe lower train but higher test accuracy in many cases). Finetuning usually achieves the highest absolute performance as it is not meant to find sparse circuits and can therefore adjust every weight and connection freely.
-
Weight vs. edge circuits: The benefits of weight circuit only compared to the final circuit depend on the task: For vowel classification, keyword spotting, and spoof detection on HuBERT and consonant classification and emotion recognition on Wav2Vec 2.0, edge circuit improves accuracy. For the rest of the tasks, edge circuit reduces performance somewhat. Together, these observations suggest that DiscoGP can benefit from an early stopping mechanism during edge circuit discovery.
V. MEMORY-EFFICIENT DISCOGP
A major runtime bottleneck in DiscoGP is the memory required to discover edge circuits, which grows quartically with model depth and can easily exceed the capacity of a single GPU. For example, models such as HuBERT and Llama3.2-1B cannot be hosted on an NVIDIA L4 (48 GB) once edge-circuit discovery is enabled. For those that can be hosted, the batch size sometimes has to be reduced to 1 or 2. We therefore modify DiscoGP to reduce the memory footprint of edge-circuit discovery from asymptotically quartic to asymptotically cubic.
A. Memory-Efficient Edge Circuit Discovery
Let B denote the number of blocks and H the number of attention heads per block. In the original formulation, the number of edge-mask parameters
The dominant term arises from residual-stream nodes accumulated across blocks: as depth increases, every new block can connect to an ever-growing set of earlier activations. We observe that the learned Q and K masks zeroed most early residual nodes. Based on this observation, we propose to keep only the last k blocks in the edge masks and zero out residual nodes from earlier blocks. In practice, we set k = 2, retaining only the current and previous block. We empirically verify our observation by evaluating the original setup and three new method of DiscoGP with QK residual removed, QKV residual removed, and QKV+MLP residual removed on GPT2, Llama3.2-1B, HuBERT, and Wav2Vec 2.0 models and their corresponding text and speech tasks with original DiscoGP running on NVIDIA L4 (48GB) and NVIDIA H100 (80GB) GPUs, and the new DiscoGP entirely on NVIDIA L4 GPUs.
The results in Table I show the accuracy-memory tradeoff in detail across all models and tasks we considered. Overall, the results show that the QKV residuals in edge-circuit discovery can be safely removed without largely impairing accuracy, but the MLP residuals must remain intact. This is reasonable because attention heads mainly act as routing machinery instead of information storage. Prior works [34], [35] have shown that many attention heads can be pruned while retaining performance, which suggests substantial redundancy in the QKV pathway. In contrast, Geva et al. [36] point out that MLP residual are the information storage, where each layer's output continuously retain, modify or veto.
In our new DiscoGP algorithm with QKV residuals zeroed out, the resulting parameter count
Similarly, the runtime memory cost of other residual cutting paradigms can be calculated, and the trade off between memory occupation and task performances are outlined in Table I. Based on the results, in terms of the number of blocks and heads of a model, our method with QKV residuals zeroed attains the optimal trade off, which reduces the memory required for edge-circuit discovery from quartic to cubic while mostly maintains the performance.
We also verify the generalization of our residual cut but evaluating our algorithms on the text models (GPT2 [5] and Llama3.1-1B Instruct [37]) with Blimp [38], IOI [7], and Pararel [39] tasks defined in the original DiscoGP paper [13]. The results show that QKV residuals zeroed attains the optimal trade off as well. The results are reported in the appendix.
VI. Discussion
Our results suggest three broader implications of circuit discovery for speech encoders. First, circuit discovery isolates compact computational subgraphs (often retaining single-digit percentages of weights/edges) that reproduce the original encoder + head performance. The resulting sparsity is best source

(a) Block 10's K edge mask
source
(b) Block 10's MLP edge mask
Fig. 2: (a) Block 10's K binary edge masks of the vowel classification task with residuals coming from block 4 onward. light greys are 0 and blacks are 1. It is clear that most of the previous residuals are turned off by edge masks anyway. (b) Block 10's K binary edge masks of the vowel classification task with all previous residuals. light greys are 0 and blacks are 1. There is no clear pattern as to which residuals are removable.
viewed as evidence that the task can be explained by a small subset of the original computation, rather than as a compression objective in its own right. As a practical side effect, these sparse circuits are also easier to store and run, which have to potential for an alternative lower-memory and lower-latency deployment.
Second, circuit discovery yields a more causal interpretability signal than layerwise diagnostic probes. Probes can produce false positives by decoding features that are present but not used, whereas, by optimizing sparse binary masks over both weights and computation-graph edges, DiscoGP explicitly selects the chain of operations required to produce the output, yielding a direct test of whether pretrained representations are used.
Third, the circuit view moves analysis away from monosemantic single-neuron explanations toward functional groups of units operating in superposition. By jointly discovering weights circuits and unrolled residual-stream edges, DiscoGP uncovers small, interacting subnetworks whose collective computation implements the task.
In a separate contribution, we also develop a memory-efficient variant of DiscoGP that reduces GPU memory usage during edge-circuit discovery from quartic to cubic in terms of the number of blocks and heads of the model. This does not change the discovered circuits themselves; rather, it makes the discovery procedure more practical on limited hardware and less likely to trigger CUDA out-of-memory errors.
VII. LIMITATIONS AND FUTURE WORK
Our evaluation is limited to two encoder families (HuBERT and Wav2Vec 2.0) and English datasets. Extending the method to other architectures, pretraining objectives, and typologically diverse languages may improve generality.
Our experiments were also restricted to classification tasks. While we aim to extend this to regression tasks, doing so presents specific challenges. Validating circuit discovery on regression tasks remains to be done in both text-based language models and speech models, and so we currently lack a robust framework demonstrating this.
Finally, we remark that we observed a consistent phenomenon whereby the weight density of the discovered circuits decreases from earlier layers to later layers across all evaluated tasks. We only document this trend here; a full theoretical understanding and causal explanation of this progression of sparsity require further experimental investigation.
VIII. SUMMARY OF CONTRIBUTIONS
We extend joint weight-and-edge circuit discovery (DiscoGP) to modern speech encoders, including HuBERT and Wav2Vec 2.0, and show that it uncovers compact, task-specific circuits across a range of speech tasks. We provide empirical validation and targeted ablations showing that these circuits reflect pretrained computation rather than random structure or task-head artifacts, and we analyze several plausible explanations for the observed generalization gains.
Separately, we introduce a memory-efficient DiscoGP variant that reduces GPU memory usage during circuit discovery, making the method more practical on limited hardware. Together, these results broaden mechanistic interpretability beyond text decoders and show that circuit-level analysis can support both explanatory insight and practical use.
IX. AI-GENERATED CONTENT DISCLOSURE
We used ChatGPT to review grammar, improve clarity of expression, and refine wording in this manuscript. We did not use generative AI tools to draft substantive portions of the paper or to assist with the conceptualization of the research, methodological design, experimental execution, data analysis, or interpretation of the results. All scientific contributions, decisions, and conclusions presented in this work are solely our own.
REFERENCES
[1] A. Vaswani et al., “Attention is all you need,” in NeurIPS. Curran Associates Inc., 2017, vol. 31, pp. 6000–6010.
[2] J. Devlin et al., “Bert: Pre-training of deep bidirectional transformers for language understanding,” in Proc. HLT, 2019, pp. 4171–4186.
[3] C. Raffel et al., “Exploring the limits of transfer learning with a unified text-to-text transformer,” JMLR, vol. 21, no. 140, pp. 1–67, 2020. [Online]. Available: http://jmlr.org/papers/v21/20-074.html
[4] H. Touvron et al., “Llama 2: Open foundation and fine-tuned chat models,” 2023. [Online]. Available: https://arxiv.org/abs/2307.09288
[5] A. Radford et al., “Language models are unsupervised multitask learners,” OpenAI Blog, 2019, page 24. [Online]. Available: https://openai.com/blog/better-language-models
[6] OpenAI, “GPT-4 technical report,” 2023. [Online]. Available: https://arxiv.org/abs/2303.08774
[7] K. R. Wang et al., “Interpretability in the wild: A circuit for indirect object identification in GPT-2 small,” in Proc. ICLR, 2022. [Online]. Available: https://openreview.net/forum?id=Px7XVTIe1z
[8] A. Conmy et al., “Towards automated circuit discovery for mechanistic interpretability,” in NeurIPS. Curran Associates Inc., 2023, vol. 37, pp. 16318–16352.
[9] P. Mondorf, S. Wold, and B. Plank, “Circuit compositions: Exploring modular structures in transformer-based language models,” in Proc. ACL, 2025, pp. 14934–14955.
[10] A. Syed, C. Rager, and A. Conmy, “Attribution patching outperforms automated circuit discovery,” in Proceedings of the 7th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP, 2024, pp. 407–416. [Online]. Available: https://aclanthology.org/2024.blackboxnlp-1.25/
[11] M. Hanna, S. Pezzelle, and Y. Belinkov, “Have faith in faithfulness: Going beyond circuit overlap when finding model mechanisms,” 2024. [Online]. Available: https://arxiv.org/abs/2403.17806
[12] L. Zhang et al., “Eap-gp: Mitigating saturation effect in gradient-based automated circuit identification,” 2025. [Online]. Available: https://arxiv.org/abs/2502.06852
[13] L. Yu et al., “Sheaf discovery with joint computation graph pruning and flexible granularity,” in Proc. EMNLP, Nov. 2025, pp. 8833–8848.
[14] W.-N. Hsu et al., “Hubert: Self-supervised speech representation learning by masked prediction of hidden units,” IEEE TASLP, vol. 29, pp. 3451–3460, 2021.
[15] A. Baevski et al., “wav2vec 2.0: A framework for self-supervised learning of speech representations,” in NeurIPS. Curran Associates Inc., 2020, vol. 34, pp. 12449–12460.
[16] N. Nanda, “A comprehensive mechanistic interpretability explainer & glossary,” 2021. [Online]. Available: https://www.neelnanda.io/mechanistic-interpretability/glossary
[17] C. Olsson et al., “In-context learning and induction heads,” 2022. [Online]. Available: https://arxiv.org/abs/2209.11895
[18] DeepSeek-AI, “Deepseek-v3 technical report,” 2024. [Online]. Available: https://arxiv.org/abs/2412.19437
[19] S. Cao, V. Sanh, and A. Rush, “Low-complexity probing via finding subnetworks,” in Proc. HLT, 2021, pp. 960–966.
[20] R. Csordás, S. van Steenkiste, and J. Schmidhuber, “Are neural nets modular? inspecting functional modularity through differentiable weight masks,” in Proc. ICLR, 2021.
[21] N. De Cao et al., “Sparse interventions in language models with differentiable masking,” in Proceedings of the 5th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP, 2022, pp. 16–27. [Online]. Available: https://aclanthology.org/2022.blackboxnlp-1.2/
[22] D. Zhang et al., “Can subnetwork structure be the key to out-of-distribution generalization?” in Proc. ICML, vol. 139, 2021, pp. 12356–12367.
[23] D. Guo, A. Rush, and Y. Kim, “Parameter-efficient transfer learning with diff pruning,” in Proc. ACL/IJCNLP, 2021, pp. 4884–4896.
[24] J. Frankle and M. Carbin, “The lottery ticket hypothesis: Finding sparse, trainable neural networks,” in Proc. ICLR, 2019.
[25] M. A. Lepori, T. Serre, and E. Pavlick, “Break it down: Evidence for structural compositionality in neural networks,” in NeurIPS. Curran Associates Inc., 2023, vol. 37, pp. 42623–42660.
[26] P. Savarese, H. Silva, and M. Maire, “Winning the lottery with continuous sparsification,” in NeurIPS. Curran Associates Inc., 2020, vol. 33, pp. 11380–11390.
[27] D. Bayazit et al., “Discovering knowledge-critical subnetworks in pre-trained language models,” in Proc. EMNLP, 2024, pp. 6549–6583.
[28] C. Louizos, M. Welling, and D. P. Kingma, “Learning sparse neural networks through regularization,” in Proc. ICLR, 2018.
[29] T. Schatz et al., “Articulation Index LSCP (LDC2015S12),” Linguistic Data Consortium, 2015. [Online]. Available: https://doi.org/10.35111/rz6a-gd14
[30] P. Fousek, P. Svojanovsky, F. Grezl, and H. Hermansky, “New nonsense syllables database analyses and preliminary asr experiments,” in Proc. ICSLP, 2004, pp. 2004–29.
[31] P. Warden, “Speech commands: A public dataset for single-word speech recognition,” Dataset available online, 2017.
[32] C. Busso et al., “Iemocap: Interactive emotional dyadic motion capture database,” JLRE, vol. 42, no. 4, pp. 335–359, 2008.
[33] A. Nautsch et al., “Asvspoof 2019: Spoofing countermeasures for the detection of synthesized, converted and replayed speech,” IEEE Trans. Biometrics, Behavior, and Identity Science, vol. 3, no. 2, pp. 252–265, 2021.
[34] P. Michel, O. Levy, and G. Neubig, in NeurIPS, H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, Eds., vol. 32, 2019, pp. 14037–14047.
[35] K. Clark et al., “What does BERT look at? An analysis of BERT’s attention,” in Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, 2019, pp. 276–286.
[36] M. Geva, R. Schuster, J. Berant, and O. Levy, “Transformer feed-forward layers are key-value memories,” in Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, M.-F. Moens, X. Huang, L. Specia, and S. W.-t. Yih, Eds. Online and Punta Cana, Dominican Republic: Association for Computational Linguistics, Nov. 2021, pp. 5484–5495. [Online]. Available: https://aclanthology.org/2021.emnlp-main.446/
[37] A. Grattafiori et al., “The llama 3 herd of models,” 2024. [Online]. Available: https://arxiv.org/abs/2407.21783
[38] A. Warstadt et al., “Blimp: The benchmark of linguistic minimal pairs for english,” Transactions of the Association for Computational Linguistics, vol. 8, pp. 377–392, 2020. [Online]. Available: https://doi.org/10.1162/tacl_a_00321
[39] Y. Elazar et al., “Measuring and improving consistency in pretrained language models,” Transactions of the Association for Computational Linguistics, vol. 9, pp. 1012–1031, 2021.