How does a Tiny Recursive Model reuse one network to revise an answer?

Trace repeated state updates in a small scheduling example, then inspect the Tiny Recursive Model paper and its training and evaluation code.

A small network can be used several times on the same problem. Each pass changes its working state, then the next pass uses that new state. The weights can stay the same throughout those passes.

The Tiny Recursive Model , or TRM, explores this approach for puzzle tasks. The first distinction to keep is simple: storing more learned numbers and performing more computation are different ways to enlarge a model's capacity to solve a task.

Keep the question, revise the state

Use x for an embedded input, y for the current answer representation, and z for a working state. These are arrays of numbers. The answer representation is not yet a decoded answer, and the working state is not a readable explanation.

The same learned update network F serves both jobs:

Operation Update What stays available --- --- --- Work on the current answer, repeated n times z ← F(z + y + x) Input x and current y Revise the answer representation y ← F(y + z) The resulting work state z

An output head reads y to produce answer scores. Extra rounds reuse F's parameters rather than creating new copies with independent weights. Whether the extra computation improves an answer must be measured.

Count calls before thinking about benchmarks

Run this small Python model of the schedule. Its handpicked update halves a sum so the states remain easy to inspect. It is a scheduling example, not a trained TRM or a puzzle solver.

python title="recursive schedule.py" x, y, z = 1.0, 0.0, 0.0 n = 2 rounds = 3 calls = 0 scale = 0.5

def update(value): global calls calls += 1 return scale value

for round id in range(rounds): for in range(n): z = update(z + y + x) y = update(y + z) print("round", round id + 1, "y:", round(y, 4), "calls:", calls) print("stored scale values:", 1)