SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.02387 · ICLR · 2025

RM-R1: Reward Modeling as Reasoning

Tong Zhang, Yu Wang, Yu Zhang, Cheng Qian, Hanghang Tong, Heng Ji, Ziqi Wang, Jin Bowen, Hongru Wang, Gaotang Li, Xiusi Chen, Denghui Zhang

arXiv · PDF · Open in the Atlas

Code that ran

1 of 1 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2505.02387.json · badge: /api/ran/2505.02387.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
rm-r1-uiuc/rm-r1 canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
PRMLoss Ran
ran on a synthesized input · constructed an object; no result was computed
rm-r1-uiuc/rm-r1/rm_r1/OpenRLHF/openrlhf/models/loss.py
code served (permissive licence) · get_code("292466df6186d9f5")
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 an instance of its own class, PRMLoss: the run constructed the object and did not call it, so no result was computed. 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)

# Define the PRMLoss class
class PRMLoss(nn.Module):
    """
    Process Reward Model Loss
    """

    def __init__(self, placeholder_token_id: int, reward_token_ids=None):
        super().__init__()
        self.IGNORE_INDEX = -100
        self.loss = nn.CrossEntropyLoss(ignore_index=self.IGNORE_INDEX)
        self.placeholder_token_id = placeholder_token_id
        self.reward_token_ids = reward_token_ids

    def forward(self, inputs, logits, labels, *, return_acc=False):
        placeholder_mask = inputs == self.placeholder_token_id
        logits = logits[placeholder_mask]
        labels = labels[placeholder_mask]
        if labels.dtype == torch.float:
            assert len(self.reward_token_ids) == 2, 'reward_token_ids should have 2 tokens for soft labels'
            logits = logits[..., self.reward_token_ids]
            positive_labels = labels.to(logits.dtype)
            negative_labels = 1 - positive_labels
            negative_labels[positive_labels != -100] = 1 - positive_labels[positive_labels != -100]
            labels = torch.stack([positive_labels, negative_labels], dim=-1)
        elif self.reward_token_ids is not None:
            logits = logits[..., self.reward_token_ids]
            for i, token in enumerate(self.reward_token_ids):
                labels = torch.where(labels == token, i, labels)
        loss = self.loss(logits, labels)
        if not return_acc:
            return loss
        if labels.dtype == logits.dtype:
            labels = labels.argmax(dim=-1)
        acc = (logits.argmax(dim=-1) == labels).float().mean()
        return (loss, acc)

# Create test data
placeholder_token_id = 5
reward_token_ids = [10, 11]

# Create inputs tensor with some placeholder tokens
inputs = torch.tensor([1, 2, 5, 3, 5, 4], dtype=torch.long)

# Create logits tensor (batch_size x seq_len x vocab_size)
# We need shape that allows indexing with placeholder_mask
logits = torch.randn(6, 20, dtype=torch.float)

# Create labels tensor with matching shape before masking
labels = torch.tensor([0, 1, 0, 1, 0, 1], dtype=torch.long)

ARGS = {
    "placeholder_token_id": placeholder_token_id,
    "reward_token_ids": reward_token_ids,
}
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 PRMLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PRMLoss 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 1 samples lifted from this paper's linked repositories, 1 carry a function identity and 0 do not. Of the 1 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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
PRMLoss
brick of this paper's assembly: entry
1 other paper
1 dated earlier
2502.04463 (2025-02)
Training Language Models to Reason Efficiently

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

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 modeling is essential for aligning large language models with human preferences through reinforcement learning. To provide accurate reward signals, a reward model (RM) should stimulate deep thinking and conduct interpretable reasoning before assigning a score or a judgment. Inspired by recent advances of long chain-of-thought on reasoning-intensive tasks, we hypothesize and validate that integrating reasoning into reward modeling significantly enhances RM's interpretability and performance. We introduce a new class of generative reward models, Reasoning Reward Models (REASRMS), which formulate reward modeling as a reasoning task. We propose a reasoning-oriented training pipeline and train a family of REASRMS, RM-R1. RM-R1 features a chain-of-rubrics (CoR) mechanism -self-generating sample-level chat rubrics or math/code solutions, and evaluating candidate responses against them. The training of RM-R1 consists of two key stages: (1) distillation of high-quality reasoning chains and (2) reinforcement learning with verifiable rewards. Empirically, our models achieve superior performance across three reward model benchmarks on average, outperforming much larger open-weight models (e.g., INF-ORM-Llama3.1-70B) and proprietary ones (e.g., GPT-4o) by up to 4.9%. Beyond final performance, we perform thorough analyses to understand the key ingredients of successful REASRM training 1 .

For agents

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

get_harvested_code_for_paper("2505.02387")
get_code_for_paper("2505.02387")
have("2505.02387")

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

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

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

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

Connect an agent — have() is free.