arXiv:2611.07932cs.LGNov 2026

Manuscript Offprint

arXiv:2611.07932

AttnSR: Attention Step Reward for Long-Horizon Agentic RL

Mengsong Wu, Tianchen Zhou, Zhaochen Su, Zhenhua Liu, Zhe Cui, Aimin Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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. 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.

1 INTRODUCTION

Reinforcement learning (RL) with verifiable rewards (Shao et al., 2024; DeepSeek-AI, 2025) is increasingly applied to agents that interleave reasoning and tool use (Putta et al., 2024; Wang et al., 2025b; Yao et al., 2023). In environments such as ALFWORLD, WEBSHOP, and SCIENCEWORLD, agents make sequences of decisions to complete a task (Shridhar et al., 2021; Yao et al., 2022; Wang et al., 2022). Vanilla PPO uses the outcome reward to estimate value targets and policy advantages (Schulman et al., 2017; 2016), but says little about how intermediate actions contribute. Assigning credit to earlier decisions thus remains a core challenge in long-horizon RL (Zhang, 2026).

Step-level rewards address this challenge by providing more localized training signals, but obtaining them can require step annotations, additional environment interactions, or a separately trained evaluator (Lightman et al., 2024; Setlur et al., 2024; Kazemnejad et al., 2025). This motivates using signals already available within the policy model to guide intermediate rewards, without incurring the substantial training and environment-interaction costs.

Attention patterns in the policy model may provide such a signal, since they record how later decisions attend to earlier actions and observations. We hypothesize that these relationships provide a useful prior for allocating intermediate rewards, although attention alone does not establish causal contributions (Jain & Wallace, 2019; Abnar & Zuidema, 2020). The signal can be extracted during the existing forward pass of the policy model over collected trajectories. The method adds little computation and requires neither a separate attribution backward pass nor a learned progress estimator.

†^{\dagger}Equal Contributions ‡^{\ddagger}Project Lead ∗^{*}Corresponding authors

Building on this hypothesis, we introduce Attention Step Reward (ATTNSR), which uses the attention of the policy model to identify relevant earlier steps and turns the task outcome into intermediate training signals. Starting from the final step, it traces attention links backward to estimate the relevance of earlier actions and observations. These estimates determine which intermediate steps receive reward, while weaker or less consistent attention reduces their overall magnitude. Outcomes above the running average score yield positive intermediate rewards, and those below it yield negative rewards. These signals can in principle be used directly by step-level RL algorithms or placed at assistant-step endpoints for token-level RL. We study the latter integration in PPO, where the added rewards change value targets and policy advantages while retaining the critic architecture and losses.

We evaluate ATTNSR on ALFWORLD, SCIENCEWORLD, and WEBSHOP using Qwen2.5-7B-Instruct with matched token-level PPO training. ALFWorld success rises from 91.2% to 97.1%, with larger gains on unseen tasks, whereas the positional ablation reaches 92.3%. On ScienceWorld, ATTNSR yields higher official scores at all four reported checkpoints and 29.9% fewer mean environment steps. These results suggest that policy attention can serve as a useful signal for intermediate reward allocation, offering a way to enrich outcome-based supervision without additional rollouts or a separately trained reward model.

Our contributions are summarized below.

  • We hypothesize that policy attention provides a relevance prior over interaction steps by indicating how later decisions attend to earlier actions and observations. Based on this hypothesis, we use attention-derived dependencies to distribute outcome information across steps for temporal credit assignment, treating attention as a heuristic relevance signal, not evidence of causal contribution.

  • We introduce ATTNSR, a step-level reward augmentation scheme that combines attention-based allocation, confidence gating, and outcome centering. The signals can be used directly as step-level rewards or aligned with assistant-step endpoints for token-level objectives, and we study the latter integration with PPO. It needs neither counterfactual rollouts nor a separately trained reward model.

  • We evaluate ATTNSR across three agentic benchmarks with ablation and trajectory analysis to characterize its performance gains and potential boundary conditions across tasks with different interaction lengths. The results are consistent with a stronger benefit on complex, long-horizon tasks, while suggesting more limited gains when trajectories are short.

References (45)