SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.04474 · ICLR · 2025

DRPO: Efficient Reasoning via Decoupled Reward Policy Optimization

Yan Chen, Tianbao Yang, Gang Li, Ming Lin

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 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; 2 failures of our instrument; 0 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/2510.04474.json · badge: /api/ran/2510.04474.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
Optimization-AI/DRPO community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_policy_loss_drpo Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Optimization-AI/DRPO/verl/verl/trainer/ppo/core_algos.py
code served (permissive licence) · get_code("5c483e7c4f793a30")
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 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 types as _types

torch.manual_seed(0)

# Define masked_mean function that will be used
def masked_mean(values, mask, axis=None):
    """Compute mean of tensor with a masked values."""
    return (values * mask).sum(axis=axis) / mask.sum(axis=axis)

# Create verl_F namespace with masked_mean
verl_F = _types.SimpleNamespace(masked_mean=masked_mean)

# Setup tensor dimensions
batch_size = 2
response_length = 4
num_questions = 2
num_responses_per_question = 1

# Create tensors with appropriate shapes
old_log_prob = torch.randn(batch_size, response_length)
log_prob = torch.randn(batch_size, response_length)

# eos_mask: binary mask indicating end-of-sequence positions
eos_mask = torch.ones(batch_size, response_length)
eos_mask[:, -1] = 1  # Mark last position as EOS

# uid: unique identifiers for questions, one per response
uid = torch.tensor([0, 1], dtype=torch.long)

# seq_level_rewards: scalar reward per sequence
seq_level_rewards = torch.tensor([1.0, 0.0])

# Hyperparameters
delta = 0.01
beta = 0.5
tau = 1.0
Lambda = 0.95

ARGS = {
    'old_log_prob': old_log_prob,
    'log_prob': log_prob,
    'eos_mask': eos_mask,
    'uid': uid,
    'seq_level_rewards': seq_level_rewards,
    'delta': delta,
    'beta': beta,
    'tau': tau,
    'Lambda': Lambda,
    'kl_type': 'low_var_kl'
}
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 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
masked_mean Ran
ran; our contract draft was wrong, not the code
Optimization-AI/DRPO/verl/verl/trainer/ppo/core_algos.py
code served (permissive licence) · get_code("1ab358e6ebe32a98")
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 Tensor, ndim 0, dtype family float, 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
import numpy as np

torch.manual_seed(0)

# Create small tensors for masked_mean
values = torch.randn(2, 4)  # batch=2, dim=4
mask = torch.ones(2, 4)     # same shape as values, all ones (no masking)

# Set axis parameter (can be None, or an integer)
axis = None

ARGS = {
    "values": values,
    "mask": mask,
    "axis": axis
}
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 Tensor, ndim 0, dtype family float, 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 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 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 1 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
masked_mean
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 2 only as an assembly brick
2505.12366 (2025-05)
DisCO: Reinforcing Large Reasoning Models with Discriminative Constrained Optimization
2509.04784 (2025-09)
Post-training Large Language Models for Diverse High-Quality Responses

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

Recent large reasoning models (LRMs) driven by reinforcement learning algorithms (e.g., GRPO) have achieved remarkable performance on challenging reasoning tasks. However, these models suffer from overthinking, generating unnecessarily long and redundant reasoning even for simple questions, which substantially increases computational cost and response latency. While existing methods incorporate length rewards to GRPO to promote concise reasoning, they incur significant performance degradation. We identify the root cause: when rewards for correct but long rollouts are penalized, GRPO's group-relative advantage function can assign them negative advantages, actively discouraging valid reasoning. To overcome this, we propose Decoupled Reward Policy Optimization (DRPO), a novel framework that decouples the length-based learning signal of correct rollouts from incorrect ones. DRPO ensures that reward signals for correct rollouts are normalized solely within the positive group, shielding them from interference by negative samples. The DRPO's objective is grounded in integrating an optimized positive data distribution, which maximizes length-based rewards under a KL regularization, into a discriminative objective. We derive a closed-form solution for this distribution, enabling efficient computation of the objective and its gradients using only on-policy data and importance weighting. Of independent interest, this formulation is general and can incorporate other preference rewards of positive data beyond length. Experiments on mathematical reasoning tasks demonstrate DRPO's significant superiority over six efficient reasoning baselines. Notably, with a 1.5B model, our method achieves 77% length reduction with only 1.1% performance loss on simple questions like GSM8k dataset, while the followup baseline sacrifices 4.3% for 68% length reduction. The code is available at https://github.com/Optimization-AI/DRPO

For agents

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

get_harvested_code_for_paper("2510.04474")
get_code_for_paper("2510.04474")
have("2510.04474")

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

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

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

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

Connect an agent — have() is free.