LLM生成代码时反复变异却总回到相似结构,缺乏真正探索。
Mutation Without Variation: Convergence Dynamics in LLM-Driven Program Evolution

- LLM变异链在程序空间中收敛至少数固定结构区域。
- 87%的链条中93%以上变异重复已有结构,变化仅限于末端替换。
- 该现象源于模型自身机制,非单纯提示词或随机性导致。
当大语言模型反复变异程序时,它是在探索新形态,还是不断回到相同形式?我们通过分析在无选择压力下的领域特定语言中,不同提示设计、模型家族和随机复现条件下的LLM驱动变异链,发现基于LLM的变异始终收敛到程序空间中的有限吸引区域。结构层面的收敛尤为严重:在87%的变异链中,超过93%的变异重复了先前见过的结构形式,大多数变化仅限于反复模板中的终端替换。循环分析显示,短周期和自环主导了转移结构。收敛速度受提示语义和模型选择影响,但现象在各种条件下均稳健存在。经典遗传编程子树变异算子未表现出类似收敛,表明该效应源于LLM变异流程的内在特性。这些发现揭示了LLM驱动程序演化的核心矛盾:赋予其语义感知能力的同时,也带来了结构性同质化的系统性偏差,若要实现持续开放探索,必须对此加以应对。源代码见https://github.com/can-gurkan/lmca。
原文摘要 · Abstract (English)
When an LLM repeatedly mutates a program, does it explore new forms or circle back to the same ones? We study this question by analyzing LLM-driven mutation chains in the absence of selection pressure within a domain-specific language, varying prompt design, model family, and stochastic replication. We find that LLM-based mutation consistently converges toward restricted attractor regions in program space. Convergence is especially severe at the structural level: in 87% of chains, over 93% of mutations revisit a previously seen structural form, with most variation confined to terminal substitutions within recurring templates. Cycle analysis reveals short cycles and self-loops dominating the transition structure. The rate of convergence varies with prompt wording and model choice, but the phenomenon is robust across conditions. A classical GP subtree mutation operator does not exhibit comparable convergence, suggesting that the effect is intrinsic to the LLM mutation pipeline. These findings reveal a tension at the heart of LLM-driven program evolution: the same capabilities that enable semantics-aware program transformation also carry a systematic bias toward structural homogeneity that must be accounted for if such systems are to sustain open-ended exploration. Source code is available at https://github.com/can-gurkan/lmca.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。