Papers › Scalable Chain of Thoughts via Elastic Reasoning

Scalable Chain of Thoughts via Elastic Reasoning

8 May 2025arXiv:2505.05315archive 2025-07-28

Yuhui Xu, Hanze Dong, Lei Wang, Doyen Sahoo, Junnan Li, Caiming Xiong

Large reasoning models (LRMs) have achieved remarkable progress on complex tasks by generating extended chains of thought (CoT). However, their uncontrolled output lengths pose significant challenges for real-world deployment, where inference-time budgets on tokens, latency, or compute are strictly constrained. We propose Elastic Reasoning, a novel framework for scalable chain of thoughts that explicitly separates reasoning into two phases--thinking and solution--with independently allocated budgets. At test time, Elastic Reasoning prioritizes the completeness of solution segments, significantly improving reliability under tight resource constraints. To train models that are robust to truncated thinking, we introduce a lightweight budget-constrained rollout strategy, integrated into GRPO, which teaches the model to reason adaptively when the thinking process is cut short and generalizes effectively to unseen budget constraints without additional training. Empirical results on mathematical (AIME, MATH500) and programming (LiveCodeBench, Codeforces) benchmarks demonstrate that Elastic Reasoning performs robustly under strict budget constraints, while incurring significantly lower training cost than baseline methods. Remarkably, our approach also produces more concise and efficient reasoning even in unconstrained settings. Our code has been made available at https://github.com/SalesforceAIResearch/Elastic-Reasoning.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2505.05315")

Code

Syntology Ran 3 of 11 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 11 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

salesforceairesearch/elastic-reasoning officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

11 samples harvested; 3 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
1ran · fixture could not drive it
1ran
8unverified

Licence: 11 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from salesforceairesearch/elastic-reasoning. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

create_huggingface_actor salesforceairesearch/elastic-reasoning/verl/verl/utils/model.py official repository ran Apache-2.0 recorded; this copy not marked cleared · pointer only · 360c671d6041ba3b · report
union_tensor_dict salesforceairesearch/elastic-reasoning/verl/verl/protocol.py official repository ran · fixture could not drive it Apache-2.0 recorded; this copy not marked cleared · pointer only · 21331a58f93375e4 · report
unpad_dataproto salesforceairesearch/elastic-reasoning/verl/verl/protocol.py official repository ran · our draft was wrong Apache-2.0 recorded; this copy not marked cleared · pointer only · 25f0ea3f460f6ce1 · report
check_correctness salesforceairesearch/elastic-reasoning/rllm/rewards/code_reward.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 7134e7134bb2121a · report
clean_code_main_block salesforceairesearch/elastic-reasoning/rllm/rewards/code_reward.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 07ead07d3ca3efae · report
extract_code_from_model salesforceairesearch/elastic-reasoning/rllm/rewards/code_reward.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · b26564a83d116677 · report
find_available_ports salesforceairesearch/elastic-reasoning/rllm/utils.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 151c4e0f70dc5941 · report
get_huggingface_actor_config salesforceairesearch/elastic-reasoning/verl/verl/utils/model.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 19472d4343d0a082 · report
get_weight_loader salesforceairesearch/elastic-reasoning/verl/verl/models/weight_loader_registry.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 919cf310ad4c189a · report
process_input_output salesforceairesearch/elastic-reasoning/rllm/rewards/code_utils/codeforces.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · db318652fa9fa6ec · report
squeeze salesforceairesearch/elastic-reasoning/verl/verl/utils/model.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 3b15e2ac7497c441 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections