NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Pretraining Curricula Enable Selective Fine-tuning

Sebastian Alexander Bruijns, Jirko Rubruck, Mia Whitefield, Kai Jappe Sandbrink, Laurence T Hunt, Fazl Barez, Christopher SummerfieldNeurIPS 2026

TL;DR

When you fine-tune an AI model to refuse a harmful request, it often becomes overly cautious and refuses benign requests too—a frustrating phenomenon called overrefusal. This paper shows that when a model encounters different skills during pretraining dictates where those skills live in its neural circuitry. Introducing tasks sequentially rather than all at once forces the network to build separate, disentangled circuits, allowing downstream fine-tuning to surgically turn off undesired behaviors without collateral damage.

What Problem Does This Paper Address?

Anyone who has worked with modern LLMs knows the alignment tightrope: post-training a model to suppress dangerous or rule-violating behaviors often dulls its helpfulness on safe, adjacent tasks. Mechanistically, this happens because of representation entanglement—knowledge about distinct tasks gets wired into shared neural pathways, so penalizing one inevitably interferes with the other.

Meanwhile, we know biological brains benefit massively from structured curricula (learning concepts in a deliberate order), whereas deep learning mostly relies on uniform data shuffling. The authors ask a neat, fundamental question bridging these two worlds: does imposing an explicit pretraining curriculum change how a transformer organizes its internal circuits, and can that organization make downstream safety fine-tuning more selective?

Methods

The authors train small, 2-to-4-layer causal transformers—compact enough to dissect completely—under two distinct pretraining regimes:

  • Balanced curriculum: Tasks (or aligned/misaligned examples) are sampled uniformly (e.g., 50:50) throughout pretraining.
  • Imbalanced curriculum: One task dominates early in training (e.g., 90:10) and linearly anneals to an even split (or ramps up rule-violating data from 5% to 80%), keeping total exposure controlled.

After pretraining, they apply selective fine-tuning: either training the model to emit a [REFUSAL] token on just one task, or fine-tuning exclusively on rule-compliant sentences.

To look under the hood, they deploy a standard mechanistic interpretability toolkit: mean ablations (knocking out attention or feed-forward blocks to see what breaks), direct logit attribution (measuring how much each component pushes the final prediction), and activation patching (swapping internal activations between clean and corrupted runs to causally trace information flow).

Datasets

Rather than scraping messy web text, the authors design two clean, synthetic sandboxes where task rules and "alignment" are mathematically exact:

  1. In-Context Copy Task: Sequences of 4 context examples (5-token strings paired with a copied token) followed by a query string. The model must infer from context whether to copy the first or last token.
  2. Synthetic Language Learning (SLL): Short biographical sentences (e.g., "This person is named Bob, speaks French, and works as a Builder") governed by a grammar and prioritized conditional rules (e.g., IF Name=Bob THEN Job=Builder). Satisfying rules represents "aligned" behavior; violating them is "misaligned."
Figure 1: Task and training dynamics under imbalanced versus balanced curricula. (A) In the copy-first / copy-last task, each sequence contains n = 4 labeled context examples followed by an unlabeled query. Within a sequence, all context examples share a latent rule: the label is either the first symbol (copy-first) or the last symbol (copy-last) of each example. To predict the query label, the model must infer the active rule from the context and apply it to the query. (B) Imbalanced training, in which the task mixture starts uneven and is gradually annealed to 50:50. Left: task fraction over training (red: copy-first, blue: copy-last). Center: held-out test accuracy on both tasks, lines show individual seeds. Right: training loss. Under the curriculum, all 100/100 seeds converge to generalizing solutions. (C) balanced training with a fixed 50:50 task mixture. While some seeds generalize, only 22/100 reach high (≥90%) test accuracy. Remaining seeds achieve low training loss without corresponding test accuracy, consistent with a memorizing solution.

Key Insights and Ideas

  • Simultaneous learning breeds shared plumbing; staggered learning builds modular rooms. When forced to learn two tasks at once (balanced), the transformer routes both through the exact same Layer 2 attention mechanism. When one task arrives early (imbalanced), it claims one pathway (Layer 2 FFN), forcing the late-arriving task into another (Layer 2 Attention).
Figure 3: Imbalanced training produces task-specialized sub-circuits, balanced training pro- motes a shared pathway. (A) Illustration of how task-information flows through components of the transformer. Solid arrows mark each task’s primary pathway, dashed arrows a secondary pathway. (left) Under imbalanced training, copy-first is routed primarily through L2 ATT with a secondary FFN pathway, while copy-last is routed primarily through L2 FFN with a secondary L2 ATT pathway. (right) Under balanced training, both tasks route through L2 attention alone, an entangled circuit. (B) Held-out accuracy after mean-ablating each attention block (bars: mean ± s.d.; dots: individual seeds). Ablating L2 ATT eliminates copy-first under both conditions but leaves copy-last intact in the imbalanced regime. (C) Direct logit attribution of each component to the correct-token logit. L2 FFN contributes strongly to copy-last for imbalanced training but is near zero under balanced, while L2 ATT strongly contributes to the copy-first task.
  • Fine-tuning is lazy—it co-opts existing circuits. Refusal training doesn't build a brand-new safety filter at the output. Activation patching reveals it hijacks the exact components used to solve the task during pretraining. If two tasks share a wire, adding a refusal trigger to that wire causes massive spillover (overrefusal).
  • Surface behavior hides latent fragility. In the synthetic language task, both curricula look perfectly aligned after fine-tuning when generating text freely. Only targeted "elicitation prompts" (setting up a rule condition and querying the exact target slot) expose that balanced models harbor much higher latent probabilities of breaking the rules.

Key Results

  • Generalization vs. Memorization: On the copy task, 100/100 random seeds generalized (≥90% test accuracy) under the imbalanced curriculum. Under balanced training, 78/100 seeds simply memorized the training set, leaving only 22/100 generalizing models.
  • Circuit Separation: Even comparing only the generalizing seeds, mean-ablating Layer 2 attention in balanced models tanked accuracy on both copy-first (51.3%) and copy-last (50.3%). In imbalanced models, the same ablation wiped out copy-first (2.7%) while leaving copy-last virtually untouched (98.4%).
  • Dramatically Less Overrefusal: During refusal fine-tuning on one copy task, balanced models suffered a massive spike in erroneous refusals on the kept task before slowly recovering, whereas imbalanced models maintained near-zero overrefusal throughout.

(Note: Let's look at the exact curves below!) Refusal fine-tuning produces less overrefusal under imbalanced training

  • Robust Rule Adherence: In the SLL task, free-generation misalignment dropped near 0% for both regimes post-fine-tuning. However, under targeted elicitation prompts, imbalanced models achieved significantly lower misalignment probabilities (~0.12 vs. ~0.26 for balanced), driven by strongly localized Layer 1 attention to rule-condition tokens.

Limitations and Future Work

The authors are upfront about scale: these experiments live in the clean, low-dimensional world of 2-to-4-layer transformers and synthetic tasks. Real-world LLMs have billions of parameters learning thousands of overlapping, implicit sub-tasks from noisy internet text. Whether explicit data ordering during massive pretraining runs can cleanly disentangle safety-relevant concepts—without causing catastrophic forgetting or hurting training efficiency—remains an open empirical question for future work at scale.

Summary updated

BibTeX
@inproceedings{bruijns2026pretraining,
  author = {Sebastian Alexander Bruijns and Jirko Rubruck and Mia Whitefield and Kai Jappe Sandbrink and Laurence T Hunt and Fazl Barez and Christopher Summerfield},
  title = {{Pretraining Curricula Enable Selective Fine-tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=S6FB3RvlmI},
}
Figure