One Policy, Any Budget: Internalizing Budget-Aware Search via Reinforcement Learning

Xiaowei Sun, Jin Li, Yili Hong, Yikun Fu, Yanghua Xiao
9/1/2026
2 citations
cs.AI
rl

Official code: xwsun01/AnySearch (1 star, Python, Apache-2.0, last commit 2026-09-02).

Abstract

While reinforcement learning has enabled LLM-based search agents to invoke external tools, existing methods train under fixed budgets and cannot adapt when constraints vary at deployment. We propose AnySearch, a framework that enables a single policy to perform budget-aware search under any budget constraint through a training scaffold and curriculum reinforcement learning.

Show full abstract

In the first phase, we train the agent with explicit budget state injection and structured reasoning prompts that guide efficient allocation under linearly decaying budgets. In the second phase, the scaffold is removed and the agent learns to operate autonomously under adaptively sampled budget constraints, matching inference conditions. Both phases are optimized with a composite reward that couples answer accuracy with budget efficiency through absolute and relative signals, where an adaptive weight amplifies the efficiency signal for high-accuracy queries and attenuates it for low-accuracy ones. Extensive experiments on seven general and multi-hop QA benchmarks show that our method outperforms baselines across all budget scales, generalizes to unseen constraints beyond the training range, and achieves superior tool productivity without excessive token overhead. Our code is available at https://github.com/xwsun01/AnySearch.

View on arXivView PDF

Code Implementations(1)

xwsun01/AnySearchOfficial100%
Apache-2.0

[EMNLP 2026 Findings] Source Code for "One Policy, Any Budget: Internalizing Budget-Aware Search via Reinforcement Learning."

10Python, ShellAug 23, 20263 months agoApache-2.0

Similar Papers

Cite this paper

@article{sun2026policy,
  title  = {One Policy, Any Budget: Internalizing Budget-Aware Search via Reinforcement Learning},
  author = {Xiaowei Sun and Jin Li and Yili Hong and Yikun Fu and Yanghua Xiao},
  year   = {2026},
  eprint = {2609.00813},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.00813v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.00813.svg)](https://codeofpaper.com/paper/2609.00813)

Discussion