SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.12366 · NeurIPS · 2025

DisCO: Reinforcing Large Reasoning Models with Discriminative Constrained Optimization

Tomer Galanti, Tianbao Yang, Gang Li, Ming Lin, Zhengzhong Tu

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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure 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/2505.12366.json · badge: /api/ran/2505.12366.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/disco canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_policy_loss_disco_Lratio Ran
ran; our contract draft was wrong, not the code
optimization-ai/disco/verl/verl/trainer/ppo/core_algos.py
code served (permissive licence) · get_code("6b8f70ca12861394")
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

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
response_length = 4
num_questions = 2
num_responses_per_question = 1

# old_log_prob: (bs, response_length)
old_log_prob = torch.randn(batch_size, response_length)

# log_prob: (bs, response_length)
log_prob = torch.randn(batch_size, response_length)

# advantages: (bs, response_length)
advantages = torch.randn(batch_size, response_length)

# eos_mask: (bs, response_length) - binary mask
eos_mask = torch.ones(batch_size, response_length)

# uid: unique identifiers for grouping - (bs,)
# Create uids so that we have num_questions unique values
uid = torch.tensor([0, 1], dtype=torch.long)

# seq_level_rewards: (bs,) - binary rewards (0 or 1)
seq_level_rewards = torch.tensor([1, 0], dtype=torch.float32)

# delta: threshold for KL divergence constraint
delta = 0.1

# beta: coefficient for constraint
beta = 0.5

# tau: temperature parameter
tau = 1.0

# kl_type: type of KL divergence to use
kl_type = 'low_var_kl'

ARGS = {
    'old_log_prob': old_log_prob,
    'log_prob': log_prob,
    'advantages': advantages,
    'eos_mask': eos_mask,
    'uid': uid,
    'seq_level_rewards': seq_level_rewards,
    'delta': delta,
    'beta': beta,
    'tau': tau,
    'kl_type': kl_type,
}
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
extract_step Ran
ran, honoured the contract we drafted
optimization-ai/disco/verl/verl/trainer/fsdp_sft_trainer.py
code served (permissive licence) · get_code("216e28c040173a61")
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 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.

import re

def extract_step(path):
    match = re.search('global_step_(\\d+)', path)
    if match:
        return int(match.group(1))
    return None

# Test case 1: path with global_step pattern
path_with_step = "/models/checkpoint_global_step_42/model.pt"

# Test case 2: path without global_step pattern
path_without_step = "/models/checkpoint_final/model.pt"

ARGS = {
    "path": path_with_step
}
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 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 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, 1 the same month, 1 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
extract_step 19 other papers
4 dated earlier, 6 the same month, 7 later, 1 same year, order not determinable, 1 undated
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
2502.14768 (2025-02)
Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning
and 16 more not named here

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

The recent success and openness of DeepSeek-R1 have brought widespread attention to Group Relative Policy Optimization (GRPO) as a reinforcement learning method for large reasoning models (LRMs). In this work, we analyze the GRPO objective under a binary reward setting and reveal an inherent limitation of questionlevel difficulty bias arising from its group relative advantage function. We also identify a connection between GRPO and traditional discriminative methods in supervised learning. Motivated by these insights, we introduce a new Discriminative Constrained Optimization (DisCO) framework for reinforcing LRMs, grounded in the principle of discriminative learning: increasing the scores of positive answers while decreasing those of negative ones. The main differences between DisCO and GRPO and its recent variants are: (1) it replaces the group relative objective with a discriminative objective defined by a scoring function; (2) it abandons clipping-based surrogates in favor of non-clipping RL surrogate objectives used as scoring functions; (3) it employs a simple yet effective constrained optimization approach to enforce the KL divergence constraint. As a result, DisCO offers notable advantages over GRPO and its variants: (i) it completely eliminates difficulty bias by adopting discriminative objectives; (ii) it addresses the entropy instability in GRPO and its variants through the use of non-clipping scoring functions and a constrained optimization approach, yielding long and stable training dynamics; (iii) it allows the incorporation of advanced discriminative learning techniques to address data imbalance, where a significant number of questions have more negative than positive generated answers during training. Our experiments on enhancing the mathematical reasoning capabilities of SFT-finetuned models show that DisCO significantly outperforms GRPO and its improved variants such as DAPO, achieving average gains of 7% over GRPO and 6% over DAPO across six benchmark tasks for a 1.5B model. 1

For agents

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

get_harvested_code_for_paper("2505.12366")
get_code_for_paper("2505.12366")
have("2505.12366")

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

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

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

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

Connect an agent — have() is free.