When a small model stops memorizing
A sweep on 3-digit addition to see how the amount of training data, and whether each example shows its worked steps, moves the point where a small model starts getting unseen problems right. From 10k worked examples, a 4-layer model gets 99.5% of them.
Question
A small model can either memorize its training examples or learn the rule behind them. How much data does it take to tip it toward the rule? And does showing the work, a step-by-step “whiteboard” trace, lower that amount compared with giving the answer alone?
Approach
Task: a + b with both numbers from 0 to 999. A fixed 20% of all pairs is held out and never trained on; 5,000 of them form the test set. Training sets are nested: 1k, 3k, 10k, 30k and 100k examples.
The quality knob is the same pairs written two ways:
- board: the column-by-column trace (digits, carry, written digit), then the answer
- noboard: the answer only
<task> add | a=347 b=589 | out: int
<board>
c0 | 7+9+0=16 | w6 c1
c1 | 4+8+1=13 | w3 c1
c2 | 3+5+1=9 | w9 c0
read: 936
</board>
<answer> 936
| Model | Character-level transformer, 4 layers, width 128, 4 heads, rotary positions |
| Training | Muon with cautious mask, batch 128, up to 2,000 steps, same steps for every data size (small sets just repeat more) |
| Stop rule | Stop early once held-out accuracy reaches 99% |
| Scoring | Greedy generation from the prompt, exact match on the answer line |
| Hardware | Laptop |
A second data set holds word problems. Training problems have 1 or 2 steps. The tests cover unseen problems, unseen phrasings, and longer problems of 3 or 4 steps.
Results
Worked trace, 10,000 examples:
| step | train accuracy | held-out accuracy |
|---|---|---|
| 250 | 87.6% | 84.9% |
| 500 | 94.3% | 94.8% |
| 750 | 98.4% | 96.6% |
| 1,000 | 98.8% | 97.5% |
| 1,250 | 99.8% | 98.7% |
| 1,500 | 99.8% | 99.1% (early stop) |
Final score on all 5,000 held-out problems: 99.48%.
Findings
- With 10k worked examples, a 4-layer model learned 3-digit addition well enough to get 99.5% of never-seen pairs right, in 1,500 steps.
- Train and held-out accuracy moved together from the first check. At this data size there was no visible memorization phase to escape from.
Next
- Train board and noboard at 1k, 3k, 10k, 30k and 100k examples and plot held-out accuracy against data size for each. The crossover point should show up in the smaller sets (1k, 3k).
- Compare answer-only against the worked board at each size, to see whether showing the work lowers the data needed.
- Train on the word problems and check unseen phrasings and longer problems, where the trace should matter more than in plain addition.