SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.07396 · 2026

Rubric-based On-policy Distillation

Dan Zhang, Xiang Wang, Tat-Seng Chua, Junfeng Fang, Houcheng Jiang, Mingyang Song, Gengsheng Li, Mao Zheng, Haiyun Guo, Zhepei Hong

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 6 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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.07396.json · badge: /api/ran/2605.07396.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
Peregrine123/ROPD_official canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
build_teacher_input_messages Ran
ran; our contract draft was wrong, not the code
Peregrine123/ROPD_official/algo/ropd_prompts.py
code served (permissive licence) · get_code("b80c1ca29ed88414")
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 torch
import numpy as np
from collections.abc import Mapping

torch.manual_seed(0)

# Test case 1: string input
raw_prompt_string = "Hello, what is the capital of France?"

# Test case 2: list of message dicts
raw_prompt_messages = [
    {'role': 'user', 'content': 'What is 2+2?'},
    {'role': 'assistant', 'content': 'The answer is 4.'},
    {'role': 'system', 'content': 'You are a helpful assistant.'},
]

# Test case 3: messages with complex content
raw_prompt_complex = [
    {'role': 'user', 'content': [{'type': 'text', 'text': 'Hello'}, {'type': 'image', 'url': 'test.jpg'}]},
    {'role': 'assistant', 'content': {'text': 'Response here'}},
]

# Test case 4: tuple of messages
raw_prompt_tuple = (
    {'role': 'developer', 'content': 'System prompt'},
    {'role': 'user', 'content': 'User query'},
)

# Test case 5: numpy array converted to list
raw_prompt_numpy = np.array([
    {'role': 'user', 'content': 'Query'},
    {'role': 'assistant', 'content': 'Answer'},
])

# Test case 6: messages with None content
raw_prompt_none_content = [
    {'role': 'user', 'content': None},
    {'role': 'assistant', 'content': 'Response'},
]

# Test case 7: messages with list content including dicts with text
raw_prompt_list_content = [
    {'role': 'user', 'content': [{'text': 'Part 1'}, {'text': 'Part 2'}]},
]

# Test case 8: messages with dict content (non-text mapping)
raw_prompt_dict_content = [
    {'role': 'user', 'content': {'key': 'value', 'nested': {'data': 123}}},
]

# Use the simplest case for ARGS
ARGS = {
    'raw_prompt': raw_prompt_string,
}
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 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
canonicalize_raw_prompt Ran
ran; our contract draft was wrong, not the code
Peregrine123/ROPD_official/algo/ropd_pipeline.py
code served (permissive licence) · get_code("49477cc9b0a9e0ef")
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 json
from collections.abc import Mapping

torch.manual_seed(0)

# Test case 1: simple string
test_string = "Hello, world!"

# Test case 2: list of dicts (message format)
test_messages = [
    {"role": "user", "content": "Hello"},
    {"role": "assistant", "content": "Hi there!"}
]

# Test case 3: tuple of dicts
test_tuple_messages = (
    {"role": "system", "content": "You are helpful"},
    {"role": "user", "content": "What is 2+2?"}
)

# Test case 4: tensor that can be converted to list
test_tensor = torch.tensor([[1, 2], [3, 4]])

ARGS = {
    "raw_prompt": test_string
}
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
coerce_ropd_teacher_answer_count Ran
ran, honoured the contract we drafted
Peregrine123/ROPD_official/algo/ropd/client.py
code served (permissive licence) · get_code("25c935aa707eeed2")
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 int, ndim 0, dtype family int, 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 torch

ARGS = {
    'value': 2,
    'default': 1,
    'field_name': 'ropd.teacher_answer_count'
}
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 int, ndim 0, dtype family int, 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
extract_question_text Ran
ran; our contract draft was wrong, not the code
Peregrine123/ROPD_official/algo/ropd_prompts.py
code served (permissive licence) · get_code("af368cdca14d2efa")
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 numpy as np
from collections import OrderedDict

torch.manual_seed(0)

# Test case 1: string input
string_input = "What is the meaning of life?"

# Test case 2: list of message dicts (conversation format)
list_input = [
    {"role": "user", "content": "Hello, how are you?"},
    {"role": "assistant", "content": "I'm doing well, thank you!"},
    {"role": "user", "content": "Can you help me?"}
]

# Test case 3: single message in list
single_message_input = [
    {"role": "user", "content": "What is 2+2?"}
]

# Test case 4: message with complex content (list of dicts)
complex_content_input = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "First part"},
            {"type": "input_text", "text": "Second part"},
            {"key": "value"}
        ]
    }
]

# Test case 5: tuple input (will be converted to list)
tuple_input = (
    {"role": "user", "content": "Question from tuple"},
)

# Test case 6: numpy array that can be converted to list
numpy_input = np.array([
    {"role": "system", "content": "You are helpful"},
    {"role": "user", "content": "Ask me something"}
])

# Test case 7: message with content as Mapping with 'text' key
mapping_content_input = [
    {
        "role": "user",
        "content": {"text": "  Content with spaces  "}
    }
]

# Use the string input as the main test case
ARGS = {
    "raw_prompt": string_input
}
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 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
hash_canonical_raw_prompt Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Peregrine123/ROPD_official/algo/ropd_teacher_index.py
code served (permissive licence) · get_code("d7b8eb099bb9cdbd")
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 hashlib
from typing import Any

# Mock the canonicalize_raw_prompt function since it's imported from algo.ropd_pipeline
# We need to patch it so the function can execute
class MockRopdPipeline:
    @staticmethod
    def canonicalize_raw_prompt(raw_prompt: Any) -> str:
        # Convert any input to a canonical string representation
        if isinstance(raw_prompt, str):
            return raw_prompt
        elif isinstance(raw_prompt, dict):
            return str(sorted(raw_prompt.items()))
        elif isinstance(raw_prompt, (list, tuple)):
            return str(raw_prompt)
        else:
            return str(raw_prompt)

# Patch the import
import sys
from unittest.mock import MagicMock

algo_module = MagicMock()
algo_module.ropd_pipeline.canonicalize_raw_prompt = MockRopdPipeline.canonicalize_raw_prompt
sys.modules['algo'] = algo_module
sys.modules['algo.ropd_pipeline'] = algo_module.ropd_pipeline

# Now define valid arguments for hash_canonical_raw_prompt
ARGS = {
    "raw_prompt": "What is the meaning of life?"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
algo, 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
hash_teacher_answer Ran
ran; our contract draft was wrong, not the code
Peregrine123/ROPD_official/algo/ropd_teacher_index.py
code served (permissive licence) · get_code("f76e506f5bafd596")
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 hashlib

def _sha256_text(text: str) -> str:
    return hashlib.sha256(text.encode('utf-8')).hexdigest()

def hash_teacher_answer(teacher_answer: str) -> str:
    return _sha256_text(teacher_answer)

ARGS = {
    "teacher_answer": "This is the correct answer to the question."
}
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
hash_teacher_answers Ran
ran; our contract draft was wrong, not the code
Peregrine123/ROPD_official/algo/ropd_teacher_index.py
code served (permissive licence) · get_code("a706504a9c51b4d3")
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 tuple, 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 hashlib

def _sha256_text(text: str) -> str:
    return hashlib.sha256(text.encode('utf-8')).hexdigest()

def hash_teacher_answer(teacher_answer: str) -> str:
    return _sha256_text(teacher_answer)

def hash_teacher_answers(teacher_answers: list[str] | tuple[str, ...]) -> tuple[str, ...]:
    return tuple((hash_teacher_answer(answer) for answer in teacher_answers))

ARGS = {
    "teacher_answers": ["answer1", "answer2", "answer3"]
}
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 tuple, ndim 1, dtype family float — a tuple 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
build_rubricator_prompt Not yet run
unverified (harvested, no recorded run)
Peregrine123/ROPD_official/algo/ropd_prompts.py
code served (permissive licence) · get_code("043b3c1e498b6fcc")
How it ran

no invocation recorded.

normalize_raw_prompt Not yet run
unverified (harvested, no recorded run)
Peregrine123/ROPD_official/algo/ropd_pipeline.py
code served (permissive licence) · get_code("850d3d6f073f8eb9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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

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) is a powerful paradigm for model alignment, yet its reliance on teacher logits restricts its application to white-box scenarios. We contend that structured semantic rubrics can serve as a scalable alternative to teacher logits, enabling OPD using only teacher-generated responses. To prove it, we introduce ROPD, a simple yet foundational framework for rubric-based OPD. Specifically, ROPD induces prompt-specific rubrics from teacher-student contrasts, and then utilizes these rubrics to score the student rollouts for on-policy optimization. Empirically, ROPD outperforms the advanced logit-based OPD methods across most scenarios, and achieving up to a 10× gain in sample efficiency. These results position rubric-based OPD as a flexible, black-box-compatible alternative to the prevailing logit-based OPD, offering a simple yet strong baseline for scalable distillation across proprietary and open-source LLMs. Code is available at https://github.com/Peregrine123/ROPD_official. Figure 1: ROPD efficiency and reasoning performance. (a) Training dynamics averaged over four math benchmarks (i.e., AIME 24/25 [1, 2] and HMMT 25 Feb./Nov. [3]). ROPD achieves a 10× sample efficiency boost. (b) Comparative results. For fair comparison, all models are trained on DAPO-Math-17K [4] using Qwen3-4B [5] (student) and Qwen3-30B-A3B [5] (teacher). See Section 3.1 for comprehensive experimental settings.

For agents

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

get_harvested_code_for_paper("2605.07396")
get_code_for_paper("2605.07396")
have("2605.07396")

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

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

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

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

Connect an agent — have() is free.