Manuscript Offprint
arXiv:2610.12520CircuitTree: Composing Circuits into A Syllable Transcriber
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
The goal of circuit discovery is to decompose a monolithic neural network into tiny modular subnetworks which are interpretable in the sense that each does an identifiable subtask. We develop a practical method for composing arbitrarily many circuits into a single model. We propose a greedy, density-scaled composition algorithm that overcomes limitations of previous attempts to compose circuits by naive union, then generalize it to N circuits via CircuitTree, a new data structure built on a tree-compose schedule. We compose circuits pruned from HuBERT for classifying individual phonemes into a syllable classifier, a capability none of the 39 phoneme circuits has individually. Chaining CircuitTrees into a hierarchy-of-circuits pipeline, we transcribe open syllables at 64.8% accuracy, within 1.2 points of a 66.0% ceiling that shares no circuitry at all, with 99.5% of circuit components shared.
Index Terms— circuit discovery, mechanistic interpretability, model merging, modularity, HuBERT
1. INTRODUCTION
Many researchers has proposed to view modern multi-task neural network models as the composition of large numbers of sub-networks (circuits) with independent capabilities. [1–6]. Early work identified circuits manually [7]; automated methods soon followed [8], reducing circuit discovery to a process of choosing a metric and a dataset to define a behaviour, and patching activations until the responsible components emerge.
While much research has proposed circuit discovery as a tool for deepening our understanding of black-box models, the ability to decompose models into small, modular sub-networks has practical implications. Researchers have envisioned circuit discovery as a way to “re-engineer” a network by decomposing the monolithic model into modular, Lego-like pieces, each responsible for a single task [1, 2, 6, 9, 10]. The practical payoff of this decomposition is modularity. Once primitive circuits are identified, they can be joined to solve complex tasks without having to rediscover every possible combination from scratch. Merullo, Eickhoff, and Pavlick [3] found that a circuit discovered for one task in

Fig. 1: Circuit discovery of weight and edge circuits.
GPT-2 is substantially reused for a related one, showing that a small hand-designed patch to four attention heads is sufficient to change the model's behaviour. Mondorf et al. [1] went further, posing general circuit composability as a fundamental open question and combining circuits for ten string-edit operations through mask-level set operations. However, their experiments were limited to synthetic toy models generated via Tracr [11]. Most recently, Yu et al. [2] discovered that composing two independently discovered circuits pruned from GPT-2 for different tasks by simple mask union largely preserves functional performance.
This is a compelling vision, but the evidence for it remains preliminary. Existing composition results stop at a pair of circuits, or at best a handful, and success is measured by whether the composed circuit still performs the individual tasks it was pruned on. Can primitive circuits can be composed at scale, and into new capabilities? We answer both halves of this question: composition survives the jump from a hand-verified pair to dozens of independently-discovered circuits merged at once, and the resulting shared circuitry is able to do a more complex task that none of the 39 source circuits were individually pruned to solve. We do this by composing circuits pruned from an English phoneme classifier based on HuBERT, about as elementary a building block as a spoken language offers, into an syllable classifier.
The outline of this paper is as follows. First, we identify failures of plain mask union (density domination, interference) and design a greedy, density-scaled algorithm that composes a pair of circuits. Second, we generalize this to N circuits with the help of a new data structure, CIRCUITTREE.
This work was supported by [embargoed for anonymous review].
Third, we compose the resulting vowel and consonant CIR-CUITTREES into a hierarchy-of-circuits pipeline with 99.5% of matrices shared across phonemes. The resulting pipeline transcribes English CV and VC syllables, a task the individual circuits were not trained for, and which the composition algorithm does not optimize for either. We reach 64.8% accuracy against the ceiling of 66.0% obtained by running the circuits independently.
3. EXPERIMENTAL SETUP
Dataset. We train and evaluate on the Articulatory Index corpus [15], originally collected by [16], which contains pronunciations of 10,329 CV and VC monosyllables produced by 20 English speakers (12 male, 8 female). The data for each phoneme is split into train, validation, and test sets. Results reported are for test. Thresholds for ensemble classifiers described in Section 4 are tuned on the validation set. All accept/reject decisions in Algorithm 1 and its N-way extension use tolerance absolute F1; scale factors (Eq. 1) are clipped to [0.05, 5.0]; the syllable type gate ( ) is itself a DISCOGP circuit under the same protocol.
Following [6], we prune 15 vowel and 24 consonant DISCOGP circuits from HuBERT-base [17] with a frozen mean-pooled linear head trained on the binary task of identifying whether a given vowel or consonant in present the syllable. Below, we combine these binary circuits into ensemble multi-class classifiers as described in Section 4.
The resulting weight circuits consist of 144 logit tensors (12 layers × {Q,K,V,O,MLP-in, MLP-out} × {weight,bias}). Edge circuits are 49 logit tensors, one per downstream node, each holding one logit per eligible upstream head or MLP.
4. PAIRWISE CIRCUIT COMPOSITION
We start by developing algorithms for composing two phonemes' circuits . We combine pairs of binary classifiers into three-way classifiers , other. Each binary classifier for phoneme is associated with a threshold , tuned by validation set. When combining two classifiers, whichever phoneme's confidence surpasses its threshold the most will be the prediction. If neither does, we predict "other". In this setting, the classifiers being combined can be run independently, or can be composed into a single system with shared weights and edges.
We first test a naive composition strategy by taking the element-wise union of weights and edges present in either circuit. As shown in Figure 2, the independent, unmerged classifiers (Figure 2a) substantially outperform this naive union across all vowel phoneme pairs (Figure 2b). We attribute this performance degradation to two key issues: density domination and interference.
By density domination we refer to the issue that circuits can have very different weight densities (2–3% for some phonemes, 15–20% for others). Simple union is dominated by the denser circuit, so the composition behaves like the dense circuit. We resolve this by scaling each mask in both circuits, or, in the general case, in all N circuits. For a shared key of the underlying model k, let denote the fraction of active entries in each phoneme 's mask. We calculate each phoneme's scale factor at key k (which have the same shape as circuit masks at key k) as follows:
where
is the geometric mean of the densities.
In following MODEL FORWARD() method where N circuits are applied to the HuBERT model, we first element-wise union (naive union) the N circuits and select the kept parameter/edge connection, then scale them by element-wise multiplication of the scale factor .
Even at matched density, overlaying two independently optimized masks introduces circuit interference: the presence of a given weight or edge may be crucial to the behaviour of one circuit but detrimental to the other. As the objects we are combining are binary masks, the techniques developed by [18] for the case of model combination by weight averaging do not apply. We instead propose a greedy algorithm to merge a subset of 90% the matrices that do not decrease the F1 score for each vowel more than some threshold.
Algorithm 1 sorts the computation graph topologically and visits every key exactly once, proposing to take the union of the two circuits' masks for the given matrix, which we apply twice to the weight mask, then to the edge mask, only if both circuits' binary F1 stays within of its independent (unmerged) performance.
Figure 2c shows the performance is comparable to independent (unmerged) performance (Figure 2a).

(a) Independent circuits

(b) Naive union

(c) Circuit Composition (ours)
Fig. 2: Pairwise macro-F1 heatmaps across all 15 vowels under three composition strategies: (a) naive union, (b) unmerged union, and (c) merged circuits.
Algorithm 1 Merge Clusters
Require: circuits , each a set of |keys| matrices; thresholds ; tolerance
1: TOPOLOGICAL SORT(keys)
2: compute , via Eq. 1
3: MODEL FORWARD()
4: ;
5: for each do
6:
7: with masks unioned according to
8:
9: MODEL FORWARD()
10: if for all then
11: accepted
12: end if
13: end for
14: return , ,
Algorithm 2 Linear schedule
1: function LINEAR() 2: 3: for to do MERGECLUSTERS() 4: end for 5: return 6: end function
5. TREE-MERGE SCHEDULES AND CIRCUITTREE DATA STRUCTURE
Composing all 15 vowels (or 24 consonants) into a single module still raises two further questions that a single invocation of Algorithm 1 cannot answer on its own. Assuming that we combine circuits iteratively, by adding one phoneme at a time, in what order should circuits be combined? And, when each new phoneme is added, how do we carry forward information about sharing validated at previous iterations?
The simplest strategy composes phonemes one at a time (Algorithm 2). The trouble is that step merges a single new member into a cluster that already holds members, so MERGECLUSTERS (Algorithm 1) must re-validate all resulting members against every one of the keys, costing MODELFORWARD calls. These costs accumulate over the whole chain:
| Schedule | Accuracy(%) | Density(%) |
|---|---|---|
| Unmerged | 82.3 | 1.13 |
| Linear (Θ(kn2)) | 77.9 | 1.11 |
| Balanced (Θ(kn log n)) | 81.8 | 1.10 |
| Kruskal merge | 82.2 | 1.10 |
| HuBERT Frozen [6] | 86.4 | 100 |
Table 1: 15-way vowel accuracy of the N-way merge schedules vs. Full HuBERT model, with post-merge circuit density.
Algorithm 3 Balanced schedule
1: function BALANCED() 2: 3: while do 4: 5: for while do 6: .append(MERGECLUSTERS()) 7: end for 8: if odd then .append() 9: end if carried forward 10: 11: end while 12: return 13: end function
A more efficient strategy avoids ever growing one cluster far larger than its merge partner. Instead, singletons are merged into pairs, pairs into fours, and so on (Algorithm 3).
At round , every cluster has size , and there are merges in that round, each invoking MERGECLUSTERS on members at a cost of MODELFORWARD calls. The result is that every round costs the same, , regardless of :
Summing this constant cost, , over the rounds:
Both linear and balanced share a limitation: both are blind schedules, choosing merge order purely from cluster size and never from how similar two phonemes actually are. We include a third schedule as an upper bound on achievable performance. Here, the distance between two phonemes is defined by the merge ratio from §4, so that pairs sharing little of their masks are placed far apart. Kruskal's algorithm is then applied repeatedly, always composing the two closest clusters that have not yet been joined. This schedule's complexity ranges from in the best case to in the worst case. As Table 1 shows, the balanced schedule matches the performance of Kruskal merging while remaining , making it preferred in practice.
5.1. The CIRCUITTREE primitive
MERGECLUSTERS operates on nodes of a CIRCUITTREE: a binary tree whose leaves hold a phoneme's original circuit, and whose internal nodes record only which keys are shared among their two children's members at that level (Figure 3).
To see why this structure is necessary, consider the natural alternative: re-union the raw masks of all current members every round, and fall back to fully private masks when any member's F1 drops too far. This memoryless approach has a serious flaw. If a later round failed by an unrelated third phoneme on some key , the naive approach discards all sharing on , including sharing between two phonemes that had already validated it several rounds earlier.
CIRCUITTREE avoids this by never forgetting a validated result. Instead of recomputing sharing from scratch, it resolves each member's effective mask for key by walking down the tree and taking the first (i.e. closest-to-root) level at which that key was successfully shared, falling back to the member's own leaf if it never was:
Scale factors are accumulated along the same path. Because sharing is monotone non-decreasing along any root-to-leaf walk, a failed merge at the root can never undo a key that two phonemes already agreed to share three levels down.

Fig. 3: A CIRCUITTREE over four phonemes. validates at every level. only validated inside : the root-level merge failed for , but still use their shared value for it via Eq. 6, rather than reverting to private masks.
Table 2: CV/VC-syllable transcription accuracy.
| System | Accuracy (%) | Merge Ratio (%) | |
|---|---|---|---|
| All | Partial | ||
| Unmerged | 66.0 | 0.0 | 0.0 |
| CIRCUITTREE | 64.8 | 30.3 | 99.5 |
6. HIERARCHY-OF-CIRCUITS TRANSCRIBER
We now compose the merged vowel and consonant CIRCUIT-TREE modules into a syllable classifier. The pipeline has two stages. First, a separately-pruned DISCOGP circuit acts as a gate: it determines the syllable's consonant/vowel order (e.g. CV vs. VC). Second, this order routes the input to the corresponding vowel or consonant CIRCUITTREE module, which resolves the specific phoneme. The two stages are combined by slotting the predicted phonemes into the given template.
Table 2 contains our central result. Collapsing 39 independent, binary phoneme circuits into just two shared CIRCUITTREE modules costs only 1.2 points of accuracy (66.0% → 64.8%), while 99.5% of keys are partially shared and 30.3% are shared across all phonemes. In other words, the vast majority of each phoneme's circuitry is recovered from a common pool rather than stored independently, at a small and controlled cost to accuracy.
7. CONCLUSION
This paper has demonstrated circuit composition at scale: a density-scaled, interference-aware merge algorithm, generalized through CIRCUITTREE to compose many circuits at once. Composing primitive circuits for the vowels and consonants of English into a working transcriber shows that primitive circuits can be joined well beyond a handful, and into a capability none of them were individually pruned for. We believe this method is promising for much more complex problems, both in speech and in other domains.
8. COMPLIANCE WITH ETHICAL STANDARDS
This study was conducted retrospectively using the Articulatory Index corpus, a pre-existing, publicly available speech dataset distributed by the Linguistic Data Consortium. No new data involving human or animal subjects were collected as part of this work. As this research involved secondary analysis of an existing, licensed open dataset rather than the collection of new human subject data, no additional ethical approval was required.
9. REFERENCES
[1] P. Mondorf, S. Wold, and B. Plank, “Circuit compositions: Exploring modular structures in transformer-based language models,” in Proc. ACL, 2025.
[2] Lei Yu et al., “Sheaf discovery with joint computation graph pruning and flexible granularity,” in Proc. EMNLP, Nov. 2025, pp. 8833–8848.
[3] J. Merullo, C. Eickhoff, and E. Pavlick, “Circuit component reuse across tasks in transformer language models,” in Proc. ICLR, 2024.
[4] Xi Chen et al., “All circuits lead to rome: Rethinking functional anisotropy in circuit and sheaf discovery for LLMs,” in Proc. ICML, 2026, Proceedings of Machine Learning Research.
[5] Pratim Chowdhary, Peter Chin, and Deepernab Chakrabarty, “K-MSHC: Unmasking minimally sufficient head circuits in large language models with experiments on syntactic classification tasks,” arXiv preprint arXiv:2505.12268, 2025.
[6] Wei et al., “Sparse weight and edge circuit discovery in transformer-based acoustic models,” IEEE Spoken Language Technology Workshop 2026, 2026.
[7] Kevin Ro Wang et al., “Interpretability in the wild: A circuit for indirect object identification in GPT-2 small,” in Proc. ICLR, 2022.
[8] Arthur Conmy et al., “Towards automated circuit discovery for mechanistic interpretability,” in NeurIPS. 2023, vol. 37, pp. 16318–16352, Curran Associates Inc.
[9] R. Pan and H. Rajan, “On decomposing a deep neural network into modules,” in Proc. ESEC/FSE, 2020, pp. 889–900.
[10] H. Kingetsu, K. Kobayashi, and T. Suzuki, “Neural network module decomposition and recomposition,” arXiv preprint arXiv:2112.13208, 2021.
[11] D. Lindner, J. Kramár, S. Farquhar, M. Rahtz, T. McGrath, and V. Mikulik, “Tracr: Compiled transformers as a laboratory for interpretability,” in NeurIPS, 2023.
[12] C. Louizos, M. Welling, and D. P. Kingma, “Learning sparse neural networks through regularization,” in Proc. ICLR, 2018.
[13] V. Sanh, T. Wolf, and A. M. Rush, “Movement pruning: Adaptive sparsity by fine-tuning,” in NeurIPS, 2020.
[14] A. Bhaskar, A. Wettig, D. Friedman, and D. Chen, "Finding transformer circuits with edge pruning," in NeurIPS, 2024.
[15] Thomas Schatz et al., “Articulation Index LSCP (LDC2015S12),” Linguistic Data Consortium, 2015.
[16] 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.
[17] Wei-Ning Hsu et al., “Hubert: Self-supervised speech representation learning by masked prediction of hidden units,” IEEE TASLP, vol. 29, pp. 3451–3460, 2021.
[18] P. Yadav, D. Tam, L. Choshen, C. Raffel, and M. Bansal, "TIES-merging: Resolving interference when merging models," in NeurIPS, 2023.