SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.12113 · 2026

Adaptive Reflection and Length Coordinated Penalty (ARLCP) STOP UNNECESSARY REFLECTION: TRAINING LRMS FOR EFFICIENT REASONING WITH ADAPTIVE REFLEC-TION AND LENGTH COORDINATED PENALTY

Yuke Zhu, Haobo Wang, Junbo Zhao, Bo Zheng, Sheng Guo, Lirong Gao, Zewei Yu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 13 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, 2 violated it and 0 have no contract verdict; 3 failures of our instrument; 7 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2602.12113.json · badge: /api/ran/2602.12113.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
ZeweiYu1/ARLCP canonical (classifier label)
classifier basis: census
6 ran · 7 no recorded run
FunctionStatusWhere it lives
sigmoid Ran
ran, violated the contract we drafted
ZeweiYu1/ARLCP/src/rm.py
code served (permissive licence) · get_code("b8e95809ca2c17c9")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:39:00Z). 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 numpy as np

# The sigmoid function takes a single parameter 'x' which should be a numeric value or array
# Looking at the function body, it performs: 1 / (1 + np.exp(-x))
# This works with scalars, lists, or numpy arrays

# Create a small numpy array to pass as input
x_input = np.array([0.0, 1.0, -1.0, 2.0])

ARGS = {
    "x": x_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
count_keywords_counter Ran
ran, honoured the contract we drafted
ZeweiYu1/ARLCP/src/data_analysis.py
code served (permissive licence) · get_code("a8f225873fc80c48")
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 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 count_keywords_counter(text):
    """
    Count the occurrences of specific keywords in the text.
    """
    keywords = ['wait', 'alternatively', 'hold on', 'another thought', 'verify', 'think again', 'but', 'however', 'alternative', 'check', 'double-check', 'oh', 'hmm']
    pattern = '\\b(' + '|'.join((re.escape(keyword) for keyword in keywords)) + ')\\b'
    matches = [match.lower() for match in re.findall(pattern, text, re.IGNORECASE)]
    return len(matches)

# Create valid arguments for the function
ARGS = {
    'text': 'Wait, let me think again. However, I should double-check this. Hold on, alternatively we could verify the result. But hmm, oh I see now.'
}
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 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
is_ipv4 Ran
ran, violated the contract we drafted
ZeweiYu1/ARLCP/verl/utils/net_utils.py
code served (permissive licence) · get_code("735e93af30b15fa9")
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, 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 ipaddress

ARGS = {
    "ip_str": "192.168.1.1"
}
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 bool, 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
make_map_fn Ran
ran; our contract draft was wrong, not the code
ZeweiYu1/ARLCP/src/preprocess_dataset.py
code served (permissive licence) · get_code("8ca7cd0eab5ae7c2")
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 function. 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
from typing import Dict, List, Optional, Any

torch.manual_seed(0)

ARGS = {
    'split': 'train',
    'data_source': 'test_dataset'
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
mathd_normalize_answer Ran
ran; our contract draft was wrong, not the code
ZeweiYu1/ARLCP/src/rm.py
code served (permissive licence) · get_code("ec578739f88adc22")
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
from typing import Optional

# Test cases for mathd_normalize_answer
test_cases = [
    # Basic string
    "42",
    # String with text wrapper
    "\\text{hello world}",
    # String with LaTeX fractions
    "\\frac{1}{2}",
    # String with newlines and special chars
    "3.14\n",
    # String with tfrac/dfrac
    "\\tfrac{3}{4}",
    # String with sqrt
    "\\sqrt{4}",
    # String with spaces
    "1 / 2",
    # String with = sign
    "x = 5",
    # Empty-like strings
    ".5",
    # None
    None,
]

ARGS = {
    "answer": "\\text{\\frac{1}{2}}"
}
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
unpad_dataproto Ran
ran; our contract draft was wrong, not the code
ZeweiYu1/ARLCP/verl/protocol.py
code served (permissive licence) · get_code("25f0ea3f460f6ce1")
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 DataProto. 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)

class DataProto:
    """Stand-in class for DataProto that supports slicing."""
    def __init__(self, data):
        self.data = data
    
    def __getitem__(self, key):
        """Support slicing to return a new DataProto with sliced data."""
        sliced_data = self.data[key]
        return DataProto(sliced_data)
    
    def __repr__(self):
        return f"DataProto({self.data})"

# Create a small DataProto instance with some data
data_tensor = torch.randn(2, 4)
data_proto = DataProto(data_tensor)

ARGS = {
    "data": data_proto,
    "pad_size": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataProto — a DataProto output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataProto 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_generation_config Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/utils/model.py
code served (permissive licence) · get_code("5c059b45527bdff7")
How it ran

no invocation recorded.

get_huggingface_actor_config Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/utils/model.py
code served (permissive licence) · get_code("0a5b4c20bc4ff94b")
How it ran

no invocation recorded.

get_weight_loader Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/models/weight_loader_registry.py
code served (permissive licence) · get_code("acf240079d434746")
How it ran

no invocation recorded.

get_weight_saver Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/models/weight_loader_registry.py
code served (permissive licence) · get_code("55f217ce71432b58")
How it ran

no invocation recorded.

is_ipv6 Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/utils/net_utils.py
code served (permissive licence) · get_code("705afe175ad8e404")
How it ran

no invocation recorded.

load_state_dict_to_megatron_gptmodel Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/models/mcore/loader.py
code served (permissive licence) · get_code("1853101234cf952e")
How it ran

no invocation recorded.

squeeze Not yet run
unverified (harvested, no recorded run)
ZeweiYu1/ARLCP/verl/utils/model.py
code served (permissive licence) · get_code("3b15e2ac7497c441")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 9 the same month, 11 later) and 2 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
unpad_dataproto 89 other papers
36 dated earlier, 13 the same month, 37 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
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
and 86 more not named here
squeeze 82 other papers
36 dated earlier, 12 the same month, 31 later, 3 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
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
and 79 more not named here
get_generation_config 63 other papers
22 dated earlier, 10 the same month, 29 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2502.19613 (2025-02)
Self-rewarding correction for mathematical reasoning
and 60 more not named here
get_weight_loader 58 other papers
15 dated earlier, 8 the same month, 33 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2505.14362 (2025-05)
DeepEyes: Incentivizing "Thinking with Images" via Reinforcement Learning
2505.20046 (2025-05)
REARANK: Reasoning Re-ranking Agent via Reinforcement Learning
and 55 more not named here
get_huggingface_actor_config 53 other papers
34 dated earlier, 5 the same month, 12 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
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
and 50 more not named here
sigmoid 51 other papers
49 dated earlier, 2 later · 2 only as an assembly brick
1505.05770 (2015-05)
Variational Inference with Normalizing Flows
1804.00779 (2018-04)
Neural Autoregressive Flows
1809.10765 (2018-09)
Auto-Encoding Knockoff Generator for FDR Controlled Variable Selection
and 48 more not named here
is_ipv4 41 other papers
10 dated earlier, 6 the same month, 23 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
and 38 more not named here
is_ipv6 41 other papers
10 dated earlier, 6 the same month, 23 later, 2 undated
2409.19256 (2024-09)
HybridFlow: A Flexible and Efficient RLHF Framework
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
and 38 more not named here
mathd_normalize_answer 12 other papers
7 dated earlier, 2 the same month, 3 later
2503.10460 (2025-03)
Light-R1: Curriculum SFT, DPO and RL for Long COT from Scratch and Beyond
2505.03335 (2025-05)
Absolute Zero: Reinforced Self-play Reasoning with Zero Data
2505.13379 (2025-05)
Thinkless: LLM Learns When to Think
and 9 more not named here
get_weight_saver 10 other papers
4 dated earlier, 1 the same month, 4 later, 1 undated
2512.14157 (2025-12)
Ophiuchus: Incentivizing Tool-augmented "Think with Images" for Joint Medical Segmentation, Understanding and Reasoning
2512.16848 (2025-12)
Meta-RL Induces Exploration in Language Agents
2601.04767 (2026-01)
AT 2 PO: Agentic Turn-based Policy Optimization via Tree Search
and 7 more not named here
load_state_dict_to_megatron_gptmodel 2 other papers
1 dated earlier, 1 later
2512.16848 (2025-12)
Meta-RL Induces Exploration in Language Agents
2603.10624 (2026-03)
Reinforcement Learning with Conditional Expectation Reward

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

Large Reasoning Models (LRMs) have demonstrated remarkable performance on complex reasoning tasks by employing test-time scaling. However, they often generate over-long chains-of-thought that, driven by substantial reflections such as repetitive self-questioning and circular reasoning, lead to high token consumption, substantial computational overhead, and increased latency without improving accuracy, particularly in smaller models. Our observation reveals that increasing problem complexity induces more excessive and unnecessary reflection, which in turn reduces accuracy and increases token overhead. To address this challenge, we propose Adaptive Reflection and Length Coordinated Penalty (ARLCP), a novel reinforcement learning framework designed to dynamically balance reasoning efficiency and solution accuracy. ARLCP introduces two key innovations: (1) a reflection penalty that adaptively curtails unnecessary reflective steps while preserving essential reasoning, and (2) a length penalty calibrated to the estimated complexity of the problem. By coordinating these penalties, ARLCP encourages the model to generate more concise and effective reasoning paths. We evaluate our method on five mathematical reasoning benchmarks using DeepSeek-R1-Distill-Qwen-1.5B and DeepSeek-R1-Distill-Qwen-7B models. Experimental results show that ARLCP achieves a superior efficiency-accuracy trade-off compared to existing approaches. For the 1.5B model, it reduces the average response length by 53.1% while simultaneously improving accuracy by 5.8%. For the 7B model, it achieves a 35.0% reduction in length with a 2.7% accuracy gain. The code is released at https://github.com/ZeweiYu1/ARLCP.

For agents

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

get_harvested_code_for_paper("2602.12113")
get_code_for_paper("2602.12113")
have("2602.12113")

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

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

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

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

Connect an agent — have() is free.