1School of Software Engineering, Huazhong University of Science and Technology · 2Centrum voor Wiskunde en Informatica (CWI) · 3University of Trento · VibeLab
Repeating transformer blocks can improve a pretrained model without changing its weights. ELP uses an AI agent to find useful loops: which blocks to repeat, how to update their hidden states, and when to reuse earlier work.
The agent also adjusts sampling schedules and guidance. After search, selected programs run as fixed code and settings, with no further search-agent calls. We test them on 9 frozen backbones for image generation, text reasoning, and video generation.
The search can change both the update code and its settings, instead of choosing only from a fixed menu.
The agent writes checks to see how features, guidance, and updates change during generation. It uses these observations to propose edits.
The same framework is tested on 9 image, reasoning, and video models. Their weights stay fixed.
Multi-domain Pareto improvements with frozen weights. Interactive vector plots across Scale-RAE, Looped-DiT-B32 (panels a–c) and RememBench video world models (panel d).
Executable program editing expands the retained Pareto frontier. On Scale-RAE under an 80-candidate budget (R0–R8), full loop program search reaches a cumulative hypervolume of 0.9148 vs. 0.7923 for configuration-only search.
Feedback-guided search vs. grid enumeration. Coordinating structure, state dynamics, and outer execution control avoids exponential grid sweeps.
Search runs offline for each model. The selected programs then run without further calls to the search agent or changes to model weights.
Choose Scale-RAE, Looped-DiT-B32, LongLive 2.0, or Dory1.0-4B to follow the code changes, observations, and results.
ELP tests each program and records what happened. The agent uses those results to improve the next round of programs.
Each candidate p = (c, λ) contains code c and settings λ. Together, they decide which blocks repeat, how states change, and when earlier work is reused.
The agent writes checks Dr for development inputs. These inspect how features, guidance, and updates change between repetitions and sampling steps.
At round r, the agent uses earlier results, failures, and observations to propose new programs. The target a tells it which outcomes to prioritize.
Keep programs that offer useful trade-offs between quality and speed. Select fixed Speed, Balanced, and Quality programs for use after search.
Different models lead to different loop structures, update rules, and ways to reuse memory or reference features.
| Backbone | Modality | Structure | Dynamics | Control & Reuse |
|---|---|---|---|---|
| Scale-RAE / RAE | Image · Unlooped DiT | Layerwise middle band (12–27) / modality-split sparse (19–22) | Damped / split Euler + LoopGuidance | Early-half looping, periodic ref refresh & prefix sharing |
| Looped-DiT-B32 | Image · Pretrained Looped DiT | Adaptive per-step depth redistribution (Kt ∈ {4, 2}) | Dual-stream latent extrapolation & damped AB2 | Curvature-warped SNR schedule & cached text preamble |
| Qwen3-4B | Text · Unlooped LLM | Non-overlapping dual windows [14]+[15..18] & [25..28] (K=3) | Post-L14 tapered RK3 & anchored Ralston RK3 | Full-token FP32 updates; read-only probes, single KV commit |
| Dory1.0-4B | Text · Pretrained Looped LLM | Weight-tied elastic recurrent block (K ∈ {2, 3, 4}) | Spherical velocity / geodesic extrapolation & annealed injection | Matched-K compute (1.17× at K=2 STEM); last-loop / per-loop KV |
| LongLive 2.0 / 1.0 | Video · World Model | Contiguous middle window (11–18 5B / 11–17 1.3B, K ∈ {4, 6, 8}) | Windowwise Euler (step size 1/K) | High-noise steps only; final-pass causal KV commit |
| Wan2.1-1.3B | Video · Short-Video Diffusion | Cond. cross-attn on 10–13 (K=3) or 3 windows (K=2) | Convex ODE weights / curvature-lookahead RK2 | Early-to-mid noise window, CFG decay & interval-5 reuse |
Inspect frame-accurate world-model revisit memory on LongLive 2.0 (5B) and 5-way image comparisons on Scale-RAE and RAE.
Drag horizontally to compare any baseline against ELP (Ours).
Explore frozen-program evaluations across Image diffusion, Text reasoning LLMs, and Video world & diffusion models.
Speedup reports baseline / program inference FLOPs relative to standard Baseline and Loop + LoopGuidance (LG). ELPqualityultra uses a stronger target model and is shown unranked for reference.
| Backbone & Method | Steps | TFLOPs ↓ | Speedup vs. Base ↑ | Speedup vs. Loop+LG ↑ | GenEval (%) ↑ | DPG-Bench (%) ↑ |
|---|---|---|---|---|---|---|
| Backbone: Scale-RAE (Unlooped Baseline: 25 steps) | ||||||
| Baseline | 25 | 31.58 | 1.00× | 2.29× | 51.64 | 77.21 |
| Loop w/o LG | 25 | 56.04 | 0.56× | 1.29× | 57.04 | 80.00 |
| Loop + LG | 25 | 72.46 | 0.44× | 1.00× | 58.56 | 79.71 |
| ELPspeed (Ours) | 10 | 19.56 | 1.61× | 3.71× | 60.54 | 80.19 |
| ELPquality (Ours) | 14 | 27.13 | 1.16× | 2.67× | 60.98 | 80.19 |
| ELPqualityultra (Ours, unranked) | 16 | 31.23 | 1.01× | 2.32× | 61.63 | 80.22 |
| Backbone: RAE SigLIP2-B/DDT 615M (Unlooped Baseline: 50 steps) | ||||||
| Baseline | 50 | 29.07 | 1.00× | 1.86× | 38.56 | 70.91 |
| Loop w/o LG | 50 | 39.67 | 0.73× | 1.37× | 38.87 | 72.44 |
| Loop + LG | 50 | 54.20 | 0.54× | 1.00× | 43.28 | 74.68 |
| ELPspeed (Ours) | 6 | 5.60 | 5.19× | 9.68× | 44.42 | 74.96 |
| ELPquality (Ours) | 10 | 9.33 | 3.12× | 5.81× | 44.94 | 74.47 |
ELP reorganizes loop depth and step schedules at matched sampling step budgets.
| Setting | Method | #Steps | TFLOPs ↓ | Speedup vs. Full ↑ | GenEval (%) ↑ | DPG-Bench (%) ↑ |
|---|---|---|---|---|---|---|
| Full reference | Looped-DiT (Native K=4) | 100 | 53.18 | 1.00× | 84.65 | 85.34 |
| Matched 14-step | Looped-DiT (Native K=4) | 14 | 7.45 | 7.14× | 79.36 | 81.31 |
| Matched 14-step | ELPspeed (Ours) | 14 | 6.80 | 7.82× | 83.43 | 85.11 |
| Matched 25-step | Looped-DiT (Native K=4) | 25 | 13.30 | 4.00× | 83.16 | 84.76 |
| Matched 25-step | ELPquality (Ours) | 25 | 13.30 | 4.00× | 85.08 | 85.09 |
Scale-RAE Pareto trajectory across 9 search rounds (R0–R8).
Looped-DiT-B32 Pareto trajectory beyond native anchors under matched steps.
ELP outperforms both standard Non-looped inference and Fixed Loop on individual and aggregate STEM reasoning metrics.
| Metric (%) ↑ | Non-looped | Fixed Loop | ELP (Ours) |
|---|---|---|---|
| Individual Benchmarks | |||
| MMLU-STEM Acc | 62.43 | 64.20 | 64.72 |
| GPQA-Main Acc | 31.92 | 33.26 | 34.82 |
| ARC Acc | 50.60 | 51.71 | 51.71 |
| ARC Acc Norm | 54.18 | 54.95 | 54.61 |
| SciQ Acc | 95.70 | 96.20 | 96.50 |
| Aggregate Scores | |||
| Micro Acc | 63.81 | 65.04 | 65.48 |
| Micro Acc Norm | 64.27 | 65.72 | 65.91 |
| Macro Group | 60.16 | 61.34 | 61.94 |
| Macro Domain | 58.37 | 59.60 | 60.36 |
Means across eight stochastic runs per prompt; speedups use ratios of means relative to native K=2 and K=4.
| Method | IFBench (%) ↑ | GPQA Diamond (%) ↑ | SciCode (%) ↑ | Average (%) ↑ | Total TFLOPs ↓ | Wall Speedup (K=2 / K=4) ↑ | FLOPs Speedup (K=2 / K=4) ↑ |
|---|---|---|---|---|---|---|---|
| Native (K=2, per-loop KV) | 78.48 | 70.39 | 33.90 | 60.92 | 96,300 | 1.00× / 1.72× | 1.00× / 1.67× |
| Native (K=4, per-loop KV) | 78.71 | 71.02 | 33.81 | 61.18 | 161,198 | 0.58× / 1.00× | 0.60× / 1.00× |
| ELP (Ours, K=2, last-loop KV) | 78.94 | 71.72 | 34.07 | 61.58 | 95,719 | 0.96× / 1.65× | 1.01× / 1.68× |
| ELP (Ours, K=2, per-loop KV) | 78.88 | 71.53 | 33.94 | 61.45 | 95,223 | 1.00× / 1.72× | 1.01× / 1.69× |
Bold highlights the higher score within each matched-K pair (ties unbolded).
| Setting | Method | GFLOPs/tok ↓ | MMLU | GPQA | ARC | ARC N. | SciQ | Micro ↑ | M. Norm ↑ | M. Grp ↑ | M. Dom ↑ |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Matched K=2 | Native | 11.03 | 54.69 | 28.57 | 47.78 | 49.66 | 95.00 | 59.64 | 60.14 | 56.51 | 51.98 |
| Matched K=2 | ELP (Ours) | 9.45 (1.17×) | 55.02 | 30.13 | 46.76 | 48.21 | 95.20 | 59.69 | 60.07 | 56.78 | 52.93 |
| Matched K=3 | Native | 14.74 | 55.02 | 28.79 | 47.95 | 49.83 | 94.90 | 59.81 | 60.29 | 56.67 | 52.15 |
| Matched K=3 | ELP (Ours) | 14.74 | 55.67 | 30.13 | 49.32 | 50.85 | 95.30 | 60.68 | 60.97 | 57.61 | 53.05 |
| Matched K=4 | Native | 18.44 | 55.54 | 29.69 | 48.89 | 49.91 | 94.60 | 60.29 | 60.68 | 57.18 | 53.02 |
| Matched K=4 | ELP (Ours) | 18.44 | 56.07 | 30.80 | 49.49 | 50.51 | 95.10 | 60.89 | 61.21 | 57.86 | 53.96 |
Bars plot LPIPS drift reduction on a 0%–70% scale alongside revisit CLIP cosine gains across all 100 RememBench scenes.
Cells report Mean (Median) across all 100 scenes. Higher CLIP & TempSSIM and lower LPIPS indicate stronger long-horizon consistency.
| Method | CLIP ↑ Mean (Median) | LPIPS ↓ Mean (Median) | TempSSIM ↑ Mean (Median) |
|---|---|---|---|
| LongLive 2.0 5B (Baseline) | 0.8585 (0.9018) | 0.3852 (0.3910) | 0.9681 (0.9718) |
| ELP on LongLive 2.0 5B (Ours) | 0.9282 (0.9568) | 0.1492 (0.0974) | 0.9905 (0.9940) |
| LongLive 1.0 1.3B (Baseline) | 0.8670 (0.8919) | 0.2609 (0.2591) | 0.9819 (0.9839) |
| ELP on LongLive 1.0 1.3B (Ours) | 0.9218 (0.9526) | 0.1480 (0.1363) | 0.9869 (0.9903) |
| Self-Forcing 1.3B (Baseline) | 0.6585 (0.6705) | 0.4874 (0.4915) | 0.9780 (0.9801) |
| ELP on Self-Forcing 1.3B (Ours) | 0.7617 (0.7764) | 0.3607 (0.3427) | 0.9804 (0.9827) |
Speed and Balanced halve compute with strong consistency sub-dimensions, while Quality achieves the highest overall VBench score.
| Method | #Steps | Quality (%) ↑ | Semantic (%) ↑ | Overall VBench (%) ↑ | TFLOPs ↓ | Speedup vs. Base ↑ |
|---|---|---|---|---|---|---|
| Wan2.1 (50-step Base) | 50 | 85.39 | 83.04 | 84.92 | 28,300 | 1.00× |
| Wan2.1 (30-step Base) | 30 | 85.33 | 80.54 | 84.37 | 16,980 | 1.67× |
| ELP (Speed) | 26 | 84.85 | 80.32 | 83.94 | 11,916 | 2.37× |
| ELP (Balanced) | 26 | 84.90 | 82.03 | 84.33 | 12,765 | 2.22× |
| ELP (Quality) | 50 | 85.25 | 84.61 | 85.12 | 30,904 | 0.92× |
Controlled 80-candidate ablations on Scale-RAE isolate search space expressiveness, programmable diagnostics, search LLM, target strength, and objectives.
Executable program editing + runtime diagnostics outperform config-only and scores-only search.
| Search Type | Diagnostics | Priority | GenEval (%) ↑ | DPG-Bench (%) ↑ | TFLOPs ↓ |
|---|---|---|---|---|---|
| Config. | Yes | Speed | 55.05 | 79.45 | 17.34 |
| Config. | Yes | Quality | 59.88 | 80.26 | 23.65 |
| Program | No | Speed | 52.41 | 80.05 | 11.99 |
| Program | No | Quality | 57.63 | 79.68 | 22.08 |
| Program | Yes | Speed | 60.54 | 80.19 | 19.56 |
| Program | Yes | Quality | 60.98 | 80.19 | 27.13 |
Compared under the same True reference target and 80-candidate budget.
| Search LLM | Priority | GenEval (%) ↑ | DPG-Bench (%) ↑ | TFLOPs ↓ | Speedup (Base / w/ LG) |
|---|---|---|---|---|---|
| Gemini-4-Argon | Speed | 57.30 | 79.64 | 25.53 | 1.24× / 2.84× |
| Gemini-4-Argon | Quality | 58.48 | 80.18 | 41.85 | 0.75× / 1.73× |
| GPT-6-Astra | Speed | 60.54 | 80.19 | 19.56 | 1.61× / 3.71× |
| GPT-6-Astra | Quality | 60.98 | 80.19 | 27.13 | 1.16× / 2.67× |
Stronger target prompts push Quality GenEval higher (up to 61.63%).
| Variant | Target Strength | Priority | Steps | GenEval (%) ↑ | DPG-Bench (%) ↑ | TFLOPs ↓ |
|---|---|---|---|---|---|---|
| ELP (True) | 0.00% | Quality | 25 | 58.48 | 80.18 | 41.85 |
| ELPstrong | 17.86% | Quality | 20 | 61.03 | 80.49 | 44.17 |
| ELPultra | 29.28% | Speed | 9 | 58.32 | 80.40 | 16.09 |
| ELPultra | 29.28% | Quality | 16 | 61.63 | 80.22 | 31.23 |
Single-metric optimization pushes individual benchmarks further at 20 steps vs. joint Speed/Quality Pareto.
| Objectives | Priority | GenEval (%) ↑ | DPG-Bench (%) ↑ | #Steps ↓ |
|---|---|---|---|---|
| Joint (GenEval + DPG + Speed) | Speed | 60.54 | 80.19 | 10 |
| Joint (GenEval + DPG + Speed) | Quality | 60.98 | 80.19 | 14 |
| GenEval-only | — | 63.15 | 80.15 | 20 |
| DPG-only | — | 56.09 | 80.61 | 20 |
@misc{chen2026elp,
title = {Evolving Loop Programs: Discovering How Frozen Transformers Should Loop},
author = {Chen, Yang and Shen, Kaitai and Zhou, Xuemei and Long, Teng and Hu, Vincent Tao},
year = {2026},
howpublished = {Research preprint},
url = {https://vibe-hust.github.io/elp_page/}
}