PAIR: Prefix-Aware Internal Reward Model for Multi-Turn Agent Optimization
Pith reviewed 2026-05-20 10:37 UTC · model grok-4.3
The pith
A two-stage internal model can turn LLM hidden states into accurate step-level rewards for multi-turn agents even when earlier steps contain errors.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The central claim is that a Prefix-Aware Internal Reward (PAIR) model, built from a frozen hidden-state probe that estimates belief consistency plus a lightweight attention-based head that corrects toward grounded correctness, produces the highest AUROC on contaminated trajectories while running at negligible inference cost and thereby supplies dense step-level reward signals for GRPO training without external calls, ground-truth dependencies, or full-trajectory rollouts.
What carries the argument
Prefix-Aware Internal Reward (PAIR) model: a two-stage architecture that pairs a frozen hidden-state probe with a lightweight attention-based correction head to produce step-level correctness estimates robust to prefix contamination.
If this is right
- GRPO and similar methods can receive dense step-level advantages during training of multi-turn agents.
- Training loops avoid repeated calls to external reward models or ground-truth oracles at every step.
- Credit assignment becomes feasible for long-horizon tasks without incurring the cost of full rollouts at training time.
- The same internal signals can be reused across many tasks once the lightweight head is trained.
Where Pith is reading between the lines
- The approach could be tested on agent benchmarks that involve longer task horizons than those reported to measure whether step-level signals improve final task success rates.
- Because the correction head is small and the probe is frozen, the method might be deployed inside the forward pass of an agent to provide real-time internal rewards during inference.
- If the complementary strengths of hidden-state and attention features generalize, similar two-stage probes could be applied to other internal-state uses such as uncertainty estimation or factuality detection.
Load-bearing premise
A lightweight attention head can reliably steer the output of a frozen hidden-state probe away from prefix coherence and toward actual grounded correctness across multi-step interactions.
What would settle it
A direct comparison showing that PAIR's AUROC on trajectories containing prefix errors falls below the AUROC of either the hidden-state probe alone or an external LLM judge on the same data.
Figures
read the original abstract
A significant hurdle for current LLMs is the execution of complex, multi-stage tasks. Group Relative Policy Optimization (GRPO) has been emerging as a leading choice, but its reliance on sparse outcome rewards severely limits credit assignment across intermediate steps. Existing remedies such as running full rollouts to assign step-level advantages, calling external LLM judges at each step, or computing intrinsic rewards that require ground-truth answers at every evaluation introduce significant costs or practical constraints. We hypothesize that internal correctness probing over LLM hidden states can be repurposed as a step-level reward signal, potentially addressing all of these limitations at once. However, existing probing research assumes clean inputs, and we first show that this assumption breaks down in multi-step settings: hidden-state probes degrade severely under prefix contamination tracking coherence with the (possibly corrupted) prefix rather than grounded correctness, while attention-based features remain robust to contamination but underperform on clean prefixes. Building on this complementary relationship, we propose the Prefix-Aware Internal Reward (PAIR), a two-stage model with a frozen hidden-state probe estimating belief-consistency and a lightweight attention-based head correcting it toward grounded correctness. Experimental results show that PAIR achieves the highest AUROC on contaminated trajectories while operating at negligible inference cost, enabling dense step-level reward signals for GRPO training without external model calls, ground-truth dependencies, or full-trajectory rollouts.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript introduces PAIR, a Prefix-Aware Internal Reward model for multi-turn LLM agent optimization under GRPO. It first establishes that hidden-state probes degrade under prefix contamination by tracking coherence with the (possibly corrupted) prefix rather than grounded correctness, while attention-based features remain robust to contamination but underperform on clean prefixes. Building on this complementarity, PAIR combines a frozen hidden-state probe with a lightweight attention-based head that is trained to correct the probe output toward grounded correctness. The central empirical claim is that PAIR achieves the highest AUROC on contaminated trajectories at negligible inference cost, thereby supplying dense step-level reward signals for GRPO without external LLM calls, ground-truth answers, or full-trajectory rollouts.
Significance. If the correction mechanism and AUROC gains are robustly validated, PAIR would provide a practical, low-overhead route to dense internal rewards for multi-turn agent training, directly addressing the credit-assignment limitations of sparse outcome rewards in GRPO. The observation of complementary probe behaviors under contamination is a useful diagnostic contribution. The negligible inference cost and lack of external dependencies are clear practical strengths. The work would be strengthened by explicit falsifiable tests of whether the attention head performs a genuine correction rather than a simple ensemble.
major comments (2)
- [§4.1–4.2] §4.1–4.2 and Eq. (3)–(5): The claim that the lightweight attention head corrects the frozen hidden-state probe toward grounded correctness on contaminated trajectories is load-bearing for the headline AUROC result. The manuscript must supply the precise training objective for the head, the input features it receives from the probe, and an ablation that isolates the correction effect (e.g., PAIR vs. attention-only and probe-only on the same contaminated test set) with statistical significance tests; without these, it remains possible that the head merely averages the two signals.
- [§5.3] §5.3, Table 2: The reported AUROC superiority on contaminated trajectories is presented without error bars, number of seeds, or comparison against a simple linear combination of the two probe types. If the gain over the already-robust attention baseline is small or statistically insignificant, the practical value of the correction head for GRPO reward density would be substantially reduced.
minor comments (3)
- [Abstract] Abstract: The phrase 'highest AUROC' should be accompanied by the actual numerical values and the identity of the strongest baseline to allow readers to gauge the magnitude of improvement.
- [§2.2] §2.2: The term 'belief-consistency' is used without a formal definition or equation; a short mathematical characterization would improve clarity.
- [Figure 3] Figure 3: The caption should explicitly state whether the trajectories are drawn from the same distribution as the training prefixes or from held-out tasks.
Simulated Author's Rebuttal
We thank the referee for their detailed and constructive review of our manuscript. We address each of the major comments below and outline the revisions we plan to make to strengthen the presentation of our results.
read point-by-point responses
-
Referee: [§4.1–4.2] §4.1–4.2 and Eq. (3)–(5): The claim that the lightweight attention head corrects the frozen hidden-state probe toward grounded correctness on contaminated trajectories is load-bearing for the headline AUROC result. The manuscript must supply the precise training objective for the head, the input features it receives from the probe, and an ablation that isolates the correction effect (e.g., PAIR vs. attention-only and probe-only on the same contaminated test set) with statistical significance tests; without these, it remains possible that the head merely averages the two signals.
Authors: We agree that additional clarity on the training procedure and stronger isolation of the correction effect would strengthen the paper. We will revise Sections 4.1–4.2 to explicitly detail the training objective for the attention head as given in Equations (3)–(5), specify the exact input features passed from the probe, and add a dedicated ablation study. This will include direct comparisons of PAIR against probe-only, attention-only, and a linear combination baseline on the same contaminated test set, along with statistical significance tests (e.g., paired t-tests over multiple seeds) to demonstrate that the gains are not attributable to simple averaging. revision: yes
-
Referee: [§5.3] §5.3, Table 2: The reported AUROC superiority on contaminated trajectories is presented without error bars, number of seeds, or comparison against a simple linear combination of the two probe types. If the gain over the already-robust attention baseline is small or statistically insignificant, the practical value of the correction head for GRPO reward density would be substantially reduced.
Authors: We thank the referee for this observation. We will update Table 2 in Section 5.3 to report mean AUROC values with standard deviation error bars computed over 5 random seeds. We will also add an explicit comparison against a simple linear combination of the probe and attention signals (with weights fit on a validation split). These revisions will allow readers to assess the magnitude and statistical significance of any gains from the correction head. revision: yes
Circularity Check
No significant circularity; derivation is observation-driven and experimentally validated
full rationale
The paper first empirically demonstrates degradation of hidden-state probes under prefix contamination and robustness of attention features, then defines PAIR as their combination via a lightweight head. The headline performance claim rests on reported AUROC results rather than any reduction to fitted parameters by construction, self-citation chains, or renamed known results. No equations or training details in the abstract reduce the correction step to a tautology; the approach is self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
axioms (1)
- domain assumption LLM hidden states contain information about step-level correctness that can be probed
Lean theorems connected to this paper
-
IndisputableMonolith/Cost/FunctionalEquation.leanwashburn_uniqueness_aczel unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
a two-stage model with a frozen hidden-state probe estimating belief-consistency and a lightweight attention-based head correcting it toward grounded correctness
-
IndisputableMonolith/Foundation/AbsoluteFloorClosure.leanabsolute_floor_iff_bare_distinguishability unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
hidden-state probes degrade severely under prefix contamination—tracking coherence with the (possibly corrupted) prefix rather than grounded correctness
What do these tags mean?
- matches
- The paper's claim is directly supported by a theorem in the formal canon.
- supports
- The theorem supports part of the paper's argument, but the paper may add assumptions or extra steps.
- extends
- The paper goes beyond the formal theorem; the theorem is a base layer rather than the whole result.
- uses
- The paper appears to rely on the theorem as machinery.
- contradicts
- The paper's claim conflicts with a theorem or certificate in the canon.
- unclear
- Pith found a possible connection, but the passage is too broad, indirect, or ambiguous to say the theorem truly supports the claim.
Reference graph
Works this paper leans on
-
[1]
Discovering Latent Knowledge in Language Models Without Supervision
Collin Burns, Haotian Ye, Dan Klein, and Jacob Steinhardt. Discovering latent knowledge in language models without supervision.arXiv preprint arXiv:2212.03827, 2022
work page internal anchor Pith review Pith/arXiv arXiv 2022
-
[2]
Yung-Sung Chuang, Linlu Qiu, Cheng-Yu Hsieh, Ranjay Krishna, Yoon Kim, and James Glass. Lookback lens: Detecting and mitigating contextual hallucinations in large language models using only attention maps. InProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 1419–1436, 2024
work page 2024
-
[3]
A survey on llm-as-a-judge.The Innovation, 2024
Jiawei Gu, Xuhui Jiang, Zhichao Shi, Hexiang Tan, Xuehao Zhai, Chengjin Xu, Wei Li, Yinghan Shen, Shengjie Ma, Honghao Liu, et al. A survey on llm-as-a-judge.The Innovation, 2024
work page 2024
-
[4]
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning.arXiv preprint arXiv:2501.12948, 2025
work page internal anchor Pith review Pith/arXiv arXiv 2025
-
[5]
Tree search for llm agent reinforcement learning.arXiv preprint arXiv:2509.21240, 2025
Yuxiang Ji, Ziyu Ma, Yong Wang, Guanhua Chen, Xiangxiang Chu, and Liaoni Wu. Tree search for llm agent reinforcement learning.arXiv preprint arXiv:2509.21240, 2025
-
[6]
Language Models (Mostly) Know What They Know
Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, et al. Language models (mostly) know what they know.arXiv preprint arXiv:2207.05221, 2022
work page internal anchor Pith review Pith/arXiv arXiv 2022
-
[7]
Beyond the Final Answer: Evaluating the Reasoning Trajectories of Tool-Augmented Agents
Wonjoong Kim, Sangwu Park, Yeonjun In, Sein Kim, Dongha Lee, and Chanyoung Park. Beyond the final answer: Evaluating the reasoning trajectories of tool-augmented agents.arXiv preprint arXiv:2510.02837, 2025
work page internal anchor Pith review Pith/arXiv arXiv 2025
-
[8]
Hunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. InThe twelfth international conference on learning representations, 2023
work page 2023
-
[9]
Understanding R1-Zero-Like Training: A Critical Perspective
Zichen Liu, Changyu Chen, Wenjun Li, Penghui Qi, Tianyu Pang, Chao Du, Wee Sun Lee, and Min Lin. Understanding r1-zero-like training: A critical perspective.arXiv preprint arXiv:2503.20783, 2025
work page internal anchor Pith review Pith/arXiv arXiv 2025
-
[10]
Qianli Ma, Haotian Zhou, Tingkai Liu, Jianbo Yuan, Pengfei Liu, Yang You, and Hongxia Yang. Let’s reward step by step: Step-level reward model as the navigators for reasoning.arXiv preprint arXiv:2310.10080, 2023
-
[11]
Attention head entropy of llms predicts answer correctness.arXiv preprint arXiv:2602.13699, 2026
Sophie Ostmeier, Brian Axelrod, Maya Varma, Asad Aali, Yabin Zhang, Magdalini Paschali, Sanmi Koyejo, Curtis Langlotz, and Akshay Chaudhari. Attention head entropy of llms predicts answer correctness.arXiv preprint arXiv:2602.13699, 2026
-
[12]
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback.Advances in neural information processing systems, 35:27730–27744, 2022
work page 2022
-
[13]
ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs
Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, et al. Toolllm: Facilitating large language models to master 16000+ real-world apis.arXiv preprint arXiv:2307.16789, 2023
work page internal anchor Pith review Pith/arXiv arXiv 2023
-
[14]
Proximal Policy Optimization Algorithms
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms.arXiv preprint arXiv:1707.06347, 2017
work page internal anchor Pith review Pith/arXiv arXiv 2017
-
[15]
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al. Deepseekmath: Pushing the limits of mathematical reasoning in open language models.arXiv preprint arXiv:2402.03300, 2024
work page internal anchor Pith review Pith/arXiv arXiv 2024
-
[16]
Learning to summarize with human feedback
Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel Ziegler, Ryan Lowe, Chelsea V oss, Alec Radford, Dario Amodei, and Paul F Christiano. Learning to summarize with human feedback. Advances in neural information processing systems, 33:3008–3021, 2020
work page 2020
-
[17]
Guoqing Wang, Sunhao Dai, Guangze Ye, Zeyu Gan, Wei Yao, Yong Deng, Xiaofeng Wu, and Zhenzhe Ying. Information gain-based policy optimization: A simple and effective approach for multi-turn llm agents.arXiv preprint arXiv:2510.14967, 2025. 11
-
[18]
Spa-rl: Reinforcing llm agents via stepwise progress attribution, 2025
Hanlin Wang, Chak Tou Leong, Jiashuo Wang, Jian Wang, and Wenjie Li. Spa-rl: Reinforcing llm agents via stepwise progress attribution.arXiv preprint arXiv:2505.20732, 2025
-
[19]
Jize Wang, Zerun Ma, Yining Li, Songyang Zhang, Cailian Chen, Kai Chen, and Xinyi Le. Gta: a benchmark for general tool agents.Advances in Neural Information Processing Systems, 37:75749–75790, 2024
work page 2024
-
[20]
Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotations
Peiyi Wang, Lei Li, Zhihong Shao, RX Xu, Damai Dai, Yifei Li, Deli Chen, Yu Wu, and Zhifang Sui. Math-shepherd: Verify and reinforce llms step-by-step without human annotations, 2024. URL https://arxiv. org/abs/2312.08935, 2(3), 2024
work page internal anchor Pith review Pith/arXiv arXiv 2024
-
[21]
VisualPRM: An effective process reward model for multimodal reasoning,
Weiyun Wang, Zhangwei Gao, Lianjie Chen, Zhe Chen, Jinguo Zhu, Xiangyu Zhao, Yangzhou Liu, Yue Cao, Shenglong Ye, Xizhou Zhu, et al. Visualprm: An effective process reward model for multimodal reasoning.arXiv preprint arXiv:2503.10291, 2025
-
[22]
Yiming Wang, Pei Zhang, Baosong Yang, Derek F Wong, and Rui Wang. Latent space chain-of- embedding enables output-free llm self-evaluation.arXiv preprint arXiv:2410.13640, 2024
-
[23]
Quan Wei, Siliang Zeng, Chenliang Li, William Brown, Oana Frunza, Wei Deng, Anderson Schneider, Yuriy Nevmyvaka, Yang Katie Zhao, Alfredo Garcia, et al. Reinforcing multi-turn reasoning in llm agents via turn-level reward design.arXiv preprint arXiv:2505.11821, 2025
-
[24]
Zhiheng Xi, Chenyang Liao, Guanyu Li, Yajie Yang, Wenxiang Chen, Zhihao Zhang, Binghai Wang, Senjie Jin, Yuhao Zhou, Jian Guan, et al. Agentprm: Process reward models for llm agents via step-wise promise and progress.arXiv preprint arXiv:2511.08325, 2025
-
[25]
Yutao Xie, Nathaniel Thomas, Nicklas Hansen, Yang Fu, Li Erran Li, and Xiaolong Wang. Tips: Turn-level information-potential reward shaping for search-augmented llms.arXiv preprint arXiv:2603.22293, 2026
-
[26]
An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, et al. Qwen2.5 technical report.arXiv preprint arXiv:2412.15115, 2024
work page internal anchor Pith review Pith/arXiv arXiv 2024
-
[27]
Dynamic and generalizable process reward modeling
Zhangyue Yin, Qiushi Sun, Zhiyuan Zeng, Qinyuan Cheng, Xipeng Qiu, and Xuan-Jing Huang. Dynamic and generalizable process reward modeling. InProceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4203–4233, 2025
work page 2025
-
[28]
Hanning Zhang, Pengcheng Wang, Shizhe Diao, Yong Lin, Rui Pan, Hanze Dong, Dylan Zhang, Pavlo Molchanov, and Tong Zhang. Entropy-regularized process reward model.arXiv preprint arXiv:2412.11006, 2024
-
[29]
arXiv preprint arXiv:2506.03106 , year=
Xiaoying Zhang, Yipeng Zhang, Hao Sun, Kaituo Feng, Chaochao Lu, Chao Yang, and Helen Meng. Critique-grpo: Advancing llm reasoning with natural language and numerical feedback. arXiv preprint arXiv:2506.03106, 2025
-
[30]
The lessons of developing process reward models in mathematical reasoning
Zhenru Zhang, Chujie Zheng, Yangzhen Wu, Beichen Zhang, Runji Lin, Bowen Yu, Dayiheng Liu, Jingren Zhou, and Junyang Lin. The lessons of developing process reward models in mathematical reasoning. InFindings of the Association for Computational Linguistics: ACL 2025, pages 10495–10516, 2025
work page 2025
-
[31]
arXiv preprint arXiv:2603.01162 , year=
Hongyi Zhou, Kai Ye, Erhan Xu, Jin Zhu, Ying Yang, Shijin Gong, and Chengchun Shi. Demystifying group relative policy optimization: Its policy gradient is a u-statistic.arXiv preprint arXiv:2603.01162, 2026
-
[32]
Yifei Zhou, Song Jiang, Yuandong Tian, Jason Weston, Sergey Levine, Sainbayar Sukhbaatar, and Xian Li. Sweet-rl: Training multi-turn llm agents on collaborative reasoning tasks.arXiv preprint arXiv:2503.15478, 2025
-
[33]
At 2po: Agentic turn-based policy optimization via tree search.arXiv preprint arXiv:2601.04767, 2026
Zefang Zong, Dingwei Chen, Yang Li, Qi Yi, Bo Zhou, Chengming Li, Bo Qian, Peng Chen, and Jie Jiang. At 2po: Agentic turn-based policy optimization via tree search.arXiv preprint arXiv:2601.04767, 2026. 12 Supplementary Material for PAIR: Prefix-Aware Internal Reward Model for Multi-Turn Agent Optimization A Data Contamination for Motivation Experience 14...
-
[34]
Pick a contamination target.Sample one assistant turn j∈ {1, . . . , T−1} uniformly at random
- [35]
-
[36]
Generate the corrupted turn.Issue a single GPT-4o-mini call with the type-specific system prompt (Figure 8 and Figure 9) and the relevant turn context, instructing the model to rewrite the chosen turn as a plausible-looking but objectively incorrect version of the original
-
[37]
Preserve downstream.Replace turn j in the trajectory with the corrupted version.Do not modify any other turn, including all subsequent observations and the evaluation turn (tT , aT ). This preserves matched-pair semantics: each (τ clean, τcontam) pair differs only in turn j, and the evaluation turn over which we measure probe accuracy is identical across the two
-
[38]
Log metadata.For every contaminated episode we record the contamination type, the index j of the corrupted turn, the original turn content, and the GPT-4o-mini response, enabling downstream auditing and validation. Table 5: Compatibility of contamination types with trajectory structures, and the empirical distribution of types over the union of contamtr a...
-
[39]
2.Stage 1:Fit the hidden-state probe on mixed (clean + contaminated) data: probe_base.fit(H,y)
Data:We use a balanced dataset of clean and contaminated trajectories with binary correctness labels for each evaluation turn. 2.Stage 1:Fit the hidden-state probe on mixed (clean + contaminated) data: probe_base.fit(H,y). 3.Intermediate:Computes bc for all training samples. 4.Stage 2:Fit the attention-based correction head on the same data: probe_correct...
-
[40]
The policy generates actiona t withoutput_hidden_states=Trueand output_attentions=True(these are already computed during generation)
-
[41]
Extract ht (last-token hidden state) and at (multi-layer attention statistics) from the forward pass
-
[42]
Computes bc =probe_base(h t)ands f inal =probe_correction([a t;s bc])
-
[43]
Assignr t =s f inal as the step-level reward at the last token of the assistant turn. D Ablation Study for Attention Statistics PAIR’s Stage 2 summarizes each attention head with four statistics (Section 3): max_attn (the peak attention value across the head’s attention distribution—“how focused is this head?”), std_attn (the spread of that distribution—“...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.