← Latest papers
🤖 machine learning

Hidden States Know Where Reasoning Diverges: Credit Assignment via Span-Level Wasserstein Distance

The paper proposes **SHEAR**, a method that improves reinforcement learning for reasoning tasks by using the Wasserstein distance between hidden-state distributions of correct and incorrect rollouts to perform fine-grained, token-level credit assignment without requiring additional reward models or step-level annotations.

Original authors: Xinzhu Chen, Wei He, Huichuan Fan, Wenzhe Niu, Zhongxiang Sun, Xuanru Wang, Jiuchong Gao, Jinghua Hao, Renqing He, Weijie Yu

Published 2026-04-28
📖 4 min read☕ Coffee break read

Original authors: Xinzhu Chen, Wei He, Huichuan Fan, Wenzhe Niu, Zhongxiang Sun, Xuanru Wang, Jiuchong Gao, Jinghua Hao, Renqing He, Weijie Yu

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 a teacher grading a long, complex math exam. Most AI models today are like a teacher who only looks at the final answer. If the student gets the answer right, the teacher gives them an A+ for the whole page. If they get it wrong, the teacher gives them an F for the whole page.

The problem? The student might have done 90% of the work perfectly but made one tiny calculation error at the very end. Or, they might have guessed the right answer by pure luck despite having a totally broken logical process. Giving the same "reward" to every single step is unfair and makes it hard for the student (the AI) to learn exactly where they went wrong.

This paper introduces a new method called SHEAR to solve this "Credit Assignment" problem.

The Core Idea: The "Vibe Check" of Hidden States

Instead of hiring a second, expensive teacher (called a Process Reward Model) to watch every single step, the researchers discovered something brilliant: The AI’s own "brain waves" (hidden states) already know when it's starting to lose the plot.

Think of it like a professional chef cooking a complex meal.

  • When the chef is following a perfect recipe, their movements are rhythmic, confident, and consistent.
  • The moment they realize they’ve added too much salt or burned the garlic, their "vibe" changes. Their movements become frantic, hesitant, or disorganized.

The researchers found that when an AI is on a "correct" path, its internal mathematical patterns (hidden states) look a certain way. When it starts to make a mistake, those patterns suddenly "diverge"—they drift away from the "correct" pattern and start looking like the patterns seen in failed attempts.

The Tool: The Wasserstein Distance (The "Difference Meter")

To measure this "vibe shift," they use a mathematical tool called the Wasserstein Distance.

Imagine you have two piles of sand. One pile represents the "brain waves" of a successful reasoning path, and the other represents a failed one. The Wasserstein Distance is essentially the minimum amount of work required to move the sand from one pile to match the shape of the other.

  • If the piles are almost identical, the distance is low (the "vibe" is the same).
  • If the piles look completely different, the distance is high (the "vibe" has shifted).

The Method: SHEAR (The Smart Grader)

SHEAR uses this "Difference Meter" to grade the AI's work with surgical precision. Here is how it works in three steps:

  1. Scanning: It slides a window across the AI's reasoning chain, looking at small chunks (spans) of its "brain waves" at a time.
  2. Comparing: It compares those chunks to the "brain waves" of successful attempts.
  3. Reweighting:
    • If a chunk of reasoning looks just like a successful path, it gets a standard grade.
    • If a chunk looks wildly different from the successful paths (meaning the AI likely just made a mistake), SHEAR amplifies the signal. It tells the AI: "Hey! This specific part was the turning point! Pay extra attention here!"

Why is this a big deal?

  1. It’s Self-Supervised: It doesn't need humans to sit there and label every single step of a math problem. It learns purely by comparing its own "good" thoughts to its "bad" thoughts.
  2. It’s Efficient: It doesn't require training a whole new "teacher" model. It just uses the brain waves the AI is already producing.
  3. It Actually Works: In their tests, this method helped AI get much better at complex math and coding, often performing as well as (or better than) much more expensive, human-supervised methods.

In short: SHEAR teaches AI to listen to its own "gut feeling" to figure out exactly which step caused a mistake, making it a much faster and more precise learner.

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 →