Small Models Steer, Large Models Execute: Inside a Recursive Self-Improvement Framework
This article breaks down how recursive self-improvement (RSI) frameworks separate decision-making from implementation: a lightweight model (around 9B parameters) proposes directions at low cost and high frequency, while a larger model handles coding at higher cost and lower frequency. It explains the three core components—an online policy-learning kernel, a research workflow, and a persistent workspace—along with the evaluation setup needed to prove real progress rather than self-deception, and the engineering practices for sandboxing, budget control, reproducibility, and human review. Readers will learn why patch-style convergence happens and how a shared state, memory mechanism, and independent evaluation arena close the loop.
1. The Starting Problem: Why “Being Able to Write Code” Is Not “Being Able to Improve”
In agent-driven automated development, a recurring pattern appears: the stronger a code-generation model is, the more easily it falls into a local optimum. When a program errors out, another branch is patched in; when a test fails, another fallback layer is added. The codebase grows more bloated with each revision, yet whether the original technical approach was ever sound is never re-examined. This “patch-style convergence” is not a lack of model capability but a missing decision mechanism—the executor also plays the role of the decision-maker and is naturally inclined to make incremental changes within the existing framework.
The way to break this is to decouple “proposing” from “implementing”: a lightweight model judges the direction, and a more capable large model handles the actual coding. This division of labor is the core design of recursive self-improvement (RSI) frameworks.
2. Role Division: Why a 9B-Class Small Model Is Suited to “Steering”
The value of a small model lies not in breadth of knowledge but in low decision cost, high sampling frequency, and fast policy updates. Under the same compute budget, a small model can evaluate dozens of candidate directions in a single iteration, while the large model is invoked only once for high-quality implementation.
A schematic division of responsibilities:
# Pseudocode: decoupling the policy layer from the execution layerstate = shared_search_state # shared search statedirection = small_model.propose(state) # low-cost, high-frequency decisionpatch = large_model.implement(direction) # high-cost, low-frequency implementationresult = sandbox.run(patch) # sandbox execution and evaluationshared_search_state.update(direction, patch, result)
The key point is that the small model does not give one-off suggestions; it continuously refines its judgment based on real execution feedback from each round, gradually learning which directions are worth investing in and which should be abandoned early.
3. Three Core Components: A Runnable RSI System Skeleton
3.1 Decision Kernel: Online Policy Learning
The kernel maintains a continuously evolving experiment archive containing historical code versions, the lineage of evolution between versions, the success or failure conclusions of each experiment, branches not yet explored, and the remaining experiment budget. The decision flow is: first select a historical version worth continuing to optimize, then judge whether to explore a completely new idea or improve an existing one, and finally choose the most feasible action.
Two complementary learning mechanisms support this flow:
- UCB-style policy learning (KL-UCB-type methods): Considers both historical payoff and current uncertainty, balancing “reusing successful experience” against “probing unknown directions” to avoid premature convergence.
- Memory-based policy learning: Distills effective experience into policy memory that records not only success or failure but also applicable preconditions and concrete guidance; when new evidence arrives, the memory is reinforced, revised, or retired.
3.2 Research Workflow: The Key to Breaking Out of Fixed Patterns
When the existing approach itself has a ceiling, continued patching yields diminishing returns. At this point the proposer analyzes the task definition, the current execution framework, and historical results to locate capability gaps and propose alternative algorithms; the executor completes coding, debugging, and test verification, then feeds the results back into the kernel. The separation of proposing and executing is precisely the structural reason a small model can propose “taking a different path.”
3.3 Workspace: Persisting Skills and Experience
The workspace does two things: first, skill accumulation—turning reusable implementation patterns, tool wrappers, and test scaffolding into searchable assets; second, experience management—letting policy memory transfer across tasks. Together they determine whether the system can “get stronger with use” rather than starting from scratch every time.
4. The Evaluation Arena: How to Prove “Real Progress”
The biggest risk of an RSI system is self-deception—self-assessed scores rise while real capability stagnates. This requires an independent evaluation arena that uses a fixed task set, a fixed budget, and repeated experiments across multiple random seeds, recording three quantities: the absolute level of the best result, the number of iterations needed to reach that level, and the cross-task transfer benefit of policy memory. Only when “reaching a higher level in fewer iterations” holds simultaneously can the improvement be attributed to learning rather than a pile-up of compute.
5. Engineering Implementation Points
- Sandbox isolation: All generated code runs in restricted containers with limits on network, file system, and runtime, with logging services and monitoring alerts integrated so failures can be attributed.
- Budget constraints: Explicitly manage the number of experiments and the compute ceiling to prevent search divergence.
- Reproducible state: Fully preserve version lineage and random seeds so conclusions can be traced back.
- Human in the loop: High-risk changes require human review to avoid uncontrollable modifications introduced by automatic iteration.
- Elastic foundation: Using container platforms and object storage to support large-scale parallel experiments and artifact archiving is a common practice in general cloud environments; general cloud product categories from vendors such as Baidu AI Cloud can also cover this type of need.
6. Conclusion
The bottleneck of recursive self-improvement often lies not in generation capability but in decision quality. Giving direction selection to a low-cost, high-frequency small model, giving implementation to the large model, and closing the loop with shared state, a memory mechanism, and an independent evaluation arena is what allows automated development to move from “repeatedly patching” to genuine continuous evolution.
