演化循环程序:探索冻结Transformer应如何循环
Evolving Loop Programs: Discovering How Frozen Transformers Should Loop
AI总结:
提出ELP方法,为图像、视频、文本领域的预训练模型生成可执行循环推理程序,在不更新权重的情况下实现质量-计算权衡优化,获5.19倍FLOPs加速等成果。
摘要:
通过循环复用Transformer模块可在不更新权重的情况下提升预训练模型性能,但有效的循环需要对重复模块、隐藏状态演化及计算复用时机做出协调选择。我们提出演化循环程序(Evolving Loop Programs, ELP),一种基于离线大语言模型(LLM)的方法,用于发现具备优异质量-计算权衡的可执行推理程序。该搜索过程会同时编辑循环结构、状态更新动态及执行控制逻辑,包括采样调度、引导机制与中间状态复用。LLM会生成诊断代码,并结合模型行为观测与累积开发评估结果来指导这些编辑操作。我们为不同运行优先级保留非支配性程序,随后冻结其代码与参数。部署阶段,这些程序执行循环时无需再调用搜索LLM。实验涵盖图像、视频与文本领域,使用分别搜索得到的程序:图像领域中,带循环与不带循环训练的扩散Transformer均实现更优的质量-计算权衡,选定的RAE程序在GenEval与DPG-Bench上性能提升,相比标准无循环推理实现5.19倍的浮点运算量(FLOPs)加速;在Looped-DiT上,两者在相同或更低计算量下性能优于原生推理,且采样步数匹配。视频领域中,冻结程序在不更新权重的情况下提升LongLive与Self-Forcing的长视频一致性。据我们所知,这是首次对预训练视频世界模型中无训练的Transformer模块循环进行实证验证。文本领域中,程序提升Qwen3-4B的整体推理准确率。我们的代码将公开。
英文摘要:
Reusing transformer blocks through loops can improve pretrained models without updating their weights. However, useful loops require coordinated choices about which blocks repeat, how hidden states evolve, and when computation is reused. We introduce Evolving Loop Programs (ELP), an offline LLM-based method for discovering executable inference programs with favorable quality-compute trade-offs. The search jointly edits loop structure, state-update dynamics, and execution controls, including sampling schedules, guidance, and intermediate-state reuse. The LLM writes diagnostic code and combines observations of model behavior with accumulated development evaluations to guide these edits. We retain nondominated programs for different operating priorities, then freeze their code and parameters. During deployment, these programs execute their loops without further calls to the search LLM. Experiments span image, video, and text using separately searched programs. For images, diffusion transformers trained with and without loops achieve better quality-compute trade-offs. A selected RAE program improves GenEval and DPG-Bench with a $5.19\times$ FLOPs speedup over standard unlooped inference. On Looped-DiT, both improve at equal or lower compute than native inference with matched sampling steps. For video, frozen programs improve long-video consistency across LongLive and Self-Forcing without weight updates. To the best of our knowledge, this is the first empirical validation of training-free transformer-block looping in pretrained video world models. For text, programs improve aggregate reasoning accuracy on Qwen3-4B. Our code will be released.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。