SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.24331 · 2026

CurveRL: Principled Distribution-Aware Context Reweighting for LLM Reasoning

Weijie Su, Ke Sun, Qi Long, Yizhou Zhao, Jiayi Xin

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 4 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/2605.24331.json · badge: /api/ran/2605.24331.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
zhyzmath/CurveRL community
Papers with Code archive
8 ran · 4 no recorded run
FunctionStatusWhere it lives
DataProtoConfig Ran
ran on a synthesized input · constructed an object; no result was computed
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("e4796ad8f902c52b")
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, DataProtoConfig: 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 os
import torch
import torch.nn as nn

torch.manual_seed(0)

# The function is a class definition with a metaclass.
# DataProtoConfig itself doesn't take constructor arguments based on the code shown.
# The metaclass _DataProtoConfigMeta defines properties for auto_padding management.
# There are no parameters to pass to DataProtoConfig() constructor.

# However, we can demonstrate usage of the metaclass functionality:
# The class can be instantiated with no arguments, and the metaclass
# provides property access to auto_padding.

ARGS = {}
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 DataProtoConfig — 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 DataProtoConfig 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
DataProtoItem Ran
ran on a synthesized input · constructed an object; no result was computed
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("638ab35e4a168504")
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, DataProtoItem: 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
from tensordict import TensorDict

torch.manual_seed(0)

# Create a small TensorDict batch
batch_data = {
    "observations": torch.randn(2, 4),
    "actions": torch.randn(2, 3),
    "rewards": torch.randn(2, 1),
}
batch = TensorDict(batch_data, batch_size=[2])

# Create non-tensor batch dictionary
non_tensor_batch = {
    "episode_ids": [1, 2],
    "metadata": ["sample_1", "sample_2"],
}

# Create meta_info dictionary
meta_info = {
    "source": "replay_buffer",
    "timestamp": 1234567890,
    "version": "1.0",
}

ARGS = {
    "batch": batch,
    "non_tensor_batch": non_tensor_batch,
    "meta_info": meta_info,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensordict, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataProtoItem — 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 DataProtoItem 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_device_name Ran
ran on a synthesized input
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("9d92e0d1206a8f07")
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 str. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 get_device_name() takes no parameters
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_npu — 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
get_torch_device Ran
ran on a synthesized input
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("dc1eedb995052004")
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 module. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 logging

torch.manual_seed(0)

# Setup logging
logging.basicConfig(level=logging.WARNING)

# The function get_torch_device() takes no parameters
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_npu — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type module — a module output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a module 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
is_torch_npu_available Ran
ran on a synthesized input
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("c86bb1613b5513de")
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 bool, ndim 0, 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

# This function takes no parameters, so ARGS should be an empty dict
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_npu — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (no_inputs)
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
softmean Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("f759cede89c24bba")
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 1, dtype family float, shape (2,) 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

torch.manual_seed(0)

# Create a small tensor for testing
# Using shape (2, 4) - batch size 2, dimension 4
x = torch.randn(2, 4)

# Define beta as a float
beta = 0.5

# Define dim as int
dim = -1

# Define keepdim as bool
keepdim = False

ARGS = {
    "x": x,
    "beta": beta,
    "dim": dim,
    "keepdim": keepdim,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
union_numpy_dict Ran
ran; our contract draft was wrong, not the code
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("3259929a490b8607")
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
import pandas as pd

# Create two dictionaries with numpy arrays
# The function checks that non-overwritable keys have matching content
tensor_dict1 = {
    'logits': np.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]),
    'tokens': np.array([[10, 11, 12, 13], [14, 15, 16, 17]]),
}

# tensor_dict2 can have the same keys (with same values for non-overwritable keys)
# and/or new keys. For 'finish_reasons', it's overwritable so values can differ
tensor_dict2 = {
    'logits': np.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]),
    'tokens': np.array([[10, 11, 12, 13], [14, 15, 16, 17]]),
    'finish_reasons': np.array([0, 1]),  # overwritable key, so can have different values
    'new_key': np.array([[20, 21, 22, 23]]),  # new key that will be added
}

ARGS = {
    'tensor_dict1': tensor_dict1,
    'tensor_dict2': tensor_dict2,
}
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 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
union_two_dict Ran
ran; our contract draft was wrong, not the code
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("1948c2c29a2b5c0c")
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

torch.manual_seed(0)

# Construct arguments for union_two_dict
# The function takes two dictionaries and merges them, checking for conflicts

dict1 = {
    "model_name": "bert",
    "hidden_size": 768,
    "num_layers": 12,
    "tensor_param": torch.randn(2, 4)
}

dict2 = {
    "vocab_size": 30522,
    "max_seq_length": 512,
    "another_tensor": torch.randn(3, 5)
}

ARGS = {
    "dict1": dict1,
    "dict2": dict2
}
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
DataProto Not yet run
unverified (harvested, no recorded run)
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("ef325088d033e27f")
How it ran

no invocation recorded.

_DataProtoConfigMeta Not yet run
unverified (harvested, no recorded run)
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("16e03b75813cf656")
How it ran

no invocation recorded.

collate_fn Not yet run
unverified (harvested, no recorded run)
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("a67c1dea604c8a67")
How it ran

no invocation recorded.

compute_advantage Not yet run
unverified (harvested, no recorded run)
zhyzmath/CurveRL/recipe/sppo/sppo_ray_trainer.py
code served (permissive licence) · get_code("480d8f57402fc9cf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
DataProtoItem
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 1 only as an assembly brick
2505.14146 (2025-05)
s3: You Don't Need That Much Data to Train a Search Agent via RL
2505.17447 (2025-05)
LeTS: Learning to Think-and-Search via Process-and-Outcome Reward Hybridization
2506.05316 (2025-06)
Improving Data Efficiency for LLM Reinforcement Fine-tuning Through Difficulty-targeted Online Data Selection and Rollout Replay
and 1 more not named here
collate_fn
brick of this paper's assembly: helper
4 other papers
4 dated earlier
2505.14146 (2025-05)
s3: You Don't Need That Much Data to Train a Search Agent via RL
2505.17447 (2025-05)
LeTS: Learning to Think-and-Search via Process-and-Outcome Reward Hybridization
2506.05316 (2025-06)
Improving Data Efficiency for LLM Reinforcement Fine-tuning Through Difficulty-targeted Online Data Selection and Rollout Replay
and 1 more not named here
union_two_dict
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 1 only as an assembly brick
2505.14146 (2025-05)
s3: You Don't Need That Much Data to Train a Search Agent via RL
2505.17447 (2025-05)
LeTS: Learning to Think-and-Search via Process-and-Outcome Reward Hybridization
2506.05316 (2025-06)
Improving Data Efficiency for LLM Reinforcement Fine-tuning Through Difficulty-targeted Online Data Selection and Rollout Replay
and 1 more not named here
DataProtoConfig
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2603.02146 (2026-03)
LongRLVR: Long-Context Reinforcement Learning Requires Verifiable Context Rewards
_DataProtoConfigMeta
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2603.02146 (2026-03)
LongRLVR: Long-Context Reinforcement Learning Requires Verifiable Context Rewards
get_device_name
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2603.02146 (2026-03)
LongRLVR: Long-Context Reinforcement Learning Requires Verifiable Context Rewards
get_torch_device
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2603.02146 (2026-03)
LongRLVR: Long-Context Reinforcement Learning Requires Verifiable Context Rewards
is_torch_npu_available
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2603.02146 (2026-03)
LongRLVR: Long-Context Reinforcement Learning Requires Verifiable Context Rewards

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

Context or prompt-level reweighting has emerged as a central algorithmic lever in Reinforcement Learning with Verified Rewards (RLVR) for improving the reasoning capability of large language models, yet the principle determining what constitutes an optimal weighting remains poorly understood. We address this gap by formulating prompt reweighting as a functional derivative of a utility functional defined in the pass-rate function space, yielding a unified optimality framework that accommodates existing schemes, including REINFORCE and GRPO. Building on this optimality framework, we propose a distribution-aware prompt reweighting approach, called CurveRL, based on a quantile coordinate transform, in which the weight assigned to each prompt depends not on the absolute value of pass rates but on its rank and density to reflect the distributional structure of the pass rates in the learning dynamics. Extensive experiments across multiple benchmarks demonstrate that our proposed CurveRL consistently outperforms GRPO and other RLVR baselines. Our study identifies context-distribution control as a principled axis for analyzing and designing promptreweighted RLVR algorithms. The code is released in https://github.com/zhyzmath/CurveRL.

For agents

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

get_harvested_code_for_paper("2605.24331")
get_code_for_paper("2605.24331")
have("2605.24331")

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

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

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

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

Connect an agent — have() is free.