Skip to content

ICML papers

Search ICML papers by title, author, or track. Open a paper’s abstract to read more.

Explore the ICML analysis

Search results

421–440 of 532

  • ICML · Workshop · Trustworthy AI for Good Workshop

    Beyond Safe Data: Pretraining-Stage Alignment with Regular Safety Reflection

    Jinhan Li, Kexian Tang, Yihan Xu, Zhuorui Ye, Kaifeng Lyu

    Abstract

    To achieve deeper safety alignment for large language models (LLMs), recent efforts have studied how to move safety interventions into pretraining, primarily by filtering unsafe data or rewriting it into safer forms. We argue that pretraining-stage alignment should go beyond just making the data itself safe: LLMs may compose seemingly benign knowledge and capabilities into unsafe behaviors. To this end, we propose $\textbf{Safety Reflection Pretraining}$, a pretraining-stage alignment method that regularly inserts short safety reflections into pretraining corpora and trains language models to self-monitor the safety of the preceding context as part of language modeling. Our experiments with 1.7B models pretrained on FineWeb-Edu show that Safety Reflection Pretraining improves safety classification accuracy and substantially reduces the success rates of inference-stage and finetuning attacks. Complementary to our real-world experiments, we also introduce a fully controlled synthetic environment, $\textbf{MedSafetyWorld}$, with a clear definition of safety and a reasoning structure under which models can easily generalize from safe data to unsafe behaviors. Ablations in MedSafetyWorld further demonstrate a clear advantage of Safety Reflection Pretraining in preventing models from acting on unsafe behaviors generalized from safe data, compared with data filtering and rewriting. Taken together, our findings suggest that pretraining alignment should not only make the training data safe, but also shape the behaviors that models are likely to acquire from safe data.

    Abstract source
  • ICML · Workshop · Trustworthy AI for Good Workshop

    Consistency Training Along the Transformer Stack: New Targets and Threats

    Sukrati Gautam, Neil Shah, Arav Dhoot, Bryan Maruyama, Caroline Wei, Robert Sidey, Prakhar Gupta, Zi C Huang, David Africa

    Abstract

    Consistency training, or encouraging invariant model behavior across clean and perturbed inputs, has shown promise for reducing certain types of misalignment, but existing methods have explored only a narrow slice of the design space. We extend consistency training along two axes: where in the transformer stack to enforce consistency, and what threats to apply it to. We introduce MLP Consistency Training (MLPCT) and Attention Consistency Training (AttCT), which achieve competitive results to previous baselines on reducing sycophancy and jailbreak susceptibility across several methods. We then apply these and prior methods to three new threat models: persona in-context learning attacks, frustration, and prefill attacks, showing that the consistency training framework can be extended to other safety concerns. Our results also reveal striking cross threat generalisation from one threat model to another in certain cases, and that activation-level consistency methods converge on a shared mid-layer representational correction distinct from output-level behavioral training. Our results suggest that consistency is a useful alignment design principle, but only when the agreement target is matched to the structure of the failure mode.

    Abstract source
  • ICML · Workshop · Trustworthy AI for Good Workshop

    LaRA: Layer-wise Representation Analysis for Detecting Data Contamination in RL Post-Training

    Minju Gwak, Minseo Kwak, Guijin Son, Alan Ritter, Jaehyung Kim

    Abstract

    Reinforcement learning (RL) improves reasoning in large language models (LLMs) but can also induce contamination through reward-driven memorization. Existing contamination detection methods mainly rely on output-level signals, such as likelihood or entropy, which become unstable after RL post-training. We propose LaRA, a layer-wise representation analysis framework for contamination detection in RL-trained LLMs. LaRA introduces three complementary metrics—Representation Shift Magnitude (RSM), Directional Collapse (DC), and Representation Stability Index (RSI)—to measure perturbation sensitivity, directional concentration, and local representation variability under controlled perturbations. Our analyses show that contamination induces progressive geometric deviations across layers, characterized by amplified perturbation sensitivity, abnormal directional concentration dynamics, and unstable local variability. Based on these observations, we develop a layer-aware detection protocol that aggregates representation-level deviations across layers and metrics. Experiments on RL-trained reasoning models show that LaRA consistently improves contamination detection over existing output-level baselines.

    Abstract source
  • ICML · Workshop · Trustworthy AI for Good Workshop

    Treat Bias as Noise: Training Bias-Robust LLM Reasoning via Reinforcement Learning

    Qian Wang, Xuandong Zhao, Zirui Zhang, Zhanzhi Lou, Nuo Chen, Dawn Song, Bingsheng He

    Abstract

    Large language models (LLMs) increasingly serve as reasoners and are being considered as automated evaluators, yet they remain susceptible to cognitive biases---often altering their reasoning when faced with spurious prompt-level cues such as consensus claims or authority appeals. Existing mitigations via prompting or supervised fine-tuning fail to generalize, as they modify surface behavior without changing the optimization objective that makes bias cues attractive. We propose \textbf{Epistemic Independence Training (EIT)}, a reinforcement learning framework built around a simple principle: models should learn that bias cues are \emph{unreliable} rather than learning to either follow or reject them. EIT trains on balanced conflict examples where each injected cue is equally likely to support the correct or incorrect answer, and uses a reward that penalizes bias-following errors without rewarding agreement with a cue that happens to be correct---making the cue non-predictive of reward. On controlled MMLU-Pro reasoning tasks with bias injection, EIT improves accuracy and robustness on both Qwen3-1.7B and Qwen3-4B when bias points to wrong answers, while preserving performance when bias aligns with truth. Trained only on bandwagon bias, EIT generalizes along two out-of-domain axes: held-out MMLU-Pro subjects and unseen bias types (authority, distraction, verbosity). EIT-trained Qwen3-4B further outperforms untrained Qwen3-8B and Qwen3-14B on bias resistance, indicating that targeted training is more effective than model scaling alone. Code and data are available at \url{https://anonymous.4open.science/r/bias-mitigation-with-rl-BC47}.

    Abstract source
  • ICML · Workshop · Failure Modes in Agentic AI: Reproducible Triggers, Trace Diagnostics, and Verified Fixes

    Inoculation Prompting Composes With Alignment Pretraining

    Henry Colbert, Kyle O'Brien, Cozmin Ududec

    Abstract

    Alignment interventions can be applied during both pretraining and post-training to steer safety-relevant properties of models. Two such interventions are alignment-pretraining, which curates pretraining data to instil aligned priors in base models, and inoculation prompting, which elicits unwanted behaviours during fine-tuning to paradoxically suppress them at test time. Whether they compose is untested, but matters as interference between alignment techniques could erode their utility. We study their composability by applying inoculation prompting to two 6.9B alignment-pretrained models and a 6.9B unfiltered baseline. The interventions compose without measurable interference: equivalence testing (TOST) shows inoculation prompting's effect on alignment-pretrained models matches its effect on the unfiltered models within 3 percentage points across all three trait-eliciting prompt strengths, with strong inoculation reducing emergent misalignment across all three base models from 6.6-7.3% (per-base Wilson 95% CIs all within [5.3, 9.0]) to 0.2-0.3% (95% CIs all within [0.1, 0.7]). We further show that trait-eliciting inoculation prompts reduce emergent misalignment beyond placebo prompts and that this protection partially persists even when the inoculation prompt is present at test-time. These results suggest that inoculation strengthens aligned models against emergent misalignment through mechanisms beyond conditionalisation alone.

    Abstract source
  • ICML · Workshop · Failure Modes in Agentic AI: Reproducible Triggers, Trace Diagnostics, and Verified Fixes

    TRACE: Capability-Targeted Agentic Training

    Hangoo Kang, Tarun Suresh, Jon Saad-Falcon, Azalia Mirhoseini

    Abstract

    Large Language Models (LLMs) deployed in agentic environments must exercise multiple capabilities across different task instances, where a capability is defined as performing the actions required for the successful completion of some subset of tasks. Many existing approaches either rely on synthetic training data that is not targeted to the model's actual capability deficits in the target environment or train directly on the target environment, where the model needs to implicitly learn the capabilities across tasks. We introduce TRACE (Turning Recurrent Agent failures into Capability-targeted training Environments), an end-to-end system for environment-specific agent self-improvement. TRACE contrasts successful and failed trajectories to automatically identify frequently lacking capabilities, synthesizes a targeted training environment for each capability that rewards its successful execution, and trains a LoRA adapter via RL on each synthetic environment, routing to the relevant adapter at inference. Empirically, TRACE generalizes across different environments, improving over the base agent by **+14.1 points** on $\tau^2$-Bench (customer service) and **+7 perfect scores** on ToolSandbox (tool use), outperforming the strongest baseline by **+7.4 points** and **+4 perfect scores**, respectively. Given the same number of rollouts, TRACE scales more efficiently than baselines, outperforming GRPO and GEPA by **+9.2** and **+7.4** points on $\tau^2$-Bench, respectively.

    Abstract source
  • ICML · Workshop · Failure Modes in Agentic AI: Reproducible Triggers, Trace Diagnostics, and Verified Fixes

    FAST-PLAN: FAilure Driven Training Data Synthesis for Ambiguity-Robust Embodied Task PLANning in Open Source LLMs

    Souradeep Mukhopadhyay, Vedang Vasant Avaghade, Ali Payani, Gaowen Liu, Jayanth Srinivasa, Chitta Baral

    Abstract

    Open-source large language models (LLMs) are increasingly deployed for embodied task planning, yet they remain brittle under ambiguous, human-like instructions characterized by implicit pronouns, underspecified attributes, and noisy dialogue. Consequently, current state-of-the-art open models often suffer severe performance collapse in realistic, ambiguous scenarios. To address this limitation, we introduce FAST-PLAN, a scalable, failure-driven data synthesis framework that trains robust planners using their own mistakes. Operating within the AI2-THOR environment, FAST-PLAN programmatically injects linguistic ambiguity into deterministic symbolic tasks. It employs an automated pipeline to generate vague instructions via an LLM augmentor, validate groundings, evaluate execution, and leverage a critic LLM to classify planning failures and generate refined feedback. We finetuned Qwen and Llama family models on synthesized trajectories generated by FAST-PLAN. The resulting models outperform baselines on REI-Bench by +50% on success rate. Furthermore, they exhibit strong zero-shot generalization on out-of-distribution ambiguity benchmarks, improving macro-F1 scores by up to 6% on the CLARA benchmark, highlighting the effectiveness of FAST-PLAN.

    Abstract source
  • ICML · Workshop · Failure Modes in Agentic AI: Reproducible Triggers, Trace Diagnostics, and Verified Fixes

    Training Agents to Self-Report Misbehavior

    Bruce W. Lee, Chen Yueh-Han, Tomek Korbak

    Abstract

    Frontier AI agents may pursue hidden goals while concealing their pursuit from oversight. Alignment training aims to prevent such behavior by reinforcing the correct goals, but alignment may not always succeed and can lead to unwanted side effects. We propose self-incrimination training, a control-oriented intervention that instead trains agents to produce a visible signal when they covertly misbehave, without assuming misbehavior can be prevented or that it can be reliably classified from the outside. We train GPT-4.1 and Gemini-2.0 agents to call a report_scheming() tool when behaving deceptively and measure their ability to cause harm undetected in out-of-distribution environments. Critically, self-incrimination trained only on instructed misbehavior generalizes to uninstructed settings where agents autonomously discover and pursue misaligned goals, including blackmail, data leaking, and preventing human rescue, while alignment baselines show limited transfer. Self-incrimination significantly reduces the undetected successful attack rate, outperforming matched-capability monitors and alignment baselines while preserving instruction hierarchy and incurring minimal safety tax on general capabilities. Unlike blackbox monitoring, self-incrimination performance is consistent across tasks regardless of how suspicious the misbehavior appears externally, and the trained behavior persists under adversarial prompt optimization.

    Abstract source
  • ICML · Workshop · Failure Modes in Agentic AI: Reproducible Triggers, Trace Diagnostics, and Verified Fixes

    Drowning in Routine: Signal Dilution in Multi-Turn Agent Training

    Yann Pernot, Vi Retault

    Abstract

    Multi-turn agents interleave consequential decisions with routine execution: some actions change the downstream return distribution, while others are necessary but reward-equivalent. The cost of trajectory-level credit assignment, often attributed to long horizons, is in fact governed by decision density $\rho$: the fraction of turns whose actions affect the return. When decision density is low, routine turns create signal dilution: they add gradient variance to trajectory-level estimators such as GRPO without adding expected signal. Under explicit assumptions, the resulting turn-level to trajectory-level signal-to-noise ratio scales as $\rho^{-1/2}$, provided critic error remains controlled. The same analysis identifies the complementary regime: at high decision density, trajectory-level methods can remain competitive while avoiding the cost of a critic. In a controlled environment where $\rho$ is exactly tunable, the predicted scaling is recovered with $R^2 = 0.999$, and the training-step gap widens significantly as $\rho \to 0$.

    Abstract source
  • ICML · Workshop · Failure Modes in Agentic AI: Reproducible Triggers, Trace Diagnostics, and Verified Fixes

    OpenSeeker: Democratizing Frontier Search Agents by Fully Open-Sourcing Training Data

    Yuwen Du, Rui Ye, shuo tang, Xinyu Zhu, Yijun Lu, Yuzhu Cai, Siheng Chen

    Abstract

    Deep search capabilities have become an indispensable competency for frontier Large Language Model (LLM) agents, yet the development of high-performance search agents remains dominated by industrial giants due to a lack of transparent, high-quality training data. This persistent data scarcity has fundamentally hindered the progress of the broader research community in developing and innovating within this domain. To bridge this gap, we introduce OpenSeeker, the first fully open-source search agent (i.e., model and data) that achieves frontier-level performance through two core technical innovations: (1) Fact-grounded scalable controllable QA synthesis, which reverse-engineers the web graph via topological expansion and entity obfuscation to generate complex, multi-hop reasoning tasks with controllable coverage and complexity. (2) Denoised trajectory synthesis, which employs a retrospective summarization mechanism to denoise the trajectory, therefore promoting the teacher LLMs to generate high-quality actions. Experimental results demonstrate that OpenSeeker, trained (a single training run) on only 11.7k synthesized samples, achieves state-of-the-art performance across multiple benchmarks including BrowseComp, BrowseComp-ZH, xbench-DeepSearch, and WideSearch. Notably, trained with simple SFT, OpenSeeker significantly outperforms the second-best fully open-source agent DeepDive (e.g., 29.5\% v.s. 15.3\% on BrowseComp), and even surpasses industrial competitors such as Tongyi DeepResearch (trained via extensive continual pre-training, SFT, and RL) on BrowseComp-ZH (48.4\% v.s. 46.7\%). We fully open-source the complete training dataset and the model weights to democratize frontier search agent research and foster a more transparent, collaborative ecosystem:https://anonymous.4open.science/r/OpenSeeker_Anonymous-F809.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Tracking Training Phases in Compositional Learning with Task-Agnostic Measures

    Niclas Dern, Selma Mazioud, Jakob Heiss, Avrajit Ghosh, Curtis J McDonald, Gabriel Clara, Bin Yu

    Abstract

    Deep neural networks often acquire their final capabilities through qualitatively distinct training phases. Characterizing these phases sheds light on how models learn and could enable steering away from unwanted outcomes. The most reliable existing methods for detecting training phases rely on a prior mechanistic understanding of how the model performs an underlying task. Task-agnostic scalar measures, i.e., quantities computed from a model's parameters, representations, or outputs, offer a more general alternative, but have largely been studied in isolation. In this paper, we systematically compare 53 such measures by fitting Gaussian hidden Markov models (HMMs) to their trajectories across two compositional settings: modular addition and a new multilingual variant we introduce, in which per-language data fractions control how much consecutive phase transitions overlap. This overlapping regime arises naturally when models acquire capabilities in close succession, yet lacks controlled benchmarks. We find that once transitions overlap, recovery quality drops across all 53 measures, even when we fit the HMM directly to validation accuracy, hinting at limitations of our HMM-based framework. Still, some measures perform relatively better, with prediction entropy, PCA effective dimension, and the Local Learning Coefficient most consistently among the top performers.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Attention Sink Forges Native MoE in Attention Layers: Sink-Aware Training to Address Head Collapse

    Zizhuo Fu, Wenxuan Zeng, Runsheng Wang, Meng Li

    Abstract

    Large Language Models (LLMs) often assign disproportionate attention to the first token, a phenomenon known as the attention sink. Several recent approaches aim to address this issue, including Sink Attention in GPT-OSS and Gated Attention in Qwen3-Next. However, a comprehensive analysis of the relationship among these attention mechanisms is lacking. In this work, we provide both theoretical and empirical evidence demonstrating that the sink in Vanilla Attention and Sink Attention naturally construct a Mixture-of-Experts (MoE) mechanism within attention layers. This insight explains the head collapse phenomenon observed in prior work, where only a fixed subset of attention heads contributes to generation. To mitigate head collapse, we propose a sink-aware training algorithm with an auxiliary load balancing loss designed for attention layers. Extensive experiments show that our method achieves effective head load balancing and improves model performance across Vanilla Attention, Sink Attention, and Gated Attention. We hope this study offers a new perspective on attention mechanisms and encourages further exploration of the inherent MoE structure within attention layers.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Sycophancy Is Often a Single-Layer Phenomenon: Spectral Diagnosis and Training-Free Weight Surgery in LLMs

    Valentin NOËL

    Abstract

    Instruction tuned language models often defer to user opinions even when those opinions are factually wrong, a behavior known as sycophancy. While sycophancy is widespread across chat models, its weight space substrate has remained opaque, blocking principled mitigation. In this work, we show that sycophancy is mediated by the dominant singular subspace of a single MLP weight matrix in ten of eleven open source models spanning 1B--14B parameters. In each affected model a single layer concentrates the behaviour: compressing its dominant spectral direction monotonically reduces the forced choice sycophancy rate, and amplifying it induces sycophancy on otherwise neutral inputs, establishing causal mediation without contrastive data; aggressive compression at this layer reveals nonlinear capability tradeoffs that we analyze and operationalize as a layer geometry diagnostic. The per-layer spectral SNR does double duty: it identifies the target layer from model weights alone, and bounds the safe operating dose ($|\alpha| \ll 1/SNR_\ell$), a predictive criterion validated across model families before any behavioral evaluation. Leveraging this insight, we propose a closed form weight space intervention that requires no training, no contrastive data, and no inference time machinery, and that on Gemma-4-E2B-it produces a strict Pareto improvement: less sycophancy and more reasoning simultaneously. The per layer spectral profile partitions models into three storage classes, localised, weakly localised, and distributed, predicting in advance whether single layer surgery will succeed. Our findings reframe the alignment tax from a fundamental training constraint to a measurable consequence of spectral geometry, and establish spectral diagnostics as a non-behavioral audit primitive for instruction tuning regimes.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Predictive Concept Decoders: Training Scalable End-to-End Interpretability Assistants

    Vincent Huang, Dami Choi, Daniel Johnson, Sarah Schwettmann, Jacob Steinhardt

    Abstract

    Interpreting the internal activations of neural networks can produce more faithful explanations of their behavior, but is difficult due to the complex structure of activation space. Existing approaches to scalable interpretability use hand-designed agents that make and test hypotheses about how internal activations relate to external behavior. We propose to instead turn this task into an end-to-end training objective, by training interpretability assistants to accurately predict model behavior from activations through a communication bottleneck. Specifically, an encoder compresses activations to a sparse list of concepts, and a decoder reads this list and answers a natural language question about the model. We show how to pretrain this assistant on large unstructured data, then finetune it to answer questions. The resulting architecture, which we call a Predictive Concept Decoder, enjoys favorable scaling properties: the auto-interp score of the bottleneck concepts improves with data, as does the performance on downstream applications. Specifically, PCDs can detect jailbreaks, secret hints, and implanted latent concepts, and accurately surface latent user attributes.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    The Model Organism Lottery: Model Organism Interpretability Strongly Depends on Training Methodology

    Andrzej Szablewski, Raffaello Fornasiere, Gabriel Konar-Steenberg, Nikita Menon, Stefan Heimersheim

    Abstract

    Model organisms (MOs) - language models trained to exhibit undesired or unnatural behaviours - are frequently used as testbeds for evaluating white-box interpretability techniques. Current MOs are typically constructed via post-hoc supervised fine-tuning (SFT) on behavioural transcripts or synthetic documents. Prior research has shown that interpretability methods can easily identify hidden behaviours in these MOs. However, recent work suggests that such post-hoc training methods may make interpretability unrealistically easy. We investigate this claim by constructing a suite of 54 $\verb|OLMo2-1B|$- and $\verb|Gemma-3-1B|$-based MOs trained with seven different techniques, including standard post-hoc SFT methods, post-hoc DPO, and more realistic integration of MO data into the OLMo post-training DPO phase. We use these MO variants to benchmark activation oracles, activation steering, logit lens, and sparse autoencoders. Our findings suggest that (i) current interpretability methods are not as capable as suggested by prior work; (ii) MO interpretability depends strongly on training methodology, target behaviour, interpretability technique, and model architecture; and (iii) substantial variance remains even after controlling for differences in the strength of target behaviour expression. Our results cast substantial doubt on the validity of current MOs as interpretability proxies. Our code is available here: https://github.com/anonsubmissionneurips2026/model-organism-lottery.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Weight-Space Geometry of Offline Reasoning Training

    Aleksandr Nikolich, Igor Kiselev, Vladimir Platonov, Karina Romanova

    Abstract

    We train six offline reasoning losses on the same data, same model, same everything and look at what they actually do to the weights. Turns out SFT, RFT, and RIFT learn the same update (cosine ≥ 0.97). Filtering or reward-weighting negatives doesn't change the direction, just the step size. DFT diverges more despite being a one-line fix. GRPO adds a real orthogonal component but stays in the same basin. DPO is a genuinely different algorithm orthogonal subspace, loss barrier, CKA collapse and the only one that's meaningfully more accurate (93.5% vs 87–88% GSM8K; 30% vs 3–10% AIME26). Most "offline RL for reasoning" is SFT in disguise.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Ghost Heads Across Training: When Greedy and Distributional Patching Disagree

    Unai Zulaika, Miguel Fernandez-de-Retana, Rubén Sánchez Corcuera, Aritz Bilbao Jayo, Aitor Almeida

    Abstract

    A language model can produce a correct answer within 32 samples long before it does so reliably on the first try. Across arithmetic, GSM8K, and MATH500, pass@32 saturates during pretraining while pass@1 lags far behind. What mechanistic process closes this gap? We track circuit formation across OLMo-3-7B's full training pipeline (pretraining, mid-training, and RL-Zero) with both greedy and distributional activation patching, and introduce answer-token patching for multi-step reasoning. The two metrics agree on most components but dissociate at specific attention heads, which we call ghost heads: heads with high greedy recovery but near-zero distributional impact. Ghost heads are a recurring training instability: they peak whenever the training objective shifts and decay within each phase. Mid-training resolves the dissociation: patching effects concentrate onto a few attention heads where both metrics agree. RL-Zero, which improves pass@1 without touching pass@32, does not reintroduce ghost heads; two independent tests (noise sensitivity and verifier reranking) confirm it acts as a diffuse whole-model shift rather than reorganizing individual circuits. The phenomenon replicates across three model families.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    A Mechanistic Study of Transformers Training Dynamics

    Ambroise Odonnat, Wassim Bouaziz, Vivien Cabannnes

    Abstract

    Large-scale pretraining of transformers has been central to the success of foundation models. However, the scale of those models limits our understanding of the mechanisms at play during optimization. In this work, we study the training dynamics of transformers in a controlled and interpretable setting. On the sparse modular addition task, we demonstrate that specialized attention circuits, called clustering heads, can be implemented during gradient descent to solve the problem. Our experiments show that such pathways naturally emerge during training. By monitoring the evolution of tokens via a visual sandbox, we uncover a two-stage learning and the occurrences of loss spikes due to the high curvature of normalization layers. Our findings provide several insights into patterns observed in more practical settings, such as the pretraining of large language models.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Masked Diffusion Training Induces Resampling-like Carry Representations in Addition

    Hwangyu Jeong, Chanwoo Park

    Abstract

    Masked diffusion models (MDMs) have emerged as alternatives to autoregressive (AR) language models, with evidence of stronger generalization under data constraints. We study this gap mechanistically in a controlled addition task: one-layer Transformers add two six-digit numbers after training only on examples with limited carry complexity, then are evaluated on an out-of-distribution carry-generalization split requiring $N_{\mathrm{carry}}>2$. This tests whether models extrapolate the carry rule beyond the carry numbers observed during training. With C2, MDMs outperform AR models on high-carry examples, while C2-Resampled largely closes the gap. We trace this difference to the geometry of carry representations. Attention and MLP sublayers play similar roles in both model classes: attention aggregates base-addition information, while the MLP makes answer tokens more linearly decodable. However, MDM training yields stronger linear alignment, which we defined as the fraction of post-attention representation variance captured along the carry/non-carry direction. Then, theoretically, we show in a Gaussian model that higher linear alignment improves robustness to boundary perturbations. Retraining the MLP while freezing earlier representations preserves the same accuracy ordering, suggesting that MDMs generalize better in this setting because they learn better-aligned carry representations, not a qualitatively different layer-level algorithm.

    Abstract source
  • ICML · Workshop · Workshop on Mechanistic Interpretability

    Pretraining Data Statistics Shape the Phases of Learning Entity Comparison in Language Models

    Yik Siu Chan, Jing Huang, Yanai Elazar, Atticus Geiger

    Abstract

    How does data shape language model (LM) behavior throughout pretraining? We investigate this question through a case study on entity comparison, e.g., Between France and Brazil, which country is larger?. We begin with controlled experiments in which we train small LMs (124M parameters) on mixtures of natural text from pretraining corpora and synthetic data from entity comparison tasks. We identify three distinct phases of learning: (1) an early phase where the LM selects entities by frequency, (2) a middle phase where the LM selects entities by position in a prompt (first vs. last), and (3) a late phase where the LM selects the entity that is the correct answer to the question. We show that the emergence of these three phases is controlled by statistical properties of the training data. With small amounts of task-specific synthetic data, we observe only the first two phases and the model fails to learn the task; with large amounts, the model jumps directly from the frequency-based heuristic to solving the task correctly. Moreover, if we modify the frequency of entities in data from a naturally occurring Zipfian distribution (a small number of entities are very common and the vast majority are rare) to a uniform distribution, the first phase disappears and the model learns the task more quickly. Finally, we find the same three phases of learning in the pretraining of open-sourced OLMo models. Together, our findings demonstrate that properties of pretraining data are causal drivers of heuristic learning and show that small-scale synthetic experiments can predict training dynamics at larger scales.

    Abstract source