Training Transformers as a Universal Computer
arXiv cs.AI / 4/29/2026
📰 NewsIdeas & Deep AnalysisModels & Research
Key Points
- The paper shows that a small transformer can learn to carry out programs written in MicroPy, a simplified but computationally universal programming language.
- Using procedure definitions and a target expression, the model predicts small-step execution with PENCIL scaffolding to keep computation efficient within a limited context window.
- After training on randomly generated (nonsensical) MicroPy programs, the transformer generalizes to multiple human-written tasks such as bit operations, binary addition/multiplication, and SAT verification/solving.
- The study reports out-of-distribution generalization, indicating the model can evaluate novel programs beyond its training set drawn from the same overall program distribution.
- Overall, the results provide empirical evidence that standard transformers can be trained to function as a “universal computer” for computations expressible in MicroPy.


