Papers › From Trajectories to Prefixes: Reusing Teacher Trajectories via Replayed Prefixes and...

From Trajectories to Prefixes: Reusing Teacher Trajectories via Replayed Prefixes and Online Continuation

3 Jul 2026arXiv:2607.19395added by Syntology

Yihan Wang, Zhong Guan, Haoran Sun, Jiale Huang, Likang Wu, Hongke Zhao

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Small language models are attractive backbones for interactive agents, but direct distillation from strong teacher trajectories often turns rich multi-turn behavior into one-shot imitation targets. This is inefficient in long-horizon environments, where early decisions shape later states and rewards. We propose Prefix-GRPO, a reinforcement learning framework that decomposes teacher trajectories into replay-aligned prefix queries and online continuations. Each prefix is replayed in the environment to recover a valid intermediate state, after which the student continues online interaction and receives task reward. Unlike response-only GRPO, Prefix-GRPO also applies clipped policy updates to historical assistant tokens inside the replayed prefix, using a policy-distilled SFT checkpoint to estimate their old log-probabilities. This unifies prefix learning and continuation learning within the same policy-optimization form. Experiments on TextCraft, BabyAI, and ALFWorld show that Prefix-GRPO improves small-model agents over distillation and standard RL baselines, while ablations show that replay alone is insufficient without explicit prefix-token optimization. The implementation and reproduction scripts are available at https://github.com/HappynessI/Prefix_GRPO.

PaperPDFCode Syntology ran

In Syntology For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2607.19395")

Code

Syntology Ran 13 of 15 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 13 ran with no contract checked.

By repository: found in paper text by Syntology: 15 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

HappynessI/Prefix_GRPO found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 13 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13ran
2unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from HappynessI/Prefix_GRPO. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

default_data_path HappynessI/Prefix_GRPO/legacy_eval/eval/eval_alfworld_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · 91ccdb61ebdda4d5 · report
default_data_path HappynessI/Prefix_GRPO/legacy_eval/eval/eval_babyai_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · 47c9834f6d824cde · report
default_data_path HappynessI/Prefix_GRPO/legacy_eval/eval/eval_sciworld_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · b81e7e7fb5e6a8fb · report
default_output_dir HappynessI/Prefix_GRPO/legacy_eval/eval/eval_alfworld_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · 0218744f7c006268 · report
default_output_dir HappynessI/Prefix_GRPO/legacy_eval/eval/eval_babyai_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · 87c5259f364602a5 · report
default_output_dir HappynessI/Prefix_GRPO/legacy_eval/eval/eval_sciworld_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · d2df0a681d9b83b5 · report
estimate_pass_at_k HappynessI/Prefix_GRPO/legacy_eval/eval/eval_webshop_vllm_server.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · bfc71d0afa64f3f5 · report
extract_textcraft_binding HappynessI/Prefix_GRPO/legacy_eval/eval/eval_textcraft_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · b2a6a1a0bee880e4 · report
fetch_model_name HappynessI/Prefix_GRPO/legacy_eval/eval/eval_webshop_vllm_server.py found in paper text by Syntology ran Apache-2.0 (permissive) · 865c5b13dc8e1217 · report
generate_config_from_args HappynessI/Prefix_GRPO/verl/verl/model_merger/base_model_merger.py found in paper text by Syntology ran Apache-2.0 (permissive) · 8896f4e2bafe8abc · report
get_dynamic_pipeline_shards HappynessI/Prefix_GRPO/verl/verl/model_merger/megatron_model_merger.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 94209884dcb2308e · report
resolve_eval_row HappynessI/Prefix_GRPO/legacy_eval/eval/agentgym_eval_utils.py found in paper text by Syntology ran Apache-2.0 (permissive) · fc83831d5895fb4a · report
session_id_to_textcraft_depth HappynessI/Prefix_GRPO/legacy_eval/eval/eval_textcraft_vllm_server.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 9b7779c4fb99dba4 · report
discover_project_root HappynessI/Prefix_GRPO/legacy_eval/eval/eval_alfworld_vllm_server.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ce2022fcdcc9a3f5 · report
discover_project_root HappynessI/Prefix_GRPO/legacy_eval/eval/eval_sciworld_vllm_server.py found in paper text by Syntology unverified Apache-2.0 (permissive) · e6e2db202c97305d · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2607.19395, was issued in July 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections