Large language models (LLMs) are increasingly used to evolve programs and multi-agent systems, yet most existing approaches rely on overwrite-based mutations that maintain only a single candidate at a time. Such methods discard useful variants, suffer from destructive edits, and explore a brittle search space prone to structural failure. We introduce EvoLattice, a framework that represents an entire population of candidate programs or agent behaviors within a single directed acyclic graph. Each node stores multiple persistent alternatives, and every valid path through the graph defines a distinct executable candidate, yielding a large combinatorial search space without duplicating structure. EvoLattice enables fine-grained alternative-level evaluation by scoring each alternative across all paths in which it appears, producing statistics that reveal how local design choices affect global performance. These statistics provide a dense, data-driven feedback signal for LLM-guided mutation, recombination, and pruning, while preserving successful components. Structural correctness is guaranteed by a deterministic self-repair mechanism that enforces acyclicity and dependency consistency independently of the LLM. EvoLattice naturally extends to agent evolution by interpreting alternatives as prompt fragments or sub-agent behaviors. Across program synthesis (proxy and optimizer meta-learning), EvoLattice yields more stable evolution, greater expressivity, and stronger improvement trajectories than prior LLM-guided methods. The resulting dynamics resemble quality-diversity optimization, emerging implicitly from EvoLattice's internal multi-alternative representation rather than an explicit external archive.
翻译:大型语言模型(LLM)越来越多地用于演化程序和多智能体系统,但现有方法大多依赖基于覆盖的突变,每次仅保留单一候选方案。此类方法会丢弃有用变体,遭受破坏性编辑的影响,并在易于发生结构故障的脆弱搜索空间中探索。我们提出EvoLattice框架,该框架将整个候选程序或智能体行为种群表示为单一有向无环图。每个节点存储多个持久替代方案,图中每条有效路径均定义一个独特的可执行候选方案,从而在不重复结构的情况下生成大型组合搜索空间。EvoLattice通过评估每个替代方案在其出现的所有路径中的表现进行细粒度替代级评估,生成揭示局部设计选择如何影响全局性能的统计数据。这些统计数据为LLM引导的突变、重组和剪枝提供密集的数据驱动反馈信号,同时保留成功组件。结构正确性由确定性自修复机制保证,该机制独立于LLM强制执行无环性和依赖一致性。EvoLattice通过将替代方案解释为提示片段或子智能体行为,自然扩展至智能体演化。在程序合成(代理和优化器元学习)任务中,与先前LLM引导方法相比,EvoLattice实现了更稳定的演化、更强的表达能力及更优的改进轨迹。其动态特性类似于质量-多样性优化,这种特性隐式地源自EvoLattice内部的多替代表示,而非显式的外部存档。