# Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generation

**Authors:** Eric Zelikman, Eliana Lorch, Lester Mackey, Adam Tauman Kalai  
**arXiv:** [2310.02304](https://arxiv.org/abs/2310.02304)  
**Date:** 2023-10-03  
**Summary page:** https://www.summarizepaper.com/en/paper/2310.02304v1/

## Key points

- The paper discusses advancements in AI systems using a scaffolding program to enhance language model outputs
- The authors introduce a novel approach of incorporating a language-model-infused scaffolding program that can improve itself
- The process involves a seed "improver" program that enhances an input program using a predefined utility function by querying the language model and selecting the best solution
- Running the seed improver on itself allows for continuous self-improvement, resulting in significantly better performance compared to its initial version
- Various self-improvement strategies proposed by the language model are analyzed, including beam search, genetic algorithms, and simulated annealing
- The study showcases the potential of language models in writing code that can call itself for self-improvement purposes
- Concerns surrounding the development of self-improving technologies are addressed, including bypassing sandbox environments
- The work builds upon existing research in AI systems and programming languages while addressing challenges and implications of recursive self-improvement in code generation.

## Summary

, , , , 

The paper titled "Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generation" delves into the latest advancements in AI systems, specifically those that utilize a scaffolding program to enhance language model outputs. These scaffolding programs, written in languages like Python, structure multiple calls to language models to generate improved results. The authors introduce a novel approach by incorporating a language-model-infused scaffolding program that can improve itself. This process involves a seed "improver" program that enhances an input program using a predefined utility function by querying the language model and selecting the best solution. The authors then run this seed improver on itself, allowing it to continuously improve its own performance. Through experiments on downstream tasks, the resulting improved improver demonstrates significantly better performance compared to its initial version. Additionally, the paper analyzes various self-improvement strategies proposed by the language model such as beam search, genetic algorithms, and simulated annealing. While the language models themselves remain unchanged, this study showcases their potential in writing code that can call itself for self-improvement purposes. The authors also address concerns surrounding the development of self-improving technologies and evaluate how frequently the generated code bypasses a sandbox environment. By building upon existing research in AI systems and programming languages, this work sheds light on recursive self-improvement in code generation while addressing associated challenges and implications.
