POLCA: Stochastic Generative Optimization with LLM
Xuanfei Ren, Allen Nie, Tengyang Xie, Ching-An Cheng
cs.LG
Mar 16, 2026 · v1
cs.AI
TL;DR
Uses VeriBench as one evaluation benchmark: LLM-optimized Python-to-Lean 4 translations are scored by Lean 4 compilation via PyPantograph, unit tests, and an LLM judge.
Abstract
Optimizing complex systems, ranging from LLM prompts to multi-turn agents, traditionally requires labor-intensive manual iteration. We formalize this challenge as a stochastic generative optimization problem where a generative language model acts as the optimizer, guided by numerical rewards and text feedback to discover the best system. We introduce Prioritized Optimization with Local Contextual Aggregation (POLCA), a scalable framework designed to handle stochasticity in optimization – such as noisy feedback, sampling minibatches, and stochastic system behaviors – while effectively managing the unconstrained expansion of solution space. POLCA maintains a priority queue to manage the exploration-exploitation tradeoff, systematically tracking candidate solutions and their evaluation histories. To enhance efficiency, we integrate an $\varepsilon$-Net mechanism to maintain parameter diversity and an LLM Summarizer to perform meta-learning across historical trials. We theoretically prove that POLCA converges to near-optimal candidate solutions under stochasticity. We evaluate our framework on diverse benchmarks, including $τ$-bench, HotpotQA (agent optimization), VeriBench (code translation) and KernelBench (CUDA kernel generation). Experimental results demonstrate that POLCA achieves robust, sample and time-efficient performance, consistently outperforming state-of-the-art algorithms in both deterministic and stochastic problems. The codebase for this work is publicly available at
https://github.com/rlx-lab/POLCA.
Problem
Optimizing complex LLM-based systems such as prompts, agents and code generators usually requires manual iteration. Automated generative optimization must cope with noisy feedback, minibatch sampling, stochastic system behavior, and an ever-growing space of candidate solutions.
Approach
POLCA frames the task as stochastic generative optimization, with an LLM proposing new program parameters from numerical rewards and text feedback. It keeps a priority queue of candidates with their evaluation histories, filters near-duplicate proposals with an ε-Net semantic filter, and uses an LLM Summarizer to supply context drawn from past trials. A simplified UCB variant is proven to converge to near-optimal candidates. Experiments cover τ-bench, HotpotQA, KernelBench and VeriBench; on VeriBench, Python programs are translated into Lean 4 and checked by the Lean compiler through PyPantograph.
Results
POLCA outperforms DSPy, GEPA and OpenEvolve in both sample and time efficiency across stochastic and deterministic benchmarks, including the Lean 4 translation tasks in VeriBench.