Large language model (LLM) generation often requires balancing output quality against inference cost, especially when using multiple generations. We introduce a new framework for inference-time optimization based on the classical Pandora's Box problem. Viewing each generation as opening a costly "box" with random reward, we develop algorithms that decide when to stop generating without knowing the underlying reward distribution. Our first contribution is a UCB-style Pandora's Box algorithm, which achieves performance that is provably close to Weitzman's algorithm, the optimal strategy when the distribution is known. We further adapt this method to practical LLM settings by addressing reward scaling across prompts via a Bradley-Terry inspired transformation. This leads to an adaptive inference-time optimization method that normalizes rewards and learns stopping thresholds on the fly. Experiments on the AlpacaFarm and HH-RLHF datasets, using multiple LLM-reward model pairs, show that our adaptive strategy can obtain the same performance as non-adaptive Best-of-N sampling while requiring 15-35 percent fewer generations on average. Our results establish a principled bridge between optimal stopping theory and inference-time scaling, providing both theoretical performance bounds and practical efficiency gains for LLM deployment.
Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stopping
Language Technologies Institute, School of Computer Science, Carnegie Mellon University(卡内基梅隆大学计算机科学学院语言技术研究所);Allen Institute for Artificial Intelligence(艾伦人工智能研究所);Paul G. Allen School of Computer Science and Engineering, University of Washington(华盛顿大学保罗·G·艾伦计算机科学与工程学院)
Optimal Bayesian Stopping for Efficient Inference of Consistent LLM Answers
Stern School of Business, New York University, New York, USA(纽约大学 Stern 商学院);Graduate School of Business, Columbia University, New York, USA(哥伦比亚大学 商学院)
Gradient-Flow Optimization as Dynamic Random-Effects Inference: Testing and Early Stopping with Applications to Deep Learning
Centre for Biomedical Data Science, Duke-NUS Medical School, National University of Singapore(生物医学数据科学中心,国立新加坡大学杜克-新加坡医学学校);Department of Biostatistics, Harvard T.H. Chan School of Public Health, Boston, MA, USA(生物统计学系,哈佛T.H. Chan公共卫生学院,马萨诸塞州波士顿,美国);Institute of Natural Sciences, MOE-LSC, School of Mathematical Sciences, CMA-Shanghai, SJTU-Yale Joint Center of Biostatistics and Data Science, Shanghai Jiao Tong University(自然科学院,MOE-LSC,数学科学学院,CMA-上海,SJTU-耶鲁联合生物统计学与数据科学中心,上海交通大学);Department of Biostatistics, Columbia University, New York, NY, USA(生物统计学系,哥伦比亚大学,纽约州纽约市,美国)
Department of Computer Science, University of Freiburg, Freiburg, Germany(弗赖堡大学计算机科学系);Zuse School ELIZA, Darmstadt, Germany(泽乌斯学校ELIZA);ELLIS Institute, Tübingen, Germany(ELLIS研究所);Prior Labs, Freiburg, Germany(Prior实验室)
Learning to Stop: Deep Learning for Mean Field Optimal Stopping
Shanghai Frontiers Science Center of Artificial Intelligence(上海人工智能前沿科学中心);NYU-ECNU Institute of Mathematical Sciences(纽约大学-复旦大学数学科学研究院);Georgia Institute of Technology(佐治亚理工学院)
CITE: Anytime-Valid Statistical Inference in LLM Self-Consistency
Komaba Institute for Science, Graduate School of Arts and Sciences, The University of Tokyo(东京大学艺术科学研究生院Komaba研究所);Nagoya University(名古屋大学);NARA Institute of Science and Technology (NAIST) / Mohamed bin Zayed University of Artificial Intelligence (MBZUAI)(NAIST科学与技术研究所 / 摩洛哥本·泽德人工智能大学);Mohamed bin Zayed University of Artificial Intelligence (MBZUAI) / RIKEN AIP(摩洛哥本·泽德人工智能大学 / RIKEN AIP);Graduate School of Arts and Sciences, The University of Tokyo / RIKEN AIP / Kyoto University(东京大学艺术科学研究生院 / RIKEN AIP / 京都大学)
GradES: Significantly Faster Training in Transformers with Gradient-Based Early Stopping
Department of Computer Science, Boston University Metropolitan College(波士顿大学计算机科学系);Information Hub, The Hong Kong University of Science and Technology, Guangzhou(香港科技大学广州信息中心);School of Engineering and Technology, Duy Tan University, Da Nang, Vietnam(杜益大学工程科技学院,岘港,越南);Department of AI, School of Computer Science and Engineering, Galgotias University, Greater Noida, India(加洛吉亚大学人工智能系,诺伊达,印度)
Optimal Best Arm Identification with Fixed Confidence
Institut de Mathématiques de Toulouse(图卢兹数学研究所);Université de Toulouse(图卢兹大学);CNRS(法国国家科学研究中心);UPS IMT(图卢兹第三大学国立图卢兹应用科学学院);Univ. Lille(里尔大学);CRIStAL - Centre de Recherche en Informatique Signal et Automatique de Lille(里尔计算机、信号与自动化研究中心);Inria(法国国家信息与自动化研究所)
Efficient Online LLM Watermark Detection via Rao-Blackwellized E-Processes
Yunnan Key Laboratory of Statistical Modeling and Data Analysis(云南统计建模与数据分析重点实验室);Yunnan University(云南大学);School of Statistics and Management(统计与管理学院);Shanghai University of Finance and Economics(上海财经大学)