The model lab · Part 3
What happens if you set the weights yourself?
Meet Doodle-15. This model is small enough that you can set all fifteen of its weights by hand, and then watch training find its own.
Doodle-15
Model card- Type
- Single-layer binary image classifier, the smallest one that still works
- Parameters
- 15: one weight per pixel
- Layers
- 1 (15 pixels → 1 score)
- Input
- 15 numbers: the 3×5 grid, 1 where you drew ink and 0 where you didn't
- Output
- 2 probabilities that sum to 100%: "this is a 3" vs "this is an E"
Doodle-64 is this same model on an 8×8 grid, and a frontier LLM is the same idea again with hundreds of billions of weights. Fifteen is small enough to hold all of them in your head at once.
Draw a 3 or an E, 15 pixels at a time
This grid is three pixels wide and five tall. At that size there is one way to draw a 3 and one way to draw an E. You can click a pixel, drag across the grid, or draw with your finger on a phone.
Draws a 3 and sets all fifteen weights, so the model below reads it correctly. Every control stays live afterwards.
Only four pixels tell the two shapes apart
Here are the two shapes side by side. Nine of the fifteen pixels are inked in both of them, so those nine say nothing about which one you drew. The whole difference is four pixels, and they sit in the left and right columns on the second and fourth rows.
- Shared by both:
- 9 pixels
- Only the 3 uses:
- 2 pixels
- Only the E uses:
- 2 pixels
Set all fifteen weights yourself
Every pixel gets one weight. You can set it to vote for 3, vote for E, or stay out of the way at zero. Real models are never set by hand like this, and you will see why in the next section. It is worth doing once, because fifteen weights is few enough to reason about the whole model at a glance.
Row 1, col 1
Row 1, col 2
Row 1, col 3
Row 2, col 1
Row 2, col 2
Row 2, col 3
Row 3, col 1
Row 3, col 2
Row 3, col 3
Row 4, col 1
Row 4, col 2
Row 4, col 3
Row 5, col 1
Row 5, col 2
Row 5, col 3
Test your weights
Every weight is zero right now, so the score is zero and the model is split exactly down the middle. You can set some weights above and watch this change.
- Score
- 0.0
- Answer
- 3
- Confidence
- 50%
The catch
You can ink only the two pixels that vote for 3 and leave the rest of the grid empty. The picture looks nothing like a 3, and the model still answers "3" with the same confidence. It has two possible outputs and no way to say "this is neither of those", so it picks the closer one and reports it.
Meet Doodle-15
Doodle-64 works on an 8×8 grid, which is 64 pixels and 64 . That is already small, and it is still more numbers than you can keep track of. So here is the same model shrunk until you can see all of it at once.
Doodle-15 reads a grid that is three pixels wide and five pixels tall. That is fifteen pixels, and fifteen weights. At this size there is exactly one way to draw a 3 and exactly one way to draw an E, which means we can work out what every single weight should be, by hand, with no training at all.
Four pixels carry the whole difference
Now let's put the two shapes side by side and look at what actually separates them. Both of them have a full bar across the top, the middle, and the bottom. That is nine pixels that are inked in the 3 and inked in the E as well.
Those nine pixels are useless for telling the shapes apart. If a pixel is on in both answers, seeing it lit tells us nothing about which one we are looking at. The difference lives entirely in the two rows between the bars. A 3 joins its bars down the right-hand column, and an E joins them down the left. That is four pixels, and those four pixels carry the whole difference.
Setting the weights by hand
A weight is the number a pixel gets multiplied by. A positive weight means "this pixel is evidence for 3", a negative weight means "this pixel is evidence for E", and a weight of zero means the pixel is ignored. The model adds up the weights of every pixel you inked, and the total decides the answer.
So the fifteen weights almost write themselves. The two pixels only a 3 uses get a positive weight. The two pixels only an E uses get a negative weight. The nine shared pixels get zero, because they cannot help. You can set all fifteen yourself in the demo and watch the answer change as you do.
Real models are never built this way. Nobody sits down and chooses a weight for each of a hundred billion parameters, and for anything bigger than this toy nobody could work out what the right values are. It is worth doing once at fifteen weights, because it shows you what training is looking for before you watch training look for it.
The model cannot say "neither"
There is a problem hiding in those four pixels, and we can trigger it deliberately. Ink the two pixels that vote for 3, leave the other thirteen blank, and ask the model what it sees.
It says "3", with real confidence. The picture is two dots. It is not a 3 by any reasonable description, and the model reports a 3 anyway.
This happens because Doodle-15 has two possible outputs and no third option. Every drawing it is given has to come out as a 3 or as an E, so a picture that is neither still gets sorted into one of them. The model has no way to answer "this is not a shape I know". It only ever tells you which of its two answers fits better, even when both of them fit terribly.
This is the same failure that makes a large model answer a question it has no information about. The shape of the output forces a choice, so a choice comes out.
Now let training find the weights
Now let's stop setting the weights and let the model find them. The training set is fifty drawings, twenty-five threes and twenty-five Es, and they are deliberately imperfect. Some are drawn with a two-pixel pen, some have a bar that stops short, and some have a gap in the vertical stroke, the way a real hand slips.
Training starts from fifteen small random numbers that mean nothing. It scores every drawing, measures how wrong it was, and nudges each weight a little way toward being less wrong. Then it does that again, eighty times over. You can drag the slider and watch the error fall.
Fifty drawings to learn from
Nobody sets the weights of a real model by hand, so here is how they are actually found. The training set is 50 drawings, half of them threes and half of them Es. They are messy on purpose. Some have a shortened bar, some are drawn with a two-pixel pen, and some have a gap in the vertical stroke.
Threes
Es
Watch the fifteen weights train
Training starts from fifteen small random numbers that know nothing. Each pass over the drawings measures how wrong the model is, then nudges every weight a little way down that slope. You can drag the slider to move through the run.
- How wrong it is
- 0.038
- Drawings it gets right
- 100%
Your weights next to the trained ones
Green votes for 3 and red votes for E, and a stronger colour is a stronger vote. The hand-set weights use four pixels and ignore the other eleven. The trained weights lean hardest on those same four, which is the encouraging part, and they also put real weight on the bars.
Set by hand
Learned by training
The four telltale pixels carry 6.7 of the trained model's voting power, and the other eleven carry 4.7 between them. The bars matter to a trained model because in these drawings a bar sometimes goes missing, and which bar goes missing is a clue.
Both of them read a clean 3
On the perfect 3, the hand-set weights answer "3" at 90%, and the trained weights answer "3" at 98%. Two different sets of fifteen numbers, and both of them work. There is no single correct answer for what the weights should be, only weights that do the job.
What the trained weights knew that you did not
Now we can compare the two sets of weights directly. The good news first: training leaned hardest on the same four pixels we picked by hand. It found them on its own, from nothing but examples and a measure of error.
The interesting part is what else it found. Our hand-set weights gave the nine shared pixels a flat zero, because in two perfect glyphs those pixels are identical. Training saw fifty messy drawings where bars sometimes go missing, and in those drawings which bar is missing turns out to be a small clue. So the trained model gives the bars real weight too, and it grades its votes by strength instead of settling for plus one and minus one.
Both sets of weights read a clean 3 correctly. That is worth sitting with, because it means there is no single right answer for what the weights should be. There are many sets of fifteen numbers that do this job, and training finds one of them rather than the one. When a model card says a model has seventy billion parameters, those parameters are seventy billion numbers just like these, found the same way, and a different training run would have found different ones that work about as well.
Put it to use
Next up: How do AI models generate images?