HeadEdit: Calibrating Language Model Behavior Through the Frozen Unembedding Matrix
cs.CL
Submitted: 2026-10-01
Updated: 2026-10-01
Comments: 31 pages, 18 figures, 7 tables
Code: https://github.com/meta-llama/llama-models
License: http://creativecommons.org/licenses/by/4.0/
The gist: Alignment does not eliminate behavioral errors in language models.
Terminology
Abstract
Alignment does not eliminate behavioral errors in language models. Models may still refuse benign requests, call unnecessary tools, or yield to false user claims. Current methods mitigate such errors as a computation problem, and rarely explore if the desired behavior is already encoded in the model's representation. Motivated by the observation that behavior-relevant information remains linearly decodable from the final hidden state even when the resulting logits produce the undesired behavior, we introduce HeadEdit, a gradient-free method that calibrates model behavior through the unembedding matrix. HeadEdit extracts a low-rank behavioral subspace from paired completions and uses each prompt's coordinates within it to generate a vocabulary-wide correction, thereby implementing implicitly adaptive steering without manually specified target tokens or parameter updates. HeadEdit improves all nine experimental settings across three tasks and three model families, with negligible inference overhead and no systematic loss of general capabilities. It also reveals a connection to gradient-based alignment. HeadEdit's low-dimensional representation partly predicts how preference tuning changes output logits on unseen prompts. The subspace learned from the model can also be reused after tuning, improving performance without re-extracting or retuning. These results show that HeadEdit provides a practical, lightweight, and interpretable way to calibrate model behavior through the unembedding matrix.
Sources
- Think Deep, Not Just Long: Measuring LLM Reasoning Effort via Deep-Thinking Tokens
- SPINAL -- Scaling-law and Preference Integration in Neural Alignment Layers
- Gemma 3 Technical Report
- LogitTrace: Detecting Benchmark Contamination via Layerwise Logit Trajectories
- D-STEER - Preference Alignment Techniques Learn to Behave, not to Believe -- Beneath the Surface, DPO as Steering Vector Perturbation in Activation Space
- Mechanistic Analysis of Alignment Algorithms in Language Models
- LLM Agents Already Know When to Call Tools -- Even Without Reasoning
- Steering Language Models With Activation Engineering
- Qwen3 Technical Report
- Rep2Text: Decoding Full Text from a Single LLM Token Representation
- Representation Engineering: A Top-Down Approach to AI Transparency
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering