Recursive Self-Improvement: A Small-Model-in-Command Architecture for Large-Model Execution
This article examines a recursive self-improvement (RSI) architecture that separates strategic decision-making from code execution: smaller models propose higher-level shifts, while larger models implement and test them. It covers the shared search state, UCB-based and memory-based policy learning, the Proposer-Worker workflow, a persistent workspace for reusable experience, and an evaluation system designed to distinguish real progress from false progress.
1. Why Large Models Fall into the “Patch Trap”
In the exploration of recursive self-improvement (RSI), researchers have observed an interesting pattern: when code optimization tasks are handed entirely to a large model, the model often falls into a fixed mode of thinking:
- If the code fails, fix the bug.
- If it still fails after the fix, try another patch.
- The model keeps circling within the original algorithmic route and rarely stops to ask whether the initial approach was wrong.
The reason is not hard to understand. When generating code, large models tend to continue the reasoning already present in the context. This strong contextual consistency is an advantage in ordinary programming tasks, but in exploratory tasks that require strategic decisions, it becomes a burden: the model keeps making local patches along a route that may be flawed from the start, falling into a loop where each fix drifts further from the right direction.
A much smaller model, such as one at the billion-parameter scale, has weaker contextual inertia and is therefore more likely to step outside the existing framework and propose global suggestions such as “switch to a completely different algorithm.” This leads to a counterintuitive architectural idea: separate decision-making from execution—let a small model “think” and a large model “do.”
2. Overall Architecture: Decoupling the Decision Layer and the Execution Layer
The core design of this type of RSI framework can be abstracted into three modules:
| Module | Responsibility | Analogy |
|---|---|---|
| Policy Core | Online policy learning; decides what to do next | Project decision-maker |
| Workspace | Accumulates skills and experience so successful experience can be reused | Team knowledge base |
| Evaluation Arena | Systematically verifies whether the model can learn and improve from tasks | Quality and evaluation system |
The following sections discuss each module.
3. Policy Core: Shared Search State and Two Learning Mechanisms
3.1 Shared Search State
Policy decisions cannot be made in a vacuum. The framework maintains a continuously updated experiment record, namely the shared search state, which records:
- All code versions tried in history;
- The evolutionary relationships between versions, that is, which version was derived from which;
- The success or failure result of each experiment;
- The list of directions not yet explored;
- The remaining experiment budget.
Based on this record, the policy layer does three things in each round: selects a historical version worth continuing to optimize; decides whether the current step should “explore a new idea” or “improve the existing method”; and chooses from candidate actions the option that combines potential and feasibility. This is essentially a multi-armed-bandit-style decision problem.
3.2 UCB-Based Policy Learning
The first mechanism draws on the classic multi-armed bandit idea and specifically adopts a KL-UCB-style method. Its core is to balance exploiting existing successful experience and exploring unknown directions:
Choose action A = argmax( historical average reward(A) + exploration bonus(uncertainty, remaining budget) )
- For directions with many attempts and good results, the exploitation term dominates, ensuring stable returns;
- For directions with few attempts and high uncertainty, the exploration term raises their priority, avoiding premature convergence to a suboptimal route.
This mechanism naturally fits scenarios with a limited experiment budget: the smaller the budget, the more carefully the weight of the exploration bonus must be managed.
3.3 Memory-Based Policy Learning
The UCB mechanism records only outcome-level statistics and lacks modeling of “why.” The second mechanism distills effective experience into policy memory:
- It records not only whether a method succeeded, but also its applicable conditions and specific guidance;
- As new experiments are generated, existing experience is reinforced, revised, or removed when it no longer applies.
The two mechanisms complement each other: UCB addresses the exploration-exploitation trade-off at the numerical level, while policy memory addresses experience transfer at the semantic level. For example, if an optimization technique works under a specific input scale, policy memory can record “prioritize this only when the data scale exceeds a certain threshold”—conditional knowledge that purely statistical methods cannot express.
4. Research Workflow: The Proposer-Worker Collaboration Loop
When the existing method itself has structural limitations, patching the code alone cannot bring a breakthrough. To address this, the framework introduces an explicit research workflow with two roles:
Proposer: analyzes the current task definition, the existing evaluation environment, and historical experiment results; identifies the current system’s capability gaps; and proposes new solution ideas. Crucially, it does not give one-off suggestions but continuously adjusts the decision direction based on the latest experiment feedback.
Worker: puts proposals into practice—completing code implementation, debugging, and test validation—and feeds execution results back to the policy layer in a structured form, forming a closed loop.
The value of this loop is that it makes reflection an explicit step in the process: the proposer can recommend overturning the current approach based on failure results instead of being locked into the original code route.
5. Workspace: Making Successful Experience Durable and Reusable
If the experience from each experiment exists only in the conversation context, the accumulated knowledge resets once it exceeds the context window or the session ends. The workspace module addresses the persistence and structured management of experience:
- Skill accumulation: implementation patterns and repair methods that have been validated as effective are abstracted into reusable skill entries for direct use in later tasks;
- Failure archiving: failure cases are recorded together with attribution analysis to avoid repeating the same mistakes;
- Version lineage management: linked with the shared search state, it maintains a clear evolution tree so that “returning to a historical version and restarting exploration” becomes a low-cost operation.
This mechanism is consistent with common engineering practices such as configuration management and knowledge bases, except that the target is no longer human engineers but the agents themselves.
6. Evaluation: Verifying “Real Progress” Rather Than “Apparent Progress”
The biggest risk for self-improving systems is false progress: metric improvements may come from evaluation-environment leakage, random fluctuations, or overfitting to specific test cases. Therefore, the evaluation module needs to:
- Separate training-style experiments from held-out evaluation sets to prevent the policy layer from “teaching to the test”;
- Perform significance analysis on performance curves across multiple iterations to distinguish real improvement from noise;
- Introduce diverse task distributions to test whether improvements generalize.
Only after passing this validation can the system be confirmed to be truly “learning how to learn” rather than overfitting to the evaluation set.
7. Practical Lessons
This architecture offers several transferable lessons for developers building autonomous agents:
- Capability complementarity beats stacking a single component: the policy divergence of small models plus the execution capability of large models may produce better results than using either model alone;
- Decisions need state support: search records, budget management, and version lineage are the foundation of policy quality;
- Exploration and exploitation need explicit mechanisms: one cannot rely on the model to balance them “on its own”;
- Experience must be structured: conditional policy memory has stronger generalization value than simple success/failure labels.
Recursive self-improvement is still in an early exploratory stage, but the design paradigm of “layered decoupling + online learning + rigorous evaluation” already provides a clear engineering path for building AI systems that can evolve sustainably.
