Metan: Unlocking Recursive Self-Improvement in LLM Agents via Emergent Meta-Depth
Meta n : Recursive Self-Improvement through Emergent Depth
This paper introduces Metan, a recursive self-improvement framework for Large Language Model (LLM) agents that achieves true multi-level meta-reasoning by keeping a universal meta-operation fixed and recursing on its accumulated input (execution traces and generated code). Guided by an evolutionary archive search, Metan dynamically grows solver stacks whose depth is governed by convergence rather than fixed constraints. Across eight diverse benchmark suites and two frontier backbones (Gemma 4 31B-IT and GPT-5.2), Metan consistently outperforms state-of-the-art self-improving baselines, notably achieving a score of 0.331 on ARC-AGI-2 where prior systems collapsed to zero.
Modern Large Language Model (LLM) agents are adept at executing intricate code generation, handling bash environments, and discovering heuristic algorithms. However, when faced with fundamental reasoning hurdles, contemporary architectures default to flat self-refinement loops (e.g., Reflexion, Self-Debug)—iterative cycles of "generate evaluate diagnose retry." In essence, these agents optimize their immediate outputs rather than improving the algorithm or meta-process that generates those outputs.
Attempts to elevate agents to meta-reasoning generally hit a structural glass ceiling: either the meta-optimizer is strictly hand-crafted and frozen outside the agent (realized depth = 1), or the agent edits its own codebase but must freeze critical drivers to avoid catastrophic self-corruption (capping realized meta-depth at ).
Metan (Kim et al., 2026) offers a paradigm shift. Rather than rewriting the meta-optimizer itself, Metan fixes a universal meta-operation and recursively feeds it the accumulated execution traces and code artifacts generated by previous layers. By substituting self-mutation with contextual input recursion, Metan enables stable, unbounded meta-depth where strategic reasoning, library synthesis, and rollback mechanisms emerge spontaneously.
Executive Summary
- The Core Innovation: Metan introduces recursive meta-depth without self-destabilization. A universal meta-operator repeatedly wraps existing solver stacks by analyzing cross-task execution traces and lower-level code, synthesizing two lightweight components: a strategic pre-processing prompt/context generator and a callable library of helper primitives.
- Key Breakthrough: Breaks the historical meta-depth barrier. Depths dynamically expand until convergence (typically stabilizing between depths 3 and 6). Distinct roles—tactical helper synthesis, task-level routing, specialized domain libraries, and strategic error rollbacks—emerge naturally across depths without explicit prompting.
- Empirical Superiority: Evaluated across 8 benchmark suites and 2 backbones (Gemma 4 31B-IT and GPT-5.2), Metan sets new state-of-the-art records. On the fluid reasoning benchmark ARC-AGI-2, Metan scores 0.331 (pass@2), whereas leading baselines (OpenEvolve and Gödel Agent) collapse near 0.00.

Problem & Motivation: The Stability-Depth Dilemma
To rigorously evaluate recursive self-improvement, the authors formalize the concept of Realized Meta-Depth: the highest architectural tier whose behavior actually evolves across iterations.
Under this taxonomy, prior art bifurcates into two paradigms, both constrained by intrinsic trade-offs:
- Hand-Crafted Meta-Systems (e.g., FunSearch, AlphaEvolve, ADAS): An external, frozen search or evolutionary algorithm mutates the solver or prompt scaffolding. Because the search algorithm and selection heuristics never evolve, the realized meta-depth is strictly 1.0.
- Self-Referential Agents (e.g., Gödel Agent, Darwin Gödel Machine, HyperAgents): The agent internalizes the meta-process by modifying its own source files. However, to prevent syntax crashes or infinite regressions, a "driver" (e.g., parent selection, action API, outer evaluation loop) is permanently hard-coded. This editable subset caps realized meta-depth at approximately .

The Research Insight
The dilemma has always been: Modifying the improver unlocks depth at the expense of system stability. Metan sidesteps this trade-off by realizing that the meta-operator does not need to rewrite its own instructions. If consumes the full execution traces and generated code of the solver stack beneath it, each recursive application of inherently operates on a strictly higher-order information set.
Methodology: Recursive Composition and Evolutionary Orchestration
1. The Meta-Layer Architecture ( and )
A Metan layer at depth operates in two distinct phases:
Build-Step (Offline Synthesis)
Given task set , execution traces from depth , and the code stack , the fixed LLM-prompted operator synthesizes new layer code :
- (Strategic Pre-Process): A Python function executing before task dispatch to construct contextual instructions .
- (Code Library): A set of reusable, standalone Python functions callable by the downstream solver (e.g., custom optimization heuristics, label sanitizers).
Run-Step (Online Execution Wrapper)
The wrapper non-invasively wraps the previous solver without mutating its underlying code:
- Context Cascading: The outermost pre-processor injects macro strategic guidance, passing downward through inner pre-processors (), each refining the prompt context.
- Execution & Library Injection: The base solver receives the composite context and generates a solution script. The cumulative union library is statically prepended to the script inside an isolated sandbox.

2. Compositional Search Space Coverage
If each depth offers distinct behaviors, a conditioned multi-layer stack spans an expressible configuration space of:
This multiplicative capacity allows high-level strategic frames to dynamically govern low-level tactics.
3. Evolutionary Archive Orchestration
To mitigate greedy stagnation from a suboptimal output, Metan maintains an evolutionary archive of layer chains. At each generation:
- Parent Sampling: Chains are sampled proportional to fitness and an exploration bonus: .
- Diversity & Inspiration: 's decoding temperature cycles through , and traces from competing top-performing chains on underperforming tasks are cross-injected into the prompt context.
- Consolidation Mode: For sensitive environments, Metan provides a variant targeting single-task optimization while freezing the archive's historical best for other tasks, ensuring monotonic non-decreasing per-task trajectories.
Experimental Validation & SOTA Comparison
The framework was evaluated against leading autonomous optimization baselines across 8 benchmark suites on two primary backbones: Gemma 4 31B-IT and GPT-5.2.
1. Main Benchmark Performance
Across combinatorial optimization (CO-Bench), algorithmic discovery (AlphaEvolve Math, AlgoTune), symbolic regression (SR), terminal environments (TerminalBench 2.0), text classification (LawBench, Symptom2Disease), and abstract grid puzzle reasoning (ARC-AGI-2), Metan establishes dominant leads.
| Method | CO-Bench (Test) | Symptom2Disease | LawBench (F1) | AlphaEvolve Math | AlgoTune (Speedup) | ARC-AGI-2 (pass@2) |
|---|---|---|---|---|---|---|
| Gemma 4 31B-IT Backbone | ||||||
| Metan (Archive-Best) | 0.851 ± 0.014 | 0.733 ± 0.015 | 0.815 ± 0.013 | 0.869 ± 0.045 | ×15.10 ± 2.4 | — |
| OpenEvolve | 0.814 ± 0.022 | 0.718 ± 0.022 | 0.745 ± 0.034 | 0.802 ± 0.052 | ×10.45 ± 1.8 | — |
| Gödel Agent (Corrected) | 0.451 ± 0.023 | 0.710 ± 0.034 | 0.775 ± 0.023 | 0.581 ± 0.061 | ×13.22 ± 2.7 | — |
| GPT-5.2 Backbone | ||||||
| Metan (Archive-Best) | 0.870 ± 0.011 | 0.725 ± 0.014 | — | 0.917 ± 0.016 | — | 0.331 ± 0.010 |
| OpenEvolve | 0.702 ± 0.025 | 0.721 ± 0.007 | — | 0.726 ± 0.046 | — | 0.003 ± 0.001 |
| Gödel Agent (Corrected) | 0.527 ± 0.033 | 0.708 ± 0.037 | — | 0.674 ± 0.068 | — | 0.054 ± 0.006 |
2. ARC-AGI-2: The Ultimate Test of Fluid Abstraction
ARC-AGI-2 requires the agent to invent novel transformations from minimal grid demonstrations, making it resistant to memorized code snippets.
- Flat Refinement Failure: Both OpenEvolve () and Gödel Agent () fail almost completely.
- Metan Meta-Stack: Metan reaches 0.331, demonstrating that meta-layer recursion successfully abstracts transformation primitives from trace patterns and composes them across tasks.
3. Compute Parity & Sample Efficiency
When token budgets are equalized against OpenEvolve on prompt benchmarks (e.g., hard-capped at 485K tokens on Gemma), Metan maintains its advantage (LawBench: 0.784 vs 0.745). Furthermore, on CO-Bench, Metan outperforms OpenEvolve while evaluating fewer candidates (29 vs. 378 evaluations), highlighting the efficiency of global cross-task meta-induction over fragmented per-task mutations.
Ablation Study: Dissecting the Source of Meta-Gains
To isolate what powers recursive gains, the authors systematically stripped away architectural components on CO-Bench and AlphaEvolve Math:
Full Metan Stack (Gemma, CO-Bench Val: 0.845)
├── [- Code Library Injection L(d)] --> 0.825 (Δ -0.020, ~15% of gain)
├── [- Inter-Layer Context String ctx_d] --> 0.751 (Δ -0.094, ~72% of gain)
└── [- Full Recursion (Flat Depth-1)] --> 0.714 (Δ -0.131, 100% of gain)
- Context Cascading Dominates: Passing contextual guidance () downward accounts for roughly 72% of the performance lift over a single-layer agent.
- Library Synthesis Adds Tangible Lift: Reusable Python code libraries () contribute an additional 15%.
- Emergence of Spontaneous Layer Roles: By classifying 596 -generated outputs across depths via dual LLM evaluators (GPT-5.2 & Kimi-K2.6, Cohen's ), a distinct division of labor emerged:
- Depth 2: Focuses on tactical primitives (e.g., implementing simulated annealing or custom Hungarian algorithms to circumvent sandbox import errors).
- Depth 3: Shifts to task routing and specialized domain libraries.
- Depths 4–6: Prioritizes strategic rollbacks and overrides (e.g., explicitly recognizing when a depth-3 constraint over-fitted, reverting the strategy while retaining helper utilities).
Critical Analysis & Takeaways
Key Takeaway
Metan demonstrates that LLMs possess strong latent meta-reasoning capabilities that cannot be unlocked via single-layer reflection or fragile self-modifying code. By externalizing the recursion onto an immutable wrapper stack driven by an invariant meta-operator, agents achieve deep strategic planning and self-correction without risk of destabilization.
Limitations
- Homogeneous Model Assumption: The current study intentionally fixes the same LLM for both base solvers and to prevent confounding variables. In practical industry deployments, pairing a heavy reasoning model (e.g., o1/GPT-5.2) at with a lightweight executor (e.g., Gemma/Llama-8B) at remains to be fully explored.
- Over-Constraining on Saturated Seeds: On benchmarks where baseline single-call solvers already achieve near-optimal execution (e.g., pre-optimized FFT kernels in AlgoTune), excessive contextual conditioning can introduce redundant constraints, leading to minor regressions.
Future Outlook
Metan opens several promising research directions:
- Structured Contextual Interfaces: Transitioning from free-form string contexts between layers to typed, schema-driven meta-protocols.
- Cross-Domain Meta-Transfer: Investigating whether code libraries and strategic pre-processors synthesized on synthetic mathematical domains can zero-shot transfer to accelerate real-world engineering and scientific pipelines.
