← Latest papers
💻 computer science

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

The paper proposes PAIR, a prefix-aware internal reward model that combines a frozen hidden-state probe with a lightweight attention-based head to generate dense, low-cost step-level rewards for multi-turn agent optimization, effectively overcoming the limitations of sparse outcome rewards and the degradation of probes under prefix contamination.

Original authors: Wonjoong Kim, Yeonjun In, Sangwu Park, Dongha Lee, Chanyoung Park

Published 2026-05-19
📖 4 min read☕ Coffee break read

Original authors: Wonjoong Kim, Yeonjun In, Sangwu Park, Dongha Lee, Chanyoung Park

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are teaching a robot assistant to solve a complex puzzle, like booking a flight, reserving a hotel, and ordering dinner all in one go. The robot has to take many steps, making decisions and using tools along the way.

The big problem with current teaching methods is that the robot only gets a "Good job!" or "Try again" at the very end of the whole process. If the robot messes up step 1, it doesn't know it until it finishes step 10 and fails the whole task. It's like playing a video game where you only get a "Game Over" screen at the end, with no hint about which jump you missed.

This paper introduces a new way to teach these robots called PAIR (Prefix-Aware Internal Reward Model). Here is how it works, using simple analogies:

The Problem: The "Confused Detective"

To give the robot feedback during the process (step-by-step), researchers tried looking inside the robot's brain (its internal computer states) to see if it was doing the right thing.

They found two types of "brain signals":

  1. The "Storyteller" (Hidden States): This signal checks if the current step makes sense with what happened before. It's like a detective who only cares if the current clue fits the story they've already written.
    • The Flaw: If the robot made a mistake earlier (contaminated the story), the "Storyteller" gets confused. It thinks, "Oh, this new step fits the wrong story perfectly, so it must be good!" It accidentally rewards the robot for continuing down a wrong path.
  2. The "Structural Architect" (Attention Patterns): This signal looks at how the robot is focusing its attention. It doesn't care about the story; it cares about the structure. Is the robot looking at the right tools? Is it ignoring the irrelevant noise?
    • The Strength: Even if the story is messed up, this signal can still tell if the robot is looking at the right things. It's robust.
    • The Weakness: On a perfect, clean story, it's not as sharp as the "Storyteller."

The Solution: The "Two-Stage Coach" (PAIR)

The authors realized that neither signal is perfect on its own. The "Storyteller" is great when things are going well, but fails when mistakes happen. The "Architect" is steady but less precise on clean tasks.

So, they built PAIR, a two-stage coach:

  1. Stage 1: The Belief Check. The coach first asks the "Storyteller" (the hidden state probe): "Does this step fit the current story?" This gives a quick, initial score.
  2. Stage 2: The Reality Check. The coach then asks the "Architect" (the attention probe): "Wait, looking at how you're focusing, are you actually solving the problem, or just following a broken story?"

How they work together:

  • If the story is clean: The "Architect" agrees with the "Storyteller." The coach accepts the score.
  • If the story is broken (contaminated): The "Storyteller" says, "This looks good because it fits the mistake!" But the "Architect" says, "No, you're looking at the wrong things!" The coach listens to the "Architect" and corrects the score, telling the robot, "Actually, that step was bad, even if it felt right."

Why This is a Big Deal

Before PAIR, to get step-by-step feedback, you had to do one of three expensive things:

  • Run the whole game 100 times to see what works (very slow and wasteful).
  • Call a human or a super-smart AI to judge every single step (very expensive and slow).
  • Know the exact answer beforehand to grade the steps (impossible for many real-world tasks).

PAIR changes the game because:

  • It's Free: It uses the robot's own brain signals. It doesn't need to call anyone else or run extra simulations.
  • It's Instant: It happens in the blink of an eye while the robot is thinking.
  • It's Honest: It catches mistakes even when the robot is confidently following a wrong path.

The Result

When they tested this on robots trying to use real-world tools (like booking flights or searching databases), PAIR helped them learn much faster and solve more problems than any other method. It's like giving a student a teacher who can spot a mistake while they are writing the essay, rather than waiting until the essay is finished to say, "You failed."

In short, PAIR is a smart, internal "lie detector" for AI agents that helps them correct their own mistakes in real-time, without needing expensive external help.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →