SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.02795 · 2026

Rubrics to Tokens: Bridging Response-level Rubrics and Token-level Rewards in Instruction Following Tasks

Chao Ma, Pengfei Liu, Gang Yu, Yong Wu, Lyumanshan Ye, Yanzhao Zheng, Baohua Dong, Hangcheng Zhu, Ruohui Huang, Pengrui Lu, Zhentao Zhang, Yuanqiang Yu, and 3 more

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 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/2604.02795.json · badge: /api/ran/2604.02795.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
TURLEing/Rubrics-To-Tokens canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
filter_forward_args Ran
ran; our contract draft was wrong, not the code
TURLEing/Rubrics-To-Tokens/roll/models/func_providers.py
code served (permissive licence) · get_code("a063873313ec0a07")
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 dict. 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
import inspect

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, input_tensor, mask=None, labels=None):
        return self.linear(input_tensor)

model = SimpleModel()

forward_args = {
    "input_tensor": torch.randn(2, 4),
    "mask": torch.ones(2, 4),
    "labels": torch.randint(0, 3, (2,)),
    "extra_param": "this_should_be_filtered_out"
}

ARGS = {
    "model": model,
    "forward_args": forward_args
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
read_prompt_list Ran
ran; our contract draft was wrong, not the code
TURLEing/Rubrics-To-Tokens/Benchmark/IFBench/evaluation_lib.py
code served (permissive licence) · get_code("688320f8e08335ac")
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 dataclasses
import json
import tempfile
import os
from typing import Dict, Optional, Union

@dataclasses.dataclass
class InputExample:
    key: int
    instruction_id_list: list
    prompt: str
    kwargs: list

def read_prompt_list(input_jsonl_filename):
    """Read inputs from jsonl."""
    inputs = []
    with open(input_jsonl_filename, 'r') as f:
        for l in f:
            example = json.loads(l)
            inputs.append(InputExample(key=example['key'], instruction_id_list=example['instruction_id_list'], prompt=example['prompt'], kwargs=example['kwargs']))
    return inputs

# Create a temporary JSONL file with sample data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
temp_filename = temp_file.name

# Write sample data to the temporary file
sample_data = [
    {
        "key": 1,
        "instruction_id_list": ["inst_1", "inst_2"],
        "prompt": "What is 2+2?",
        "kwargs": [{"param1": "value1", "param2": 42}, {"param3": "value3", "param4": None}]
    },
    {
        "key": 2,
        "instruction_id_list": ["inst_3"],
        "prompt": "Explain recursion",
        "kwargs": [{"nested": "data", "count": 10}]
    }
]

for line in sample_data:
    temp_file.write(json.dumps(line) + '\n')

temp_file.close()

ARGS = {
    'input_jsonl_filename': temp_filename
}
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 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
split_into_sentences Ran
ran; our contract draft was wrong, not the code
TURLEing/Rubrics-To-Tokens/Benchmark/IFBench/instructions_util.py
code served (permissive licence) · get_code("a87fa9a878e94aa6")
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 re

def split_into_sentences(text):
    """Split the text into sentences.

    Args:
      text: A string that consists of more than or equal to one sentences.

    Returns:
      A list of strings where each string is a sentence.
    """
    _ALPHABETS = '([A-Za-z])'
    _PREFIXES = '(Mr|St|Mrs|Ms|Dr)[.]'
    _SUFFIXES = '(Inc|Ltd|Jr|Sr|Co)'
    _STARTERS = '(Mr|Mrs|Ms|Dr|Prof|Capt|Cpt|Lt|He\\s|She\\s|It\\s|They\\s|Their\\s|Our\\s|We\\s|But\\s|However\\s|That\\s|This\\s|Wherever)'
    _ACRONYMS = '([A-Z][.][A-Z][.](?:[A-Z][.])?)'
    _WEBSITES = '[.](com|net|org|io|gov|edu|me)'
    _DIGITS = '([0-9])'
    _MULTIPLE_DOTS = '\\.{2,}'
    
    text = ' ' + text + '  '
    text = text.replace('\n', ' ')
    text = re.sub(_PREFIXES, '\\1<prd>', text)
    text = re.sub(_WEBSITES, '<prd>\\1', text)
    text = re.sub(_DIGITS + '[.]' + _DIGITS, '\\1<prd>\\2', text)
    text = re.sub(_MULTIPLE_DOTS, lambda match: '<prd>' * len(match.group(0)) + '<stop>', text)
    if 'Ph.D' in text:
        text = text.replace('Ph.D.', 'Ph<prd>D<prd>')
    text = re.sub('\\s' + _ALPHABETS + '[.] ', ' \\1<prd> ', text)
    text = re.sub(_ACRONYMS + ' ' + _STARTERS, '\\1<stop> \\2', text)
    text = re.sub(_ALPHABETS + '[.]' + _ALPHABETS + '[.]' + _ALPHABETS + '[.]', '\\1<prd>\\2<prd>\\3<prd>', text)
    text = re.sub(_ALPHABETS + '[.]' + _ALPHABETS + '[.]', '\\1<prd>\\2<prd>', text)
    text = re.sub(' ' + _SUFFIXES + '[.] ' + _STARTERS, ' \\1<stop> \\2', text)
    text = re.sub(' ' + _SUFFIXES + '[.]', ' \\1<prd>', text)
    text = re.sub(' ' + _ALPHABETS + '[.]', ' \\1<prd>', text)
    if '"' in text:
        text = text.replace('."', '".')
    if '"' in text:
        text = text.replace('."', '".')
    if '!' in text:
        text = text.replace('!"', '"!')
    if '?' in text:
        text = text.replace('?"', '"?')
    text = text.replace('.', '.<stop>')
    text = text.replace('?', '?<stop>')
    text = text.replace('!', '!<stop>')
    text = text.replace('<prd>', '.')
    sentences = text.split('<stop>')
    sentences = [s.strip() for s in sentences]
    if sentences and (not sentences[-1]):
        sentences = sentences[:-1]
    return sentences


ARGS = {
    'text': 'Hello world. This is a test. Dr. Smith works at Google.com. What is your name? It is great!'
}
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 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
no_set_device_hook_post_init Not yet run
unverified (harvested, no recorded run)
TURLEing/Rubrics-To-Tokens/roll/models/trl_patches.py
code served (permissive licence) · get_code("414bb5321e52ac1b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 0 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
split_into_sentences 8 other papers
7 dated earlier, 1 the same month
2309.00071 (2023-09)
YaRN: Efficient Context Window Extension of Large Language Models
2311.07911 (2023-11)
Instruction-Following Evaluation for Large Language Models
2404.15846 (2024-04)
From Complex to Simple: Enhancing Multi-Constraint Complex Instruction Following Ability of Large Language Models
and 5 more not named here
filter_forward_args 2 other papers
2 dated earlier
2506.06122 (2025-06)
Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Library
2601.10477 (2026-01)
Urban Socio-Semantic Segmentation with Vision-Language Reasoning
no_set_device_hook_post_init 2 other papers
2 dated earlier
2506.06122 (2025-06)
Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Library
2601.10477 (2026-01)
Urban Socio-Semantic Segmentation with Vision-Language Reasoning
read_prompt_list 2 other papers
2 dated earlier
2025.emnlp-main.1010 (2025 (year only))
SAFENUDGE: Safeguarding Large Language Models in Real-time with Tunable Safety-Performance Trade-offs Warning: this article contains sensitive content
2505.19037 (2025-05)
Speech-IFEval: Evaluating Instruction-Following and Quantifying Catastrophic Forgetting in Speech-Aware 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-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

Rubric-based Reinforcement Learning (RL) has emerged as a promising approach for aligning Large Language Models (LLMs) with complex, open-domain instruction following tasks. However, existing methods predominantly rely on response-level rewards, introducing severe reward sparsity and reward ambiguity problems. To address these issues, we propose Rubrics to Tokens (RTT), a novel rubric-based RL framework that bridges coarse response-level scores and fine-grained token-level credit assignment. RTT introduces a Token-Level Relevance Discriminator to predict which tokens in the response are responsible for a specific constraint, and optimizes the policy model via RTT-GRPO, which integrates response-level and token-level advantages within a unified framework. Furthermore, we identify the Group Partitioning Problem when transitioning from one-dimensional, outcome-level reward to three-dimensional reward space in the token-level rubric-based RL, and propose a novel group normalization method, called Intra-sample Token Group Normalization, to accommodate this shift. Extensive experiments demonstrate that RTT consistently outperforms all baselines in both instruction-level and rubric-level accuracy across different models. We open-source RTT framework in https://github.com/TURLEing/Rubrics-To-Tokens.

For agents

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

get_harvested_code_for_paper("2604.02795")
get_code_for_paper("2604.02795")
have("2604.02795")

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

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

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

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

Connect an agent — have() is free.