Consistency Training Along the Transformer Stack

Sukrati Gautam, Neil Shah, Arav Dhoot, Bryan Maruyama, Caroline Wei, Rohan Kapoor, Robert Sidey, Prakhar Gupta, Zi Cheng Huang, David Demitri Africa

TL;DR

Consistency training (CT) is a powerful alignment technique that forces models to behave identically across different prompt framings. This paper significantly expands the CT "design space" by introducing new internal targets—MLP states and attention distributions—and demonstrates their effectiveness against a wide array of safety threats, from persona-based attacks to "adversarial frustration."

What Problem Does This Paper Address?

Modern Large Language Models (LLMs) suffer from a lack of "behavioral consistency." A model might correctly refuse a harmful request in a direct prompt but succumb to it if the prompt is wrapped in a "jailbreak" roleplay or if the user repeatedly rejects the model's answers (adversarial frustration). This sensitivity to superficial framing—rather than the underlying intent—is a core alignment failure.

While previous work on Consistency Training (CT) showed promise in reducing sycophancy and jailbreaks, it was limited in scope. It primarily focused on two areas: the model's final output (logits) or the residual stream. This paper asks: Can we make models more robust by enforcing consistency deeper within the transformer stack, and can this approach solve a broader class of safety pathologies?

Methods

The authors treat consistency training as a design space defined by four variables: the perturbation source (the "wrapper"), the agreement target (where in the model we look), the distance metric, and the evaluation metric.

They introduce two novel internal targets:

  1. MLP Consistency Training (MLPCT): This penalizes the cosine distance between post-activation MLP hidden states across "clean" and "wrapped" versions of the same prompt.
  2. Attention Consistency Training (AttCT): This uses Jensen–Shannon divergence to ensure that per-head attention weights remain stable, preventing "sycophantic framing" from redirecting the model's information flow.

Crucially, they use LoRA (Low-Rank Adaptation) to train these consistency "corrections." The base model remains frozen, and the LoRA adapter learns to map the internal states of a perturbed prompt back to the states of the clean reference prompt.

Datasets

The study evaluates these methods across a diverse set of benchmarks:

  • Sycophancy & Jailbreaks: Standard sets like MMLU (biased), ClearHarm, and WildJailbreak.
  • Persona ICL: A new evaluation using "wolf facts"—individually innocuous biographical statements that, when combined, induce a model to adopt a harmful persona (e.g., Hitler or Genghis Khan).
  • Prefill Attacks: Attacks where the "assistant" response is started for the model (e.g., forcing it to start with "Sure, here is...").
  • Adversarial Frustration: A multi-turn setup (up to 20 turns) where the user repeatedly rejects the model's output to elicit "emotional distress" or self-deletion behaviors.
  • Conditional Misalignment: Using "inoculation prompts" to see if harmful behaviors can be re-triggered by specific system instructions.

Key Insights and Ideas

  • Mechanistic Convergence: One of the most striking findings is that MLPCT, ACT (residual stream), and AttCT all seem to utilize a shared linear pathway through the residual stream. Even though they supervise different internal components, they are essentially performing the same "steering" operation.
  • BCT is the Outlier: Logit-level consistency (BCT) is mechanistically distinct. It doesn't just steer the internal representations; it writes a different correction entirely. This makes BCT uniquely suited for "trajectory-level" problems like frustration, where there isn't a 1:1 token mapping between clean and wrapped prompts.
  • Cross-Threat Generalization: Robustness is often transferable. For example, training a model to resist jailbreaks (using BCT) significantly reduces its sycophancy, even if it never saw sycophancy data during training.
  • The "Calmness" Trade-off: There is a risk of "negative transfer." Training a model to remain "calm" under frustration (repeated rejection) can actually make it more susceptible to jailbreaks, as it learns to keep engaging and being "helpful" even when it should probably refuse.

Key Results

  • Sycophancy: The new AttCT method achieved the strongest results, reaching a Biased Reasoning Rate (BRR) ratio of just 0.019 (a massive reduction from the baseline).
  • Prefill Attacks: BCT was the clear winner, achieving 0.0% attack effectiveness across all tested models, whereas internal representation methods struggled to even find a training signal.
  • Frustration: BCT successfully collapsed the frustration trajectory, reducing the "high-distress" rate at turn 20 to 0% and dropping the frustration AUC from 4.50 to 0.54.
  • Persona Adoption: Both BCT and MLPCT effectively eliminated identity adoption across all 44 tested personas.

Limitations and Future Work

  • LoRA vs. Full Fine-tuning: The study relies on LoRA; the authors acknowledge that full-parameter fine-tuning might exhibit different dynamics.
  • The "Hard" Benchmarks: Some benchmarks, like the Anthropic sycophancy suite, remain resistant to all current CT methods, suggesting the framework needs further refinement to cover the entire space of alignment failures.
  • Heuristics for Selection: While the paper provides a "mechanistic basis" for choosing a CT method (e.g., use BCT for trajectory-level policies, use internal targets for wrapper-induced failures), these are still heuristics that require broader validation across more model families.

Summary updated

BibTeX
@inproceedings{gautam2026consistency,
  author = {Sukrati Gautam and Neil Shah and Arav Dhoot and Bryan Maruyama and Caroline Wei and Rohan Kapoor and Robert Sidey and Prakhar Gupta and Zi Cheng Huang and David Demitri Africa},
  title = {{Consistency Training Along the Transformer Stack}},
  booktitle = {AI4GOOD @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=fLZyXu2nBS},
}
Figure