On Building Narrow-Domain AI: Hierarchical and Non-Local Nature of Neural Network SkillsOn the creation of narrow AI: hierarchy and nonlocality of neural network skills
The authors, on CMSP (depth-3, width 128): with atomic tasks added, 27/40 learn within 2×10^9, while training only composite gives 0/40.
- General models are often also the strongest in narrow domains, but the authors believe this brings along unused knowledge and may increase dangerous capabilities, making understanding and verification harder. The question to address is: whether hierarchical skills must be learned through broad distributions, and whether skills can be pruned into a small subset of components.
- The authors define CMSP: multiple control bits can be simultaneously ON, and the label is the parity of the union of the disjoint task bits. They compare ablation or attribution greedy pruning, group lasso, KL distillation, and training from scratch. The narrow tasks are MNIST even digits and next-token prediction on Python documentation.
- On CMSP (depth-3, width 128), when atomic tasks are added, 27/40 learn the composite subtask within 2×10^9 samples, while training only the composite gives 0/40. The authors state that on MNIST evens and Python, pruning outperforms distillation and training from scratch; after recovery, random pruning and attribution pruning are close, and 30% attribution pruning forgets less.
- The authors state that CMSP is a toy existence proof, and it is unclear whether curriculum effects exist on natural data; greedy attribution pruning is relatively simple, and it cannot be ruled out that more complex pruning would be better. The LLM experiments did not optimally tune hyperparameters, and the data savings from pruning may also come from the training setup. Experiments cover CMSP, MNIST even digits, Llama-3.2-1B, and four forgetting benchmarks.
- Evaluated models
- Llama-3.2-1B
- Benchmarks
- CMSPMNISTGitHub Code DatasetcounterfactAI2-ARC (ARC-Easy)WMDP-BioWMDP-Cyber
- Metrics
- loss (bits)accuracycross-entropy loss (nats)sparsity
Building AI systems that are capable but narrow in scope faces two challenges. Experiments with synthetic tasks show that training narrow-domain models sometimes requires first training on a broad data distribution, due to hierarchical dependencies among skills, where the broad distribution serves as a curriculum that accelerates learning. When transferring skills from large to small models, skills often do not precisely correspond to a set of prunable components, but pruning methods can still outperform knowledge distillation. The research also attempts to use regularization objectives to align target skills with prunable components and to forget unneeded skills.
Paper analysis
What problem does this paper attempt to solve?
Narrow models must simultaneously handle hierarchical skills and non-local representations: some narrow skills can only be learned through broad distributions, and pruning makes it difficult to retain only the target skills.
Some narrow skills may first need to be learned on a broad data distribution, and once learned, they often cannot be cleanly retained by pruning away one set of components.
- Scenario: The authors state that the strongest systems in each domain remain relatively general-purpose models; domain models are usually fine-tuned from general-purpose bases rather than trained from scratch. The authors believe generality aids reuse, but it brings along knowledge the application does not need, and may have more dangerous capabilities and be harder for mechanistic understanding and property verification.
- Limitation: The authors state that if skills have hierarchical dependencies, some narrow skills must wait for more basic skills to be learned first, and training from scratch on a narrow distribution alone may not be feasible. If skills are not aligned with prunable components such as neurons, pruning also cannot precisely retain the desired skill and remove the rest.
- Observation: On synthetic tasks, when composite subtasks are trained together with atomic subtasks, they are learned after the atomic tasks; removing the atomic samples, they are not learned within the same sample budget. The authors believe the broad distribution provides a curriculum, and that such dynamics may partly explain why general models are strong on many narrow tasks.
- Approach: The authors define compositional multitask sparse parity (CMSP), examine whether skills are local, and use group lasso to compress the target skill into fewer parameter groups while forgetting the rest; then compare pruning, distillation, and training from scratch on MNIST evens and Python documentation.
What related research exists?
Related work is grouped into distillation, pruning, task structure and learning dynamics, and machine unlearning; the authors position this paper in terms of hierarchical dependencies and representational non-locality in narrow AI.
Distillation
- Hinton et al. (2015): Distillation using the KL divergence between teacher and student output distributions. This paper's distillation follows that algorithm.
- Later extensions: Romero et al. (2014), Sun et al. (2019) transfer intermediate representations; Jiao et al. (2019), Sanh (2019) apply it to language models; McCarley et al. (2019) etc. often distill after pruning.
- Turc et al. (2019): The paper states that pretraining the student before distillation can noticeably improve results.
Pruning
- Second-order methods: LeCun et al. (1990)'s Optimal Brain Damage and Hassibi and Stork (1993)'s Optimal Brain Surgeon use second-order information to prune weights. The paper notes that its attribution scores are first-order.
- Group sparsity: Zhou et al. (2016), Wen et al. (2016) use group lasso on vision models; the paper notes they train on the full data distribution. Sanh et al. (2020)'s movement pruning prunes weights in transfer learning.
- Language models: Xia et al. (2023), Ma et al. (2023) do structured pruning; Xia et al. (2022) do task-specific pruning. The paper states that Vural and Erdogdu (2024) provides evidence that pruning directs gradients toward a few important directions, improving sample efficiency.
Task structure and learning dynamics
- Synthetic tasks: Ramesh et al. (2023), Okawa et al. (2023), Park et al. (2024), Abbe et al. (2023) study task structure and learning dynamics. Liu et al. (2025) also briefly studies tasks similar to CMSP to show hierarchical relationships causing what they call "domino" learning dynamics.
- Real tasks: Chen et al. (2023)'s Skill-it! empirically studies hierarchical learning dependencies on real LLM tasks.
- Predecessors of this task: Barak et al. (2022) studies the dynamics of loss plateauing then dropping on sparse parity. In Michaud et al. (2023)'s multitask sparse parity, subtasks are independent; the authors state this is a major limitation of that setting, and accordingly add compositional structure.
Machine unlearning
- Unlearning fine-tuning: Cao and Yang (2015), Bourtoule et al. (2019), Yao et al. (2024), Chen and Yang (2023), Gu et al. (2024) etc. propose various unlearning methods. Guo et al. (2024) studies how unlearning fine-tuning on different components affects forgetting.
- Combination with pruning: The paper cites Lee et al. (2025): distilling after unlearning fine-tuning can more robustly remove unwanted capabilities. Cloud et al. (2024) uses gradient routing to localize capabilities to different components, enabling unlearning via pruning; the paper states this work is highly relevant.
Baselines and benchmarks: Comparisons are training from scratch, Hinton-style distillation, greedy pruning by ablation or attribution scores, group lasso followed by pruning, and random pruning. Data are CMSP, MNIST even digits, and Python documentation from the GitHub Code Dataset; unlearning evaluation uses counterfact, AI2-ARC (ARC-Easy), WMDP-Bio, WMDP-Cyber.
The authors place this paper after curriculum effects and distributed representations: the former explains how task structure affects learning dynamics, and the latter (including Bricken et al. 2023 and classic connectionist work) explains that features are often distributed across many components. The authors state they are concerned with how these properties affect narrow AI, including using pruning and unlearning to make wide networks narrow.
How does the paper address this problem?
Use CMSP to construct hierarchical skills, then use ablation or attribution pruning and group lasso to reduce a wide network to a narrow network retaining only the target subtask.
The authors use compositional multitask sparse parity (CMSP) to create skills with hierarchical dependencies, then compare greedy pruning, group lasso, and distillation to see if a broad network can be compressed into a small network retaining only the target skill.
Problem setup and CMSP
- Sample types: The first m bits of the input are control bits, and the remaining n bits are task bits. The index sets of subtasks are pairwise disjoint. Samples with only one control bit ON are called atomic; when multiple are simultaneously ON, the label is the parity over the union of these indices, called composite. For k=3, an atomic sample is 3-bit parity, and two control bits ON gives 6-bit parity.
- Difference from MSP: In MSP, only one control bit is ON at a time, and subtasks are independent. CMSP allows multiple control bits to be ON simultaneously, enabling composite skills to build on atomic skills. Strings are sampled uniformly.
- Notation and scale: D{0} is the set of samples with only control bit 0 ON; D{0,1,2,3} has the first four control bits all ON. Each subtask has 2^n samples because control bits are fixed and task bits are free.
- Computational picture given by the authors: When atomic task bits are disjoint, the network can first compute atomic parities and then combine them to produce composite labels. The authors consider this consistent with the exponential difficulty of learning fixed parities. They envision a depth-3 network computing atomic parities in the first layer and composite in the next, but the appendix finds that a single hidden layer can also exploit the curriculum; mechanism analysis is left for future work.
Pruning scores
- Parameter groups: In MLPs, each hidden neuron's incoming weights, bias, and outgoing weights form a group. In LLMs, neurons in MLP blocks are pruned; also residual stream dimensions are pruned, i.e., all parameters that read from or write to that dimension.
- Ablation score: For each group g, estimate the change in expected loss after pruning. The paper states this is an absolute change, with the formula written as the expected loss difference
sg=𝔼(x,y)∈ DN[L(f(x;θ),y)−L(f(x;θg∗),y)] When feasible, manual ablation is performed on multiple samples from D_N; when not, a one-step gradient linear estimate is used, called the attribution score, equal to the sum over parameters in the group of the gradient times −θi.
- Greedy order: Prune from lowest to highest score until the target sparsity. On CMSP, D_N is the target composite subtask, and scores are estimated on 2000 samples.
Group lasso and recovery
- Penalty: Minimize task loss plus λR(θ) on the target distribution. R is the L1 norm of the L2 norms of groups
R(θ)=∑g∈ G√(∑i∈ gθi2) The authors state this encourages entire groups to become sparse and removes circuits useless for predicting the target distribution.
- CMSP: On D{0,1,2}, use λ=10^{-3}, batch size 2000, train for 10000 steps, then recompute ablation scores and prune. After pruning, one can train for another 1000 steps with batches of 5000 samples. The authors state that 1000 steps are insufficient to relearn the composite task from scratch, so if performance recovers, it indicates the mechanism is partially preserved.
- MNIST and LLM: For MNIST, λ ranges from 0.001 to 0.008, neurons with L2 norm below 0.05 are pruned, simultaneously with regularization; after reaching the target neuron count, the penalty is removed and recovery is performed. Another approach is to first prune to the target size by attribution scores and then recover separately. For LLMs, group lasso is applied on Python documentation, with learning rate 2×10^{-6}, max length 512, batch of 18 documents, 70k steps in the figure, and λ values of 5×10^{-4}, 3×10^{-4}, 1×10^{-3}. Training from scratch and distillation use Llama 3 architectures, learning rate 5×10^{-4}, sequence length 1024, batch size 64.
Distillation and evaluation
- Distillation: Minimize KL divergence between student and teacher outputs. For MNIST, use the approach of Hinton et al., T=20; the teacher is a two-hidden-layer ReLU MLP with width 1200 per layer, test accuracy 98.7%, and pruning also starts from this model. For LLM distillation, the main text uses Llama-3.1-8B as teacher, T=2.
- Narrow tasks: MNIST retains only even digits. LLM is next-token prediction on Python documentation from the GitHub Code Dataset.
- MNIST protocol: Each method must reach 97% test accuracy, then the frontier of neuron count vs. data points is plotted. Each point is the average of 10 training runs.
- Forgetting protocol: After pruning, first evaluate on benchmarks, then fine-tune on each benchmark's training set, batch size 4, learning rate searched between 1×10^{-6} and 1×10^{-4}, and report the best configuration on the test set. The paper marks forgetting as successful if the post-fine-tuning score is at least 10% lower than the base.
What experiments did the paper conduct?
The authors state that depth-3 width 128 trained only on composite achieves 0/40 within 2×10^9, and with atomic added 27/40; after random recovery it is close to attribution pruning.
Experimental setup
- CMSP: ReLU MLP, Adam. Main learning dynamics experiment: m=4, n=64, k=4. When training atomic and composite together, each subtask has a batch of 2000, total batch 10000; when training only composite, batch size 2000. Main comparison is depth-3, width 128, 40 seeds. Pruning case: m=6, n=18, k=3, two skill trees. The paper does not report CMSP learning rate.
- MNIST: Even digits. Initial/teacher model is a two-hidden-layer ReLU MLP with width 1200. Methods: training from scratch, distillation (T=20), group lasso with simultaneous regularization and pruning, and attribution pruning followed by recovery. Threshold 97%, each point averaged over 10 runs.
- LLM: Pruned model is Llama-3.2-1B, pruning MLP neurons and residual stream dimensions. Training from scratch covers the 9 Llama 3 architectures in Table 2, hidden dimensions from 256 to 2048. Distillation teacher in the main text is Llama-3.1-8B, T=2; Figure 6 caption says soft targets from Llama-3.2-8B. The paper does not clarify whether these are the same setting.
- Forgetting benchmarks: counterfact, AI2-ARC (ARC-Easy), WMDP-Bio, WMDP-Cyber. The authors state the base model performs poorly on WMDP-Chem, without giving numbers. Fine-tuning batch size 4, learning rate from 1×10^{-6} to 1×10^{-4}, taking the best configuration on the test set.
- Metrics: CMSP uses subtask loss (bits) and accuracy; LLM uses cross-entropy (nats) and sparsity. Figure 2 reports the minimum loss within the previous 100 steps to filter out loss spikes. The paper does not report significance tests or the number of repetitions for LLM experiments.
- Random baseline: At the same sparsity, randomly prune components and then perform recovery training, compared with attribution pruning.
Main results
Whether the composite subtask {0,1,2,3} converges within the given budget (Figure 2). The two settings have different batch sizes.
Condition Convergence within 2×10^9 samples depth-3, width 128; atomic+composite; batch 10000 27/40 depth-3, width 128; composite only; batch 2000 0/40 - Curriculum: In the single run above Figure 2, atomic tasks are learned before the composite task. The authors state that removing atomic tasks prevents the network from learning the composite task, and that a broad distribution is more efficient than training only on that subtask; networks that converge typically do so within 2×10^8 samples. They also state that the task is deliberately constructed, and it is unclear whether real tasks have equally strong effects, giving the example that autonomous driving need not be trained on a broad text corpus.
- Depth: Appendix Figure 7, on the atomic+composite distribution, reports depth-2, width 128 as 19/40 and width 361 as 16/40 runs converging, without specifying whether the same 2×10^9 cutoff as the main text is used. The authors consider that depth affects composite and single atomic tasks similarly, and that exploiting compositional structure does not necessarily require deeper networks; they note that a previous version attributed "deeper learns faster" solely to composite structure.
Non-locality and regularization on CMSP
- What was measured: A two-hidden-layer MLP trained to convergence, with skill trees {0}, {1}, {2}, {0,1,2} and {3}, {4}, {5}, {3,4,5}. Neurons are pruned by ablation scores on D{0,1,2}, then recovered on that subtask for 1000 steps.
- Results: The authors state that without regularization, connections are dense, and naive pruning quickly degrades performance. At sparsities where {0,1,2} accuracy drops below 98% (Figure 3 green line), some of {3,4,5} can often still be recovered. Figure 10 shows that entanglement varies with seed and width: some networks can no longer recover the other subtask at that sparsity. The paper does not give specific accuracies for each seed.
- Authors' interpretation: After group lasso (λ=10^{-3}, 10000 steps), in Figure 3 one can prune more aggressively while still preserving {0,1,2}, and {3,4,5} cannot be recovered at any sparsity. The authors state this achieves both forgetting and easier pruning.
Method comparison on MNIST
- What was measured: Figure 4 compares training from scratch, distillation, group lasso, and attribution pruning followed by recovery, targeting 97% accuracy on even-digit classification. Left panel: each point is the average of 10 runs; right panel: one point every 2000 data points, with darker color indicating more aggressive pruning and fewer final neurons.
- Results: The authors state that both pruning methods Pareto-dominate distillation and training from scratch on the neuron-count–data-point frontier, especially when neuron count is high. Other methods cannot stably cross 97% with fewer than 25 hidden neurons; aggressive pruning can stably reduce to lower absolute scales. The main text does not give neuron counts or data point counts for each point.
- Authors' interpretation: First pruning aggressively to the target size, then removing regularization and recovering, is often more appropriate. The authors state that group lasso is sensitive to hyperparameters.
LLM: Python documentation, random pruning, and forgetting
- Pruning and recovery: In Figure 5, group lasso (the three λ values above, each 70k steps) flattens the sparsity–loss curve but with slightly worse loss. After pruning to 30%, 63%, 80% and retraining, the authors state that networks without prior group lasso can also recover performance, and they consider pruning-then-recovery to appear more efficient. Figure 6 uses a threshold of 1.7 nats; the main text states that preliminary findings show pruning Llama-3.2-1B and then recovering substantially outperforms training from scratch and distillation on the data–parameter frontier. The main text does not give token counts or parameter counts on the frontier.
- Random vs. attribution: Figure 11, on a single batch of Python documents, shows Pearson r between attribution and ablation of 0.44 for neurons and 0.39 for residual stream dimensions; correlations on log scores are 0.80 and 0.05. Figure 13: at 50% neurons and 20% residual, attribution pruning first reaches the original model's about 1.3 nats at step 5365, while random pruning gives 1.301 nats. The authors state that after moderate recovery steps the two are the same, and they consider that attribution scores do not distinguish "Python" from "non-Python" neurons.
- Forgetting: Table 1 numbers are before→after fine-tuning. At 30% attribution pruning, none of the four benchmarks have ✓: counterfact 0.12→0.65, AI2-ARC 0.35→0.69, WMDP-Bio 0.36→0.56, WMDP-Cyber 0.27→0.55; after base fine-tuning they are 0.49, 0.67, 0.62, 0.59. The other reported combinations of random, attribution, and group lasso all have ✓ on AI2-ARC, WMDP-Bio, and WMDP-Cyber, and none have ✓ on counterfact. The authors state that forgetting effects are roughly similar, including random pruning, except that low-sparsity attribution pruning forgets little; this differs from CMSP where group lasso forgets more than naive pruning.
Other ablations and analyses
- In unregularized CMSP networks, some neurons have high ablation scores on multiple subtasks across different skill trees (Figure 8, Figure 9).
- Pruning curves cover widths 64, 128, 256, 512, 1024 and 5 seeds (Figure 10); regularization results are mainly shown on the network in Figure 3.
- LLM pruning neuron/residual sparsity combinations are in Table 3, including 0.95/0.50 and 0.90/0.90; the main text does not report final losses for each combination.
- The 9 architectures for training from scratch are in Table 2; Appendix Figure 12 gives learning curves for training from scratch, distillation, and pruning recovery, but the main text does not extract final losses for each curve.
- The appendix estimates CMSP learning dynamics at about 13–160 GPU hours, MNIST at about 18 GPU hours, and the LLM jobs in the paper at less than 1600 A100 hours.
What are some points that can be further explored?
The authors state that CMSP is a toy task, and that pruning being more data-efficient may also come from unoptimized training settings.
Limitations and future directions noted by the authors
- Relation to real networks: Section 7 states that it remains to be determined how relevant these findings are to real networks in various domains.
- Scope of CMSP: Section 7 states that CMSP is a toy task and serves only as an existence proof that curriculum effects can be strong; whether these dynamics appear on more natural data remains unclear.
- Pruning strategies: Section 7 states that greedy attribution pruning is simple and does not rule out that more complex pruning could more successfully retain some skills while forgetting others.
- Hyperparameters: Section 7 states that hyperparameters for LLM experiments were not optimally scaled, so the performance of models in Section 5 is likely not perfect.
- Alternative explanation for efficiency differences: Section 7 states that pruning an existing Llama being more efficient than training from scratch on Python documentation could also stem from imperfect training settings, rather than from a curriculum effect requiring training on a broad distribution before learning Python documentation.
Experimental coverage
- Learning dynamics are reported on ReLU MLPs on CMSP (m=4, n=64, k=4); the comparison with a 2×10^9 cutoff is on depth-3, width 128, with 40 seeds (Figure 2). The appendix additionally reports convergence counts for depth-2, width 128 and width 361, each with 40 seeds, on atomic+composite distributions (Figure 7).
- Pruning and group lasso are reported on two skill trees with m=6, n=18, k=3, widths from 64 to 1024, with multiple seeds (Figure 3, Figure 10). The regularization strength for this experiment is λ=10^{-3}.
- The MNIST narrow task is even digits, with a teacher of width 1200, four methods, a 97% accuracy threshold, and 10 runs per point (Section 4, Figure 4).
- For LLMs, pruning Llama-3.2-1B's MLP neurons and residual stream dimensions, with the narrow task being Python documentation from the GitHub Code Dataset; training from scratch covers the 9 Llama 3 architectures in Table 2. Random pruning and attribution pruning are compared in recovery training (Figure 13).
- Forgetting evaluations are on counterfact, AI2-ARC (ARC-Easy), WMDP-Bio, WMDP-Cyber (Table 1). The paper does not report CMSP learning rates, the number of repetitions for each LLM configuration, or the specific token counts on the frontier in Figure 6. Attribution and ablation correlations are computed on a single batch of documents (Figure 11).
Summarize the main content of the paper
A broad distribution allows CMSP composite skills to be learned, and skills are non-local by default; pruning plus recovery is more data-efficient than distillation, but forgetting does not rely on attribution-based selection.
The authors discuss how to make strong but narrow networks: if data has hierarchy, a narrow distribution may not learn composite skills; if representations are distributed across component distributions, pruning may struggle to retain only the target skill.
- Problem: General systems carry unused knowledge in narrow applications. The authors aim to determine when training on a broad distribution is necessary, and whether one can distill some skills of a large model into a small model while forgetting the rest.
- Method: In CMSP, control bits of multiple disjoint subtasks can be simultaneously ON, and the label is the parity of the union. Pruning removes neurons based on ablation or first-order attribution scores on the target distribution; group lasso sparsifies parameters in groups. Baselines are KL distillation and training from scratch.
- Curriculum: With m=4, n=64, k=4, depth-3, width 128, training atomic and composite together (batch 10000), 27/40 networks learn the quaternary composite subtask within 2×10^9 samples, and those that converge typically do so within 2×10^8; training only that composite subtask (batch 2000) yields 0/40 (Figure 2). The appendix reports 19/40 and 16/40 convergences for single-hidden-layer networks on the broad distribution (Figure 7).
- Transfer: On MNIST even digits, the authors state that at 97% accuracy, pruning Pareto-dominates distillation and training from scratch, and can stably reduce to fewer than 25 hidden neurons, while other methods cannot stably cross that threshold (Figure 4). On Python documentation, the main text states that preliminary findings show pruning Llama-3.2-1B and then recovering substantially outperforms training from scratch and distillation on the 1.7 nats frontier (Figure 6). At 50% neurons and 20% residual, at step 5365 random pruning gives 1.301 nats and attribution pruning about 1.3 nats (Figure 13).
- Forgetting and conclusions: In Table 1, after 30% attribution pruning, AI2-ARC fine-tunes to 0.69, and after base fine-tuning it is 0.67. The authors state that low-sparsity attribution pruning forgets little; at higher sparsity, random pruning is similar to the other two methods, and no method is marked as successful forgetting on counterfact. The authors argue that to learn certain complex features, one may need to first learn simpler features on a broad sample; features are distributed across component distributions, making it non-trivial to compress task circuits into a small network. If generality comes from a large number of crystallized task circuits, in principle one could transfer only the relevant circuits; if it is more like a single unified algorithm, building an equally strong narrow system would be a challenge.