Gradient Estimation for LLM-Embedded Simulation Optimization
Abstract
Large language models (LLMs) are increasingly embedded in operational simulators to represent context-dependent human decisions, which opens new possibilities for simulation optimization. However, the LLM acts as a black box, so derivatives through its decisions are unavailable for gradient-based policy search. Finite difference estimation can avoid this requirement, but the required paired simulations that sample LLM actions independently often disagree, and such action switches persist under small perturbations, which inflates the gradient variance to order for perturbation radius . To control this variance, we develop a behavioral common random number framework. It first applies maximal coupling to the LLM's action distributions, preserving each simulation's behavioral law while making action switches as rare as possible, which reduces the variance bound to . It then applies first-switch conditioning, which averages over whether a switch occurs, together with an impact-aware extension that prioritizes influential switches. Under suitable stability conditions, both keep the variance bounded as shrinks. We further establish improved complexity bounds for projected stochastic approximation. Experiments on synthesized and LLM-embedded simulators confirm the theory and show substantial performance gains.
Create a lesson
Metadata
- Comments
- 31 pages, 5 figures
Related papers
Near Optimal Pure Stepsize Adaptation Acceleration for Gradient Descent on Nonconvex Optimization
Shared title terminologymath.OCYin Liu, Ziyang Zeng, Junyu Zhang
BGPNP: A Non-Euclidean Gradient Projection Newton Pursuit Method for Sparsity-Constrained Optimization
Shared title terminologymath.OCJiawei Chen, Huilin Han, Yibing Lv et al.
Exact Last-Iterate Bounds and Optimal Stepsizes for Proximal Stochastic Gradient Descent
Shared title terminologymath.OCLaurent Condat, Peter Richtárik
Robust Estimators for Stochastic Model-Based Derivative-Free Optimization
Shared title terminologymath.OCFangyu Liu, Lindon Roberts
Fast Gradient-Based Framework for Spatial and Length Optimization of Geothermal Borehole Fields
Shared title terminologymath.OCOliver Heinzel, Smajil Halilovic, Thomas Hamacher et al.
Gradient Flows over Convex Bodies for Learning Optimal Regularizers
Shared title terminologymath.OCNilava Metya, Oscar Leong, Yong Sheng Soh