Manuscript Offprint
arXiv:2610.32153Sparsity-driven emergence of functional modularity in multitask neural networks
ABSTRACT
Neural networks can learn multiple tasks, but how learning organizes shared computation into specialized and reusable components remains poorly understood. In this work, we show that sparsity-inducing regularization promotes functional modularity in multitask networks without predefined module boundaries. Using functional profiling in multilayer perceptrons and a lightweight transformer, we identified compact, task-selective subnetworks, termed functional tokens. Across rule-based task families, selectively retaining these tokens preserves their associated functions while reducing performance on other tasks. Such specialization develops preferentially in deeper layers during training, while earlier layers retain shared computation. Regularization strength and form shape module compactness and specialization, while task weighting alters functional allocation. Moreover, extracted functional tokens can be recombined through alternative pathways to reconstruct a learned composite computation without retraining, preserving their connectivity and learned weights. Our results suggest that sparsity-constrained optimization shapes not only parameter use but also the organization and reuse of learned computation.
1 Introduction
Deep neural networks have achieved wide success across perception, language, reasoning, and scientific discovery Bengio and LeCun [2007], Hinton et al. [2006], Goodfellow et al. [2016]. Despite substantial advances in architectural design He et al. [2015], Huang et al. [2018] and optimization Ruder [2017], the organizational principles that emerge during learning remain poorly understood. In particular, it is unclear how networks with distributed parameters and representations develop specialized functions while sharing and reusing computation across tasks. Biological intelligence provides a compelling example of such organization: functional modularity, characterized by partially independent yet interacting computational components, enables neural systems to support specialized processing, robustness, and compositional reuse across tasks Damicelli et al. [2019], Margalit et al. [2024].
Motivated by the computational advantages of modularity, previous machine-learning approaches have attempted to incorporate modular organization through explicit design. Neural module architectures introduce predefined functional components that can be selectively combined for different tasks Andreas et al. [2017], Braylan et al. [2015], while adaptive structural learning methods seek to optimize network architectures by modifying connectivity patterns Cortes et al. [2017], Liu et al. [2018]. Other approaches have explored structure-preserving constraints to incorporate prior organization into neural networks Celledoni et al. [2021]. More recently, sparse expert architectures have enabled large-scale neural networks to achieve conditional computation by routing inputs to specialized subnetworks Shazeer et al. [2017], Fedus et al. [2022]. Although these approaches demonstrate the utility of modular computation, they typically rely on architectural constraints, predefined components, or explicit routing strategies Sun and Guyon [2023].
Modular organization, however, need not be specified in advance. Evolutionary studies have shown that modularly varying goals or selection to reduce connection costs can promote the emergence of modular networks Kashtan and Alon [2005], Clune et al. [2013]. More recently, work on multitask recurrent networks has linked emergent modularity to task demands, representational capacity, and connection-growth dynamics Wu et al. [2026]. Learned modular connection masks can also improve subsequent learning after weight reinitialization, particularly under capacity constraints Wu et al. [2026], demonstrating the utility of learned connectivity as a structural prior.
Sparsity provides an optimization-level route to investigate how constraints on connectivity shape computation. Sparsity-inducing regularization encourages a network to use fewer connections without prescribing internal module boundaries. Sparse and structured regularization have been extensively studied for model compression, parameter selection, and pruning Wen et al. [2016], Scardapane et al. [2017], Ma et al. [2019], while analyses of learned features, task-selective representations and shared dynamical motifs have revealed structure in trained networks Agrawal et al. [2022], Li et al. [2024], Michaud et al. [2024], Yang et al. [2019], Driscoll et al. [2024]. The question here goes beyond network size: can sparsity help organize computation into task-selective components that preserve their associated functions and can be recombined with their learned parameters intact, without retraining?
In this work, we show that sparsity-inducing optimization can drive the emergence of functional modularity in multitask neural networks without explicitly designed modular architectures. Across multilayer perceptrons and a light-weight transformer, we identify compact, task-selective subnetworks, which we denote functional tokens, that coexist with shared computation. Across task families, these tokens preserve their associated functions under selective retention. By systematically varying sparsity strength and regularizer form, tracking functional specialization during training, and analyzing endpoint representation geometry, we characterize how sparsity shapes depth-dependent functional reorganization. Furthermore, extracted functional tokens can be connected through different pathways to reconstruct a learned composite computation without retraining or changing their learned parameter values. These findings connect sparse optimization to the organization and reuse of learned computation, highlighting machine-learning systems as models for uncovering general principles of computational organization Levine and Tu [2024].
2.1 Task-selective functional modules emerge under sparse multitask learning
To examine how computation is shared and specialized across tasks, we used a controlled setting where a multilayer perceptron (MLP) with three fully connected ReLU hidden layers was trained to perform five related Binary Sequence Calculation tasks, without task-specific hidden branches or explicit modular routing (Fig. 1a, Methods). The task set comprised four primitive arithmetic transformations, , , , and , and one composite transformation . Each shared input pair carried targets for all five rules, whose predictions occupied separate output blocks. The network was trained jointly on all rule losses from random initialization under sparsity-inducing regularization, with as the default (Methods; Supplementary Note 5.1).
To map functional contributions across tasks, we individually silenced scalar weights and measured the resulting change in each rule's output segment (Fig. 1b). Each scalar weight served as an elementary token. Rule-specific masks were constructed at a fixed extraction quantile, (Methods). Each selected weight was assigned an exact rule-set signature specifying the rules for which it met this criterion. We define a functional token for a rule or rule set by retaining the weights selected by the corresponding mask or union of masks while silencing the remaining weights simultaneously across all profiled weight matrices, including the output weights. Biases and other parameters outside the masking set remained unchanged (Methods; Supplementary Notes S3 and S4).
The resulting weight assignments revealed a depth-dependent organization (Fig. 1c). Earlier hidden-layer weight blocks showed broader multi-rule support, whereas deeper blocks were enriched in sharper single-rule signatures and signatures involving fewer rules. This pattern was reproducible across independently trained networks.
We next examined whether retaining these supports preserved their associated computations. Rule-wise relative accuracy was defined as the retained subnetwork's accuracy divided by that of the corresponding full network on the same task. Single-rule functional tokens preserved substantial relative accuracy on their target rules, while performance on the other rules was reduced (Fig. 1d). This selective preservation therefore provided a functional test of the extracted supports distinct from the individual-weight output perturbations used to define them. Multi-rule functional tokens likewise retained performance on their constituent tasks while remaining less effective on rules outside the selected rule set (Fig. 1e,f).
a
Shared multitask MLP
b
Functional profiling and token extraction

Joint loss + sparsity penalty
Apply rule masks across all profiled matrices, including output weights. Biases and other unmasked parameters remain unchanged.
C

Exact rule-set signature
d

e

f
Multi-task tokens (3–5 tasks)

Retained rule set
Figure 1. Network architecture, functional profiling and task-selective weight supports. (a) Shared MLP with three 300-unit fully connected (FC) ReLU hidden layers, trained jointly on five rules (R1–R5 of Binary Sequence Calculation rules). (b) Functional profiling and extraction. Each scalar weight is scored individually by output ablation or Taylor output-sensitivity profiling. Rule-specific masks are constructed separately for each profiled weight matrix and then applied simultaneously across those matrices, including the output weights; biases and parameters outside the masking set are unchanged. (c) Log-transformed weight counts, , for the 31 nonempty exact rule-set signatures, shown separately for the three hidden-layer weight matrices. For example, “1–3” denotes the weights selected for exactly rules 1 and 3. (d–f) Relative accuracy of subnetworks retaining the union of masks for one rule (d), two rules (e), or three to five rules (f). Colours identify the evaluated rule. Relative accuracy is retained-subnetwork bitwise accuracy divided by that of the full network on the same rule. Violins summarize 30 independent runs; black and red marks indicate means and medians, respectively.
2.2 Functional modularity persists across task families, profiling methods, and model architectures
Having identified task-selective functional modules in the Binary Sequence Calculation setting, we next asked whether this organization depended on task semantics or input format, profiling criterion, or model architecture.
We first trained the same shared MLP architecture on two additional task families. Sparse Pattern Logic replaced arithmetic transformations with five Boolean-style rules, whereas MNIST Digit-Pair Arithmetic retained the arithmetic rule structure but presented pairs of digit images as inputs, coupling image-based input processing to arithmetic prediction (Methods; Supplementary Notes 5.2 and 5.3). Across independently trained networks for each task family, the extracted functional tokens preserved higher relative accuracy on their associated rules than on omitted rules (Fig. 2a,b; Binary Sequence Calculation baseline in Fig. 1d–f; Methods). Residual performance on omitted rules varied across task families, reflecting differences in computational overlap among the underlying transformations. Thus, the extracted subnetworks captured both task-selective and shared structure.
We next replaced exhaustive output ablation with randomized Taylor output-sensitivity profiling, a computationally less expensive criterion that estimates the squared first-order output perturbation associated with removing a scalar weight (Methods; Supplementary Note S3). The row-normalized mean relative-accuracy matrix for single-rule Taylor-derived tokens peaked on the corresponding evaluated rules (Fig. 2c). Functional tokens extracted using the same score-quantile criterion retained high relative accuracy on their associated rules and showed reduced performance on other rules (Fig. 2d). Thus, the two profiling criteria recovered consistent patterns of target-task sufficiency and off-task selectivity, indicating that the observed modular organization was not specific to a single importance measure.
Finally, we trained a TinyTransformer on the same five-rule Binary Sequence Calculation task set (Fig. 2e; Methods; Supplementary Note 2). Applying the Taylor-based profiling and retention procedure to scalar weight coordinates yielded functional tokens that preserved the corresponding target functions, with lower performance on omitted rules (Fig. 2f). The extent of performance reductions varied across tasks. This architectural control extended the observation of task-selective functional organization beyond fully connected MLPs.
2.3 Sparse regularization shapes the compactness and specialization of functional supports
Having shown that task-selective functional organization persists across the tested settings, we next asked whether sparsity merely accompanies modularity or actively controls its emergence. Specifically, we interrogated the effects of the regularization strength l and the regularization exponent in the multitask MLP.
We first compared Lasso regularization strength with the non-regularized control , re-extracting functional tokens from each trained network using the same ablation-based, within-rule score quantile criterion. For each condition, three complementary quantities were assessed: target-rule relative accuracy, the retained scalar weight fraction, and the importance-weighted modularity statistic (Eq. (13); Fig. 3; Methods).
Without sparsity regularization, the extracted functional tokens retained comparatively large and diffuse supports and showed incomplete preservation of their target functions. Introducing regularization at substantially improved target-rule relative accuracy while retained-weight fractions remained similar to those in the unregularized condition. Increasing the regularization strength to markedly reduced these fractions, with target-rule relative accuracy remaining close to the full-network level (Fig. 3a). At , the retained-weight ratio was close to one quarter, primarily reflecting the 75th-percentile extraction rule.
The modularity score M provided a complementary measure of how selectively these weights contributed to different rules. M incorporates the magnitude of the profiled contributions and measures their concentrations on individual rules (importance-weighted normalized inverse participation, NIP; Methods; Eq. (13)). Increasing l from 0 to 5 raised M in the second and third hidden-layer weight blocks, followed by a plateau at l = 10 (Fig. 3c). The first block did not show the same monotonic response. Higher M reflected more rule-concentrated importance profiles among the selected weights (Supplementary Note S3).
We next asked whether these effects depended on the form of the regularizer. At fixed , we compared penalties with (Methods; Supplementary Note 2). The and penalties produced compact functional tokens that preserved target-rule performance and showed stronger deeper-block specialization, whereas the penalty yielded substantially larger retained-weight fractions, lower target-rule relative accuracy, and lower in deeper blocks (Fig. 3b,d).
A local support-recovery analysis provides a conditional framework for interpreting both the dependence on regularizer form and the layer-specific response (Supplementary Note 1). Approximating hidden-layer computation or parameter-Jacobian effects by a multitask linear surrogate, the analysis identifies conditions on signal strength, feature coherence, and local approximation error under which sparse task supports can be recovered or locally stabilized. For , a

b

C
d

e

TinyTransformer
f

Two tokens · mean pooling · five P-dimensional outputs (P = 7)

Figure 2. Functional-token selectivity across task families, profiling methods and architectures. (a,b) Relative accuracy of ablation-derived retained masks for Sparse Pattern Logic (a) and MNIST Digit-Pair Arithmetic (b), respectively. The Binary Sequence Calculation baseline is shown in Fig. 1d–f. (c) Mean relative accuracy matrix for single-rule Taylor-derived tokens from 30 independent MLP runs, with each retained-token row normalized to its maximum. Rows identify the retained-token rule and columns the evaluated rule. (d) Relative accuracy of Taylor-derived MLP subnetworks in Binary Sequence Calculation. (e) TinyTransformer architecture with two input-sequence tokens, a shared 32-dimensional projection and positional bias, two self-attention/FFN blocks with residual connections and layer normalization, mean pooling and a linear output head. (f) Relative accuracy of Taylor-derived TinyTransformer subnetworks in Binary Sequence Calculation. In a,b,d,f, the horizontal axis identifies the retained rule set, colors identify the evaluated rule, and accuracy is normalized to the corresponding full network on that rule. Violins summarize 30 independent runs in a,b,d and 23 batch-128 runs in f; black and red marks indicate means and medians, respectively.
support recovery follows from a Lasso primal-dual witness argument; for , the nonconvex objective can admit an oracle-supported strict local minimum. In contrast, penalties with primarily shrink weight magnitudes without enforcing exact sparsity Zhao and Yu [2006], Ma et al. [2019]. This distinction offers an interpretation of the contrast in Fig. 3b,d: sparsity-inducing penalties can stabilize sparse task supports once compatible local coordinates emerge.
Theoretical analyses further indicate that support recovery or stabilization for depends critically on the coherence structure of the effective design, particularly the off-diagonal structure of the feature covariance. When active and inactive coordinates are sufficiently distinguishable, sparse regularization can more effectively eliminate redundant coefficients; strongly correlated features make exact support separation less stable. This dependence offers a possible interpretation of the observed depth profile. Early layer weights operate on common inputs and may retain intermediate features shared across tasks. Successive nonlinear transformations can produce coordinates in which task-relevant effects are more readily separated, allowing sparse penalties to concentrate rule-selective influence in later blocks closer to the rule-conditioned outputs while preserving shared computation near the input.
Together, retained-weight fraction, relative accuracy, and M distinguish support compactness, functional preservation, and specialization. The strength and form of sparse regularization shape how task-relevant influence is concentrated into compact, task-selective supports, while allowing shared computation to persist in earlier layer transformations.
2.4 Depth-dependent functional specialization develops during training
To determine how task-selective functional influence developed during optimization, we tracked the importance-weighted modularity score at five saved checkpoints spanning 1,000–5,000 training epochs under Lasso strengths (Fig. 4a). At each snapshot, scalar weights were Taylor-profiled and masks were recomputed within each hidden-layer weight block using the same rule-wise score-quantile criterion ( ). Each condition comprised 30 independent runs.
The trajectories were strongly dependent on both depth and regularization strength. Without regularization, median M increased only modestly and reached 0.278, 0.375, and 0.277 in the three blocks at epoch 5000. At l = 1, specialization accumulated more clearly in the second and third blocks, whose final medians were 0.440 and 0.481. Stronger regularization produced a more pronounced increase in the deepest block: between epochs 1,000 and 5,000, median M rose from 0.516 to 0.883 at l = 5, and from 0.731 to 0.874 at l = 10. In contrast, the second block attained intermediate values and approximately plateaued, whereas the first block remained comparatively weakly specialized. Thus, task-selective importance progressively concentrated in the deepest block rather than increasing uniformly across the network. This layer-dependent temporal separation mirrors the final depth-dependent organization: early transformations retained broader multi-rule influence, whereas the deepest weight block progressively consolidated task-selective importance.
To characterize the representations accompanying this organization, we analyzed the latest saved epoch with (Fig. 4b–e; Supplementary Note 6). Pairwise-correlation distributions were estimated at from four independent runs per condition, whereas PCA and centered kernel alignment (CKA) analyses used 30 runs per condition over the extended sweep .
Pearson correlations between pre-activation unit responses changed in a layer-dependent, non-monotonic manner (Fig. 4b). The clearest increase in correlations near zero occurred in the first hidden layer at l = 1. At stronger regularization, deeper layers instead redistributed more correlation mass toward intermediate values.
PCA spectral entropy revealed a complementary change in the distribution of representational variance (Fig. 4c). Across the analyzed post-ReLU hidden and output representations, the pooled median entropy decreased from 3.279 at l = 0 to 2.280 at l = 15, indicating that representational variance became concentrated into fewer dominant directions. Linear CKA further showed that sparsity altered the division of representational roles across layers (Fig. 4d,e). Similarity among hidden-layer representations remained high across the sweep, peaked at moderate regularization, and declined modestly at larger l. By contrast, pooled hidden-output CKA increased from 0.418 at l = 0 to 0.619 at l = 15. Hidden representations therefore retained broadly compatible geometry while becoming progressively aligned with the rule-conditioned output space.
Together, the training trajectories show that sparse optimization preferentially strengthens task-selective influence in deeper weight blocks. Endpoint representation analyses associate this organization with concentrated variance and stronger hidden-output alignment, rather than uniform decorrelation across layers. These observations are compatible with the support-recovery interpretation (Supplementary Note 1), by which sparse task supports are most readily stabilized when active and inactive coordinates are sufficiently separable, which depends on the coherence of the effective design matrix as well as on signal strength and local approximation error.
a

b
Lasso strength I
Regularizer
C
d

Lasso strength I
Regularizer
Figure 3. Regularization changes the compactness and selectivity of extracted weight supports. (a) Relative accuracy of single-rule subnetworks at Lasso strengths with (upper plots), and their retained-weight ratios (lower plot). (b) The corresponding quantities for regularizer exponents at . Bar colors identify the evaluated rule; colors in the lower plots identify the rule defining each retained functional token. Bars show means and error bars show sample SD across 30 independent runs. The retained-weight ratio is the number of mask-selected scalar coordinates divided by the total number of scalar coordinates in the analyzed weight matrices. The extraction quantile is fixed at ; score thresholds are determined separately for each network, matrix and rule. (c,d) Layer-wise modularity metric across Lasso strengths with (c) and across regularizer exponents at (d). Colored guide lines connect medians for each layer at aligned conditions (x positions). All panels use ablation profiling and 30 independent runs per condition. Panels c,d show importance-weighted normalized inverse participation (NIP), defined in Eq. (13). The analysis uses , and all scalar-weight candidates (Methods).
Layer 1 Layer 2 Layer 3
a




b


Absolute correlation


C
d

1
e

1

1
Figure 4. Training dynamics and endpoint representation geometry. (a) Importance-weighted modularity M at 1,000–5,000 epochs for l = 0, 1, 5, 10, from left to right, with . Masks are recomputed at each checkpoint using Taylor output-sensitivity profiling with four probes and the same extraction quantile, . Violins show 30 independent runs; black and red marks show means and medians. Coloured lines connect layer-wise medians at common epochs. The analysis uses , , seed 0 and all scalar-weight candidates (Methods). (b) Distributions of absolute pre-activation unit correlations at the same four Lasso strengths, aligned column by column to (a) and pooled from four runs per condition. (c) PCA spectral entropy of post-ReLU hidden-layer activations and output representations. (d,e) Linear centered kernel alignment (CKA) between hidden-layer pairs (d) and between hidden and output layers (e). Endpoint metrics in c–e use 30 runs per condition over l = 0, 1, 2, 3, 5, 10, 15. Hidden-layer colours are shared across a-c; colors in d,e identify layer pairs, with “o” denoting the output layer.
2.5 Task-biased optimization reshapes multitask performance and functional allocation
Having examined how sparse regularization shapes functional organization, we next asked whether preferentially optimizing one task under sparse regularization improves its performance at the expense of other tasks, and how these changes relate to functional specialization. Without changing the network architecture or training data, we introduced per-rule weighting into the multitask objective:
where denotes the weight assigned to rule . To emphasize a specific rule, we assigned while keeping unit weights for all other rules. All six conditions used three hidden layers of 300 units and were trained with and , and each weighting condition was compared with an equal-weight control across 30 runs (Fig. 5).
The full-network response depended on the emphasized rule (Fig. 5a). Upweighting rules 2 or 5 improved mean accuracy not only on the target rule but also on all four non-upweighted rules. By contrast, emphasizing rules 3 or 4 improved target-rule accuracy while reducing mean accuracy on the other rules. Upweighting rule 1 reduced performance on both the target and non-target rules. Preferential task weighting therefore produced distinct outcomes, ranging from cross-task gains to target-specific gains accompanied by losses elsewhere.
To relate these performance changes to functional organization, we re-extracted functional tokens independently from each trained network using the same ablation-based score-quantile criterion. We quantified each token by its retained scalar weight fraction and its specialization margin, defined as its target-rule relative accuracy minus its mean relative accuracy on the other four rules (Supplementary Note 7). Support changes extended across rule-defined tokens: emphasizing rules 2 or 5 increased retained-weight fractions broadly, whereas emphasizing rule 1 reduced them. Rules 3 and 4 produced small increases in their own target-token supports, with mixed increases and decreases in non-target supports (Fig. 5b). Thus, the observed performance trade-offs did not simply correspond to expansions of the target token accompanied by the contraction of the others.
Specialization margins further distinguished functional selectivity from preferential task performance. Conditions emphasizing rules 2 and 5 yielded margins of approximately 0.16–0.19 across the rule-defined tokens, whereas margins were substantially smaller under the rule-3 and rule-4 conditions that exhibited cross-task performance costs (Fig. 5c).
Changes in target accuracy and retained-weight fraction were positively associated across the five target-rule means (Pearson ; Fig. 5d) and across 150 repeat-matched target-rule responses ( , nominal ; Fig. 5e). Target-performance gains therefore tended to accompany larger selected supports, but were not restricted to conditions with high functional selectivity. The pooled association comprises five upweighted-rule conditions with 30 repeat-matched responses per condition (Supplementary Note 7).
2.6 Learned functional tokens support compositional reuse without retraining
Finally, we tested whether the extracted functional tokens could reuse their learned computations in explicitly specified composite pathways outside the configuration in which they were originally identified.
We considered the rule-5 Binary Sequence Calculation transformation,
which admits two equivalent decompositions through addition, multiplication, and squaring operations already learned by the same multitask network (Fig. 6a).
For each Lasso strength l, rule-specific functional tokens were extracted from a common mother network. Each component retained its extraction mask and learned parameters throughout recomposition (Supplementary Note 8). The directly extracted rule-5 token served as a non-recomposed control, with performance reported relative to the corresponding full mother network on rule 5.
In the type 1 pathway, the addition token first computed . Its thresholded output was paired with the original input and passed to the multiplication token to implement . In the type 2 pathway, the square and multiplication tokens operated in parallel to compute and ; their thresholded outputs were then passed to the addition token to implement . Thus, the two pathways reconstructed the same target task through distinct computational graphs. Both the sequential type 1 pathway and the parallel type 2 pathway recovered rule 5 with substantial relative accuracy (Fig. 6b). Type 1 had a slightly higher mean relative accuracy than Type 2 at all four displayed regularization settings. At
and , both reached or exceeded full mother-network performance. These results showed that rule-associated components could preserve useful computations after being connected through the specified intermediate interfaces.
Recomposition was also possible without regularization, but the associated functional supports were substantially larger and more diffuse. To relate reconstruction accuracy to support compactness, we defined the parameter-normalized reconstruction score :
where is relative accuracy on rule 5 and is the nonzero scalar-weight fraction of the directly extracted rule-5 control (Supplementary Note S8). The same denominator is used for the control and both recomposition pathways. increased with (Fig. 6c), reflecting the combination of preserved reconstruction accuracy and a smaller reference support.
To assess the cost of obtaining functional tokens, we compared multitask training with and without token extraction against training five separate task-specific networks (Fig. 6d; Supplementary Note 8.7). Across three auxiliary benchmark runs, the separate-training heuristic total was 4.78 times the joint-training-plus-extraction total.
a

b
C
d
e
Figure 5. Rule-loss weighting changes network performance and functional-token allocation. Each intervention assigns five-fold loss weight to one rule and unit weights to others, and is compared with an equal-weight control, with 30 independent runs per condition at and . Rows in a–c identify the upweighted rule; columns identify the evaluated rule in a and the token-defining rule in b,c. (a) Mean change in full-network accuracy for each upweighted-rule and evaluated-rule pair, calculated as intervention minus control. (b) Mean change in the retained scalar-weight fraction, in units of . (c) Mean specialization margin: relative accuracy on the token-defining rule minus its mean relative accuracy on the other four rules. Outlined diagonal cells in a–c identify the upweighted target. (d) Association between the five target-rule mean accuracy changes and retained-weight-ratio changes; error bars combine intervention and control marginal uncertainties as defined in Supplementary Note 7. The dashed line denotes a least-squares fit. (e) Association across 150 repeat-matched target-rule responses, with 30 responses per upweighted rule. Colors in d,e denote the upweighted rule. The solid line in e is a least-squares fit and the annotation reports the pooled Pearson correlation and nominal two-sided value.
a
Target rule 5: out = a(a + b)
Control

Type 1

Type 2

b
control
Type 1
Type 2

C
d

Figure 6. Recomposition of learned functional tokens without retraining. (a) Recomposition of rule 5 computation . The directly extracted rule-5 token is the control; Type 1 computes sequentially, and Type 2 computes through parallel primitives followed by addition. Component outputs are thresholded and encoded using the original task interface. Component masks and learned weights remain fixed. (b) Rule-5 relative accuracy normalized to that of the full mother network. (c) Reconstruction score , where is the relative accuracy for configuration , and is the nonzero scalar-weight fraction of the directly extracted rule-5 token. The denominator is shared across all three configurations. In b,c, l denotes the mother network Lasso strength; violins summarize 30 independent runs per regularization setting, with means and medians marked in black and red. (d) Heuristic training/extraction cost comparison, normalized within each run to multitask training plus extraction. Bars show means across three benchmark runs, error bars show s.e.m., and points show individual runs. This proxy excludes recomposition (Supplementary Note 8.7).
3 Discussion
Our results demonstrate that functional modularity can emerge under sparsity-constrained multitask learning, with compact, task-selective supports coexisting with shared computation. This organization recurs across the tested task families, profiling criteria, and architectures, while the MLP analyses reveal a systematic depth dependence. These findings complement work on explicit modular architectural design Andreas et al. [2017], Sun and Guyon [2023] and task-driven modular organization Wu et al. [2026] by identifying sparse optimization as a control of functional allocation and testing the preservation and reuse of learned computation.
Our analyses distinguish support compactness, functional preservation and specialization. Under the tested conditions, sparsity-inducing penalties produced smaller and more selectively organized supports than regularization. Drawing on insights from Lasso consistency Zhao and Yu [2006], the local support-recovery analysis distinguishes sparse support formation from magnitude shrinkage and identifies conditions on signal strength, feature coherence, and approximation error under which recovery or local stabilization is possible (Supplementary Note 1). Its dependence on effective coordinates offers a possible interpretation of the depth profile: nonlinear transformations may make task-relevant effects more readily separable in later blocks, while early transformations retain shared computation.
Training trajectories show that task-selective importance progressively concentrates in deeper blocks rather than increasing uniformly across the network. Separately, endpoint representation analyses associate this organization with concentrated variance and stronger hidden–output alignment, alongside layer-dependent, non-monotonic changes in neuronal correlations. These observations connect functional allocation to questions of feature geometry Li et al. [2024] and learned computational structure Cagnetta and Wyart [2024], Chughtai et al. [2023], and resonate with neuroscientific accounts of modular specialization Damicelli et al. [2019].
Task-biased optimization further distinguishes preferential task performance from functional specialization. Conditions with cross-task gains exhibited higher specialization margins than those with target–non-target performance trade-offs. Support changes also extended beyond the emphasized token rather than consistently following a target-expansion, non-target-contraction pattern. Cross-task costs therefore cannot simply be attributed to induced over-specialization. Instead, these results motivate evaluating functional selectivity jointly with performance across the task set, rather than treating greater task priority as a direct means of creating more isolated modules.
Methodologically, the functional-token framework connects importance profiling with tests of computational utility, complementing attribution-based interpretability approaches Marcinkevičs and Vogt [2023], Michaud et al. [2024]. Retaining selected weights while simultaneously masking all profiled weight matrices, including output weights, preserved substantial target function and reduced off-target performance; biases and other unmasked parameters remained unchanged. Compositional reuse provides a further test: extracted functional tokens from a common mother network reconstruct a learned composite rule without retraining while preserving their masks and inherited weights. This evaluates reuse of learned computation, distinct from testing the learning performance of subnetworks trained in isolation under modular connection masks Wu et al. [2026].
These recomposition experiments support the functional reuse of the identified tokens. Within the controlled task setting examined here, these properties support interpreting functional tokens as optimization-dependent and intervention-validated candidate sub-computations, while also showing that their reuse remains constrained by intermediate-interface compatibility and the selected computational decomposition.
Several limitations define the scope of this interpretation. Rule boundaries, primitive operations, composite relations, and task-specific readouts are specified by design, leaving open whether comparable supports can be recovered when tasks are implicit or component roles depend on context. Extraction depends on the intervention target, score normalization, and mask-selection criterion, and scalar-weight analyses may miss higher-order interactions or redundant pathways. The theoretical analysis should likewise be read as a local support-recovery argument for simplified linear surrogates. A stronger account would need to connect feature coherence, exact sparsity, representation geometry, and training-time dynamics in a single framework, and to specify when sparsity promotes separability versus when it destroys useful shared structure. Extending the framework to larger models should also test stability across extraction settings and datasets, compare weight-, path-, and circuit-level interventions, and evaluate targeted functional editing beyond masking.
4 Methods
4.1 Model Architectures
We conduct experiments using two representative neural architectures: a multilayer perceptron (MLP) and a lightweight transformer model (TinyTransformer).
4.1.1 Multitask MLP
The multitask MLP consists of three fully connected hidden layers, each containing 300 ReLU units (Fig. 1a). Each training sample comprises a shared input pair and labels for all selected tasks, and the output layer concatenates rule-specific predictions corresponding to distinct tasks. In the default setting, , and the tasks consist of related arithmetic or logical transformations applied to the same input pair. All tasks are introduced simultaneously and optimized jointly from random initialization, without curriculum learning, sequential task presentation, or task-specific pretraining. Hidden activations are used for representation analyses, whereas functional-token extraction is performed on scalar weight coordinates in the trained parameter matrices. Sparsity is imposed using regularization with , with used as the default unless otherwise stated. The task loss is averaged over the equally sized rule outputs, and the regularization penalty is the sum of the mean within each trainable non-bias weight matrix, with . Additional architectural and training details, including the exact objective, are provided in Supplemental Information, Section S2.
4.1.2 TinyTransformer
To test whether functional modularity generalizes beyond MLPs, we also consider a lightweight transformer encoder (Fig. 2e). The model embeds the input into a compact sequence representation, applies a lightweight transformer encoder, and maps the pooled representation to the same multitask output format used by the MLP experiments. The TinyTransformer control is trained on Binary Sequence Calculation. As in the MLP experiments, all tasks are trained jointly from random initialization, without curriculum learning or sequential task presentation. Functional-token extraction is performed on scalar weight coordinates. The TinyTransformer analysis includes 23 independent runs trained with batch size 128. Full implementation details are provided in Supplemental Information, Section S2.
4.2 Task Design and Random Multitask Training
We use several rule-based multitask families to test whether functional tokens emerge across different input formats and rule semantics (Supplemental Information, Section S5). In all cases, a single shared neural network receives one input sample and predicts the concatenated outputs of the selected rules. Unless otherwise stated, experiments use the first five rules of the selected task family as the default multitask setting (R = 5).
For Binary Sequence Calculation tasks, each input consists of two binary vectors of length . The complete task family contains six arithmetic rules. Rules 1–4 are primitive transformations–addition, multiplication, , and –whereas rules 5 and 6 are composite transformations, and , which reuse primitive arithmetic structure. The default setting jointly trains rules 1–5, placing four primitive tasks and one composite task in the same shared network.
Sparse Pattern Logic tasks use the same paired binary-input format but replace arithmetic with elementwise logical operations. The full rule family contains AND, OR, XOR, NOT of the first input, identity of the first input, and identity of the second input; the default setting again uses the first five rules. MNIST Digit-Pair Arithmetic tasks mirror the Binary Sequence Calculation rule structure but use digit-derived inputs, testing whether the same extraction framework remains informative beyond direct synthetic binary variables. The TinyTransformer control uses the Binary Sequence Calculation setting with the same five default rules.
For each independent trial, examples are randomly sampled and split into training and validation sets. Labels for all selected rules are generated on the same samples, and all task losses are optimized jointly from random initialization. Additional implementation details are provided in Supplemental Information, Section S2.
4.3 Profiling Functional Tokens
4.3.1 Ablation Profiling
For each trained network and rule , we quantify the functional contribution of a scalar weight token by zeroing that weight while keeping all other parameters fixed. Let denote the baseline output block for rule , and let denote the output after ablating scalar weight . The ablation score is
This score measures the output perturbation induced by removing one scalar weight coordinate from the trained model.
4.3.2 Taylor Profiling
As a complementary first-order approximation, we estimate the squared output sensitivity of each scalar weight:
This approximates the squared first-order output perturbation associated with removing a scalar weight. For each batch , rule and probe , independent Rademacher signs are drawn for each sample and output coordinate . The estimator is
Here is the total number of profiled samples. The expectation over the probes equals . The Taylor runs in Figs. 2c,d,f and 4a used .
4.4 Functional Token Extraction
A weight token is a scalar coordinate in a trainable non-bias weight matrix. A rule-specific functional token is the set of weight tokens selected by an intervention-defined important mask. For each rule and weight token , let denote the corresponding importance score from ablation or Taylor profiling. To account for differences in output scale across rules, we also compute a normalized score profile
where stabilizes output-energy normalization; it is distinct from the score floor .
The extraction quantile is fixed at . For each trained network , profiled weight matrix and rule , the numerical threshold is
where is the set of profiled candidate coordinates. The important mask is
The quantile is computed before score-floor filtering, so finite zero scores enter its calculation. The numerical threshold is recomputed for every network, matrix and rule, and at every profiled training snapshot. For a rule set C, masks are combined by union,
We construct a mask separately for each profiled weight matrix and apply all masks simultaneously, including the output weights. Biases and other parameters outside the masking set remain unchanged. The retained-weight ratio is
Its numerator counts mask-selected positions; its denominator counts all scalar coordinates in the analyzed weight matrices, including zero-valued entries and excluding biases.
We evaluate rule-wise relative accuracy as
where is the accuracy of the retained subnetwork on rule , and is the accuracy of the full network on the same rule. Unless otherwise stated, rule accuracy is the mean agreement over samples and output bits after binarizing predictions at > 0.5.
For descriptive assignment plots, a selected weight token can also be given an exact rule-set signature,
These signature counts visualize which rule combinations share selected weights.
The importance-weighted normalized inverse participation (NIP) statistic used in Fig. 3c,d and the training trajectories in Fig. 4a uses the masked score profile directly. Given a rule set and a block-specific important mask , define
Tokens are active when , with , a numerical mass floor distinct from the raw-score floor . For active tokens, let . We define the normalized concentration
and the block modularity score
Thus measures the degree to which important weighted score profiles are concentrated on individual rules, with larger values indicating stronger functional specialization under a fixed extraction criterion. Masks are recomputed separately for each network, weight matrix, rule and snapshot. is defined when the active importance mass is nonzero.
Additional implementation details are provided in Supplementary Note S3.
Supplemental Information
Supplemental theoretical analysis, model and training details, task definitions, and supporting analyses are appended after the References.
Data and Code Availability
All synthetic datasets are generated by the task procedures described in Methods and Supplemental Information. MNIST-based experiments use the public MNIST dataset. Training, analysis, and figure-generation code are maintained in the accompanying project repository.
Acknowledgements
This work was supported by the Beijing Natural Science Foundation (Z260005 to L. Q.) and the Fundamental and Interdisciplinary Disciplines Breakthrough Plan of the Ministry of Education of China (JYB2025XDXM502 to Q. O.).
Author contributions
L. Q. and Q. O. conceived the study and designed the overall research framework. B. S. developed the theoretical methodology, designed and carried out the computational experiments and conducted data analysis. L. Q. supervised the research. B. S. and L. Q. wrote the manuscript with input from all authors. All authors discussed the results, reviewed the manuscript, and approved the final version.
Competing interests
The authors declare no competing interests.
References
Yoshua Bengio and Yann LeCun. Scaling learning algorithms towards AI. In Large Scale Kernel Machines. MIT Press, 2007.
Geoffrey E. Hinton, Simon Osindero, and Yee Whye Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18:1527–1554, 2006.
Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT Press, 2016.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition, December 2015.
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely Connected Convolutional Networks, January 2018.
Sebastian Ruder. An overview of gradient descent optimization algorithms, June 2017.
Fabrizio Damicelli, Claus C. Hilgetag, Marc-Thorsten Hütt, and Arnaud Messé. Topological reinforcement as a principle of modularity emergence in brain networks. Network Neuroscience, 3(2):589–605, January 2019. ISSN 2472-1751. doi: 10.1162/netn_a_00085.
Eshed Margalit, Hyodong Lee, Dawn Finzi, James J. DiCarlo, Kalanit Grill-Spector, and Daniel L.K. Yamins. A unifying framework for functional organization in early and higher ventral visual cortex. Neuron, 112(14):2435–2451.e7, July 2024. ISSN 08966273. doi: 10.1016/j.neuron.2024.04.018.
Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural Module Networks, July 2017.
Alexander Braylan, Mark Hollenbeck, Elliot Meyerson, and Risto Miikkulainen. Reuse of Neural Modules for General Video Game Playing, December 2015.
Corinna Cortes, Xavi Gonzalez, Vitaly Kuznetsov, Mehryar Mohri, and Scott Yang. AdaNet: Adaptive Structural Learning of Artificial Neural Networks, February 2017.
Jia Liu, Maoguo Gong, Qiguang Miao, Xiaogang Wang, and Hao Li. Structure Learning for Deep Neural Networks Based on Multiobjective Optimization. IEEE Transactions on Neural Networks and Learning Systems, 29(6): 2450–2463, June 2018. ISSN 2162-237X, 2162-2388. doi: 10.1109/TNNLS.2017.2695223.
E. Celledoni, M. J. Ehrhardt, C. Etmann, R. I. Mclachlan, B. Owren, C.-B. Schonlieb, and F. Sherry. Structure-preserving deep learning. European Journal of Applied Mathematics, 32(5):888–936, October 2021. ISSN 0956-7925, 1469-4425. doi: 10.1017/S0956792521000139.
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In International Conference on Learning Representations, 2017.
William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39, 2022.
Haozhe Sun and Isabelle Guyon. Modularity in Deep Learning: A Survey. In Intelligent Computing, volume 739, pages 561–595. Springer Nature Switzerland, 2023. doi: 10.1007/978-3-031-37963-5_40.
Nadav Kashtan and Uri Alon. Spontaneous evolution of modularity and network motifs. Proceedings of the National Academy of Sciences, 102(39):13773–13778, 2005. doi: 10.1073/pnas.0503610102.
Jeff Clune, Jean-Baptiste Mouret, and Hod Lipson. The evolutionary origins of modularity. Proceedings of the Royal Society B: Biological Sciences, 280(1755):20122863, 2013. doi: 10.1098/rspb.2012.2863.
Yuhang Wu, Shikuang Deng, Kangrui Du, Marcelo G. Mattar, Yifan Wu, Dani S. Bassett, Huajin Tang, Gang Pan, and Shi Gu. Task-structured modularity emerges in artificial networks and aligns with brain architecture. Nature Machine Intelligence, 2026. doi: 10.1038/s42256-026-01306-9.
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning Structured Sparsity in Deep Neural Networks, October 2016.
Simone Scardapane, Danilo Comminiello, Amir Hussain, and Aurelio Uncini. Group Sparse Regularization for Deep Neural Networks. Neurocomputing, 241:81–89, June 2017. ISSN 09252312. doi: 10.1016/j.neucom.2017.02.029.
Rongrong Ma, Jianyu Miao, Lingfeng Niu, and Peng Zhang. Transformed 1 regularization for learning sparse deep neural networks. Neural Networks, 119:286–298, November 2019. ISSN 08936080. doi: 10.1016/j.neunet.2019.08.015.
Ayush Manish Agrawal, Atharva Tendle, Harshvardhan Sikka, and Sahib Singh. WeightScale: Interpreting Weight Change in Neural Networks, March 2022.
Yuxiao Li, Eric J. Michaud, David D. Baek, Joshua Engels, Xiaoqing Sun, and Max Tegmark. The Geometry of Concepts: Sparse Autoencoder Feature Structure, October 2024.
Eric J. Michaud, Isaac Liao, Vedang Lad, Ziming Liu, Anish Mudide, Chloe Loughridge, Zifan Carl Guo, Tara Rezaei, Kheirkhah, Mateja Vukelić, and Max Tegmark. Opening the AI black box: Program synthesis via mechanistic interpretability, February 2024.
Guangyu Robert Yang, Madhura R. Joglekar, H. Francis Song, William T. Newsome, and Xiao-Jing Wang. Task representations in neural networks trained to perform many cognitive tasks. Nature Neuroscience, 22(2):297–306, February 2019. ISSN 1097-6256, 1546-1726. doi: 10.1038/s41593-018-0310-2.
Laura N. Driscoll, Krishna Shenoy, and David Sussillo. Flexible multitask computation in recurrent networks utilizes shared dynamical motifs. Nature Neuroscience, 27(7):1349–1363, July 2024. ISSN 1097-6256, 1546-1726. doi:10.1038/s41593-024-01668-6.
Herbert Levine and Yuhai Tu. Machine learning meets physics: A two-way street. Proceedings of the National Academy of Sciences, 121(27):e2403580121, July 2024. ISSN 0027-8424, 1091-6490. doi: 10.1073/pnas.2403580121.
Peng Zhao and Bin Yu. On Model Selection Consistency of Lasso. Journal of Machine Learning Research, 7(90):2541–2563, 2006.
Francesco Cagnetta and Matthieu Wyart. Towards a theory of how the structure of language is acquired by deep neural networks, October 2024.
Bilal Chughtai, Lawrence Chan, and Neel Nanda. A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operations, May 2023.
Ričards Marcinkevičs and Julia E. Vogt. Interpretable and explainable machine learning: A methods-centric overview with concrete examples. WIREs Data Mining and Knowledge Discovery, 13(3):e1493, May 2023. ISSN 1942-4787, 1942-4795. doi: 10.1002/widm.1493.
SUPPLEMENTAL INFORMATION FOR SPARSITY-DRIVEN EMERGENCE OF FUNCTIONAL MODULARITY IN MULTITASK NEURAL NETWORKS
Bowen Shi Qi Ouyang Long Qian
Institute for Advanced Study in Physics, Zhejiang University, Hangzhou 310058, China
Center for Quantitative Biology, Academy for Advanced Interdisciplinary Studies, Peking University, Beijing 100871, China
ZJU-Hangzhou Global Scientific and Technological Innovation Center, Hangzhou 311200, China
Institute of Fundamental and Transdisciplinary Research, Zhejiang University, Hangzhou, China
bwshi1996@qq.com; qoy@zju.edu.cn; long.qian@pku.edu.cn
October 22, 2026
S1 A Local Support-Recovery Argument for -Induced Subnetworks
This supplemental section gives a conditional proof explaining why sparsity-inducing regularization can make task-selective functional-token subnetworks separable by ablation or Taylor profiling. The argument starts from the linear multitask model
and then transfers the conclusion to a trained neural network through an explicit local-linear surrogate assumption. It should be read as a support-recovery theorem for the surrogate coordinates, not as a global theorem for nonlinear training dynamics.
S1.1 Linear surrogate and notation
Let be the number of samples, the number of candidate elementary coordinates, and the number of tasks. In Eq. (S.1),
where is the target vector for task , is the true task-specific coefficient vector, and is the noise matrix. For each task,
We write
Here is the true support of task . To avoid confusing support sets with importance scores, this section uses calligraphic for supports and reserves symbols such as and for ablation and Taylor scores.
We estimate by
The objective is separable across task columns:
It is therefore enough to prove the support claim for one fixed task. In the proof below we suppress the task index r, writing for the corresponding single-task quantities.
S1.2 Assumptions
The following assumptions are standard support-recovery assumptions, with an additional local-curvature condition for the nonconvex case .
A1. Sparse and normalized design. The support size satisfies . The columns of are normalized so that , and for a finite constant . Here denotes the spectral norm.
A2. Restricted identifiability. There are constants and such that
For index sets A, B, denotes the submatrix of C with rows in A and columns in B. The matrix -norm is the maximum absolute row sum.
A3. Noise correlation. The empirical noise-design correlation is uniformly bounded:
For normalized designs and sub-Gaussian noise, is typically of order for one task, or uniformly across tasks.
A4. Beta-min signal. The smallest active coefficient is bounded below:
The tuning parameter is small enough that active coefficients do not cross zero. A convenient sufficient condition is
For , this is .
A5. Off-support incoherence for . For the Lasso endpoint, assume the strict irrepresentable condition
and assume the off-support noise is dominated by the Lasso penalty:
These two inequalities are used only for the convex support-recovery proof.
A6. Active-set curvature for . For , is concave away from zero, so its second derivative is negative on active coordinates. We assume the restricted quadratic loss curvature dominates that negative curvature in the sign-preserving neighborhood : there is such that
In addition, the active gradient at the oracle coefficient is small enough that
This condition ensures that the restricted nonconvex problem has an interior minimizer in the sign-preserving neighborhood.
S1.3 Support recovery for
Proposition S1. Under A1–A6, the following statements hold for each task r.
For , the convex Lasso problem has a global minimizer satisfying
For , the nonconvex objective has a strict local minimizer satisfying
The second statement is local: it does not claim that all global minimizers have this support, nor that gradient descent from arbitrary initialization must reach this local minimizer.
Proof. Fix a task and omit the subscript .
Case 1: . The objective is convex. We use a primal-dual witness argument. The phrase Karush-Kuhn-Tucker (KKT) conditions refers here to the necessary and sufficient first-order optimality conditions for a convex optimization problem with a nonsmooth penalty, expressed through the subgradient of the norm.
First solve the restricted Lasso problem on the true support:
On active coordinates, the KKT equation is
where . If has the correct sign, then . Solving Eq. (S.18) gives
By A2–A4 with ,
Thus every active coefficient remains nonzero and has the same sign as . This validates the chosen active subgradient.
It remains to verify the inactive KKT condition. For , the subgradient condition for is
Substituting the active solution with , the left side of Eq. (S.21) is at most
By A5 this is bounded by . Therefore the full vector satisfies the KKT conditions. Since the objective is convex, these conditions certify a global minimizer with support and correct signs.
Case 2: . The penalty is nonconvex and non-Lipschitz at zero, so KKT conditions at zero are not the right tool. We instead prove the existence of an oracle-supported strict local minimizer.
Consider the restricted objective on the true support:
Define the sign-preserving neighborhood
Inside this neighborhood all active coordinates satisfy . For any point in , the Hessian of the restricted objective is
which is bounded below by by A6. Hence is -strongly convex on , even though the full objective is nonconvex outside this neighborhood.
At the oracle coefficient,
By A3 and A6,
For any boundary point of , . Strong convexity gives
Therefore the minimizer of over the compact set lies in its interior. Denote it by . It satisfies the active first-order equation
Because , all active signs are preserved.
We now show that is a strict local minimizer in the full -dimensional space. Perturb the active and inactive coordinates by and , respectively. A Taylor expansion around , using Eq. (S.29) for the active coordinates, yields
where
is finite by A1–A4. For , the term dominates both and as : for sufficiently small ,
The cross term satisfies, for any ,
Choose , then choose the neighborhood in small enough that the inactive singular penalty dominates the finite linear term , the quadratic term in , and the remaining cross-term bound. Eq. (S.31) is then strictly positive for every nonzero sufficiently small perturbation . Thus is a strict local minimizer with support . This proves the nonconvex local statement.
Repeating the single-task argument for each task column proves the multitask statement, because Eq. (S.5) separates across tasks.
S1.4 From support recovery to score-separable functional tokens
Support recovery says that the effective coordinates of task form a set . The experiments, however, do not observe directly. They estimate functional supports through ablation and Taylor scores. This subsection proves the link between the true support , the ablation score , and the Taylor score .
Let be a trained network and fix a local coordinate block . Let denote the scalar local coordinate associated with weight token , for example the coordinate appearing in a parameter-Jacobian linearization around the trained parameters. Let be the output segment for task , where in the experiments. Assume the following local-linear surrogate:
where is a remainder term. The task support in this layer is
Define the ideal coefficient-energy score
Assume an active margin: there exists such that
This margin excludes unidentifiable active coordinates with zero coordinate second moment or vanishingly small effective coefficients.
Ablation score. Let be the output after removing token . The population ablation score is
If removing q changes only the corresponding local term up to a remainder
and if uniformly, then
Thus ablation score is a controlled perturbation of the ideal support energy .
Taylor score. Introduce a multiplicative gate on token q, so that the local surrogate becomes
The population first-order Taylor score is
Because
the same calculation gives, if ,
Score-support relation. Define score-threshold support estimates
Let . If , then for every threshold
we have
Indeed, if , then , so both scores are at most . If , then , so both scores are at least . Moreover,
so ablation and Taylor are close because both estimate the same ideal energy , not because they are algebraically identical interventions.
The empirical scores have finite-sample error and, for Taylor profiling, random-probe error. If uniform bounds of sizes and hold for these two errors, the same conclusion holds after replacing by . Four probes do not automatically guarantee the required bound; no numerical probe-error guarantee is asserted here. This is the formal relation between the recovered task support , the ablation score , and the Taylor score .
S1.5 From linear supports to functional-token subnetworks
The support-recovery result applies directly to coordinates on which the regularized objective acts, such as readout coefficients, explicit gates, path coefficients, or parameter-Jacobian coordinates. For scalar weight coordinates in a nonlinear network, raw sparsity must still be interpreted through a local surrogate. The bridge from Eq. (S.1) to a neural network therefore requires a compatibility assumption: in the chosen local coordinates, the trained network is well approximated by Eq. (S.35), and the effect of regularization is reflected in sparse, stable effective coefficients with a nonzero score margin .
The support-recovery theorem and its singularity argument for concern the idealized, unshifted penalty . The neural-network implementation instead uses with per-matrix normalization (Section S2). For this shifted penalty, the one-sided derivative has finite magnitude at zero; the unshifted singularity argument therefore does not directly prove local stability for the implemented objective. The theoretical connection remains conditional on the local-surrogate and compatibility assumptions above.
The support-recovery statement applies only when the realized score threshold, including the score floor, lies inside the assumed separation gap. A fixed 75th-percentile rule does not by itself guarantee this condition or identify the true support size. The theoretical noise bound is distinct from the extraction quantile .
Under these local-surrogate, compatibility and score-separation assumptions, Proposition S1 yields task-specific supports . Eq. (S.49) then shows that ablation and Taylor profiling recover those supports by thresholding. The task signature of token q is
For a task set , the retained functional-token subnetwork is the support union
If , then . Let denote the remainder for task after masking. Provided the local approximation remains valid after the simultaneous mask is applied to all analyzed matrices and , the surrogate gives
which is a conditional output-preservation statement, not a general sufficiency guarantee for a nonlinear network. Simultaneous removal of many weights can change activations and invalidate a single-coordinate approximation. Preserving thresholded predictions additionally requires the joint-mask output error to remain smaller than the original distance of each output from its decision threshold (0.5 for binary outputs). Support inclusion alone does not establish this stability or margin condition. If , and the same approximation remains valid, then
A small intersection alone does not imply reduced off-target accuracy: the magnitudes of omitted contributions, biases, approximation error and classification margins also matter. An accuracy decrease requires output changes that cross decision boundaries in directions that turn correct predictions into errors, with a net loss over any corrected errors. Sufficiency and specificity of the actual joint masks are therefore assessed empirically. Finally,
which explains why functional-token combinations can be composed by union of their recovered supports. This is the mathematical counterpart of the experimental masking rule: retain scalar weight tokens important for any selected task and remove the rest.
S1.6 Why the endpoint is included and why differs
The endpoint is included because the Lasso penalty has a subgradient interval at zero:
This interval is exactly what allows the inactive KKT condition in Eq. (S.21) to hold with . Thus can produce exact zeros and support recovery under the irrepresentable and beta-min conditions above.
For , the derivative
is singular as . This singularity makes zero locally stable against sufficiently small inactive perturbations, which is why the nonconvex proof uses local domination by rather than a convex KKT certificate.
For , neither mechanism is present. There is no Lasso subgradient interval at zero, and the derivative is finite at zero; for , it is exactly zero at zero. Small empirical correlations can then be represented by small nonzero coefficients instead of being thresholded to exact zeros. Consequently, task supports need not have a stable active/inactive gap, and ablation or Taylor score distributions may not admit a clean threshold separating functional-token subnetworks.
S1.7 Conclusion of the argument
Combining the pieces gives the conditional chain
(S.58)
provided the restricted-design, beta-min, noise, curvature, local-linearization, and score-margin assumptions hold. This proves the claimed relationship between -induced sparse supports and threshold-separable ablation/Taylor functional-token subnetworks, while making explicit the assumptions under which the conclusion is valid.
S2 Model Architectures and Training Details
S2.1 Multitask MLP
The robustness simulations use a fully connected Torch MLP with three hidden layers, each containing 300 ReLU units. The input dimension is for the binary arithmetic and logic tasks, whereas paired MNIST images are flattened and concatenated to give . The output dimension is , with jointly trained rules and output bits per rule.
Each input sample contains two vectors, x and y, concatenated into a shared input representation. The model is trained on rule indices 0–4, displayed in the paper as rules 1–5. Each rule defines a distinct transformation of the same input pair and produces an output vector of length P. The rule-specific outputs are concatenated and predicted by a shared network.
All tasks are introduced at the beginning of training and optimized jointly. We do not use curriculum learning, sequential task training, or task-specific pretraining. The training objective is
where is the mean-squared error averaged over samples and the outputs of rule , by default, is the set of trainable non-bias weight matrices, and is the number of scalar weights in matrix . The implementation uses and sums the per-matrix means rather than an unnormalized sum over all weights. Biases are excluded from the penalty. The task-weighting experiment sets one to 5 while retaining the factor and the same (Supplementary Note S7).
Robustness-simulation setup
• Optimizer: Adam with learning rate 0.001.
• Batch size: 128.
• Hidden layers: three layers with 300 units per layer.
• Dataset size: 5,000 samples with a 50/50 training–validation split.
• Independent repeats: 30, starting from seed 300.
• Number of jointly trained tasks: 5 in the default experiments.
• Regularization exponent: in the robustness simulations; in the regularizer-form comparison.
• Sparsity coefficient: for MLP robustness simulations.
Training configurations by experiment. Saved training configurations distinguish the experiments listed below. All listed configurations use Adam, 5,000 training epochs, rules 1–5 (implementation indices 0–4), and a checkpoint interval of 1,000 epochs. Each experimental condition has 30 analyzed independent runs, except the TinyTransformer robustness analysis, which includes 23. The sweep contains 21 conditions; the task-weighting experiment contains six. The four mother-network conditions used for recomposition are drawn from the sweep and inherit its training settings.
| Experiment | Learning rate | Training batch size |
|---|---|---|
| MLP robustness: binary, logic and MNIST | 128 | |
| TinyTransformer robustness | 128 | |
| Sparsity-strength/exponent sweep (Figs. 3, 4) | 512 | |
| Task weighting (Fig. 5) | 128 | |
| Recomposition mother networks (Fig. 6b,c) | 512 |
The TinyTransformer analysis uses the 23 saved runs trained with batch size 128. The seven runs trained with batch size 500 are excluded to keep the training batch size uniform. Training batch sizes in this table are distinct from the analysis batch size of 64 specified in the reproduction protocol.
S2.2 TinyTransformer
The TinyTransformer provides a lightweight non-MLP architecture for testing whether functional-token extraction depends on fully connected hidden layers. Each paired binary input is split into left and right halves, and both halves are projected into a shared 32-dimensional token space. The resulting two-token sequence is processed by two encoder-style self-attention blocks with feedforward width 64. The final representation is obtained by mean-pooling the two tokens and passing the pooled vector through a linear prediction head with outputs.
In the robustness simulation, the TinyTransformer is trained on the same Binary Sequence Calculation rules as the MLP, using rule indices 0–4. The encoder is trainable (train_encoder=True), so both the token encoder and output head are optimized jointly. Functional tokens are constructed from scalar weight coordinates in the trained parameter matrices, profiled and retained with the same definitions used for the MLP experiments.
Robustness-simulation setup.
- Optimizer: Adam with learning rate 0.001.
- Training batch size: 128; 23 independent runs included in the analysis.
- Token/hidden dimension: 32.
- Transformer encoder blocks: two.
- Feedforward hidden dimension: 64.
- Dataset size: 5,000 binary-pair samples with a 50/50 training–validation split.
- Number of jointly trained arithmetic tasks: 5.
- Regularization exponent: .
- Sparsity coefficient: for the transformer robustness simulation.
S3 Ablation and Taylor Profiling
All functional-token analyses in the main text use scalar weight coordinates as tokens. For a trained model with parameters and rule-specific output block , ablating a weight token means replacing by zero while leaving all other parameters fixed. The ablation importance score is
where denotes the parameter vector after zeroing coordinate .
As a complementary first-order approximation, we estimate the squared output sensitivity of each scalar weight:
This approximates the squared first-order output perturbation associated with removing a scalar weight; it is not a task-loss gradient attribution. For each batch , rule and probe , independent Rademacher signs are drawn for each sample and output coordinate . The estimator is
Here is the total number of profiled samples. The expectation over the probes equals . There is no additional division by the output dimension . The Taylor runs in Figs. 2c,d,f and 4a used .
For multiplicative gates , ; thus this scalar-weight score corresponds to the squared gate-Jacobian quantity in the local theoretical model.
S3.1 Token-Extraction and Modularity Settings
The extraction quantile is fixed at . For each trained network , profiled weight matrix and rule , the numerical threshold is
where is the set of profiled candidate coordinates. The important mask is
The quantile is computed before score-floor filtering, so finite zero scores enter its calculation. The numerical threshold is recomputed for every network, matrix and rule, and at every profiled training snapshot. Fixed is not a fixed numerical score threshold. For a rule set C, masks are combined by union,
We construct a mask separately for each profiled weight matrix and apply all masks simultaneously, including the output weights. Biases and other parameters outside the masking set remain unchanged. This subnetwork intervention differs from zeroing one scalar weight at a time to compute its importance. The retained-weight ratio is
Its numerator counts mask-selected positions; its denominator counts all scalar coordinates in the analyzed weight matrices, including zero-valued entries and excluding biases. It is not the nonzero fraction of the full network.
Configuration provenance and reproduction checks. The saved summaries for Figs. 1c–f and 2a,b,d,f record , , and no candidate cap; the score floor is also present in all 150 original analysis exports. The current figures use 143 of these exports: 120 MLP exports and 23 TinyTransformer exports. Seven TinyTransformer runs trained with batch size 500 are excluded from Fig. 2f, leaving the 23 runs trained with batch size 128; all original exports are preserved. The Taylor groups record four probes.
For reproducibility, we specify the current analysis configuration for Figs. 3 and 4a: , , all scalar-weight candidates, all available test samples and an analysis batch size of 64. Fig. 3 uses ablation profiling with ; Fig. 4a uses randomized Taylor profiling with , four probes and seed 0. The verified execution devices are CUDA for ablation and CPU for Taylor; fixing the Taylor device preserves the random-probe sequence. These settings define the adopted reproduction protocol.
The Fig. 3c,d distributions match the saved importance-weighted NIP results and implement Eq. (13); rule-count purity is a different statistic and was not used for these panels. Recomputing six representative ablation checkpoints with the adopted configuration gave a maximum absolute difference in of , identical active-token counts, and identical single-rule relative accuracies and retained-weight ratios. Recomputing all 600 Taylor checkpoints underlying Fig. 4a gave a maximum absolute difference in of and identical active-token counts. These checks reassess saved trained models rather than retrain them.
For Fig. 5, all 180 newly trained 300-unit models underwent fresh scalar-weight ablation profiling. Fig. 6b,c uses fresh profiling of all 120 saved 300-unit mother models, and Fig. 6d uses fresh profiling of three saved auxiliary joint models. All these analyses use , , , perturbation batch size 64 and no candidate cap. All 194,700 scalar weights, including the output matrix, are candidates; masks are constructed separately per matrix and applied simultaneously, while biases remain unchanged. Fig. 5 uses and , without display rescaling. The recomposition conditions retain the sweep's experiment/display strength mapping. The saved score-ratio field is not a selection threshold in the score_quantile branch, and probe-count metadata in ablation exports do not imply Taylor profiling.
Training regularization strength , extraction quantile , realized score threshold , score floor and output-energy constant have distinct roles. In the saved Lasso/exponent sweep used for Figs. 3 and 4, the displayed strength is . Thus displayed corresponds to . Experiment-specific training settings are provided in Supplementary Note S2; task-weighting and recomposition/cost protocols are detailed in Supplementary
Notes S7 and S8, respectively. Rule accuracy is mean agreement over samples and output bits after thresholding predictions at > 0.5, not exact-vector accuracy; relative accuracy divides this measure by that of the full network. In the main-text definition of , active tokens satisfy , distinct from the raw-score floor ; is undefined if no token is active.
S4 Implementation Details
Token-level analyses are performed from saved PyTorch activations, model weights, and validation data, with MATLAB-compatible exports retained only for figure-generation compatibility.
• Export activations, outputs, task labels, and non-bias trainable weight matrices from trained models.
• Compute ablation scores or Taylor scores for scalar weight tokens.
• Convert scores into rule-wise important masks using the fixed score-quantile rule in Eq. 6.
• Construct each retained rule combination by taking the union of scalar weight tokens important to any selected rule.
• Construct the mask separately for each profiled matrix, then simultaneously zero unselected coordinates across all profiled matrices, including output weights; biases and other unmasked parameters remain unchanged.
• Compute relative accuracy matrices for single-rule functional tokens and multi-rule token combinations.
S5 Task Family Definitions
This section summarizes the task families used in the robustness simulations. The implementation uses zero-based rule indices, whereas the paper displays the same rules as rule 1, rule 2, and so on. The default active rule set is indices 0–4, corresponding to rules 1–5.
S5.1 Binary Sequence Calculation
This task family applies arithmetic rules to pairs of binary input patterns.
Input. Two binary vectors are sampled as paired binary patterns. In the robustness simulation, , 5,000 unique pairs are sampled without replacement from the possible pairs, and the model receives the concatenated vector .
Output. Each selected rule produces a binary vector of length P. With R selected rules, the outputs are concatenated into
Rule Set. Let and ; and are the arithmetic operands used in the main text and figures, whereas and denote their binary encodings. Arithmetic rules are applied in integer space and then mapped back to binary using dec2bin, retaining only the last bits:
-
Addition:
-
Multiplication: ab
-
Square of
-
Square of
-
Mixed multiplication:
-
Alternative interaction:
S5.2 Sparse Pattern Logic
This task family applies elementwise logical operations to sparse binary patterns.
Input. Two binary vectors are sampled independently from a sparse Bernoulli distribution. In the robustness simulation, and the sparsity parameter is 0.7, so each bit is zero with probability 0.7 and one with probability 0.3. The model receives the concatenated vector . Sample rows are shuffled and split without deduplicating pattern pairs across the training and held-out sets. Each of the 30 saved runs contains 2,500 held-out pairs.
Output. Each selected rule produces a binary vector in . With selected rules, the final output is
Rule Set. Logical operations are applied elementwise:
-
AND:
-
OR:
-
XOR:
-
NOT of the first input:
-
Identity of the first input: x
-
Identity of the second input: y
S5.3 MNIST Digit-Pair Arithmetic
This task family applies arithmetic rules to MNIST digit labels while presenting the corresponding image pairs as input.
Input. Two MNIST images , with digit labels , are selected. In the robustness simulation, digit pairs are balanced over the 100 possible label pairs, and image instances for each digit are sampled from the MNIST training split. Images are normalized, flattened, and concatenated into a single input vector. The split is performed on generated image-pair rows rather than on unique source images, so the same source image can occur in both sets. Each of the 30 saved runs contains 2,500 held-out pairs.
Output. Rules operate on integer labels . Each rule output is converted to binary and truncated to the last P = 7 bits. With R selected rules, the output is
Rule Set.
-
Addition:
-
Multiplication:
-
Square of :
-
Square of :
-
Mixed multiplication:
-
Alternative interaction:
S6 Representational Analysis
We characterized the internal representations of the trained networks using three complementary measures: cross-layer representational similarity, within-layer spectral complexity, and pairwise hidden-unit correlation.
Cross-layer representational similarity. We quantified representation similarity across layers using linear centered kernel alignment (CKA). For each layer , hidden-unit activations were collected across the same set of input samples and arranged into an activation matrix . After centering the activation matrices across samples, linear CKA between layers and was computed as
Higher CKA values indicate greater similarity between the representational geometries of two layers.
PCA spectral entropy. To characterize the complexity of the representation within each layer, we performed principal component analysis on its activation matrix. Let denote the fraction of variance explained by the -th principal component of layer , normalized such that
The PCA spectral entropy was then defined as
A low spectral entropy indicates that the representation is concentrated in a small number of principal directions, whereas a high value indicates that variance is distributed more broadly across representational dimensions.
Pairwise hidden-unit correlation. To quantify statistical dependence among hidden units within each hidden layer, we computed pairwise Pearson correlations between their pre-activation responses. Let
denote the pre-activation response matrix of layer , where is the number of input samples and is the number of hidden units. The correlation between hidden units and was calculated as
We excluded the diagonal entries and retained one value for each unordered hidden-unit pair by extracting the upper triangular portion of the correlation matrix. Because both positive and negative correlations indicate statistical coupling, we analyzed the absolute correlation magnitude,
The values were grouped into 100 equally spaced bins over , and the histogram was normalized to represent the probability distribution of pairwise correlations within each layer. Distributions concentrated near zero indicate weakly correlated and more diverse hidden-unit responses, whereas greater mass at high correlation values indicates stronger coordination or redundancy among hidden units.
S7 Task-Weighting Functional Allocation Analysis
This section defines the analysis in Fig. 5, generated with the historical example/fig56_protocol.py workflow and plotted with example/figure6.py. The accompanying Git repository provides reproduce.py -all to rerun the experiments and reproduce.py -from-results to reconstruct the figures from the supplied observations. All six conditions use the same MLP architecture with three hidden layers of 300 units. Each condition contains K = 30 runs with seeds 300–329, giving 180 newly trained networks. Training uses 5,000 epochs, Adam with learning rate 0.05, batch size 128, and . In Fig. 5 and its task-weighting objective, . Each seed generates 5,000 unique binary input pairs, split equally into training and held-out sets and shared across conditions. The model initialization and optimizer random seeds are the run seed plus 100 and 200, respectively. Figure labels use rules 1–5; the implementation indexes them as 0–4.
Experimental design. Let denote the equal-weight control, for which for every rule. In intervention condition , rule receives five-fold loss weight:
Functional tokens are extracted independently from each trained network by ablation profiling and the fixed rule-wise score-quantile mask used in the main analysis. Importance profiling and evaluation of the masked subnetworks use the same held-out set, as in the robustness and recomposition analyses; reported retention therefore measures preservation on that analysis set, rather than generalization to a second untouched evaluation set.
Condition-level matrices. Let be the unmasked-network accuracy in condition c, evaluated on rule r in run k, and let be the retained scalar weight fraction of the functional token defined for rule r. Bars denote averages over runs. Panels a and b report
for every upweighted rule u and evaluated/token-defining rule r; panel b displays .
To define panel c, let be the relative accuracy on evaluated rule s when only the functional token defined for rule r is retained in run k. Its specialization margin is
Panel c shows for each upweighted condition and rule-defined token. Unlike panels a and b, this panel reports the margin in the intervention condition itself rather than a control-subtracted change.
Target-rule summaries and paired trials. Panel d uses the five diagonal condition-level pairs ( ). For a metric (accuracy or retained-weight ratio), the implemented marginal error is , where (population standard deviation, ddof=0). The displayed error for a difference is ; the weight-ratio error is multiplied by on the plotted axis. The combined marginal uncertainty omits the covariance between paired observations. The displayed Pearson coefficient is descriptive across the five rule means.
For panel e, upweighted and control runs are matched by repeat index. The target-rule differences are
Pooling the five rules gives matched pairs. The figure reports their Pearson correlation ( ), nominal two-sided value ( ), and least-squares fit. Conditions share run seeds and the same control networks; this pooled value is not adjusted for clustering by seed, shared controls, or task identity.
S8 Compositional Reconstruction of Functional Tokens
S8.1 Source networks and component functional tokens
For each sparsity condition, a mother MLP was first trained jointly on rules 1–5 of the Binary Sequence Calculation task family under regularization, with . The sparsity-strength parameter therefore denotes the Lasso strength used during training of the mother network, rather than a regularization term applied during recomposition.
For each of four displayed regularization strengths and 30 independent trials, the saved 300-unit mother model was profiled again using scalar-weight ablation and the masking procedure described above. The 120 fresh analyses produced masks for addition, multiplication, square and composite rule 5. Each mask and its learned parameters were then held fixed while evaluating the direct rule-5 control and the two recomposition pathways, giving 360 evaluations. Recomposition does not retrain or fine-tune the components, and it does not merge their masks.
Each functional token retained the architecture and learned parameter values inherited from its mother network, while parameters excluded by its functional mask were set to zero. The masks of different functional tokens were not combined through a union of scalar weight coordinates. Instead, each token remained a separate masked MLP, and recomposition was implemented by explicitly connecting the output of one token to the input of another.
No parameters were retrained or fine-tuned during this procedure, and no additional penalty or other optimization objective was applied after the component tokens were connected. The resulting reconstructions therefore constitute zero-shot compositions of fixed functional subnetworks.
S8.2 Notation and output selection
Let the original input be the concatenation of two binary vectors,
The corresponding integer operands are and , using the original task encoding.
For a functional token , its masked MLP was evaluated using the same feedforward computation as the original network. Unselected scalar weights in all profiled matrices remained zero throughout the forward pass; biases and other unmasked parameters retained their trained values.
The output of the original multitask MLP consists of consecutive seven-dimensional blocks corresponding to different rules. In the implementation, dimensions 1–7 correspond to addition, dimensions 8–14 to multiplication, dimensions 15–21 to the square rule used to compute , and dimensions 29–35 to rule 5.
Intermediate outputs passed between functional tokens were binarized using
where the threshold was applied element-wise.
S8.3 Type 1: sequential addition and multiplication
The type 1 reconstruction implements
as a sequential composition of the addition and multiplication functional tokens.
The addition token was first evaluated on the original input:
The seven-dimensional addition output was selected from dimensions 1–7 and binarized:
This intermediate output was concatenated with the original vector x:
The resulting vector was supplied to the multiplication functional token:
Because the final component is the multiplication token, dimensions 8–14 of were used as the reconstructed rule-5 output. The pathway therefore implements
The addition and multiplication tokens retained their independently extracted masks and parameter values throughout the reconstruction.
S8.4 Type 2: parallel square and multiplication followed by addition
The type 2 reconstruction uses the identity
The square and multiplication functional tokens were first evaluated independently on the original input:
The square-rule output corresponding to was selected from dimensions 15–21, whereas the multiplication output corresponding to was selected from dimensions 8–14. Both intermediate outputs were binarized:
The two intermediate vectors were concatenated:
and supplied to the addition functional token:
Because the final component is the addition token, dimensions 1–7 of were used as the reconstructed rule-5 output. This pathway implements
Thus, type 2 connects three fixed functional tokens in a parallel-then-sequential configuration without combining their parameter masks into a single network.
S8.5 Control conditions and accuracy evaluation
For each mother network, we evaluated three conditions:
-
the functional token extracted directly for rule 5, used as the non-recomposed control;
-
the type 1 reconstruction using addition followed by multiplication;
-
the type 2 reconstruction using square and multiplication followed by addition.
The corresponding full, unmasked multitask MLP was used as the performance reference. For both the full network and the directly extracted rule-5 token, output dimensions 29–35 were evaluated. For the type 1 reconstruction, dimensions 8–14 of the final multiplication token were evaluated, whereas dimensions 1–7 of the final addition token were evaluated for type 2.
All outputs were compared with the same seven-dimensional rule-5 target,
Final continuous predictions were binarized using a threshold of 0.5. For condition k, accuracy was calculated as the mean element-wise agreement between the binary prediction and the rule-5 target across all samples:
where N is the number of evaluated samples.
Let denote the rule-5 accuracy of the corresponding full mother network. Relative reconstruction accuracy was defined as
The numerical guard matches the implementation. Across the 360 saved evaluations, and , so neither denominator guard is active. The numerator and denominator are always evaluated on rule 5. The accuracies of the addition, multiplication, and square component tasks are not independently included in this metric.
S8.6 Parameter-normalized reconstruction score
For an extracted functional token, the retained-weight fraction was calculated as
where is the number of nonzero scalar-weight entries and is the total number of scalar-weight entries in the corresponding masked model. In the figure-generation implementation, these quantities are summed across weight matrices; biases are excluded. The cached retained-parameter field is an alias of the retained-weight fraction.
For the directly extracted rule-5 functional token, this fraction was
The parameter-normalized reconstruction score was defined as
Here in the main-text notation, and for configuration . The same value of was used as the denominator for the directly extracted rule-5 control and for both reconstructed pathways. Consequently, provides a common parameter-normalized comparison of rule-5 reconstruction performance. It should not be interpreted as the pathway-specific parameter efficiency of the type 1 or type 2 reconstruction, because the actual retained-weight fractions of their component subnetworks are not used separately in this normalization.
S8.7 Auxiliary training and extraction cost
The auxiliary benchmark compares three jointly trained five-task models (seeds 830–832), those models followed by weight-token extraction, and 15 separately trained single-task controls (five per seed). Each network has three hidden layers of 300 units. This auxiliary experiment uses 600 epochs of SGD, learning rate 0.05, batch size 128, and 1,000 training plus 1,000 held-out samples; it is distinct from the 5,000-epoch Adam experiments. Both joint and single-task models used , , and a regularization offset of . The trained models are reused, and weight profiling is recomputed with the protocol specified above.
For each run, the training proxy is
For scalar-weight extraction, the implemented batching proxy is
where counts scalar weights in matrix b and . Each joint network has 194,700 candidate weights across four matrices. Profiling performs 194,700 single-weight perturbations in 3,045 batched perturbation-forward calls, each using 1,000 held-out samples. Thus there are 194,700,000 perturbed sample evaluations, whereas the batching proxy is 3,045,000; batching does not make those two counts equivalent. The unperturbed reference evaluation and subsequent masked-network evaluations are not included in this extraction proxy.
The training proxies are for the joint network and for the five separate networks combined. The benchmark adds the differently scaled training and extraction proxies to obtain a predefined heuristic total, for joint training plus extraction. This sum is neither a FLOP count nor a wall-clock cost, and does not establish a hardware-independent or measured speed-up. Each run is normalized by its own joint-training-plus-extraction total; the separate-training ratio is 4.7845. Recomposition is excluded.
Fresh weight extraction took a mean of 13.42 seconds (sample SD 0.33 seconds) across the three runs on the recorded CUDA device. These measurements describe the new extraction stage only; they are not combined with historical training times. The mean full-network accuracies were 0.7641 for joint training and 0.8677 for separate training, so the benchmark is not an equal-accuracy comparison. Extracted tokens retained a mean relative accuracy of 0.9527 (s.e.m. 0.0047), averaging over the five rules within each joint model and then over the three models.