arXiv:2609.01335cs.LGSep 2026

Manuscript Offprint

arXiv:2609.01335

Bandits in Prod: Hyperparameter Optimization at Inference Time

Louis Abraham, Tuan-Anh Nguyen, Nicolas Devatine

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Many production systems can assess a configuration only by using it on live requests and observing noisy feedback. Modern agentic systems are a prominent example, with inference-time choices such as model selection, retrieval depth, prompting strategy, and decoding temperature, yet often with no representative validation data. We formalize this setting as Online Hyperparameter Optimization (OHPO) and cast it as an infinitely many-armed bandit over mixed and conditional search spaces. We introduce IMABO, a general framework that combines any bandit policy for choosing among already sampled configurations with any oracle for proposing new ones. We instantiate it with IMOSS, a restart-free anytime policy whose active set grows as tβt^{\beta}, and prove an expected cumulative quantile-regret bound of O(pρ−1/β+T(1+β)/2)O(p_{\rho}^{-1/\beta} + T^{(1+\beta)/2}), where β∈(0,1)\beta \in (0,1) controls active-set growth and pρp_{\rho} lower-bounds the probability that a proposed configuration falls in the top- ρ\rho fraction of the search space. We combine IMOSS with three practical oracles: a Tree-structured Parzen Estimator, an incumbent-mutation oracle driven by a per-coordinate bandit, and a pretrained tabular foundation model, all three improving over the uniform random oracle baseline. IMABO obtains the lowest cumulative regret across diverse OHPO settings, from tuning classical machine-learning models to configuring LLM-based agents.

1 Introduction

Hyperparameter optimization (HPO) is usually performed offline by evaluating configurations on a fixed dataset and keeping the best one, with methods such as grid search, random search, or Bayesian optimization [1, 2, 3]. A growing class of systems cannot be tuned this way. Applications built around large language models served by external providers expose only inference-time settings, such as the choice of model, the decoding temperature, or the prompting strategy. Without a dataset that reflects real usage, a configuration can be evaluated only by serving it and observing how it performs. We call this problem online hyperparameter optimization (OHPO). Because every evaluation is a served request, exploration is never free: what matters is the reward accumulated over the whole request stream, not the quality of a final recommendation, and the horizon of that stream is not known in advance. OHPO has received little attention, falling between (offline) HPO, which evaluates configurations before deployment, and online learning, which rarely exploits the structure of a hyperparameter space.

This problem has the structure of a multi-armed bandit (MAB), where each configuration is an arm, and each served request is a pull of the chosen arm. But a hyperparameter space is typically continuous or mixed, combining real-valued, integer, and categorical settings, so the possible configurations far outnumber the requests the system will ever serve. Bandit problems in which the arms outnumber the available pulls are known as infinitely many-armed bandits (IMAB). Existing approaches either assume a metric under which nearby configurations earn similar rewards, an assumption that is meaningless for categorical parameters such as the choice of model, or draw new configurations at random, learning nothing from past rewards.

We address this problem with IMABO (Infinitely Many-Armed Bandit with Oracle), a framework that pairs a bandit policy over a growing active set of configurations with an oracle that proposes which configuration to admit next. Our contributions are as follows.

• We introduce and formalize the OHPO problem, cast it as an infinitely many-armed bandit, and propose IMABO, a framework that combines any bandit policy with any oracle, requiring only that a configuration can be scored from live feedback and making no further assumptions about the search space.

• We introduce IMOSS, an anytime bandit policy for online hyperparameter optimization, prove a sublinear cumulative quantile-regret bound, and instantiate it with several arm-creation oracles: IMOSS-Random, IMOSS-TPE, IMOSS-TabPFN, and IMOSS-mutate-KL×PE. These variants natively support continuous, integer, and categorical hyperparameters while remaining computationally efficient for production. Our implementation is publicly available. 1^{1}

• We validate our method on both continuous and discrete HPOBench tasks, and on a real LLM-based question-answering system over a mixed search space of retrieval, prompting, and model choices.

References (53)