Watch Every Step! LLM Agent Learning via Iterative Step-level Process Refinement

Weimin Xiong, Yifan Song, Xiutian Zhao, Wenhao Wu, Xun Wang, Ke Wang, Cheng Li, Wei Peng, Sujian Li

Introduction

Large Language Models (LLMs) are increasingly deployed as autonomous agents to navigate complex, multi-step environments such as web interfaces or database systems. However, training these agents effectively remains a significant challenge. Most current reinforcement learning and fine-tuning paradigms rely on outcome-level rewards—binary feedback provided only at the conclusion of a task.

This "all-or-nothing" approach suffers from severe credit assignment issues: an agent failing a ten-step task lacks the signal to identify whether the error occurred at the second or ninth step. Furthermore, it risks reinforcing "accidental success," where an agent reaches a goal through a highly suboptimal or "lucky" path. To address these limitations, we introduce Iterative step-level Process Refinement (IPR), a framework that automates the generation of granular, step-by-step feedback.

Conceptual comparison between Supervised Fine-Tuning (SFT), Exploration-based Trajectory Optimization (ETO), and the proposed Iterative Process Refinement (IPR).

The IPR Framework

The IPR framework operates through a cyclic process of data collection, reward estimation, and model optimization. It is composed of three primary modules:

  1. Step-wise Trajectory Construction: The agent explores the environment by following an expert trajectory. At each step, the agent's proposed action is compared against the expert's action. If the agent's choice leads to a significantly lower probability of eventual success, that step is flagged as a critical mistake.
  2. Step-level Reward Acquisition: To quantify the value of an action without human intervention, IPR employs Monte Carlo (MC) rollouts. For a given state-action pair, the agent performs $N$ random simulations to the task's end. The success ratio of these rollouts serves as a proxy for the action's "step reward."
  3. Mixture Trajectory Optimization: The agent is fine-tuned using a composite loss function designed to balance error avoidance with goal-oriented behavior. This includes Outcome-DPO for global trajectory success, Step-DPO to penalize specific identified mistakes, and Supervised Fine-Tuning (SFT) to anchor the model to known successful paths.
The complete IPR pipeline, illustrating trajectory construction, reward acquisition via Monte Carlo rollouts, and multi-loss optimization.

This process is iterative: as the agent improves, it becomes a more accurate "scorer" for its own actions, creating a self-refining feedback loop that progressively elevates the quality of the training data.

Experimental Evaluation

We evaluated IPR across three demanding benchmarks: WebShop (online shopping with 1.8M products), InterCodeSQL (interactive database querying), and ALFWorld (embodied household tasks). Using GPT-4 to generate initial expert trajectories, we tested IPR against strong baselines, including the previous state-of-the-art, Exploration-based Trajectory Optimization (ETO).

IPR demonstrated consistent performance gains across all environments, outperforming ETO by 5.8% on WebShop and 7.2% on InterCodeSQL. Notably, the framework proved robust across various base architectures, including Mistral-7B and the Llama family (Llama-2-13B, Llama-3-8B).

Key Insights

  • Precision in Credit Assignment: Identifying where a trajectory diverged from success is more impactful than simply knowing that it failed. By isolating mistake steps, IPR forces the model to learn from specific pitfalls.
  • Sampling Efficiency: High-quality signals can be obtained with relatively few Monte Carlo samples ($N=5$), making the automated process supervision computationally feasible.
  • The Necessity of Anchoring: The inclusion of SFT loss alongside DPO is critical. While DPO effectively pushes the model away from negative behaviors, SFT ensures it remains focused on the narrow, successful trajectories required for complex agentic tasks.

Conclusion and Future Directions

IPR represents a significant step toward automated, high-fidelity supervision for LLM agents. By transforming sparse outcome rewards into dense process signals, it enables agents to learn more efficiently and take more direct paths to their goals. Future work will focus on mitigating overfitting during extended iterations and developing generalized reward models that can provide process supervision across diverse tasks without environment-specific retraining.

Summary updated

BibTeX
@inproceedings{xiong2024watch,
  author = {Weimin Xiong and Yifan Song and Xiutian Zhao and Wenhao Wu and Xun Wang and Ke Wang and Cheng Li and Wei Peng and Sujian Li},
  title = {{Watch Every Step! LLM Agent Learning via Iterative Step-level Process Refinement}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.93},
}
Figure