SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.13417 · EMNLP · 2025

AdaptThink: Reasoning Models Can Learn When to Think

Juanzi Li, Lei Hou, Nianyi Lin, Ling Feng, Jiajie Zhang

arXiv · PDF · Open in the Atlas

Code that ran

11 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 5 have no contract verdict; 3 failures of our instrument; 2 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-24; 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.13417.json · badge: /api/ran/2505.13417.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
thu-keg/adaptthink canonical (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
sigmoid Ran
ran, violated the contract we drafted
thu-keg/adaptthink/src/adapt_think_reward_manager.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
check_megatron_checkpoint_path Ran
ran on a synthesized input
thu-keg/adaptthink/src/model_merger.py
code served (permissive licence) · get_code("0b9eda4efe0494dd")
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 tuple. 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 tempfile
import shutil

# Create a temporary directory structure that matches the expected Megatron checkpoint format
temp_dir = tempfile.mkdtemp()

# Create sharded directories with the expected naming pattern: mp_rank_XX_YYY
# where XX is tensor parallel rank and YYY is pipeline parallel rank
sharded_dirs = [
    'mp_rank_00_000',
    'mp_rank_00_001',
    'mp_rank_01_000',
    'mp_rank_01_001',
]

for sharded_dir in sharded_dirs:
    dir_path = os.path.join(temp_dir, sharded_dir)
    os.makedirs(dir_path, exist_ok=True)
    # Create the model.pt file in each directory
    model_file = os.path.join(dir_path, 'model.pt')
    with open(model_file, 'w') as f:
        f.write('dummy model checkpoint')

model_path = temp_dir

ARGS = {
    'model_path': model_path
}
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 tuple — a tuple 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
compute_adapt_think_metrics Ran
ran on a synthesized input
thu-keg/adaptthink/src/adapt_think_ray_trainer.py
code served (permissive licence) · get_code("158e886d84bcb855")
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

class MockBatch:
    def __init__(self):
        self.non_tensor_batch = {
            'acc': [0.9, 0.85, None, 0.88],
            'reward': [1.0, 0.5, None, 0.75],
            'response_length': [100, 150, None, 120],
            'enforce_nothinking': [True, False, None, True],
            'is_nothinking': [True, True, None, False],
            'nothinking_acc': [0.95, 0.90, None, 0.92],
            'nothinking_reward': [1.2, 0.8, None, 1.0],
            'nothinking_response_length': [80, 100, None, 90],
            'thinking_acc': [0.85, 0.80, None, 0.84],
            'thinking_reward': [0.8, 0.4, None, 0.6],
            'thinking_response_length': [150, 200, None, 180],
        }

batch = MockBatch()

ARGS = {
    'batch': batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
compute_naive_outcome_advantage Ran
ran on a synthesized input
thu-keg/adaptthink/src/adapt_think_core_algos.py
code served (permissive licence) · get_code("29b890d81eedb1ee")
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 tuple, ndim 3, 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 numpy as np

torch.manual_seed(0)

# Construct arguments for compute_naive_outcome_advantage
token_level_rewards = torch.randn(2, 4)  # batch_size=2, token_dim=4
response_mask = torch.ones(2, 1)  # batch_size=2, mask_dim=1

index = np.array([0, 1])  # simple index array

epsilon = 1e-06

ARGS = {
    "token_level_rewards": token_level_rewards,
    "response_mask": response_mask,
    "index": index,
    "epsilon": epsilon,
}
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 tuple, ndim 3, 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
count_unknown_letters_in_expr Ran
ran, honoured the contract we drafted
thu-keg/adaptthink/src/adapt_think_rm.py
code served (permissive licence) · get_code("368d3db6347269c3")
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 torch

def count_unknown_letters_in_expr(expr: str):
    expr = expr.replace('sqrt', '')
    expr = expr.replace('frac', '')
    letters_in_expr = set([x for x in expr if x.isalpha()])
    return len(letters_in_expr)

ARGS = {
    'expr': 'sqrt(x) + frac(a, b) + y'
}
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 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
get_custom_reward_fn Ran
ran; our contract draft was wrong, not the code
thu-keg/adaptthink/src/main_ppo.py
pointer only (licence: MIT); the stored copy get_code serves, from hanxuhu/rl-new-language, is pointer only (licence: NONE) · get_code("e535567b971a2a42")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hanxuhu/rl-new-language, 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.

get_tp_pp_rank_from_sharded_dir Ran
ran on a synthesized input
thu-keg/adaptthink/src/model_merger.py
code served (permissive licence) · get_code("f223afda53bf5034")
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 tuple, ndim 1, dtype family int; 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 re

def get_tp_pp_rank_from_sharded_dir(sharded_dir):
    match = re.match('mp_rank_(\\d\\d)_(\\d\\d\\d)', sharded_dir)
    tp_rank = int(match.group(1))
    pp_rank = int(match.group(2))
    return (tp_rank, pp_rank)

ARGS = {
    'sharded_dir': 'mp_rank_05_042'
}
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 tuple, ndim 1, dtype family int — 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
mathd_normalize_answer Ran
ran; our contract draft was wrong, not the code
thu-keg/adaptthink/src/adapt_think_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
merge_by_placement Ran
ran; our contract draft was wrong, not the code
thu-keg/adaptthink/src/model_merger.py
code served (permissive licence) · get_code("21af94ece8f97ca1")
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 2, dtype family float, shape (2, 4) 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
from torch.distributed._tensor import Shard, Replicate

torch.manual_seed(0)

# Create small test tensors
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(2, 4)
tensors = [tensor1, tensor2]

# Create a Replicate placement for testing
placement = Replicate()

ARGS = {
    "tensors": tensors,
    "placement": placement,
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
process_validation_metrics Ran
ran on a synthesized input
thu-keg/adaptthink/src/adapt_think_metric_utils.py
code served (permissive licence) · get_code("4c72638db3629ff5")
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 defaultdict. 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
from collections import defaultdict

# Set seed for reproducibility
np.random.seed(42)

# Define the arguments for process_validation_metrics
ARGS = {
    "data_sources": ["source_a", "source_b", "source_a", "source_b"],
    "sample_inputs": [
        "What is 2+2?",
        "What is the capital of France?",
        "What is 2+2?",
        "What is the capital of France?"
    ],
    "infos_dict": {
        "accuracy": [0.95, 0.87, 0.92, 0.89],
        "confidence": [0.98, 0.76, 0.94, 0.81],
        "latency": [0.12, 0.45, 0.13, 0.42],
        "labels": ["correct", "correct", "correct", "correct"]
    },
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
should_allow_eval Ran
ran, violated the contract we drafted
thu-keg/adaptthink/src/adapt_think_rm.py
code served (permissive licence) · get_code("95f02454eddf082a")
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 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 re

BAD_SUBSTRINGS = ['^{', '^(']

BAD_REGEXES = ['\\^[0-9]+\\^', '\\^[0-9][0-9]+']

def count_unknown_letters_in_expr(expr: str):
    expr = expr.replace('sqrt', '')
    expr = expr.replace('frac', '')
    letters_in_expr = set([x for x in expr if x.isalpha()])
    return len(letters_in_expr)

def should_allow_eval(expr: str):
    if count_unknown_letters_in_expr(expr) > 2:
        return False
    for bad_string in BAD_SUBSTRINGS:
        if bad_string in expr:
            return False
    for bad_regex in BAD_REGEXES:
        if re.search(bad_regex, expr) is not None:
            return False
    return True

# Test cases for the function
ARGS = {
    'expr': '2*x + 3*y'
}
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 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
create_device_mesh Not yet run
unverified (harvested, no recorded run)
thu-keg/adaptthink/src/adapt_think_fsdp_workers.py
code served (permissive licence) · get_code("5f055b30781a958b")
How it ran

no invocation recorded.

get_sharding_strategy Not yet run
unverified (harvested, no recorded run)
thu-keg/adaptthink/src/adapt_think_fsdp_workers.py
pointer only (licence: MIT); the stored copy get_code serves, from xcyao00/HTPO, is pointer only (licence: NONE) · get_code("439358649f4873cc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xcyao00/HTPO, 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. 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, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 5 the same month, 7 later) and 6 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
sigmoid 51 other papers
46 dated earlier, 1 the same month, 4 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
should_allow_eval 13 other papers
4 dated earlier, 2 the same month, 7 later
2305.20050 (2023-05)
Let's Verify Step by Step
2406.12809 (2024-06)
Can Large Language Models Always Solve Easy Problems if They Can Solve Harder Ones?
2502.06703 (2025-02)
Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scaling
and 10 more not named here
count_unknown_letters_in_expr 12 other papers
3 dated earlier, 2 the same month, 7 later
2305.20050 (2023-05)
Let's Verify Step by Step
2502.06703 (2025-02)
Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scaling
2503.10460 (2025-03)
Light-R1: Curriculum SFT, DPO and RL for Long COT from Scratch and Beyond
and 9 more not named here
mathd_normalize_answer 12 other papers
1 dated earlier, 2 the same month, 9 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
merge_by_placement 6 other papers
1 dated earlier, 2 the same month, 3 later
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2505.12081 (2025-05)
VisionReasoner: Unified Reasoning-Integrated Visual Perception via Reinforcement Learning
2505.16673 (2025-05)
R1-ShareVL: Incentivizing Reasoning Capability of Multimodal Large Language Models via Share-GRPO
and 3 more not named here
get_sharding_strategy 2 other papers
2 later
2602.04284 (2026-02)
Agent-Omit: Adaptive Context Omission for Efficient LLM Agents
2605.08283 (2026-05)
HTPO: Towards Exploration-Exploitation Balanced Policy Optimization via Hierarchical Token-level Objective Control
get_custom_reward_fn 1 other paper
1 later
2606.06428 (2026-06)
Reinforcement Learning Elicits Contextual Learning of Unseen Language Translation

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-24.

Repositories linked to this paper

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

Abstract

Recently, large reasoning models have achieved impressive performance on various tasks by employing human-like deep thinking. However, the lengthy thinking process substantially increases inference overhead, making efficiency a critical bottleneck. In this work, we first demonstrate that NoThinking, which prompts the reasoning model to skip thinking and directly generate the final solution, is a better choice for relatively simple tasks in terms of both performance and efficiency. Motivated by this, we propose AdaptThink, a novel RL algorithm to teach reasoning models to choose the optimal thinking mode adaptively based on problem difficulty. Specifically, AdaptThink features two core components: (1) a constrained optimization objective that encourages the model to choose NoThinking while maintaining the overall performance; (2) an importance sampling strategy that balances Thinking and NoThinking samples during on-policy training, thereby enabling cold start and allowing the model to explore and exploit both thinking modes throughout the training process. Our experiments indicate that AdaptThink significantly reduces the inference costs while further enhancing performance. Notably, on three math datasets, Adapt-Think reduces the average response length of DeepSeek-R1-Distill-Qwen-1.5B by 53% and improves its accuracy by 2.4%, highlighting the promise of adaptive thinking-mode selection for optimizing the balance between reasoning quality and efficiency.

For agents

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

get_harvested_code_for_paper("2505.13417")
get_code_for_paper("2505.13417")
have("2505.13417")

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

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

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

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

Connect an agent — have() is free.