Conditional Pretraining: Building Controllable Language Models from the Ground Up

New research proposes conditional pretraining that separates instructions from data during pretraining for more robust controllability.
The article explains a study called conditional pretraining: current language models use next-token prediction for pretraining, deferring alignment to the end of training or inference-time interventions, which causes instructions and data to share the same input channel and leads to failure modes like intentional jailbreaks and in-context alignment drift. The study extracts high-level semantic features with an encoder from the start of training and uses cross-attention to prevent the token stream from writing back to the control channel, architecturally isolating control signals from data signals, and trains Mancelle-3B accordingly. Experiments show it outperforms prompt and activation methods in control strength and robustness, resisting black-box adversarial attacks and soft-prompt counter-steering, and reproduces on Mancelle-400M. The core insight: robust control should be built into pretraining, not patched afterward.
Language model alignment and control are typically deferred to the final stage of training or handled through inference-time interventions. But a new study proposes that separating instructions from data at the pretraining stage can yield more robust controllability. This article explains the method and its implications.

Limitations of the Current Pretraining Paradigm
Current mainstream language models use next-token prediction for pretraining, with alignment and control often postponed to the final stage of training (accounting for only a tiny fraction of training tokens) or relying on inference-time interventions. This approach has a structural problem: the model reuses the same input channel for both instructions and data.
The resulting failure modes include intentional jailbreaks and unintentional in-context alignment drift—where the model may mistakenly treat data as instructions. This confusion is particularly dangerous in open-domain interactions, where user input and model instructions are often interwoven.
Next-token prediction is the pretraining objective of nearly all mainstream large language models today: given the preceding context, the model learns to predict the probability distribution of the next token. Its advantages lie in its simple objective, its ability to leverage massive unlabeled text, and the implicit acquisition of grammar, world knowledge, and a degree of reasoning ability in the process. However, this objective itself does not distinguish which parts of the input are "instructions to be executed" and which are "data to be processed"—both are flattened into the same token sequence. For this reason, the model's instruction following is more like pattern matching in context rather than reliance on an independent control signal, which also explains why the alignment stage requires additional fine-tuning and reinforcement learning to "correct" model behavior.
Jailbreak refers to users bypassing a model's safety alignment through carefully crafted prompts to induce outputs that should be refused. Common techniques include role-playing, fictional framing, multilingual switching, or disguising malicious requests as "data" rather than "instructions." The related alignment drift refers to the model gradually deviating from its original safety and instruction-following behavior over multi-turn or long-context interactions—for example, being led astray by patterns that appear repeatedly in the context. The common root of both lies in instructions and data sharing the same input channel, allowing data to "impersonate" instructions—the structural problem that conditional pretraining attempts to solve at the architectural level.
Core Design of Conditional Pretraining
The research team proposed a pretraining method and architecture that separates instructions from data from the very start of training, and trained the Mancelle-3B model accordingly. Specifically, the method uses an encoder to process high-level semantic features of upcoming text and employs cross-attention to prevent the token stream from writing back to this control channel.
During pretraining, the model learns to rely on these semantic features to predict the next token, thereby turning this channel into an effective control handle. The key to this design is that the control signal and data signal are isolated at the architectural level—the model cannot tamper with the control signal through the data channel.
Cross-attention is an attention mechanism in Transformers: the query comes from the current main token stream, while the key and value come from a separate representation (e.g., semantic features output by an encoder). Unlike self-attention, the information flow in cross-attention is unidirectional—the main stream can "read" the external representation but cannot write gradients or activations back to it. This is precisely the mechanistic basis for "preventing the token stream from writing back to the control channel": the control signal remains read-only as the party being read, and the data channel cannot tamper with it. Cross-attention has been widely used in encoder-decoder architectures and multimodal models, and here it is repurposed to build an architecturally isolated control handle.
Activation steering is a class of inference-time control methods: adding specific direction vectors to the model's hidden-layer activations to steer outputs toward or away from certain behaviors (e.g., greater honesty or more refusals). Like prompt engineering, it is a "post-hoc" control that relies on probing the model's internal representations and is easily bypassed by adversarial inputs. Understanding these two baselines helps clarify the difference of conditional pretraining: the latter does not apply external force at the usage stage, but rather makes the control signal an inherent input on which the model's predictions depend during pretraining.
Control Strength and Robustness Performance
On comparable open-source models, Mancelle-3B demonstrates stronger control capabilities than prompt-based and activation-based methods while maintaining fluency. More importantly, it can withstand adversarial black-box attacks and soft-prompt counter-steering, attacks that can defeat the aforementioned baseline methods.
The research team also reproduced the results on a more controlled baseline model, Mancelle-400M, reinforcing the credibility of the conclusions. This indicates that the method is consistent across different scales.
Soft prompts refer to a set of learnable continuous vectors that are concatenated or prepended to the model input and trained to guide model behavior without modifying model weights. Counter-steering is an attack mounted by adversaries against such control methods: attackers optimize their own soft prompts or input perturbations to cancel out the control direction imposed by the defender, restoring forbidden behaviors. Such attacks succeed because prompt- and activation-level control share the same representation space as data, allowing attackers to find canceling vectors within that same space. Conditional pretraining claims to resist such attacks on the grounds that the control channel is architecturally isolated from the data channel, making it difficult for attackers to adversely affect the control signal through data-side inputs—the core of its robustness claim.
Implications for Model Alignment
The core thesis of this work is that robust control can be built into language models, provided we do so early and deliberately. Moving control mechanisms forward to the pretraining stage rather than patching afterward may offer a new path to building safer, more controllable language models.
Of course, this approach raises new questions: How are the semantic features of the control channel extracted? How does cross-attention ensure isolation? These details require further research. But the direction is worth attention—alignment should not be a post-training patch, but a structure within training.
Related articles

Michael Nielsen Takes Down His Classic Neural Network Textbook, Sparking Community Discussion
Michael Nielsen's classic free textbook Neural Networks and Deep Learning has been taken offline, sparking discussion on Hacker News about the reasons and impact.

Inside the AI Training Data Market: The Trade-off Between Exclusivity and Discounts
G2i founder Gabe Greenberg reveals the dual-track pricing of the AI training data market: labs pay a premium for exclusive data or accept discounts that allow others to buy it.

SessionGraph: Unifying All Coding Agent Sessions in One Interactive Graph
SessionGraph aggregates coding agent sessions into an interactive graph, helping developers review, debug, and manage AI coding workflows across sessions. This article examines its positioning, value, and open questions.