Understanding the Challenges in Iterative Generative Optimization with LLMs

Allen Nie, Xavier Daull, Zhiyi Kuang, Abhinav Akkiraju, Anish Chaudhuri, Max Piasevoli, Ryan Rong, YuCheng Yuan, Prerit Choudhary, Shannon Xiao, Rasool Fakoor, Adith Swaminathan, Ching-An Cheng

TL;DR

Generative optimization—using Large Language Models (LLMs) to iteratively improve code, prompts, or workflows based on execution feedback—is a powerful paradigm for building self-improving agents. However, it remains notoriously brittle in practice, with only 9% of surveyed agents utilizing it. This paper reveals that this brittleness stems from three critical, hidden design choices: the starting artifact structure, the credit horizon of execution traces, and the batching size of experiences.

What Problem Does This Paper Address?

While LLMs have shown remarkable success in automatically generating and optimizing code or prompts, setting up a reliable automated "learning loop" is incredibly difficult. Engineers face a massive design space with little theoretical guidance, often resorting to ad-hoc guesswork.

This paper systematically investigates why generative optimization loops frequently fail or plateau. The authors break down the hidden engineering choices that dictate whether an LLM optimizer can successfully navigate a solution space or if it will fall victim to "meta-overfitting"—revising code to perfectly fit immediate validation feedback while completely destroying its ability to generalize.

Methods

The authors formalize the generative optimization process using a graph-based framework (extending the OPTO framework) to analyze how information flows back to the LLM optimizer.

Figure 1: The learning loop of generative optimization.

They isolate and evaluate three core design decisions across three distinct application domains:

  1. Starting Artifact (System Initialization): Does providing a single monolithic function vs. a highly modularized multi-function pipeline change what solutions the LLM can successfully discover?
  2. Credit Horizon (Learning Context): For multi-step tasks, should the optimizer receive immediate, dense feedback after every single action (short horizon), or should it only update after observing a full sequence of interactions (long horizon)?
  3. Experience Batching: How many independent examples (minibatch size) of inputs, outputs, and feedback should be concatenated into the LLM's prompt context at each update step to ensure robust generalization?

Datasets

The methods were rigorously tested across three diverse benchmarks:

  • MLAgentBench: Specifically evaluating automated machine learning pipeline generation on Kaggle's Spaceship Titanic and Housing Price datasets.
  • Arcade Learning Environment (ALE) / OCAtari: Optimizing Python code to play 8 different Atari games (including Pong, Breakout, and Space Invaders) using object-centric state dictionaries.
  • BigBench Extra Hard (BBEH): Prompt and post-processing optimization across 8 challenging language understanding tasks (e.g., Dyck Languages, Geometric Shapes, Linguini, Boolean Expressions).

Key Insights and Ideas

  • Parallels to Traditional ML: The authors highlight a fascinating connection: the hidden challenges of LLM learning loops directly mirror classic machine learning concepts. The starting artifact problem acts like neural network weight/architecture initialization; the credit horizon mirrors reinforcement learning horizons; and experience batching behaves exactly like SGD batch size selection.
  • No Universal Recipe: A configuration that guarantees success in one task can completely ruin performance in another. For instance, modularizing code helped significantly on the Spaceship Titanic task but severely degraded performance on the Housing Price dataset.
  • Meta-Overfitting is Real: Even without numerical gradient descent, LLM optimizers exhibit classical overfitting. They quickly learn to exploit validation metrics by introducing brittle code hacks that fail on hidden test sets.
  • Batch Size Non-Monotonicity: Unlike traditional deep learning where larger batches typically stabilize training, larger minibatches do not monotonically improve LLM generalization. Larger batches provide broader error coverage but can smooth out specific, critical failure modes, causing the optimizer to plateau early.
Figure 3: Starting artifacts. The one-function and many-function initializations provide equiv- alent docstring information but differ in pipeline modularization.

Key Results

  • MLAgentBench: The LLM-optimized pipelines outperformed prior baselines by 11.5% to 22.4% on average, with the best runs matching or surpassing the top 86.6% of human Kaggle submissions.
  • Atari: Shorter, one-step credit horizons actually outperformed full multi-step rollouts in 4 out of 8 games (e.g., Freeway, Enduro), proving that full trajectories aren't always necessary. Remarkably, generative optimization achieved competitive game scores up to 26x faster in wall-clock time than traditional Deep RL baselines (DQN and PPO).
  • BBEH: Optimal batch sizes were highly task-dependent. Batch size 1 achieved the best test performance for Disambiguation QA, while Geometric Shapes and Boolean Expressions required a batch size of 3 to successfully generalize.

Limitations and Future Work

The study focused strictly on isolating the three core learning loop components and did not ablate other influential variables, such as the choice of the base LLM optimizer, the specific search algorithms used, or the phrasing of the feedback oracle.

The authors conclude that the lack of a simple, universal setup recipe is the primary barrier preventing widespread production adoption of self-improving agents. They call for future work to focus on developing robust, automated "defaults"—similar to the Adam optimizer or Transformer architecture in traditional ML—that can automatically manage context structuring, trace truncation, and batching across diverse domains.

Summary updated

BibTeX
@inproceedings{nie2026understanding,
  author = {Allen Nie and Xavier Daull and Zhiyi Kuang and Abhinav Akkiraju and Anish Chaudhuri and Max Piasevoli and Ryan Rong and YuCheng Yuan and Prerit Choudhary and Shannon Xiao and Rasool Fakoor and Adith Swaminathan and Ching-An Cheng},
  title = {{Understanding the Challenges in Iterative Generative Optimization with LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=uMQtAycESf},
}
Figure