Neural Network Writing
We asked an AI to write a neural network by hand, with no data and no training. Sometimes it beat 10 million examples. Sometimes it was worth 12.
A number that checks itself
When you type a long number into a form, one wrong key can send a payment or a parcel to the wrong place. So many long numbers carry a small safety feature. The last digit is not new information. It is worked out from all the other digits. Change any digit, or swap two digits next to each other, and the check fails. The computer knows something is wrong without looking anything up.
This is called a checksum. We used a well-known one called Verhoeff, published in 1969 and still used in real ID numbers, including India's Aadhaar.
It works like a small board game. You start at position 0. You read the digits one at a time, from right to left, and a lookup table tells you where each digit moves you. If you finish back at 0, the number is valid. Here it is on a made-up number, 1234 5678 9010.
| Step | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Digit read | 0 | 1 | 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| New position | 0 | 5 | 0 | 7 | 0 | 9 | 3 | 4 | 3 | 9 | 9 | 0 |
You finished at 0, so the number is valid. Try it yourself below. Press a digit to change it and watch the check fail.
What we asked the AI to do
We gave three Claude models this rule and its lookup tables, and we asked each one to write a neural network that does the same job.
There was one catch. Normally nobody writes the numbers inside a neural network. You show it millions of examples and it adjusts them slowly, which is called training. We asked the AI to write every number by hand. It got no examples, and it was not allowed to run its network even once to see if it worked.
To be clear, the AI did not discover the rule. We gave it the rule. What it had to work out was how to build that rule from neural network parts.
The network it wrote
Opus saw that the rule is a small machine with 10 positions, and it built that machine directly. One group of units remembers the current position. The next group asks a simple question: am I at this position, and is the next digit this one? There are 100 of those units, one for each pair, and exactly one of them switches on. The last group turns that into the next position. This block repeats for each digit.
Of its 156,442 numbers, only 4,420 are not zero. And because it is so tidy, you can read the rule straight back out of it. Below is one block of the real weights, written as a table. It is the lookup table for that step, and our build script checks that this holds for all 11 blocks.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 8 | 9 | 1 | 6 | 0 | 4 | 3 | 5 | 2 | 7 |
| 1 | 9 | 5 | 2 | 7 | 1 | 0 | 4 | 6 | 3 | 8 |
| 2 | 5 | 6 | 3 | 8 | 2 | 1 | 0 | 7 | 4 | 9 |
| 3 | 6 | 7 | 4 | 9 | 3 | 2 | 1 | 8 | 0 | 5 |
| 4 | 7 | 8 | 0 | 5 | 4 | 3 | 2 | 9 | 1 | 6 |
| 5 | 2 | 1 | 9 | 4 | 5 | 6 | 7 | 0 | 8 | 3 |
| 6 | 3 | 2 | 5 | 0 | 6 | 7 | 8 | 1 | 9 | 4 |
| 7 | 4 | 3 | 6 | 1 | 7 | 8 | 9 | 2 | 5 | 0 |
| 8 | 0 | 4 | 7 | 2 | 8 | 9 | 5 | 3 | 6 | 1 |
| 9 | 1 | 0 | 8 | 3 | 9 | 5 | 6 | 4 | 7 | 2 |
All three models found a machine like this, though they built it in different ways. Every network scored 100% on 100,000 numbers it had never seen.
| Model | Tries | Linear layers | ReLU layers | Weights | Nonzero weights | Sealed accuracy |
|---|---|---|---|---|---|---|
| Fable | 5 | 12 to 25 | 11 to 12 | 170,962 to 513,262 | 4,533 to 13,720 | 100% |
| Opus | 5 | 24 | 11 | 156,442 | 4,412 to 4,420 | 100% |
| Sonnet | 5 | 6 to 35 | 3 to 12 | 47,922 to 250,032 | 4,101 to 12,530 | 100% |
Here is the network from the figure on our made-up number.
| Number | What it is | The network says |
|---|---|---|
| 1234 5678 9010 | The correct number | valid |
| 1234 5778 9010 | One digit changed | invalid |
| 1234 5687 9010 | Two neighbours swapped | invalid |
| 1234 5678 9013 | Wrong last digit | invalid |
Then we tried to train one
This is the part we like most. We took the same design, filled it with random numbers, and trained it the normal way. We also trained two standard networks of similar size. We showed them up to 10 million labelled examples, half valid and half invalid.
Table view
| N | Training accuracy % |
|---|---|
| 10 | 50.0 |
| 100 | 50.0 |
| 1,000 | 50.0 |
| 10,000 | 50.0 |
| 100,000 | 50.0 |
| 1,000,000 | 50.0 |
| 10,000,000 | 50.0 |
After 10 million examples, training was still at 50%. That is a coin toss. The written network, with no examples at all, was exactly right.
One limit, to be fair: our training was not unlimited, and a longer run might do better. A longer test we ran was still at 49.9%. So we can say that our training did not learn this rule. We cannot say that no training ever could.
So what is a written network worth?
This gave us a simple way to measure it. Take a network the AI wrote with no data. Then count how many labelled examples normal training needs to become just as good. That count is what the written network is worth.
We tried this on three more jobs, and the answer changed enormously.
| The task | Score of the AI-written network | Normal training catches up after |
|---|---|---|
| Name the clothing item in a small photo | 47.7% | 12 examples |
| Read a handwritten digit | 60.2% | 25 examples |
| Say which of 50 languages a sentence is in | 92.7% | 437 examples |
| Verify a 12-digit Verhoeff checksum | 100% | not after 10 million examples |
Clothing items: worth about 12 examples
The job is to look at a tiny photo and name the item: a shirt, a shoe, a bag. Nobody can write that down as a rule.
So the AI did something charming. It drew a rough picture of each item from memory, and it scored a new photo by how well the photo matched each picture. Those drawings are the network. Here they are, exactly as they sit in the weights.


| True class | T-shirt | Trouser | Pullover | Dress | Coat | Sandal | Shirt | Sneaker | Bag | Boot |
|---|---|---|---|---|---|---|---|---|---|---|
| Network said | T-shirt | Trouser | Shirt | Dress | Trouser | Sandal | Shirt | Sneaker | Bag | Sneaker |
It scored 47.7%, well above the 10% you would get by guessing. But normal training catches up after about 12 examples. Trousers and sneakers have distinctive shapes, so it gets those right. Many coats, pullovers and shirts look like the same filled block, and they end up called bags.
Handwritten digits: worth about 25 examples
The same idea again. The AI drew each digit from memory, and the network looks for the closest match. Here are its drawings, as they sit in the weights.


| True class | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| Network said | 0 | 1 | 2 | 5 | 9 | 4 | 0 | 7 | 8 | 9 |
It scored 60.2%, which is worth about 25 examples. The best of the 15 networks, by Opus, reached 84.7% by looking for strokes at different angles first.

So for images, writing by hand buys you a few dozen examples, or about a hundred at the very best. Someone could label that many in a few minutes.
Fifty languages: worth about 437 examples
The job is to read a paragraph and say which of 50 languages it is in. Here the AI did very well, with 92.7%, where guessing would give 2%.
How? For each language, it wrote out about 150 to 250 words from memory, counted which letter patterns came up, and stored those counts in a single table. That one table is the whole network.
Normal training needs about 437 examples to match it. The mistakes are mostly between close relatives, such as Malay and Indonesian. Konkani is the exception, and we did not look into why.
| Hardest languages | Accuracy | Most often taken for |
|---|---|---|
| Konkani | 41.2% | Swedish |
| Malay | 42.8% | Indonesian |
| Indonesian | 74.8% | Malay |
| Maithili | 75.6% | Nepali |
| Danish | 83.4% | Norwegian |
| Bengali | 87.6% | English |
What about the legal citations network?
A lot of this excitement began with Jacob Lauritzen's network, which told real legal citations from fake ones. By his own numbers, the version Fable wrote with no labels scored 97.8%, while a trained network with 8,192 labels scored 94.6%. We did not rerun this, so those are his numbers.
It fits the same pattern. Legal citations follow written rules: which law reports exist, which courts they cover, and which volumes belong to which years. A related project, CiteNet, builds its network from exactly such a list.
There is a limit too. CiteNet's own page says it only reads the text of a citation, so a fake that copies a valid format will pass. It can tell you that a citation could exist, and it cannot tell you that it does.
What we conclude
If you can say the rule in words, an AI can write it into a network. A checksum is pure rule. Languages and legal citations are close to rules, because the AI remembers which words belong to which language and which law reports exist. There, a written network can be worth thousands of examples or more.
But how do you know that a scribble is a 7? You cannot really say. So there, a written network is worth only a few dozen examples.
Two things to keep in mind. We gave the AI the checksum rule, so this shows it can translate a rule and does not show it can discover one. And "no data" means none during the session. These models learned from a lot of text long before this.
For researchers: the mathematics, full numbers and caveats
The exact rule
Validity is a function \(f : \{0,\dots,9\}^{12} \to \{\text{valid},\text{invalid}\}\). With \(c_0 = 0\), \(c_{i+1} = d(c_i, p^{\,i \bmod 8}(s_{11-i}))\), and \(f\) is valid exactly when \(c_{12} = 0\). Here \(d\) is multiplication in the dihedral group \(D_5\), and \(p\) is a fixed permutation of the digits.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 1 | 1 | 2 | 3 | 4 | 0 | 6 | 7 | 8 | 9 | 5 |
| 2 | 2 | 3 | 4 | 0 | 1 | 7 | 8 | 9 | 5 | 6 |
| 3 | 3 | 4 | 0 | 1 | 2 | 8 | 9 | 5 | 6 | 7 |
| 4 | 4 | 0 | 1 | 2 | 3 | 9 | 5 | 6 | 7 | 8 |
| 5 | 5 | 9 | 8 | 7 | 6 | 0 | 4 | 3 | 2 | 1 |
| 6 | 6 | 5 | 9 | 8 | 7 | 1 | 0 | 4 | 3 | 2 |
| 7 | 7 | 6 | 5 | 9 | 8 | 2 | 1 | 0 | 4 | 3 |
| 8 | 8 | 7 | 6 | 5 | 9 | 3 | 2 | 1 | 0 | 4 |
| 9 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|---|
| p0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| p1 | 1 | 5 | 7 | 6 | 2 | 8 | 3 | 0 | 9 | 4 |
| p2 | 5 | 8 | 0 | 3 | 7 | 9 | 6 | 1 | 4 | 2 |
| p3 | 8 | 9 | 1 | 6 | 0 | 4 | 3 | 5 | 2 | 7 |
| p4 | 9 | 4 | 5 | 3 | 1 | 2 | 6 | 8 | 7 | 0 |
| p5 | 4 | 2 | 8 | 6 | 5 | 7 | 3 | 9 | 0 | 1 |
| p6 | 2 | 7 | 9 | 3 | 8 | 0 | 6 | 4 | 1 | 5 |
| p7 | 7 | 0 | 4 | 6 | 9 | 1 | 3 | 2 | 5 | 8 |
The network, and why it is exact
With one-hot state \(h\) and input \(x \in \{0,1\}^{120}\): \(u_{c,d} = \mathrm{ReLU}(h_c + x_{\mathrm{pos},d} - 1)\) and \(h'_k = \sum u_{c,d}\) over pairs with \(d(c,p^i(d)) = k\). The sum inside the ReLU is 2 for exactly one pair and at most 1 for the rest, so \(h'\) is again one-hot. By induction, the network computes \(f\) exactly. The model wrote this argument in its notes before anyone ran the network.
The worth of a network
For accuracy \(A\), \(N^* = \min\{N : G(N) \ge A\}\), where \(G(N)\) is mean test accuracy of gradient descent on the same architecture from random weights with \(N\) labelled examples.
The clothing and language networks
Clothing: Bernoulli naive Bayes, \(\mathrm{score}_c(m) = \sum_i m_i \log\frac{p_{c,i}}{1-p_{c,i}} + \sum_i \log(1-p_{c,i})\). Languages: multinomial naive Bayes on hashed n-grams, \(\mathrm{score}_c(x) = \sum_i x_i \log p_c(i)\).
The last digit of the numbers we used carries no information of its own. It is a checksum, computed with an algorithm that the Dutch mathematician Jacobus Verhoeff published in 1969, built on the symmetries of a pentagon. It catches every mistyped digit and every swap of two neighbouring digits, which are the mistakes people make most.
We gave three Claude models the rule and its two tables and asked each for a neural network that checks such a digit on 12-digit strings. They were allowed no data and no forward pass, so a model could not run its network even once. The strings we tested on are random and synthetic, never real identifiers. All 20 networks scored 100% on 100,000 sealed strings, and a separate agent found no errors on 180,000 fresh and adversarial ones. The median budget-0 network has 4,520 nonzero weights.
We tried to train the same thing. An MLP with 226,434 parameters reached 50.10% after 10 million fresh examples, and a GRU reached 50.01%. Chance is 50%.
The same rule on shorter numbers
The networks above work on 12 digits. As a check that our training pipeline works at all, we ran the same rule on made-up shorter numbers of 3, 4, 5, 6 and 8 digits. "3 digits" below means the Verhoeff rule on a 3-digit number, which has only 1,000 possible inputs.
Table view
| Length | N | Mean accuracy |
|---|---|---|
| 3 digits | 1,000 | 92.1% |
| 3 digits | 10,000 | 100.0% |
| 3 digits | 100,000 | 100.0% |
| 3 digits | 1,000,000 | 100.0% |
| 3 digits | 10,000,000 | 100.0% |
| 4 digits | 1,000 | 54.3% |
| 4 digits | 10,000 | 98.2% |
| 4 digits | 100,000 | 100.0% |
| 4 digits | 1,000,000 | 100.0% |
| 4 digits | 10,000,000 | 100.0% |
| 5 digits | 1,000 | 50.0% |
| 5 digits | 10,000 | 61.3% |
| 5 digits | 100,000 | 98.0% |
| 5 digits | 1,000,000 | 95.4% |
| 5 digits | 10,000,000 | 100.0% |
| 6 digits | 1,000 | 50.0% |
| 6 digits | 10,000 | 50.1% |
| 6 digits | 100,000 | 62.6% |
| 6 digits | 1,000,000 | 50.0% |
| 6 digits | 10,000,000 | 85.6% |
| 8 digits | 1,000 | 50.0% |
| 8 digits | 10,000 | 50.1% |
| 8 digits | 100,000 | 50.1% |
| 8 digits | 1,000,000 | 50.1% |
| 8 digits | 10,000,000 | 50.1% |
That contrast is the reason we built a unit for this. Everyone who saw a hand-written network last week asked whether it was impressive. A better question is what it is worth, and worth can be measured. For a network with sealed-test accuracy A, we define its data equivalent N* as the number of labelled examples gradient descent needs, on the same architecture from random weights, to reach A. We searched learning rates and schedules on a validation split for every N, over 10 seeds.
We ran 80 writers, in fresh contexts, in random order: Fable, Opus and Sonnet at budget 0, and Fable again with 10 peeks at a dev set. 77 ran. A judge re-executed each build script in a sandbox with no network, and every weight file came back byte-identical. Every network beat 5 copies of itself with the weights permuted, which all scored at chance.
Three kinds of knowing
The range tells you what a hand-written network actually is. On images, where nobody can write the rule down, the median network is worth about as much as a couple of dozen labels. The best of 15 on MNIST, an Opus network built from an orientation map and nearest templates, scored 84.7%. A convolutional network with augmentation, given one example per class, reaches about 47%. So writing vision by hand is possible, and it is worth very little.

On language identification the models know something that can be written down. The notes we read describe a naive Bayes table recalled from memory and hashed through the feature map, and the median reached 92.7% over 50 languages, including 18 South Asian ones. That is worth about 437 labels, which is a real number of examples for someone to collect.
On the checksum, the models were handed the rule, so this measures compilation, not recall. Our Verhoeff/WiLI ratio of medians is at least 22,905, and that is a lower bound that depends on where we stopped training. Strictly, our ordering of the two only needs Verhoeff above about 43,700.
Where to be careful
Our training runs on Verhoeff were not generous. One online pass at batch size 1024 gives 9,667 steps at N = 10 million, so "above 10 million" means within those steps. A separate agent probed further on CPU with one seed at batch 128, and an MLP on 12 digits was still at 49.9% after 78,000 steps and a GRU at 50.1% after 27,500. The pipeline does fit short strings, but largely by covering the input space: at length 4 with 10,000 examples, 74% of test strings are already in the training set, and balanced accuracy on unseen strings is only 55%. At length 5 with 100,000 examples it is 81%. The cost of each extra digit up to length 5 matches the growth of the input space, so that slope does not extrapolate to 12 digits. We can say that this pipeline did not learn 12 digits. We cannot say that 12 digits are unlearnable, or put a limit on N*.
The same-architecture number also mixes two things. Three of the best MNIST networks, at 75.6% to 84.7%, train to only about 50% to 55% on their own architecture at N = 2,000, because they contain long chains of narrow layers that suit a hand design and not gradient descent. Against a fixed reference CNN they are worth 36 to 108 labels. That gap surprised us, and for perception the reference number is the fairer rate.
Class count explains part of the ordering. Per class, WiLI over MNIST is not significant on the same architecture (Holm p = 0.116). And "zero data" means none in the session. These models were trained on text that surely describes MNIST and Wikipedia in many languages, so N* measures what transfers, not how it got there.
Two more results are worth a sentence each. Hand-written networks were not more robust than matched trained ones on MNIST-C (mean difference 0.020, 95% CI -0.011 to 0.052), which we had guessed they would be. And the weights are a good place to begin training: on WiLI at 50 examples, starting from written weights gives 91.6% against 70.7% from random, though the advantage is gone by 1,000.
The practical reading is narrow but real. If your task has a rule you can state, an agent can compile it into a network that training may never find, and you need no data at all. If your task is perception, you are buying a couple of dozen labels. Both of those seem worth knowing before you pay for either.
