SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.28014 · 2026

ROSD: Reflective On-Policy Self-Distillation for Language Model Reasoning across Domains

Ziqi Zhao, Xiao-Ming Wu, Xinyu Ma, Liu Yang, Zhaochun Ren, Yujie Feng, Daiting Shi, Xin Xin, Jingzhou He

arXiv · PDF · Open in the Atlas

Code that ran

5 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 7 no recorded run), measured 2026-11-21; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.28014.json · badge: /api/ran/2605.28014.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ZiqiZhao1/ROSD canonical (classifier label)
classifier basis not recorded on the link
5 ran · 7 no recorded run
FunctionStatusWhere it lives
generate_config_from_args Ran
ran; our contract draft was wrong, not the code
ZiqiZhao1/ROSD/verl/model_merger/base_model_merger.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("8896f4e2bafe8abc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_dynamic_pipeline_shards Ran
ran, honoured the contract we drafted
ZiqiZhao1/ROSD/verl/model_merger/megatron_model_merger.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("94209884dcb2308e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_ipv4 Ran
ran, violated the contract we drafted
ZiqiZhao1/ROSD/verl/utils/net_utils.py
code served (permissive licence) · get_code("735e93af30b15fa9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ipaddress

ARGS = {
    "ip_str": "192.168.1.1"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
union_tensor_dict Ran
ran; our contract draft was wrong, not the code
ZiqiZhao1/ROSD/verl/protocol.py
code served (permissive licence) · get_code("21331a58f93375e4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned TensorDict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from tensordict import TensorDict

torch.manual_seed(0)

# Create two TensorDicts with identical batch size
batch_size = torch.Size([2])

# First tensor dict with some keys
tensor_dict1 = TensorDict(
    {
        "shared_key": torch.randn(2, 4),
        "key1": torch.randn(2, 3),
    },
    batch_size=batch_size,
)

# Second tensor dict with overlapping and new keys
tensor_dict2 = TensorDict(
    {
        "shared_key": tensor_dict1["shared_key"].clone(),  # Same tensor values
        "key2": torch.randn(2, 5),
    },
    batch_size=batch_size,
)

ARGS = {
    "tensor_dict1": tensor_dict1,
    "tensor_dict2": tensor_dict2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensordict, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TensorDict — a TensorDict output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unpad_dataproto Ran
ran; our contract draft was wrong, not the code
ZiqiZhao1/ROSD/verl/protocol.py
code served (permissive licence) · get_code("83b1686d7ac03c21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataProto. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# DataProto is a custom class that needs to support slicing with [:-pad_size]
class DataProto:
    def __init__(self, data):
        self.data = data
    
    def __getitem__(self, key):
        # Support slicing like [:-pad_size]
        sliced_data = self.data[key]
        return DataProto(sliced_data)
    
    def __repr__(self):
        return f"DataProto({self.data})"

# Create sample data
sample_data = torch.randn(2, 4)
data_proto = DataProto(sample_data)

ARGS = {
    'data': data_proto,
    'pad_size': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataProto — a DataProto output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataProto output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_generation_config Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/utils/model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xiuyilou/TACO, is pointer only (licence: NONE) · get_code("e6c72459395ae26a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xiuyilou/TACO, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_huggingface_actor_config Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/utils/model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xiuyilou/TACO, is pointer only (licence: NONE) · get_code("1b071bded6f62e73")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xiuyilou/TACO, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_weight_loader Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/models/weight_loader_registry.py
code served (permissive licence) · get_code("acf240079d434746")
How it ran

no invocation recorded.

get_weight_saver Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/models/weight_loader_registry.py
code served (permissive licence) · get_code("ada2d6cf9ca9ee89")
How it ran

no invocation recorded.

is_ipv6 Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/utils/net_utils.py
code served (permissive licence) · get_code("705afe175ad8e404")
How it ran

no invocation recorded.

is_valid_ipv6_address Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/utils/net_utils.py
code served (permissive licence) · get_code("72b5e8089e8c68a6")
How it ran

no invocation recorded.

squeeze Not yet run
unverified (harvested, no recorded run)
ZiqiZhao1/ROSD/verl/utils/model.py
code served (permissive licence) · get_code("3b15e2ac7497c441")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 12 the same month, 12 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
unpad_dataproto 89 other papers
63 dated earlier, 7 the same month, 16 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
and 86 more not named here
squeeze 82 other papers
59 dated earlier, 6 the same month, 14 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
and 79 more not named here
union_tensor_dict 64 other papers
50 dated earlier, 5 the same month, 6 later, 3 undated · 4 only as an assembly brick
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
and 61 more not named here
get_generation_config 63 other papers
43 dated earlier, 6 the same month, 12 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2502.19613 (2025-02)
Self-rewarding correction for mathematical reasoning
and 60 more not named here
get_weight_loader 58 other papers
34 dated earlier, 7 the same month, 15 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2505.14362 (2025-05)
DeepEyes: Incentivizing "Thinking with Images" via Reinforcement Learning
2505.20046 (2025-05)
REARANK: Reasoning Re-ranking Agent via Reinforcement Learning
and 55 more not named here
generate_config_from_args 57 other papers
28 dated earlier, 7 the same month, 19 later, 3 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2509.25787 (2025-09)
Self-Evolving Vision-Language Models for Image Quality Assessment via Voting and Ranking
2510.08630 (2025-10)
ExPO-HM: Learning to Explain-then-Detect for Hateful Meme Detection
and 54 more not named here
get_dynamic_pipeline_shards 52 other papers
25 dated earlier, 7 the same month, 18 later, 2 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2509.25787 (2025-09)
Self-Evolving Vision-Language Models for Image Quality Assessment via Voting and Ranking
2510.08630 (2025-10)
ExPO-HM: Learning to Explain-then-Detect for Hateful Meme Detection
and 49 more not named here
is_ipv4 41 other papers
22 dated earlier, 6 the same month, 11 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
and 38 more not named here
is_ipv6 41 other papers
22 dated earlier, 6 the same month, 11 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
and 38 more not named here
get_huggingface_actor_config 28 other papers
13 dated earlier, 5 the same month, 9 later, 1 undated
2509.25787 (2025-09)
Self-Evolving Vision-Language Models for Image Quality Assessment via Voting and Ranking
2601.02648 (2026-01)
Prioritized Replay for RL Post-training
2602.02518 (2026-02)
GRAPHDANCER: Training LLMs to Explore and Reason over Graphs via Two-Stage Curriculum Post-Training
and 25 more not named here
get_weight_saver 17 other papers
4 dated earlier, 3 the same month, 10 later
2601.02648 (2026-01)
Prioritized Replay for RL Post-training
2602.04879 (2026-02)
Rethinking the Trust Region in LLM Reinforcement Learning
2602.10609 (2026-02)
Online Causal Kalman Filtering for Stable and Effective Policy Optimization
and 14 more not named here
is_valid_ipv6_address 15 other papers
4 dated earlier, 3 the same month, 8 later
2506.03887 (2025-06)
Pre 3 : Enabling Deterministic Pushdown Automata for Faster Structured LLM Generation
2602.04879 (2026-02)
Rethinking the Trust Region in LLM Reinforcement Learning
2602.10609 (2026-02)
Online Causal Kalman Filtering for Stable and Effective Policy Optimization
and 12 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

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

Abstract

On-policy self-distillation (OPSD) improves the reasoning performance of large language models (LLMs) by providing dense token-level supervision for on-policy rollouts. However, existing OPSD methods often yield limited gains on in-domain reasoning and generalize poorly to out-of-domain problems. We identify two key causes: conditioning the self-teacher on a verified solution encourages imitation of training-domain reference trajectories rather than error-specific correction, and applying distillation to the full response can overwrite valid reasoning prefixes and reinforce overfitting. We propose Reflective On-policy Self-Distillation (ROSD), a framework that turns reference-solution imitation into targeted reasoning correction through reflection-guided, error-localized distillation. For each rollout, ROSD uses a self-reflector to extract a corrective idea and locate the first erroneous span. The corrective idea guides the selfteacher toward targeted supervision, while the localized error span restricts distillation to where correction is needed. This design corrects flawed reasoning while preserving valid prefixes. Experiments on multiple in-domain and out-of-domain reasoning benchmarks show that ROSD yields stronger in-domain reasoning performance overall and substantially better out-of-domain generalization than standard OPSD. Code is available at https://github.com/ZiqiZhao1/ROSD.

For agents

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

get_harvested_code_for_paper("2605.28014")
get_code_for_paper("2605.28014")
have("2605.28014")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.28014.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.28014.svg)](https://syntology.ai/paper/2605.28014)

Connect an agent — have() is free.