TL;DR
Large Language Models (LLMs) have shown promise as surrogate models and candidate generators for complex "blackbox" optimization problems. However, they often struggle in high-dimensional spaces, producing biased or sparse suggestions. To solve this, researchers introduce HOLLM (Hierarchical Optimization with LLMs), a novel framework that adaptively partitions the search space into smaller subregions. By using a bandit-inspired scoring system to select promising areas, HOLLM allows LLMs to focus their reasoning on manageable local spaces. This approach consistently outperforms global LLM sampling and matches state-of-the-art traditional optimizers.
The Challenge: LLMs in High-Dimensional Spaces
In global optimization, the goal is to find the optimal input for a function without knowing its underlying mathematical formula—evaluating points is often expensive, like tuning a machine's settings or discovering a new chemical compound. Recently, researchers have leveraged LLMs as "samplers" because they possess a "meta-prior," an inherent intuition about how scientific data and functions typically behave.
Despite this intuition, LLMs have a critical weakness: they struggle to navigate vast, high-dimensional search spaces. When prompted to suggest points across a global domain, their outputs tend to be biased, sparse, or repetitive. They frequently "collapse" into a narrow area, failing to explore the broader landscape. The core challenge is harnessing the LLM’s intuition without letting it get overwhelmed by the sheer size of the search space.
The HOLLM Approach
To overcome these limitations, the authors developed HOLLM. The algorithm operates in a continuous five-step loop designed to balance exploration and exploitation:
- Partition: The algorithm uses a KD-tree to adaptively slice the search space into smaller subregions (leaves) based on previously evaluated data points.
- Score: Each subregion is treated as a "meta-arm" in a multi-armed bandit framework. It receives a score based on three factors:
- Exploitation: The best value discovered in that region so far.
- Geometric Exploration: The physical volume of the region, favoring large, unexplored areas.
- Statistical Exploration: A variance-aware term (UCB-V) that prioritizes regions with inconsistent or uncertain data.
- Select: Subregions are chosen stochastically based on these calculated scores.
- Sample: Instead of asking the LLM to find the best point anywhere, the prompt provides the specific boundaries of the selected subregion. The LLM then proposes $k$ candidate points strictly within that localized box.
- Evaluate: The LLM predicts which of its own candidates are the most promising. The algorithm evaluates the top choices on the actual blackbox function and updates the KD-tree with the new data.
Key Insights and Results
HOLLM was rigorously tested across a variety of benchmarks, including synthetic math functions (like Hartmann, Rosenbrock, and Ackley), Hyperparameter Optimization (FCNet), real-world engineering tasks, and Neural Architecture Search (NAS-Bench-201).
- The Power of Locality: The study reveals that LLMs are significantly better local optimizers than global ones. Restricting the LLM to a small subregion lowers its "cognitive load," resulting in much more diverse and high-quality suggestions.
- Preventing Model Collapse: Global LLM optimizers quickly suffer from zero diversity, suggesting near-duplicate points. By forcing the model to evaluate different partitioned areas, HOLLM maintains high diversity (measured by ICL Divergence) throughout the optimization run.
- Superior Performance: HOLLM consistently outperformed "Global LLM" baselines and matched or exceeded established state-of-the-art methods like Bayesian Optimization (GP-EI) and BORE. Notably, on the notoriously difficult 20-dimensional Ackley function, HOLLM found the global minimum in under 50 iterations, while traditional methods failed to make meaningful progress.
- Efficiency and Accessibility: HOLLM is highly cost-effective; a full 50-trial run using Gemini-2.0-Flash cost approximately $0.14 in API fees. Furthermore, it works surprisingly well with open-weights models like Llama-3 and Qwen, democratizing access to LLM-based optimization.
Limitations and Future Work
While HOLLM represents a significant leap forward, it is not without limitations. The method remains dependent on the underlying LLM's proposal quality; if the model "hallucinates" poor points, the search efficiency drops. Additionally, making sequential API calls per iteration introduces latency and cost compared to running local, math-based optimizers like Gaussian Processes. Finally, while it performs well empirically, HOLLM currently lacks formal theoretical regret bounds, and its interaction with discrete search spaces warrants deeper investigation in future research.
Summary updated