Reproduce “Hidden States Know Where Reasoning Diverges: Credit Assignment via Span-Level Wasserstein Distance” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Xinzhu Chen, Wei He, Huichuan Fan, Wenzhe Niu, Zhongxiang Sun, Xuanru Wang, Jiuchong Gao, Jinghua Hao and 2 more

Researchers found that large language model hidden states intrinsically contain signals for local reasoning quality, leading to the development of SHEAR, a self-supervised method that uses span-level Wasserstein distance for fine-grained credit assignment. This method significantly improved mathematical reasoning and code generation performance for LLMs without relying on external step-level supervision.

Key insights

  • Large language model hidden states inherently encode signals about the local quality of reasoning, with distributional divergences (measured by Wasserstein distance) serving as a robust indicator of reasoning errors.
  • Fine-grained credit assignment can be self-supervised directly from the LLM's internal representations, bypassing the need for expensive external annotations or auxiliary reward models for process-level supervision.
  • The full distributional difference captured by metrics like Wasserstein distance is critical for distinguishing reasoning quality; simpler metrics focusing only on mean shifts proved insufficient and could degrade performance.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.