SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.08067 · ICML · 2025

Reward-Augmented Data Enhances Direct Preference Alignment of LLMs

Yufeng Zhang, Zhaoran Wang, Tao Sun, Liyu Chen, Shenao Zhang, Boyi Liu, Zhihan Liu, Yingxiang Yang, Yongfei Liu

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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2410.08067.json · badge: /api/ran/2410.08067.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
shenao-zhang/reward-augmented-preference canonical (classifier label)
classifier basis: classifier_2025
6 ran · 0 no recorded run
FunctionStatusWhere it lives
add_neg_goal Ran
ran; our contract draft was wrong, not the code
shenao-zhang/reward-augmented-preference/scripts/reward_augmentation.py
code served (permissive licence) · get_code("34ad32ae863a3812")
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) 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

torch.manual_seed(0)

# Construct a minimal example dict that satisfies the function's requirements
example = {
    'overall_score_rejected': 7.5,
    'rejected': [
        {'role': 'user', 'content': 'What is 2+2?'},
        {'role': 'assistant', 'content': 'The answer is 4.'}
    ],
    'chosen': [
        {'role': 'user', 'content': 'Explain quantum mechanics.'},
        {'role': 'assistant', 'content': 'Quantum mechanics is the study of particles at atomic scales.'}
    ]
}

ARGS = {
    'example': example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
add_pos_goal Ran
ran; our contract draft was wrong, not the code
shenao-zhang/reward-augmented-preference/scripts/reward_augmentation.py
code served (permissive licence) · get_code("0674aa408dbedf57")
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) 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

torch.manual_seed(0)

# Construct a valid example dict for add_pos_goal
example = {
    'overall_score_chosen': 8.5,
    'chosen': [
        {'role': 'user', 'content': 'What is 2+2?'},
        {'role': 'assistant', 'content': 'The answer is 4.'}
    ],
    'rejected': [
        {'role': 'user', 'content': 'What is 2+2?'},
        {'role': 'assistant', 'content': 'The answer is 5.'}
    ]
}

ARGS = {
    'example': example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
format_prompt Ran
ran; our contract draft was wrong, not the code
shenao-zhang/reward-augmented-preference/scripts/preprocess.py
code served (permissive licence) · get_code("1290bdbfd3cfa6e5")
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) 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 hashlib
import random
import time

# Set seed for reproducibility
random.seed(42)

# Create a minimal completion object structure
def create_completion(overall_score, response, model, helpfulness, honesty, instruction_following, truthfulness):
    return {
        'overall_score': overall_score,
        'response': response,
        'model': model,
        'annotations': {
            'helpfulness': {'Rating': str(helpfulness)},
            'honesty': {'Rating': str(honesty)},
            'instruction_following': {'Rating': str(instruction_following)},
            'truthfulness': {'Rating': str(truthfulness)}
        }
    }

# Create sample data
completions = [
    create_completion(8.5, "This is a helpful response.", "model_a", 8.0, 7.5, 8.2, 7.8),
    create_completion(7.2, "This is another response.", "model_b", 7.0, 7.2, 7.1, 7.3),
    create_completion(9.1, "This is an excellent response.", "model_c", 9.0, 8.9, 9.2, 8.8),
]

x = {
    'instruction': 'What is the capital of France?',
    'completions': completions
}

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
get_pairwise_completions Ran
ran; our contract draft was wrong, not the code
shenao-zhang/reward-augmented-preference/scripts/preprocess.py
code served (permissive licence) · get_code("2f76390e5e689883")
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) and returned tuple, ndim 2, 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 random
import time

# Construct valid completions data structure
completions = [
    {
        'overall_score': 8.5,
        'response': 'This is a helpful response.',
        'model': 'model_a',
        'annotations': {
            'helpfulness': {'Rating': '8'},
            'honesty': {'Rating': '9'},
            'instruction_following': {'Rating': '8'},
            'truthfulness': {'Rating': '9'}
        }
    },
    {
        'overall_score': 7.2,
        'response': 'This is another response.',
        'model': 'model_b',
        'annotations': {
            'helpfulness': {'Rating': '7'},
            'honesty': {'Rating': '7'},
            'instruction_following': {'Rating': '7'},
            'truthfulness': {'Rating': '7'}
        }
    },
    {
        'overall_score': 6.5,
        'response': 'Yet another response.',
        'model': 'model_c',
        'annotations': {
            'helpfulness': {'Rating': '6'},
            'honesty': {'Rating': '6'},
            'instruction_following': {'Rating': '7'},
            'truthfulness': {'Rating': '6'}
        }
    }
]

ARGS = {
    'completions': completions
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 2, 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
remove_last_step_for_rl Ran
ran; our contract draft was wrong, not the code
shenao-zhang/reward-augmented-preference/scripts/preprocess.py
code served (permissive licence) · get_code("c5e24c10f8edc3f7")
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) 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

torch.manual_seed(0)

# The function expects an 'example' dict with a 'messages' key
# that contains a list. It removes the last element from that list.

example = {
    'messages': [
        {'role': 'user', 'content': 'Hello'},
        {'role': 'assistant', 'content': 'Hi there'},
        {'role': 'user', 'content': 'How are you?'},
    ]
}

ARGS = {
    'example': example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
system_prompt Ran
ran; our contract draft was wrong, not the code
shenao-zhang/reward-augmented-preference/scripts/reward_augmentation.py
code served (permissive licence) · get_code("636da2fc25ece4cf")
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) 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

torch.manual_seed(0)

# Analyze the function:
# - overall_score is used with int() conversion and comparison
# - It's formatted into an f-string
# - The function accepts numeric types (int or float)

# Create valid arguments
overall_score_value = 7.5

ARGS = {
    "overall_score": overall_score_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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

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, 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 6 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-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

Preference alignment in Large Language Models (LLMs) has significantly improved their ability to adhere to human instructions and intentions. However, existing direct alignment algorithms primarily focus on relative preferences and often overlook the qualitative aspects of responses, despite having access to preference data that includes reward scores from judge models during AI feedback. Striving to maximize the implicit reward gap between the chosen and the slightly inferior rejected responses can cause overfitting and unnecessary unlearning of the high-quality rejected responses. The unawareness of the reward scores also drives the LLM to indiscriminately favor the low-quality chosen responses and fail to generalize to optimal responses that are sparse in data. To overcome these shortcomings, our study introduces reward-conditioned LLM policies that discern and learn from the entire spectrum of response quality within the dataset, helping extrapolate to more optimal regions. We propose an effective yet simple data relabeling method that conditions the preference pairs on quality scores to construct a reward-augmented dataset. The experiments across various benchmarks and diverse models demonstrate that our approach consistently boosts DPO by a considerable margin. Through comprehensive ablation studies, we demonstrate that our method not only maximizes the utility of preference data but also mitigates the issue of unlearning, demonstrating its broad effectiveness beyond mere data expansion. Our code is available at https://github.com/shenao-zhang/ reward-augmented-preference.

For agents

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

get_harvested_code_for_paper("2410.08067")
get_code_for_paper("2410.08067")
have("2410.08067")

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

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

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

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

Connect an agent — have() is free.