Manuscript Offprint

arXiv:2609.10645

Sparse Weight and Edge Circuit Discovery in Transformer-based Acoustic Models

Jiankun Wei, Ewan Dunbar, Gerald Penn

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

1st1^{st} Jiankun Wei

Department of Computer Science

University of Toronto

Toronto, Canada

0009-0006-4926-3815

2nd2^{nd} Ewan Dunbar

Department of Computer Science

University of Toronto

Toronto, Canada

0000-0001-9603-953X

3rd3^{rd} 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.

References (38)