Manuscript Offprint

arXiv:2610.27847

SAPD: Learning from Agent Experience without Environment Interaction

Juncheng Diao, Haibin Wang, Wei Shi, Yifan Ding, Qingbin Li, Rongxiang Weng, Xunliang Cai

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

ABSTRACT

Scaling the training of Large Language Model (LLM) agents typically requires a large collection of executable environments, whose construction, maintenance, and operation constrain the expansion of training experience. Existing offline trajectories offer an opportunity to reuse interaction experience, yet effectively refining the current policy without revisiting these environments remains challenging: supervised fine-tuning (SFT) can lead to catastrophic forgetting, while online reinforcement learning requires real-time interaction with the environment. To address this challenge, we propose Step-Advantage Policy Distillation (SAPD), a method for learning from offline trajectories using relative step advantages. SAPD decomposes multi-turn trajectories into individual decision contexts for on-policy distillation, allowing the student to generate responses conditioned on recorded histories, and introduces relative step advantage signals to stabilize training. The entire process requires neither new environment observations nor additional multi-turn interactions. Experiments on ALFWorld, WebShop, and Search-based QA show that SAPD improves performance across different teacher configurations, mitigates catastrophic forgetting compared with SFT, and runs at least 4.7×4.7\times faster per training step than online OPD. We will release our code soon.

1 INTRODUCTION

Recent advances in large language models (LLMs) have enabled LLM agents to tackle increasingly complex, long-horizon tasks. Scaling agent training across these long-horizon tasks typically requires diverse executable environments in which models can take actions and receive feedback (Liao et al., 2026; Zhou et al., 2026). Recent models such as DeepSeek-V3.2 and Qwen3-Coder-Next further highlight this trend through large-scale construction of executable environments for agent training (DeepSeek-AI et al., 2025; Cao et al., 2026). However, deploying, maintaining, and operating these environments introduces substantial infrastructure demands and engineering complexity, making agent training difficult to scale across heterogeneous tasks (Liao et al., 2026).

Existing offline trajectories offer an opportunity to reuse interaction experience, yet effectively refining the current policy without revisiting the original environments remains challenging. Supervised fine-tuning (SFT) learns from these trajectories by imitating expert actions. However, when trajectories span heterogeneous domains, their supervision signals may conflict, causing interference between domain-specific behaviors. Sequential SFT can further lead to catastrophic forgetting, with gains on new tasks coming at the expense of previously acquired capabilities (Lu & Thinking Machines Lab, 2025). These challenges limit the use of SFT for continually expanding an agent's task coverage. In contrast, online reinforcement learning (RL) and on-policy distillation (OPD) optimize trajectories generated by the current policy and can substantially mitigate forgetting compared with SFT (Shenfeld et al., 2026; Lu & Thinking Machines Lab, 2025). However, their application through online multi-turn rollouts requires continued environment interaction, retaining the associated de-

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

employment and execution costs (Liao et al., 2026; Zhou et al., 2026). These limitations raise a central question: How can we continually improve an agent's policy using offline interaction experience without revisiting the environment, while retaining previously acquired capabilities?

To address this challenge, we propose Step-Advantage Policy Distillation (SAPD), which refines the student policy using offline prefixes and teacher supervision. SAPD consists of two components: offline trajectory decomposition and context-relative step-advantage optimization. Offline trajectory decomposition converts recorded multi-turn trajectories into decision contexts, each retaining the preceding interaction history and current observation as a fixed prefix. For each prefix, the student generates a group of single-turn responses, and a fixed teacher provides token-level supervision on the generated responses. This enables SAPD to reuse offline interaction histories while optimizing the student's own decisions, without executing new actions or obtaining additional environment observations. However, offline prefix replay faces a two-sided mismatch: recorded histories may differ from those the student would encounter through its own interactions and may also be unfamiliar to the teacher. This mismatch can introduce context-dependent errors into teacher supervision, making updates based on absolute teacher–student discrepancies less reliable. To address this challenge, SAPD introduces context-relative step-advantage optimization, which aggregates token-level signals into action-level scores and compares candidate responses under the same decision context. Comparing responses under the same prefix yields relative advantages that provide decision-level guidance alongside token-level supervision. We incorporate these advantages into a joint objective to stabilize policy updates, alongside token-level OPD for efficiency and rule rewards for further stability. Experiments on three publicly available agentic benchmarks show that SAPD significantly improves performance across teacher configurations, substantially mitigates catastrophic forgetting compared with SFT, and runs at least 4.7×4.7\times faster per training step than online OPD in the measured configurations. In summary, our contributions are as follows:

• We introduce a framework that combines offline trajectory decomposition with policy optimization, enabling environment-free learning while mitigating catastrophic forgetting.

• We propose Step-Advantage Policy Distillation (SAPD), which constructs relative step advantages to provide more stable decision-level supervision under behavior-prefix shift.

• Experiments on three publicly available agentic benchmarks demonstrate improved performance across teacher configurations, reduced forgetting compared with SFT, and lower per-step training time than online OPD.

References (62)