How a small network learned to be a computer

The front page shows the machine running. This page explains what it is, where it came from, and the method that found it: naming the constraints of two machines, a Turing machine and a transformer, until one could be read as the other.

1 · The basics

Two machines, both very simple.

A universal computer is a machine that can run any program, given the program as data. Your laptop is one. So, in principle, is a strip of paper, a pencil and a short list of rules, if the rules are the right ones. That second machine is the Turing machine, and it is what this project is about.

The Turing machine · 1936

A tape, a head, and a rule table

A long tape of cells, each holding one symbol. A head that looks at one cell. A state, which is all the machine remembers. And a table of rules: in this state, seeing this symbol, write that symbol, move one cell left or right, and go to that state. That is all. Every program anyone has written can be translated into such a table.

A universal Turing machine is one whose tape holds a description of another machine, and which runs that description. It is a program that runs programs.

The transformer · 2017

Read some tokens, write the next one

The kind of network behind today's chatbots. It reads a stretch of tokens (words, or here, symbols) through a window, mixes them through a fixed set of learned numbers called weights, and writes one token. That token is added to the end of the text, and it runs again. One run is a forward pass.

The network here is tiny: one layer, a window of three tokens, and 23,844 weights. A chatbot has billions.

The project's claim, in one sentence: a transformer that reads three tokens and writes one, run in a loop whose window trails behind its own output, acts as a universal Turing machine, and an ordinary trained network learns to be one. It never sees a real program while it learns. It learns the individual steps of one universal machine running random machines, and then it runs programs people wrote, which it has never seen: Collatz, a bubble sort, cellular automata, the busy beaver, the sieve of Eratosthenes.

2 · The method

Generative Computing Construction Styles.

The work was done inside a larger body of work called GCCS: Generative Computing Construction Styles. Its method is borrowed from Roy Fielding, who described the architecture of the web (REST) by starting from a style with no rules at all and adding one named constraint at a time: client and server, then stateless, then cacheable, and so on. Each constraint buys a property the system did not have before.

GCCS applies the same move to machines that compute. Its thesis is:

Name the null style. Accumulate named constraints. Each constraint induces forced properties. The induced properties of one layer become constraints for the next.
The null styleStart where anything may happen: for a Turing machine, unconstrained symbols changing in any way at all.
Named constraintsAdd restrictions one at a time, in order, each with a name (C1, C2, …).
Induced propertiesEach constraint forces something to be true. Behaviour comes from these properties, not the other way round.
The removal testTake a constraint away. If its property disappears, the constraint was doing real work. If nothing changes, it was only description.

The removal test is the part that matters most here. It is how GCCS separates the constraints that actually make a machine work from the ones that only describe it, and it is what showed which part of a transformer plays which part of a Turing machine.

3 · Matching them up

Each machine, written as its constraints.

The Turing machine
ConstraintWhat it forces
C1 · finite alphabetsymbols can be told apart and written down
C2 · unbounded storagemore than a finite automaton: room for any computation
C3 · bounded vieweach step looks at a fixed amount, however long the input
C4 · finite controlmemory cannot hide in the controller; it must go on the tape
C5 · a local rule tablea definite next step
C6 · finite inputno answer is slipped in from outside
C7 · a halting statea finished computation can be seen
The Turing machine, in one sentence

A finite alphabet, an unbounded tape, a head that sees a bounded amount, a finite control, a fixed table of local rules, a finite input, and a state that says it is done. Each of the seven forces something the machine could not do without it.

The transformer below is listed the same way, one constraint per row, with what each one forces in general and exactly what it is in the network this site runs: 8 numbers per token, 2 attention heads, 32 hidden units, one layer, 23,844 weights.

The transformer, one pass
ConstraintWhat it forcesIn this network
C1 · a finite token fieldevery look has a finite domainthe window: exactly 3 positions, the same 3 on every pass, however long the transcript grows
C2 · a fixed-width carriereach position has a stable state, and every layer the same contract8 numbers per position
C3 · embeddingsa token's identity survives being turned into numbers; two tokens that must differ cannot be given the same numbers1,351 input tokens, 8 numbers each (10,808 weights). The head is one token, state and symbol together (find:*), so one position carries both
C4 · query, key, valuea position can ask, the others can answer, and what is carried is kept apart from how it is matchedWq, Wk, Wv, each 8 × 8, split into 2 heads of 4 numbers
C5 · compatibility scorespositions address each other through a formal relationonly the newest position asks; each head scores all 3 positions against it
C6 · normalized accumulationa look across the whole field collapses into one updatesoftmax over the 3 positions, per head
C7 · bounded reinjectionsee everything, bring back only a fixed amountWo (8 × 8) adds attention's result to the newest position's 8 numbers
C8 · a position-wise updatea nonlinear function of what the position now holds. Not in the general list, but this network depends on it8 → 32 ReLU units → 8 (W1, W2). In the hand-built lag1, this is where the rule table lives: one neuron per rule
C9 · positionorder matters: the same tokens in a different order are a different input3 learned position vectors: first, second, third in the window. Never the position in the transcript, which grows without bound
C10 · layersrelations compose into deeper relationsone layer; depth was not needed
The transformer, run in a loop
ConstraintWhat it forcesIn this network
C11 · a causal maskeach position may look only at what came before itno mask, and none needed: only the newest position asks, and all 3 tokens it reads came before it. Remove C11 and nothing changes, so here it is not load-bearing
C12 · a readoutthe output is chosen from a finite alphabet1,356 outputs scored by U; the highest wins, never sampled. Not every output is one token: 1,351 write one token, 4 write two (the tape grows), and 1 writes nothing
C13 · the output fed backgeneration can go on; a finished run can be seenthe output's tokens are appended at the end of the transcript and never overwritten; writing nothing ends the run

Laid side by side, the obvious pairing is the tape with the transformer's context, the text it can see. That pairing is wrong, and finding out why was the turn the whole project rests on.

Turing machine↔Autoregressive transformer
the tape↔the transcript: every token it has written, never erased, growing at the end
the head's view (C3)↔the context window: a bounded view, read all at once
the state↔nothing hidden: the state is written into the transcript and read back through the window
the rule table↔the fixed weights; one forward pass is one step
write and move↔append one token; the window moves on
halting↔a halt token

Two consequences follow. Because the transformer keeps nothing between passes, its window does double duty: it is the head's view and the machine's state. And because nothing is ever overwritten, every configuration the machine passes through stays in the transcript. The memory grows on paper, not in the network.

4 · Where the window reads

The same rules, read two ways.

Once the window is the head's view, one question decides everything: which part of the transcript does the window read? Apply the removal test to Turing's C2. Unbounded storage only counts if the machine can read it again.

Recency window · ordinary decoding

Reads the newest tokens

The next token depends only on the last few, so the loop can only ever be in finitely many situations. It is a finite-state machine: it stalls or loops. The transcript grows, but nothing ever reads it back. Storage that is never read again is not storage.

Lagging window · this project

Reads the old end, writes the new end

The transcript becomes a queue: read from the front, written at the back. A machine that works that way is a Lag system, and Lag systems are universal (shown for language models by Schuurmans, Dai and Zanini, 2024). The same rule table, read this way, runs any Turing machine.

In practice the transcript is written in rings. Each ring is one whole configuration of the machine: its tape, with the state written as a token in front of the cell the head is on. The window slides along the newest complete ring, three tokens at a time, and each pass writes the token for the middle one's place in the next ring. When the window has crossed the ring, the next ring is complete: one step of the machine. Three tokens are enough because a Turing step only ever changes the cell under the head and moves one cell, so each cell of the next ring depends on at most three cells of this one.

The implicit constraints · what makes it universal

None of these is in the general lists above. They are constraints on how the loop runs, found by asking what the Turing machine needs that C1–C13 do not supply.

ConstraintIn this networkRemove it, and
C14 · the lagging readthe window starts at the oldest token and moves forward one token per pass, while output is written at the far end. The transcript is a queue: read the front, write the backthe loop reads only its newest tokens and is a finite-state machine: every lag0 test stalls or loops (witnessed: lag0, L3)
C15 · nothing carried between passeseach pass depends only on the 3 tokens it reads: no hidden state, no memory of earlier passes, no knowledge of where in the transcript it is. So the machine's state has to be written into the transcript, and the same window always gets the same answermemory could hide outside the transcript, which a Turing machine's finite control forbids (C4) (argued)
C16 · fixed weights while runningthe 23,844 weights never change during a run; they change only in trainingthe rule table would change mid-run, and the run would no longer be a Turing machine's (argued)
C17 · a finite starting transcripta run starts from one ring: the universal machine's tape, holding the program and its inputanswers could be slipped in from outside, which a Turing machine's finite input forbids (C6) (argued)
5 · How it was built

One rung at a time, each one checked.

GCCS builds a claim as a ladder of witnesses: small programs that check one step of the argument exactly and print a verdict. Each rung takes something the last rung assumed and makes it explicit. Every machine here is checked against tm0, GCCS's smallest audited Turing machine, which is built so that it cannot cheat: no hidden memory, no random access, no answers from outside.

lag0
The idea, as a program. Any Turing machine compiles into a rule table over windows of three tokens. With a lagging window it agrees with tm0 on every test; with a recency window every test stalls or loops. That is the removal test, run.
lag1
The rule table, as a transformer. The same table written by hand into transformer weights: one attention head looks one token back, the other two back, and each rule of the machine becomes one neuron. Nothing learned yet: a proof that a transformer can hold it.
lag2
Trained, not written. A network trained only on adding one to numbers of 1 to 3 bits adds one to every number up to 12 bits, and to 256-bit numbers. Every step those longer runs need already occurs in the short ones, so the data forces the rule. Fitting and generalizing happen at the same moment.
lag3
One network for every program. Trained on the steps of a universal machine running 4,000 random machines, it runs seven machines it never saw, 70 runs out of 70 correct. The coverage had to be earned: uniformly random machines left hundreds of needed steps unseen, until machines biased to travel right closed the gap.
lag4–5
The same network, not retrained, draws cellular automata (Rule 90, 30, 110) and runs the four-state busy beaver through every one of its configurations.
smaller
How small can it be? The same recipe at width 8: 8,170 parameters, every training step exact, and 90% of them are the vocabulary. As far as the project could find, the smallest trained transformer shown to act as a universal computer.
faster
A faster universal machine. Profiling showed most of the work was finding the next state by counting. A second universal machine finds it in binary: 4× faster at 8 states, 2,289× at 256. A 23,844-parameter network learns its steps. This is the network the front page runs.
bigger
A big program. The sieve of Eratosthenes as a 250-state machine finds the 263 primes up to 1,680: 39,991 steps, the equivalent of 9.9 trillion forward passes, 48 windows never seen in training, all right.
6 · Reading the front page

What the harder sections are showing.

The sieve

A real program, at full size

The sieve of Eratosthenes finds primes by crossing out multiples: every second number after 2, every third after 3, and so on. A Turing machine has no way to say "every third", so it counts with states: a chain of three states for stride 3, five for stride 5. To reach 1,680 it needs strides up to 40, which is why the program has 250 states.

The network runs the universal machine, which runs the sieve. Each step of the sieve is tens of thousands of steps of the universal machine, and each of those is a whole ring of forward passes. The spiral at the end lays out the numbers 1 to 1,680; each raised bar is a number the network never crossed out, and every one is prime.

Back to the sieve →
Many at once

Every small machine, side by side

One program's steps have to happen in order. Separate programs share nothing, so a graphics card can run thousands of them at once, one per thread. There are 20,736 Turing machines with two states, and this section runs all of them for seven steps. Any that has not stopped by then never will (that is a known result), so seven steps sorts every one.

Columns that stay flat never halt; the taller a column, the longer it ran before halting. The tallest is the busy beaver: 6 steps, 4 ones, the longest any two-state machine runs and still stops. For now this preview runs the machines directly in the page; running them on the network, on the GPU, is the next milestone.

Back to many at once →
7 · What is and is not claimed

Measured, not proved.

  • Universality belongs to the system, not the weights alone. It is the network inside a loop whose window reads the old end of an unbounded transcript. That read discipline is not how chatbots decode.
  • It is an idealization, like every such result. The transcript is unbounded in principle; every real computer, this one included, is finite.
  • Exactness is measured. The network is right on every step it was trained on, and on every step met in every run reported here. A proof that no other step can ever occur is still open.
  • It can be wrong. A learned rule can choose the wrong token on an input unlike anything it trained on, and nothing corrects the transcript afterwards. That is why every run on the site is checked against the exact rule as it goes.
  • "Smallest" means smallest trained, as far as the project could find in October 2026. Hand-built constructions may be smaller.