Paper commentary
Ballad: Bandit-Based LLM Routing for Automated Heuristic Discovery
- Problem AHD runs make thousands of LLM calls, and standard routing methods assume offline labels and independent queries, which AHD does not provide.
- Method Treats LLM selection in AHD as an online bandit and scores each LLM with an index that combines a bootstrapped upper-tail estimate, DAG-lineage credit and sliding-window discounting.

Figure 1 :LLM selection share across search steps (rolling window of 100 calls).Each panel shows, for a combinatorial optimization problem, the fraction of LLM calls routed to each model by BALLAD over the course of the evolutionary search. The dotted horizontal line marks the uniform-allocation baseline (1/K=25% here), corresponding to a policy with no preference over arms. Deviations from this baseline reflect the learned routing policy by BALLADfavors models with selection share above 1/K due to higher estimated utility.
Original paper · CC BY 4.0 · Samidha Verma, Ankit Anand, Sayan Ranu · Ballad: Bandit-Based LLM Routing for Automated Heuristic Discovery · Original paper figure · Extracted the figure area from page 8 of the original PDF.Why routing is harder in heuristic discovery
Each heuristic discovery run calls an LLM thousands of times, so the choice of model has a large effect on cost. A common expectation is that a bigger, costlier model produces better heuristics, but the covered text finds no consistent advantage for larger models across five combinatorial benchmarks, and smaller or free models sometimes beat expensive ones.
Existing LLM routers learn from offline labelled data and treat each query on its own, with no link between one choice and the next. In heuristic discovery there are no offline labels; the only signal is the evaluator score given to each heuristic after it is tested, and each choice changes what later calls see.
Three further properties follow from this setting: the goal is one best heuristic across the whole run rather than good routing for each query, the outputs of one model seed the population that conditions later prompts, and the relative usefulness of each model changes as the population evolves. Classical bandit algorithms assume independent arms and optimize cumulative reward, so they do not apply directly to these three properties.
What the routing policy optimizes
The AHD goal is to find a heuristic that maximizes its average score over the instance set of the problem. \[ \hat{h} = \arg\max_{h \in \mathcal{H}} \frac{1}{|\mathcal{I}_P|} \sum_{I \in \mathcal{I}_P} f_P(h, I) \]
The search runs for a horizon of T steps. At each step a context-building algorithm A picks k heuristics from those already generated, and the chosen LLM uses them to produce a new candidate by mutation and crossover. The scoring function f_P then gives the candidate a scalar score r_t, and A itself stays fixed while the LLM choice becomes the quantity to learn.
For each LLM ℓ the method keeps a buffer O_ℓ of the scores of every heuristic that ℓ generated, and the pull count n_ℓ is the size of that buffer. Because the same heuristic can be authored more than once, O_ℓ is treated as a multi-set rather than a plain set.
Since the objective rewards the best heuristic found rather than the average output, each LLM is characterized by its upper-tail quantile q_p(ℓ), the score threshold that only a fraction p of its outputs exceed. \[ q_p(\ell) = \min\{ x \in \mathbb{R} : \Pr(f_P(h) > x \mid \mathrm{LLM}(h) = \ell) \le p \} \] A smaller p selects more extreme outcomes, and as p approaches 0 the quantile approaches the highest score the LLM can reach.
The mutation genealogy is a directed acyclic graph whose nodes are generated heuristics and whose edge from h' to h means that h' was in the prompt used to generate h. The parent set Pa(h) is the set of k heuristics chosen by A for the prompt that produced h. The d-hop ancestry Pa^(d)(h) collects the heuristics reachable by following at most d parent edges, and it is defined recursively.
\[ \mathrm{Pa}^{(d)}(h) = \begin{cases} \emptyset & \text{if } d = 0, \\ \mathrm{Pa}(h) \cup \bigcup_{h' \in \mathrm{Pa}(h)} \mathrm{Pa}^{(d-1)}(h') & \text{if } d \ge 1 \end{cases} \]
The routing problem asks for a policy π that maps the history of heuristics to an LLM at each step, so that the best heuristic found within the horizon scores as high as possible. \[ \pi^* = \arg\max_{\pi} \max_{h \in h_{\pi \le T}} \left( \frac{1}{|\mathcal{I}_P|} \sum_{I \in \mathcal{I}_P} f_P(h, I) \right) \] The outer maximum is over policies, and the inner maximum is over the heuristics that a policy produces within T steps, so only the single best heuristic counts.
The seed heuristic h_0 is fixed, and the policy is applied from t = 1 onward.
How BALLAD scores each LLM arm
Each LLM is an arm, and the evaluator score of the heuristic it produces is the reward. BALLAD builds its index on this bandit view, so that each arm can be compared with the others from scores gathered during the same run.
Because the goal is the single best heuristic, arms are ranked by their upper-tail quality q_p(ℓ) instead of their mean, and that quantity has to be estimated reliably from the small buffer O_ℓ collected during the run. The bootstrapped quantile-of-maxima estimator provides that base estimate from the buffer.
This credit is propagated through the mutation genealogy DAG, so an LLM's contribution is counted through the chain of prompts it seeded.
The third component is a sliding-window normalisation, which keeps the index tied to each model's current utility rather than its utility over the whole history. This matters because the usefulness of a model can drop once the search moves past the regime where it was strong.
It needs no offline supervision and leaves prompt construction and evaluation unchanged.
Results across five problems
Across five combinatorial benchmarks, the covered text reports no consistent advantage for larger, costlier LLMs in heuristic quality.
On five NP-hard combinatorial optimization problems with a pool of four LLMs, BALLAD matches the best individual LLM. In several cases it surpasses every individual model in the pool.
The authors argue that the gain cannot be explained by selection alone and that BALLAD learns a collaborative dynamic among the models.
Limits of the evidence in this excerpt
Per-problem scores, the exact cost comparison and the experimental settings are not part of the covered text.
The matching or surpassing of the best individual LLM is described for several problems, not all of them. The covered text does not give the parameters of the bootstrap or the windowing, so the index is described only at the level of its components.
Paper info
- Authors
- Samidha Verma, Ankit Anand, Sayan Ranu
- Venue
- arXiv · Preprint
- First published
- 2026-11-12
- Added
- 2026-11-14
- Updated
- 2026-11-12
- Version
- v1
- arXiv
- 2611.17241
- Category
- cs.AI
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Modern automated heuristic discovery (AHD) systems increasingly rival hand-crafted heuristics by leveraging Large Language Models (LLMs) to iteratively mutate and refine solutions. A natural assumption is that more powerful and more expensive models consistently yield better heuristics. We challenge this empirically: across multiple NP-hard combinatorial optimization problems, we find no consistent advantage for larger, costlier models. This raises a deeper question: given a pool of LLMs spanning frontier and freely hosted or open-weight models, how should one adaptively select which model to invoke at each step of the search? The challenge is non-trivial. The optimal LLM may shift over the course of a run, and because one LLM's output seeds the context for subsequent calls, each model's reward signal is non-stationary and entangled across the heuristic population, thus violating the independence assumptions of classical online decision-making settings. We address this through Ballad (Bandit-based LLM Routing for Automated Heuristic Discovery), an online bandit algorithm that learns to orchestrate a pool of LLMs into an ensemble that matches or exceeds what any soloist LLM achieves alone. This orchestration is powered by an LLM selection policy that favors rare, high-scoring heuristics over stable averages, a DAG-based credit propagation mechanism through the genealogy of the heuristic population, and discounting of stale observations to remain attuned to each model's current utility. Across five NP-hard combinatorial optimization problems and a pool of four models of varying capability and cost, Ballad not only matches the best individual LLM in hindsight but, in several cases, surpasses every individual model while reducing API cost by up to 65.6% relative to always using the strongest model.
Quote from the paper
Samidha Verma, Ankit Anand, Sayan Ranu (2026). Ballad: Bandit-Based LLM Routing for Automated Heuristic Discovery. arXiv:2611.17241v1. https://arxiv.org/abs/2611.17241v1
BibTeX
@misc{verma2026ballad,
title = {{Ballad: Bandit-Based LLM Routing for Automated Heuristic Discovery}},
author = {Samidha Verma and Ankit Anand and Sayan Ranu},
year = {2026},
eprint = {2611.17241},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.17241v1}
}