POLCA: Stochastic Generative Optimization with LLM

Xuanfei Ren, Allen Nie, Tengyang Xie, Ching-An Cheng

TL;DR

This paper introduces POLCA, a novel framework for optimizing complex systems using Large Language Models (LLMs). POLCA efficiently handles the inherent noise and vast search spaces in generative optimization, outperforming existing methods on various benchmarks by intelligently managing candidate exploration and leveraging historical context.

What Problem Does This Paper Address?

Optimizing complex systems, such as LLM prompts or multi-turn agents, traditionally involves tedious manual iteration. While generative optimization using LLMs has shown promise in automating this, it faces significant challenges:

  • Stochasticity: Feedback can be noisy (e.g., from LLM judges), and system behaviors themselves can be inherently random. This makes it hard to reliably assess candidate improvements.
  • Explosive Search Space: LLMs can generate an ever-increasing number of candidate solutions, leading to prohibitive computational costs for evaluation.
  • Optimization Instability: LLMs can get stuck in local optima or repeat mistakes, hindering progress.

The authors aim to develop a scalable and robust framework that addresses these issues, enabling efficient and effective optimization of complex, stochastic systems.

Methods

POLCA introduces several key innovations to tackle the challenges of stochastic generative optimization:

  • Prioritized Optimization with Local Contextual Aggregation (POLCA): This is the core framework. It uses a priority queue to manage candidate solutions, balancing exploration (trying new ideas) and exploitation (refining promising ones).
  • $\varepsilon$-Net Criterion: To manage the vast search space, POLCA employs an $\varepsilon$-Net mechanism. This uses semantic embeddings of candidate programs to ensure structural and semantic diversity within the priority queue, pruning redundant proposals. It allows for a controlled trade-off between exploration and computational budget.
  • LLM Summarizer: To provide richer context to the LLM optimizer, POLCA uses an LLM Summarizer. This component processes historical trials (both successes and failures) to generate high-level optimization instructions, akin to meta-learning.
  • Minibatch Evaluation: To handle expensive evaluations, POLCA uses minibatches of tasks for evaluation, providing a more efficient way to gather feedback.
  • Theoretical Guarantees: The paper provides theoretical analysis showing that POLCA, particularly with a UCB (Upper Confidence Bound) priority, converges to near-optimal solutions under stochasticity.

Datasets

POLCA was evaluated on the following diverse benchmarks:

  • $\tau$-bench: For optimizing multi-turn agents' prompts in complex tool-use scenarios.
  • HotpotQA: For optimizing prompts in a multi-hop question-answering dataset.
  • VeriBench: For formal verification tasks, specifically translating Python to Lean 4 code, both in a deterministic compilation setting and a stochastic 3-step evaluation setting.
  • KernelBench: For optimizing CUDA kernel code for performance.

Key Insights and Ideas

  • Semantic Diversity is Crucial: The $\varepsilon$-Net mechanism is vital for preventing the search space from exploding with redundant candidates. By ensuring semantic diversity, POLCA can explore more distinct solution paths.
  • Historical Context Matters: The LLM Summarizer's ability to distill past successes and failures into actionable guidance significantly improves the LLM optimizer's effectiveness, mimicking momentum-based optimization.
  • Stochasticity Requires Robust Memory: Unlike methods that discard old information, POLCA's continuously updated memory buffer and re-evaluation of candidates make it resilient to noisy feedback and stochastic system behaviors.
  • UCB for Provable Guarantees: While the empirical mean is a practical default, the theoretical analysis highlights that UCB-based exploration is essential for provable convergence guarantees in stochastic environments.

Key Results

POLCA consistently outperformed state-of-the-art algorithms across all tested benchmarks, demonstrating:

  • Robustness: Achieved superior performance in both deterministic and stochastic settings.
  • Sample Efficiency: Required fewer samples to reach high-performing solutions.
  • Time Efficiency: Minimized wall-clock time through parallelization and efficient batch updates.
  • Specific Improvements:
    • On $\tau$-bench, POLCA achieved significant performance improvements over baselines.
  • On HotpotQA, POLCA showed clear superiority.
  • On VeriBench (Compilation), POLCA achieved a 95.2% pass rate, significantly exceeding baselines.
  • On KernelBench, POLCA consistently outperformed baselines in terms of speed and efficiency.

Limitations and Future Work

The authors acknowledge several limitations and suggest future directions:

  • Priority Function Sophistication: While the empirical mean is efficient, more advanced priority functions (beyond UCB) might further enhance search performance.
  • UCB Parameter Tuning: The theoretical UCB requires knowledge of the reward noise level ($\sigma$), which is often unavailable. Empirical sweeps of the exploration bonus ($\beta$) showed it can outperform the mean but is problem-dependent.
  • Function Approximation: While the $\varepsilon$-Net uses embeddings for filtering, more advanced function approximation methods (beyond embedding-based filtering) could be explored for predicting performance across analogous tasks.
  • Generalizability: The current results are based on specific benchmarks and models. Further validation across a wider range of tasks and model families is needed.
  • Optimizer Independence: POLCA is designed to be agnostic to the specific LLM optimizer, allowing it to benefit from future advancements in LLM capabilities.

Summary updated

BibTeX
@inproceedings{ren2026polca,
  author = {Xuanfei Ren and Allen Nie and Tengyang Xie and Ching-An Cheng},
  title = {{POLCA: Stochastic Generative Optimization with LLM}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=2RKPztDfgZ},
}
Figure