What DPO changes inside a language model

A reader-driven tour of the features alignment amplifies and suppresses, and how much of it is visible in the preference data before training starts

TopicsLanguage models · Sparse autoencoders · Post-training & RL · Safety & guardrails
ModelsLlama-3.1-8B Tulu-SFT (subject) · standard DPO baseline
ReferencesAI2 Dolci / Olmo-3 post-training · Direct Preference Optimization (DPO)
Try it yourself. Open the finished run in your own workspace and pick up where it leaves off.

Aligning a chat model with Direct Preference Optimization visibly changes how it answers, but the change is usually read only from the outputs. This recipe reads it one level down instead: it passes the model's activations through a sparse-autoencoder lens, turns the dense internal signal into a small set of nameable features, and measures which features alignment turns up and which it turns down. The unit of analysis is the feature cluster, a group of features that move together, plus the prompt clusters that drive each shift.

Read that way, the effect of DPO is narrow and partly anticipated. Of the 65,483 features the lens ever sees fire on the preference data, only 151 change their firing rate by a clear margin, about two in a thousand. And a forecast built only from the preference data, before any training, predicts the direction of the actual internal shift 79% of the time, far above a coin flip. Alignment is not a diffuse rewrite of the whole model. It is a small set of targeted nudges, much of which is legible in the data beforehand.

Key takeaways

How the dissected model was trained, and the length confound

The model opened up here is a Llama-3.1-8B, supervised-fine-tuned on AI2's Tulu data, then aligned with DPO on the Dolci-Instruct-DPO preference set. Getting an honest subject was its own short investigation. A learning-rate sweep of standard DPO found a setting that the model could absorb cleanly, preferred about 70% of the time over the SFT base with its knowledge, math, and instruction-following intact; pushed harder, the same recipe broke the model instead of aligning it. The win came partly with longer answers, so a length-normalized variant was tried to tame the verbosity. It made things worse at first, and the failure turned out to be an over-hot learning rate rather than the objective itself.

The lesson that survived is a measurement one. Raw win-rate quietly rewards longer answers, so the recipes only separate cleanly once quality is read with a length-controlled comparison, the metric this thread was missing at first. That is the model now placed under the lens.

Reading a model with a sparse-autoencoder lens, in a nutshell

Modern chat models are first taught to be helpful, then aligned: nudged toward the answers people prefer. DPO does this by showing the model thousands of pairs in which a human picked one answer over another and pushing it toward the preferred one. After alignment the outputs change, often for the better, but the machinery that produced the change stays opaque. The question this recipe inherits from the post-training literature is what alignment does inside the model, not just to its answers.

The instrument is a sparse autoencoder, a tool trained to rewrite a layer's dense activation vector as a much larger but mostly-inactive set of features, each of which tends to stand for something a person can name: a topic, a tone, a formatting habit. The handful of features active at any moment are an interpretable summary of what the model is doing at that point.

Read what DPO changed, from the inside

The goal is to test whether DPO's effect on this model is legible and foreseeable: whether it lands on a small, nameable set of features rather than smearing across the whole model, and whether the preference data predicts which way each feature will move. The evidence, in order:

Scatter of predicted internal shift (horizontal, from the preference data) against the actual shift the aligned model made (vertical). Each dot is one prompt-theme combination; dots in the green corners agree on direction, dots in the red corners are misses. The cloud leans along the agreement diagonal.
Predicted shift versus what actually happened. Horizontal: the direction and size the preference data predicted, before training. Vertical: the shift the aligned model actually made on its own answers. Green corners agree on direction; red corners are the misses. The cloud leans clearly along the agreement diagonal.

Put together, the picture is encouraging for anyone who wants to monitor what alignment does. The internal effect of DPO is concentrated and nameable, and part of it is visible in the data a team already has before spending the training compute. That is a step toward checking which behaviors a run will amplify or suppress in advance, instead of only noticing after the outputs change.