# PAIR: Prefix-Aware Internal Reward Model for Multi-Turn Agent Optimization

*Wonjoong Kim, Yeonjun In, Sangwu Park, Dongha Lee, Chanyoung Park*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/156086) · [Open on the map](../papers.html#p156086)

Category: [LLM Post-Training: RL & Distillation](../pcat/18.md) › [Reinforcement Learning for Language Model Reasoning](../pgroup/146.md) · Type: new method · Keywords: internal reward model, prefix contamination, multi-turn agent optimization, group relative policy optimization, step-level reward

Areas: [LLM Reasoning](../areas/reasoning.md) › Reasoning Optimization › Policy Optimization for Language Models; [RL for LLMs & Agents](../areas/llm-rl.md) › LLM Policy Optimization › Reinforcement Learning for Language Models

## Summary
PAIR introduces a prefix-aware internal reward model that provides dense step-level rewards for multi-turn agent optimization by combining a frozen hidden-state probe and an attention-based head, enabling efficient GRPO training without external judges or full rollouts.

## Explained to a 5-year-old
A robot needs to do many steps to finish a task, but it only gets a reward at the end, so it doesn't know what it did well. The paper makes a simple checker that looks inside the robot's thoughts to see if they make sense. Sometimes the robot's earlier thoughts get messed up, and the checker can tell when that happens. To fix this, the paper also adds a simple attention trick that helps the checker focus on the right parts. This helps the robot learn faster without asking a big helper or doing a lot of extra work.

## Explained to a 5-year-old, longer
Imagine a robot that has to do several steps to finish a big job, like solving a puzzle piece by piece. Usually, the robot only gets a reward when it finishes the whole puzzle, which makes it hard to know which steps were good. The paper creates a tiny checker inside the robot that watches its thoughts and checks if they make sense. This checker looks at how the robot thinks about what it has already done. Sometimes the robot’s earlier thoughts get mixed up or corrupted, and the checker can spot that. To fix this, the paper also adds a simple attention mechanism that helps the checker focus on the right parts. The attention part corrects the checker’s judgment when the earlier thoughts are messed up. Together, the checker and the attention part give the robot a reward for each step, not just at the end. This step-by-step reward helps the robot learn what to do better at each stage. The robot can improve without needing a big external judge or asking for the correct answers. It also saves a lot of computing power because the checker is lightweight. In the end, the robot becomes better at multi-step tasks while using fewer resources.

## For a technical reader
The paper addresses the difficulty of assigning credit across intermediate steps in multi-turn tasks when only a final reward is available. It proposes a two-stage internal reward model that first uses a frozen hidden-state probe to measure belief consistency and then refines this signal with an attention-based head that corrects for prefix contamination. This design provides dense, step-level rewards at negligible inference cost, allowing group relative policy optimization to be trained without external judges or full trajectory rollouts. Experiments show the approach achieves the highest AUROC on contaminated trajectories while keeping computational overhead low. The method thus enables more efficient reinforcement-learning pipelines for language agents in practical settings.

## Problem
Adapting agents to complex, multi-stage tasks is hindered by sparse outcome rewards that make credit assignment across intermediate steps difficult. Existing solutions either require costly full rollouts, external LLM judges at each step, or ground-truth answers for intrinsic rewards, limiting practicality.

## Method
The approach leverages internal LLM hidden states by using a frozen hidden-state probe to estimate belief consistency and an attention-based head to correct for prefix contamination, yielding a robust step-level reward signal. This two-stage model operates at negligible inference cost and can be integrated with group relative policy optimization without requiring external judges or full trajectory rollouts.

## Results
The approach attains the highest AUROC on contaminated trajectories and operates at negligible inference cost, providing dense step-level rewards for GRPO training without external model calls, ground-truth dependencies, or full rollouts.

## Contributions
It introduces a two-stage internal reward model that combines hidden-state probing and attention-based correction to obtain robust step-level rewards under prefix contamination, and demonstrates its effectiveness for GRPO training with minimal computational overhead.

## Research questions this paper is counted under

- [How can reinforcement learning agents effectively learn from sparse, delayed rewards in long-horizon tasks?](../q/1.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/156086)
