SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.23104 · 2026

ReNIO: Reweighting Negative Trajectory Importance for LLM On-Policy Distillation

Wei Zhang, Chen Lin, Kedi Chen

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2606.23104.json · badge: /api/ran/2606.23104.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
BDML-lab/ReNIO canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
build_prompt Ran
ran; our contract draft was wrong, not the code
BDML-lab/ReNIO/eval/evaluate_code.py
code served (permissive licence) · get_code("736f1be23541cbcd")
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 str. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal tokenizer stand-in that implements apply_chat_template
class MinimalTokenizer:
    def apply_chat_template(self, messages, tokenize=False, add_generation_prompt=False, enable_thinking=False):
        # Simulate applying chat template - just concatenate messages
        result = ""
        for msg in messages:
            result += f"[{msg['role']}]: {msg['content']}\n"
        if add_generation_prompt:
            result += "[assistant]:"
        return result

# Create a minimal problem dict with required 'prompt' key
problem = {
    'prompt': 'def add(a, b):\n    """Add two numbers."""\n    pass',
    'entry_point': 'add',
    'test_cases': []
}

# Instantiate tokenizer
tokenizer = MinimalTokenizer()

# Define all arguments
ARGS = {
    'problem': problem,
    'enable_thinking': True,
    'tokenizer': tokenizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
extract_boxed_answer Ran
ran; our contract draft was wrong, not the code
BDML-lab/ReNIO/grpo_train.py
pointer only (licence: MIT); the stored copy get_code serves, from ZJU-REAL/TTPO, is pointer only (licence: NONE) · get_code("728111e00c43689f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ZJU-REAL/TTPO, 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.

extract_boxed_answer Ran
ran; our contract draft was wrong, not the code
BDML-lab/ReNIO/eval/evaluate_math.py
pointer only (licence: MIT); the stored copy get_code serves, from ZJU-REAL/TTPO, is pointer only (licence: NONE) · get_code("b1030fc6426aa14c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ZJU-REAL/TTPO, 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.

make_format_fn Ran
ran; our contract draft was wrong, not the code
BDML-lab/ReNIO/sft_train.py
code served (permissive licence) · get_code("e69497d17971497c")
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 function. 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 torch.nn as nn

class MockTokenizer:
    """Stand-in tokenizer that implements apply_chat_template"""
    def apply_chat_template(self, messages, tokenize=False):
        """
        Converts messages to a formatted string.
        messages is a list of dicts with 'role' and 'content' keys.
        """
        formatted_parts = []
        for msg in messages:
            role = msg['role']
            content = msg['content']
            formatted_parts.append(f"[{role}]: {content}")
        return "\n".join(formatted_parts)

# Create a mock tokenizer instance
tokenizer = MockTokenizer()

# Define ARGS with the tokenizer parameter
ARGS = {
    'tokenizer': tokenizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
reward_code_correctness Ran
ran, honoured the contract we drafted
BDML-lab/ReNIO/grpo_train.py
code served (permissive licence) · get_code("96924b6c34b8b483")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 json
import torch

# Define minimal test data
completions = [
    # Completion 1: valid code with thinking tags
    "<think>Let me solve this step by step</think>\nHere's the solution:\n```python\nimport sys\nfor line in sys.stdin:\n    print(line.strip())\n```\nThis reads input and prints it.",
    
    # Completion 2: valid code without thinking tags
    "```python\nprint('hello world')\n```",
]

test_cases = [
    # Test case 1: JSON string with inputs and outputs
    json.dumps({
        "inputs": ["test input", "another line"],
        "outputs": ["test input\n", "another line\n"]
    }),
    
    # Test case 2: JSON string with simple inputs/outputs
    json.dumps({
        "inputs": [""],
        "outputs": ["hello world\n"]
    }),
]

ARGS = {
    "completions": completions,
    "test_cases": test_cases,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
strip_thinking_content Ran
ran; our contract draft was wrong, not the code
BDML-lab/ReNIO/eval/evaluate_code.py
code served (permissive licence) · get_code("9f8bd0add2c569dc")
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 str. 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 re

def strip_thinking_content(text: str) -> str:
    """Strip thinking/reasoning content from model output."""
    text = re.sub('<think>.*?</think>', '', text, flags=re.DOTALL)
    text = re.sub('<\\|begin_of_thought\\|>.*?<\\|end_of_thought\\|>', '', text, flags=re.DOTALL)
    return text.strip()

# Test inputs with thinking content that should be stripped
test_text_1 = "Hello <think>this is internal reasoning</think> world"
test_text_2 = "Start <|begin_of_thought|>some complex thought process\nacross multiple lines</|end_of_thought|> end"
test_text_3 = "Plain text with no thinking content"
test_text_4 = "<think>only thinking</think>"
test_text_5 = "Multiple <think>first thought</think> and <|begin_of_thought|>second thought</|end_of_thought|> parts"

ARGS = {
    "text": test_text_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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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
extract_boxed_answer 5 other papers
3 dated earlier, 2 later
2601.18734 (2026-01)
Self-Distilled Reasoner: On-Policy Self-Distillation for Large Language Models
2605.05040 (2026-05)
Preference-Based Self-Distillation: Beyond KL Matching via Reward Regularization
2605.21606 (2026-05)
When Are Teacher Tokens Reliable? Position-Weighted On-Policy Self-Distillation for Reasoning
and 2 more not named here
extract_boxed_answer 3 other papers
2 dated earlier, 1 later
2601.18734 (2026-01)
Self-Distilled Reasoner: On-Policy Self-Distillation for Large Language Models
2605.09548 (2026-05)
Crosslingual On-Policy Self-Distillation for Multilingual Reasoning
2608.27448 (2026-08)
TTPO: Test-Time Policy Optimization
make_format_fn 1 other paper
1 dated earlier
2601.18734 (2026-01)
Self-Distilled Reasoner: On-Policy Self-Distillation for Large Language Models

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-23.

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 distillation (OPD) improves LLM reasoning by training a student model on its own generated outputs, but standard OPD treats all student-generated outputs (SGOs) equally regardless of their informativeness. We observe a consistent asymmetry in controlled filtering experiments: in both OPD and on-policy self distillation (OPSD), training only on incorrect SGOs outperforms training only on correct ones. Our further analysis suggests that models trained on correctonly SGOs tend to generate shorter reasoning traces and show weaker reflection behavior, while incorrect SGOs better preserve exploratory reasoning near the model's capability boundary. To exploit this signal without requiring full answer-containing rollouts, we introduce ReNIO, which Reweights Negative trajectory Importance for LLM On-policy distillation. By using the student-to-teacher probability ratio, ReNIO identifies pivotal tokens leading to wrong reasoning traces and aggregates their information into a normalized sample weight, inherently assigning larger weights to likely negative trajectories without observing the correctness of final-answer. Since Re-NIO only uses prefix-conditioned token probabilities, it preserves OPD's prefix training advantage over full-rollout reinforcement learning. Across both mathematical reasoning and code generation tasks, ReNIO improves both OPD and OPSD, with representative relative gains of up to 8.90% for Qwen3-1.7B and 10.00% for R1-Distill-Qwen-7B on mathematical reasoning benchmarks. Code repo: https://github.com/BDML-lab/ReNIO.

For agents

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

get_harvested_code_for_paper("2606.23104")
get_code_for_paper("2606.23104")
have("2606.23104")

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

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

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

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

Connect an agent — have() is free.