AttnSR: Attention Step Reward for Long-Horizon Agentic RL

Mengsong Wu, Tianchen Zhou, Zhaochen Su, Zhenhua Liu, Zhe Cui +1 more
11/5/2026
cs.LGcs.AI
rl

Official code: fairyshine/AttnSR (1 star, Python, last commit 2026-11-06).

Abstract

Long-horizon LLM agents make multi-step decisions, yet outcome-reward-only reinforcement learning provides little direct supervision for individual steps. We introduce AttnSR, a step-level reward augmentation method that derives reward allocations from policy attention extracted during training replay, without a separately trained reward model or additional rollouts.

Show full abstract

AttnSR traces backward through the policy model attention graph to estimate the relevance of earlier steps to the final response. The terminal step, measured relative to a running baseline, determines whether these rewards reinforce or penalize the selected steps. In a controlled Qwen2.5-7B-Instruct study, AttnSR consistently outperforms the PPO baseline across all evaluated checkpoints on ALFWorld, raising final held-out success from 91.2% to 97.1%. The ablation experiment shows that the benefit depends on how intermediate rewards are assigned, rather than simple accumulation of step rewards over time. AttnSR also improves ScienceWorld at every checkpoint while cutting environment interactions by 29.9%. These results support policy attention as a practical prior for step-level reward allocation in long-horizon agentic RL. Code is available at https://github.com/fairyshine/AttnSR .

View on arXivView PDF

Code Implementations(1)

fairyshine/AttnSROfficial100%
10Python, ShellNov 4, 20263 weeks ago

Similar Papers

Cite this paper

@article{wu2026attnsr,
  title  = {AttnSR: Attention Step Reward for Long-Horizon Agentic RL},
  author = {Mengsong Wu and Tianchen Zhou and Zhaochen Su and Zhenhua Liu and Zhe Cui and Aimin Zhou},
  year   = {2026},
  eprint = {2611.07932},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.07932v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.07932.svg)](https://codeofpaper.com/paper/2611.07932)

Discussion