Greedy Is a Strong Default: Agents as Iterative Optimizers

Yitao Li · 2026

Read Greedy Is a Strong Default: Agents as Iterative Optimizers by Yitao Li (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-27415.txt.

Introduction

Li tests whether smart search tools still help when an AI proposes each step. Classic search tweaks random guesses step by step. Here a language model reads test feedback and suggests better options. Four tasks cover rule learning, tuning, and fine-tuning. Simple greedy hill climbing wins or ties across all tasks. Fancy methods like annealing add cost but no gain. Most gains arrive in the first round. The author urges greedy search as the default choice.

Catalog record

CREATORYitao Li
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE42659
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.27415

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Greedy Is a Strong Default: Agents as Iterative Optimizers Yitao Li Abstract Classical optimization algorithms—hill climbing, simulated annealing, population-based methods—generate candidate solutions via random perturbations. We replace the random proposal generator with an LLM agent that reasons about evaluation diagnostics to propose informed candidates, and ask: does the classical optimization machinery still help when the proposer is no longer random? We evaluate on four tasks spanning discrete, mixed, and continuous search spaces (all replicated across 3 independent runs): rule-based classification on Breast Cancer (test accuracy 86.0% → \to 96.5%), mixed hyperparameter optimization for MobileNetV3-Small on STL-10 (84.5% → \to 85.8%, zero catastrophic failures vs. 60% for random search), LoRA fine-tuning of Qwen2.5-0.5B on SST-2 (89.5% → \to 92.7%, matching Optuna TPE with 2 × \times efficiency), and XGBoost on Adult Census (AUC 0.9297 → \to 0.9317, tying CMA-ES with 3 × \times fewer evaluations). Empirically, on these tasks : a cross-task ablation shows that simulated annealing, parallel investigators, and even a second LLM model (OpenAI Codex) provide no benefit over greedy hill climbing while requiring 2–3 × \times more evaluations. In our setting, the LLM’s learned prior appears strong enough that acceptance-rule sophistication has limited impact—round 1 alone delivers the majority of improvement, and variants converge to similar configurations across strategies. The practical implication is surprising simplicity: greedy hill climbing with early stopping is a strong default. Beyond accuracy, the framework produces human-interpretable artifacts—the discovered cancer classification rules independently recapitulate established cytopathology principles. Code is available at https://github.com/yitao416/agentic-optimization . K eywords LLM agents \cdot optimization \cdot hyperparameter tuning \cdot proposal distribution 1 Introduction Hyperparameter optimization and artifact optimization are fundamentally iterative search problems. Current approaches—random search, Bayesian optimization, evolutionary strategies (CMA-ES), grid search—rely on random or model-based perturbations to generate candidate solutions. A growing body of work uses large language models as optimizers: OPRO [ 1 ] iterates on prompts, EvoPrompting [ 2 ] combines LLMs with evolutionary search, FunSearch [ 8 ] pairs LLMs with evolutionary procedures, and LLAMBO [ 9 ] integrates LLMs into Bayesian optimization. These systems share a common structure: propose a candidate, evaluate it, decide whether to accept . This is precisely the structure of classical optimization algorithms—hill climbing, simulated annealing, and population-based methods. The only difference is the proposal generator : an LLM that reads evaluation diagnostics and proposes changes based on reasoning, rather than a random perturbation. This raises a natural question: when the proposal generator is an informed LLM rather than a random process, does the surrounding optimization machinery—simulated annealing, parallel search, strategic diversity—still provide value? We investigate this question empirically on four tasks spanning discrete rule discovery, mixed hyperparameter optimization, and continuous tuning. Across all tasks and 3 independent runs per configuration, we find that greedy hill climbing matches or beats simulated annealing and parallel investigators while using 2–3 \times fewer evaluations. The LLM’s learned prior appears to be the dominant factor: round 1 alone delivers the majority of improvement, and all variants converge to similar configurations regardless of acceptance strategy. We do not claim this holds universally—on tasks with sharper local optima or weaker LLM priors, SA may still help. But the consistency of the finding across four diverse tasks suggests that, at least for current LLMs on standard ML optimization problems, the proposal quality matters far more than the acceptance rule . The practical implication is that researchers building LLM-based optimizers can start with the simplest possible loop—greedy acceptance with early stopping—and add complexity only if needed. The framework also produces practically useful results: matching Optuna TPE and CMA-ES with fewer evaluations, zero catastrophic failures, and human-interpretable artifacts that independently recapitulate domain knowledge. 2 Framework 2.1 Iterative Optimization as Propose-Evaluate-Accept Let \theta denote the current artifact (a rule file, hyperparameter configuration, or any parameterized object) and M(\theta) its evaluation metric. Each optimization round proceeds as: 1. Propose: Generate a candidate \theta^{\prime} . Classically, \theta^{\prime} is drawn from a random perturbation distribution around \theta . In our framework, \theta^{\prime} is proposed by an LLM agent that reasons about evaluation diagnostics. 2. Evaluate: Compute M(\theta^{\prime}) on the candidate. 3. Accept/Reject: Decide whether to adopt \theta^{\prime} based on an acceptance rule. The acceptance rule determines the optimization algorithm: 2.2 Hill Climbing (Greedy Acceptance) Accept \theta^{\prime} if M(\theta^{\prime})>M(\theta) ; reject otherwise. This converges to a local optimum. In our implementation, the Orchestrator dispatches the Investigator to propose \theta^{\prime} , and the Reviewer accepts if the metric strictly improves. 2.3 Simulated Annealing (Probabilistic Acceptance) Accept improvements always; accept regressions with probability: P(\text{accept})=\exp\!\left(\frac{M(\theta^{\prime})-M(\theta)}{T}\right) where T is the temperature, cooled geometrically: T_{k}=T_{0}\cdot\gamma^{k-1} . At high temperature, the optimizer explores freely; as T\to 0 , it converges to greedy. Given a sufficiently slow cooling schedule, simulated annealing converges to the global optimum [ 3 ] . The implementation is identical to hill climbing except that the Reviewer applies the Boltzmann acceptance criterion. 2.4 Parallel Investigators K investigators run independently each round, each receiving a directive constraining it to a different search region (e.g., “explore deep trees with heavy pruning” vs. “explore class-aware calibration”). The Reviewer selects the best proposal. This is parallel hill climbing with selection, where directives force proposal diversity beyond what the shared LLM prior provides. 2.5 The LLM as Proposal Generator The Investigator reads diagnostic output—cross-validation results, error analysis, misclassification patterns—and proposes changes based on reasoning about observed patterns. For example, detecting overfitting leads to increased regularization; observing class imbalance triggers scale adjustment. The key difference from random proposals is that the LLM has a learned prior over good configurations, derived from its training data. This prior is the source of both strength (efficient early search, informed categorical decisions) and weakness (convergence to “conventional” configurations, inability to match continuous optimizers on numerical precision). Formally, let \mathcal{L} denote the LLM (e.g., Claude Opus 4.6) and f the deterministic parsing function that maps token sequences to valid artifacts. Given the current artifact \theta and diagnostic information d , the model \mathcal{L} produces a conditional distribution over token sequences; applying f yields the proposal distribution over artifacts: P_{\mathcal{L}}(\text{tokens}\mid\text{prompt}(\theta,d))\;\xrightarrow{\;f\;}\;q_{\mathcal{L}}(\theta^{\prime}\mid\theta) The induced distribution q_{\mathcal{L}} depends on the specific model \mathcal{L} —different LLMs will produce different proposal distributions and therefore different optimization trajectories. The effective support \Theta_{q_{\mathcal{L}}}\subseteq\Theta (the region receiving non-negligible probability mass) is determined by \mathcal{L} ’s training data and reflects its learned prior over good configurations. The LLM’s value as a proposal generator is measured by whether q_{\mathcal{L}} concentrates mass on improving solutions more effectively than a random perturbation distribution. 2.6 When Does SA Help? A Proposal-Centric Analysis Classical SA theory [ 3 ] shows that SA’s advantage over greedy comes from crossing energy barriers between local optima: the Boltzmann criterion accepts uphill moves that enable the search to escape one basin and reach another. We argue that this advantage vanishes when the proposal distribution is sufficiently concentrated. Effective search space. For a random perturbation, \Theta_{q}\approx\Theta . For an LLM \mathcal{L} with a strong prior, \Theta_{q_{\mathcal{L}}}\ll\Theta : proposals cluster in a narrow “conventional” region. Different models \mathcal{L}_{1},\mathcal{L}_{2} may have different effective supports \Theta_{q_{\mathcal{L}_{1}}}\neq\Theta_{q_{\mathcal{L}_{2}}} , but parallel investigators sharing the same \mathcal{L} are constrained to the same \Theta_{q_{\mathcal{L}}} . We test this prediction empirically in Section 3.4 using two distinct LLMs. Unimodality within \Theta_{q_{\mathcal{L}}} . If the objective M

Read the complete text