It's the Writer, Not the Reader: Why Hidden-State Probes of Code Correctness Weaken on Chat-Format Instruct Models
Abstract
Linear probes on hidden states can predict which of a code model's own attempts will fail its tests, which makes them attractive as cheap verifiers. Measured within each task, so that knowing which tasks are hard does not help, this signal is much weaker for instruction-tuned models. On six base/instruct pairs from three families (1.5B to 14B parameters) on HumanEval and MBPP, the within-task AUROC falls from 0.78 to 0.64, and 10 of 12 comparisons pass a rule fixed in advance. A cross-reading design shows that the instruct model is not a worse reader: it finds the failures in base-written programs as well as the base model does (12 of 12), while the base model cannot find the failures in instruct-written programs (11 of 12). The signal follows the writer. The same instruct weights writing in completion format recover most of it (0.74 against 0.62 in chat format). Chat-format failures read as correct to every reader we tried: they do not surprise the reader, and evidence of the error does not build up along the program. Seven other explanations account for almost none of the gap. In practice, on chat-format output a probe is no better than the writer's own token probability. Follow-up tests with rules fixed in advance show that reading the program inside the chat request changes nothing, that the gap survives removing type hints and renaming variables, and that it repeats for Qwen3-8B; on tasks that both models get partly right it is about half as large. A weak probe on an instruct model is therefore not evidence of a hidden representation.
Create a lesson
Metadata
- Categories
- cs.AI, cs.SE
- Comments
- 32 pages, 11 figures. Code and data: https://github.com/igaurab/writer-not-reader
Related papers
When Does Feedback Help? Evaluating Feedback for Iterative Refinement in Coding Agents
Shared title terminologycs.AIAmin Banayeeanzade, Mengxuan Hu, Qingchuan Yang et al.
Duet-PRM: Factorizing Plan Reliability and Step Correctness in Process Reward Models
Shared title terminologycs.AIZhimin Lin, Morunliu Yang, Chen Zhong et al.
From Process Logs to Overload Decisions: Modeling and Controlled Stress Probing
Shared title terminologycs.AIIlia Karpov, Artem Voytetskiy, Vadim Ayuyev
Latent Semantic Stress in Behaviorally Correct Vision-Language Decisions
Shared title terminologycs.AIHaoran Zhao, Caren Han, Eduard Hovy
AUTOEMBED: Can Coding Agents Train Text Embedding Models?
Shared title terminologycs.AIAdnan El Assadi, Isaac Chung, Deep Shah
Where Greedy Evaluation Noise Comes From: Request Order, Compile Cache, Device, and Server State in vLLM on Blackwell GPUs
Shared title terminologycs.AIStephen J. Ronan MD