SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.19236 · 2026

STARE: Surprisal-Guided Token-Level Advantage Reweighting for Policy Entropy Stability

Can Xu, Haipeng Luo, Han Hu, Qingfeng Sun, Yansong Tang, Songli Wu, Wenfeng Deng

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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; 11 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2606.19236.json · badge: /api/ran/2606.19236.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
hp-luo/STARE canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_ce_dpo_loss_rm Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/recipe/prime/prime_core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("f220595adfc5e83c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_detach_dpo_loss_rm Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/recipe/prime/prime_core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("4d91e4383716e42c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_online_dpo_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hp-luo/STARE/recipe/spin/core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("f19825983a523003")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_onlinedpo_pref Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/recipe/spin/core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("41b6e81dc3ecba79")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_score_data_source Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hp-luo/STARE/recipe/open_math_reasoning/compute_score.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("05a86ccb0b3876dd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_solution Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/verl/utils/reward_score/math_stare.py
code served (permissive licence) · get_code("d138cde65a9c4401")
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. 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 re

def extract_solution(solution_str):
    """Extract the answer from the solution string."""
    pattern = '^<think>(.*?)</think>(.+)$'
    match = re.match(pattern, solution_str, re.DOTALL)
    if not match:
        return None
    inside_content = match.group(1)
    after_content = match.group(2)
    if not after_content.strip():
        return None
    if not inside_content.strip():
        return None
    if '<think>' in inside_content or '</think>' in inside_content:
        return None
    if '<think>' in after_content or '</think>' in after_content:
        return None
    return after_content


# Valid case: proper <think> tags with content before and after
solution_str_valid = '<think>This is reasoning</think>This is the answer'

ARGS = {
    'solution_str': solution_str_valid
}
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 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_kl_controller Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/recipe/spin/core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("757d109d90121142")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/recipe/gkd/megatron_kl_loss.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("11c8e99168eeef2e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pred_ans_extract Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/verl/utils/reward_score/math_stare.py
code served (permissive licence) · get_code("2aa611c91f5e4478")
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. 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)

ARGS = {
    "pred_response": "<think>Let me work through this problem step by step. First I need to analyze the question carefully.</think>\n\n<answer>The answer is 42</answer>"
}
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 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
pred_ans_extract_train Ran
ran; our contract draft was wrong, not the code
hp-luo/STARE/verl/utils/reward_score/math_stare.py
code served (permissive licence) · get_code("1305c915f184b3a4")
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. 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 re

def pred_ans_extract_train(pred_response):
    pattern = '<answer>(.*?)</answer>'
    match = re.search(pattern, pred_response, re.S)
    if match:
        has_answer = True
        content = match.group(1)
    else:
        has_answer = False
        content = None
    return content

# Setup code
ARGS = {
    'pred_response': '<answer>The answer is 42</answer>'
}
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 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
reward_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hp-luo/STARE/recipe/r1/reward_score.py
code served (permissive licence) · get_code("8a84f8cc921357e2")
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, patch

torch.manual_seed(0)

# Mock the imported modules to avoid import errors
mock_math_reward = Mock()
mock_math_reward.compute_score = Mock(return_value=0.85)

mock_gpqa = Mock()
mock_gpqa.compute_score = Mock(return_value=0.92)

mock_livecodebench = Mock()
mock_livecodebench.compute_score = Mock(return_value=0.78)

# Patch the imports at module level
import sys
sys.modules['recipe'] = Mock()
sys.modules['recipe.r1'] = Mock()
sys.modules['recipe.r1.tasks'] = Mock()
sys.modules['recipe.r1.tasks.math_reward'] = mock_math_reward
sys.modules['recipe.r1.tasks.gpqa'] = mock_gpqa
sys.modules['recipe.r1.tasks.livecodebench'] = mock_livecodebench

ARGS = {
    'data_source': 'Maxwell-Jia/AIME_2024',
    'solution_str': 'The answer is 42',
    'ground_truth': '42',
    'extra_info': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
recipe, 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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 8 the same month, 8 later) and 3 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
compute_ce_dpo_loss_rm 46 other papers
34 dated earlier, 5 the same month, 4 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
and 43 more not named here
compute_detach_dpo_loss_rm 44 other papers
32 dated earlier, 5 the same month, 4 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
and 41 more not named here
compute_online_dpo_loss 38 other papers
26 dated earlier, 5 the same month, 4 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
and 35 more not named here
get_kl_controller 38 other papers
26 dated earlier, 5 the same month, 4 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
and 35 more not named here
compute_onlinedpo_pref 30 other papers
19 dated earlier, 4 the same month, 4 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
and 27 more not named here
reward_func 15 other papers
9 dated earlier, 3 the same month, 2 later, 1 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2601.17687 (2026-01)
Agentic reinforcement learning empowers next-generation chemical language models for molecular design and synthesis
2601.21468 (2026-01)
MemOCR: Layout-Aware Visual Memory for Efficient Long-Horizon Reasoning
and 12 more not named here
compute_score_data_source 13 other papers
8 dated earlier, 2 the same month, 2 later, 1 undated
2601.21468 (2026-01)
MemOCR: Layout-Aware Visual Memory for Efficient Long-Horizon Reasoning
2602.17550 (2026-02)
MASPO: Unifying Gradient Utilization, Probability Mass, and Signal Reliability for Robust and Sample-Efficient LLM Reasoning
2603.02938 (2026-03)
Beyond One-Size-Fits-All: Adaptive Subgraph Denoising for Zero-Shot Graph Learning with Large Language Models
and 10 more not named here
normalize 6 other papers
2 dated earlier, 1 the same month, 2 later, 1 undated
2602.17550 (2026-02)
MASPO: Unifying Gradient Utilization, Probability Mass, and Signal Reliability for Robust and Sample-Efficient LLM Reasoning
2603.07079 (2026-03)
Entropy-Aware On-Policy Distillation of Language Models
2606.06021 (2026-06)
OPRD: On-Policy Representation Distillation
and 3 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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Reinforcement Learning with Verifiable Rewards algorithms like GRPO have emerged as the dominant post-training paradigm for complex reasoning in LLMs, yet commonly suffer from policy entropy collapse during training. We conduct a first-order gradient analysis of token-level entropy dynamics under GRPO and identify a token-level credit assignment mismatch: the per-token entropy variation decomposes into the product of the trajectory-level advantage and an entropy sensitivity function over the next-token distribution, yielding an advantage-surprisal four-quadrant structure and a near-criticality property. Motivated by it, we propose STARE (Surprisal-guided Token-level Advantage Reweighting for policy Entropy stability), which identifies entropy-critical token subsets via batch-internal surprisal quantiles, selectively reweights their effective advantages, and incorporates a target-entropy closed-loop gate for stable entropy regulation. Across model scales from 1.5B to 32B and three task families (Short CoT, Long CoT, and Multi-Turn Tool Use), STARE sustains stable RL training over thousands of steps while maintaining policy entropy within the target band. On AIME24 and AIME25, STARE outperforms DAPO and other competitive baselines by 4%-8% in average accuracy, with reflection tokens and response length growing in tandem, indicating sustained exploration-exploitation balance that further unlocks RL training potential. Code is available at https://github.com/hp-luo/STARE

For agents

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

get_harvested_code_for_paper("2606.19236")
get_code_for_paper("2606.19236")
have("2606.19236")

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

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

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

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

Connect an agent — have() is free.