SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.06903 · 2024

Semi-Supervised Reward Modeling via Iterative Self-Training

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2409.06903.json · badge: /api/ran/2409.06903.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
RLHFlow/RLHF-Reward-Modeling canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_scores_per_section Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/useful_code/eval_reward_bench_bt.py
code served (permissive licence) · get_code("af2be95726bb445c")
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 numpy as np

# Analyze the function to understand what parameters it needs:
# 1. example_counts: dict mapping test names to counts
# 2. subset_mapping: dict mapping section names to lists of test names
# 3. metrics: dict mapping test names to metric scores

# Create example_counts - maps test identifiers to example counts
example_counts = {
    "test_a": 100,
    "test_b": 50,
    "test_c": 75,
    "test_d": 25,
}

# Create subset_mapping - maps sections to lists of tests
subset_mapping = {
    "section_1": ["test_a", "test_b"],
    "section_2": ["test_c", "test_d"],
    "section_3": ["test_a", "test_c"],
}

# Create metrics - maps test names to metric scores (between 0 and 1)
metrics = {
    "test_a": 0.85,
    "test_b": 0.92,
    "test_c": 0.78,
    "test_d": 0.88,
}

ARGS = {
    "example_counts": example_counts,
    "subset_mapping": subset_mapping,
    "metrics": metrics,
}
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 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
calculate_scores_per_section Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/armo-rm/stage-2_train.py
code served (permissive licence) · get_code("d9c128f1ad102f62")
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 numpy as np

# Construct valid arguments for calculate_scores_per_section

# example_counts: dict mapping test names to example counts
example_counts = {
    "test_a": 100,
    "test_b": 150,
    "test_c": 200,
    "test_d": 75,
}

# subset_mapping: dict mapping section names to lists of test names
subset_mapping = {
    "section_1": ["test_a", "test_b"],
    "section_2": ["test_c", "test_d"],
    "section_3": ["test_a", "test_c"],
}

# metrics: dict mapping test names to metric scores (normalized between 0 and 1)
metrics = {
    "test_a": 0.85,
    "test_b": 0.92,
    "test_c": 0.78,
    "test_d": 0.88,
}

ARGS = {
    "example_counts": example_counts,
    "subset_mapping": subset_mapping,
    "metrics": metrics,
}
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 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
chat_completion_openai Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/decision_tree/collect_llm_preferences.py
code served (permissive licence) · get_code("f8f5b369acc5168f")
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 Mock. 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 unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock OpenAI client
mock_client = Mock()

# Create a mock response object that has the structure expected
mock_response = Mock()
mock_response.choices = [Mock()]
mock_response.choices[0].message = Mock()
mock_response.choices[0].message.content = "This is a test response from the mock API."

# Configure the mock client to return our mock response
mock_client.chat = Mock()
mock_client.chat.completions = Mock()
mock_client.chat.completions.create = Mock(return_value=mock_response)

# Define arguments
ARGS = {
    'client': mock_client,
    'model': 'gpt-4',
    'request': 'What is the capital of France?',
    'max_tokens': 100
}
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 Mock — a Mock 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
chat_completion_together Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/decision_tree/collect_llm_preferences.py
code served (permissive licence) · get_code("b2da3df8c4cfa9a9")
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 Mock. 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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock client that simulates Together API behavior
mock_client = Mock()

# Create a mock response object
mock_response = Mock()
mock_response.choices = [Mock()]
mock_response.choices[0].message = Mock()
mock_response.choices[0].message.content = "This is a test response from the model."

# Configure the mock client to return our mock response
mock_client.chat = Mock()
mock_client.chat.completions = Mock()
mock_client.chat.completions.create = Mock(return_value=mock_response)

# Define arguments for the function
ARGS = {
    'client': mock_client,
    'model': 'meta-llama/Llama-2-7b-chat-hf',
    'request': 'What is the capital of France?',
    'max_tokens': 256
}
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 Mock — a Mock 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
compute_metrics Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/bradley-terry-rm/gemma_2B_rm.py
code served (permissive licence) · get_code("23a0bca594cfbdcb")
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 numpy as np
from types import SimpleNamespace

# Create eval_pred object with predictions attribute
# The function expects predictions to be indexable with [0] and [1]
# Each should be an array that can be compared element-wise

pos_predictions_scores = np.array([0.8, 0.6, 0.9, 0.7])
neg_predictions_scores = np.array([0.3, 0.5, 0.4, 0.2])

eval_pred = SimpleNamespace(
    predictions=[pos_predictions_scores, neg_predictions_scores]
)

ARGS = {
    'eval_pred': eval_pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
convert_to_chat_format Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/decision_tree/get_embeddings.py
code served (permissive licence) · get_code("3462cb5c25c31912")
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

torch.manual_seed(0)

# The function takes a prompt string and a response string
# It parses the prompt for multi-turn conversations and constructs a chat format

# Test case 1: Simple single-turn prompt
prompt_simple = "What is machine learning?"
response_simple = "Machine learning is a subset of artificial intelligence."

# Test case 2: Multi-turn prompt with <extra_id_1> token
prompt_multi = "Hello there\n<extra_id_1>Assistant\nHi, how can I help?\n<extra_id_1>User\nWhat is AI?"
response_multi = "AI stands for Artificial Intelligence."

ARGS = {
    "prompt": prompt_simple,
    "response": response_simple
}
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
eval_reward_bench Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/armo-rm/stage-2_train.py
code served (permissive licence) · get_code("307a0a74a4fcdc2e")
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 pandas as pd
import numpy as np

# Create a minimal DataFrame that satisfies the eval_reward_bench function
# The function expects a DataFrame with 'subset' column and a 'correct' column (by default)

# All the subset names that will be used
all_subsets = [
    'alpacaeval-easy', 'alpacaeval-length', 'alpacaeval-hard', 
    'mt-bench-easy', 'mt-bench-med', 'mt-bench-hard',
    'llmbar-natural', 'llmbar-adver-neighbor', 'llmbar-adver-GPTInst', 
    'llmbar-adver-GPTOut', 'llmbar-adver-manual',
    'refusals-dangerous', 'refusals-offensive', 
    'xstest-should-refuse', 'xstest-should-respond', 'donotanswer',
    'math-prm', 'hep-cpp', 'hep-go', 'hep-java', 'hep-js', 'hep-python', 'hep-rust'
]

# Create example counts mapping
example_counts_map = {
    'alpacaeval-easy': 100, 'alpacaeval-length': 95, 'alpacaeval-hard': 95,
    'mt-bench-easy': 28, 'mt-bench-med': 40, 'mt-bench-hard': 37,
    'math-prm': 984, 'refusals-dangerous': 100, 'refusals-offensive': 100,
    'llmbar-natural': 100, 'llmbar-adver-neighbor': 134, 'llmbar-adver-GPTInst': 92,
    'llmbar-adver-GPTOut': 47, 'llmbar-adver-manual': 46,
    'xstest-should-refuse': 250, 'xstest-should-respond': 154, 'donotanswer': 136,
    'hep-cpp': 164, 'hep-go': 164, 'hep-java': 164, 'hep-js': 164,
    'hep-python': 164, 'hep-rust': 164
}

# Build a DataFrame with rows for each subset
rows = []
for subset in all_subsets:
    count = example_counts_map.get(subset, 10)
    # Create random binary correctness labels
    for i in range(count):
        rows.append({'subset': subset, 'correct': np.random.randint(0, 2)})

df_examples = pd.DataFrame(rows)

ARGS = {
    'df_examples': df_examples,
    'acc_column': 'correct'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
find_proper_verbosity_penalties Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/armo-rm/stage-2_train.py
code served (permissive licence) · get_code("0a86528ef75096e8")
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 numpy as np

# Construct a small cluster_V matrix
# The function expects shape (n_clusters, K) where K is number of dimensions
# We'll create 5 clusters with 4 dimensions
np.random.seed(0)
cluster_V = np.random.randn(5, 4).astype(np.float64)

# Define all parameters
ARGS = {
    'cluster_V': cluster_V,
    'verbosity_dim': 0,
    'corr_threshold': 0.028
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
find_token_for_gating Ran
ran; our contract draft was wrong, not the code
RLHFlow/RLHF-Reward-Modeling/armo-rm/stage-2_prepare.py
code served (permissive licence) · get_code("0d1671f0a8c16a44")
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.

# The function finds the last occurrence of a token pattern in a list
# Parameters:
# - lst: a list that should contain the token_pattern somewhere
# - model_family: a string key into token_patterns dict

# Looking at the function:
# 1. It retrieves token_pattern from the token_patterns dict using model_family
# 2. It searches through lst for the pattern
# 3. lst needs to be a list (or list-like) that supports slicing and equality comparison

# For llama3, the pattern is [128009, 128006, 78191, 128007, 271] (length 5)
# For gemma2, the pattern is [107, 108, 106, 2516, 108] (length 5)

# Create a list that contains the llama3 pattern so the function can find it
lst_with_pattern = [100, 200, 300, 128009, 128006, 78191, 128007, 271, 400, 500]

ARGS = {
    'lst': lst_with_pattern,
    'model_family': 'llama3'
}
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 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

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, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 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
calculate_scores_per_section 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
calculate_scores_per_section 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
chat_completion_openai 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
chat_completion_together 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
compute_metrics 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
convert_to_chat_format 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
eval_reward_bench 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
find_proper_verbosity_penalties 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts
find_token_for_gating 1 other paper
1 dated earlier
2406.12845 (2024-06)
Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts

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

Reward models (RM) capture the values and preferences of humans and play a central role in Reinforcement Learning with Human Feedback (RLHF) to align pretrained large language models (LLMs). Traditionally, training these models relies on extensive human-annotated preference data, which poses significant challenges in terms of scalability and cost. To overcome these limitations, we propose Semi-Supervised Reward Modeling (SSRM), an approach that enhances RM training using unlabeled data. Given an unlabeled dataset, SSRM involves three key iterative steps: pseudo-labeling unlabeled examples, selecting high-confidence examples through a confidence threshold, and supervised finetuning on the refined dataset. Across extensive experiments on various model configurations, we demonstrate that SSRM significantly improves reward models without incurring additional labeling costs. Notably, SSRM can achieve performance comparable to models trained entirely on labeled data of equivalent volumes. Overall, SSRM substantially reduces the dependency on large volumes of human-annotated data, thereby decreasing the overall cost and time involved in training effective reward models.

For agents

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

get_harvested_code_for_paper("2409.06903")
get_code_for_paper("2409.06903")
have("2409.06903")

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

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

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

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

Connect an agent — have() is free.