SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.20732 · 2025

SPA-RL: Reinforcing LLM Agents via Stepwise Progress Attribution

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
wanghanlinhenry/spa-rl-agent canonical 4 of 5
FunctionStatusWhere it lives
process_format Ran wanghanlinhenry/spa-rl-agent/eval_agent/main_vh.py
code served (permissive licence) · get_code("da76a1cb08f71e53")
prompt_with_icl Ran wanghanlinhenry/spa-rl-agent/eval_agent/prompt/templates.py
code served (permissive licence) · get_code("041bad03a9d3bad1")
remove_duplicate_edge Ran wanghanlinhenry/spa-rl-agent/eval_agent/main_vh.py
code served (permissive licence) · get_code("241b9f5e2a386a3d")
step Ran wanghanlinhenry/spa-rl-agent/eval_agent/utils/replace_sciworld_score.py
code served (permissive licence) · get_code("91b0f8598b261907")
process_ob Not yet run wanghanlinhenry/spa-rl-agent/eval_agent/envs/alfworld_env.py
code served (permissive licence) · get_code("dfb17eb3e6eaed35")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Reinforcement learning (RL) holds significant promise for training LLM agents to handle complex, goal-oriented tasks that require multi-step interactions with external environments. However, a critical challenge when applying RL to these agentic tasks arises from delayed rewards: feedback signals are typically available only after the entire task is completed. This makes it non-trivial to assign delayed rewards to earlier actions, providing insufficient guidance regarding environmental constraints and hindering agent training. In this work, we draw on the insight that the ultimate completion of a task emerges from the cumulative progress an agent makes across individual steps. We propose Stepwise Progress Attribution (SPA), a general reward redistribution framework that decomposes the final reward into stepwise contributions, each reflecting its incremental progress toward overall task completion. To achieve this, we train a progress estimator that accumulates stepwise contributions over a trajectory to match the task completion. During policy optimization, we combine the estimated per-step contribution with a grounding signal for actions executed in the environment as the fine-grained, intermediate reward for effective agent training. Extensive experiments on common agent benchmarks (including Webshop, ALFWorld, and VirtualHome) demonstrate that SPA consistently outperforms the state-of-the-art method in both success rate (+2.5\% on average) and grounding accuracy (+1.9\% on average). Further analyses demonstrate that our method remarkably provides more effective intermediate rewards for RL training. Our code is available at https://github.com/WangHanLinHenry/SPA-RL-Agent.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2505.20732")
get_code_for_paper("2505.20732")
have("2505.20732")

Connect an agent — have() is free.