A chain of thought trades tokens for accuracy: instead of forcing one hard prediction, the model writes intermediate steps so that every prediction it makes is easy. Compute exactly why that wins, then train two tiny networks in your browser and watch it happen for real.
One hard prediction
Asked for 3642 + 4858 in one shot, a model must resolve every digit and every carry inside a single forward pass. The leading digit of the answer already depends on the entire carry chain, so the difficulty of that one prediction grows with the problem.
Many easy predictions
Writing the steps out moves the intermediate state into the context window. Each next token then needs only one tiny local computation: two digits and a carry. The per-step difficulty stays constant no matter how long the problem gets.
The price
Steps cost tokens, and tokens cost compute and latency. Chain of thought is a trade: linearly more output tokens in exchange for a per-step success rate near 1. Whether the trade pays off is arithmetic, and you can do that arithmetic below.
The compounding arithmetic, live
A whole answer is only right if every one of its parts is right, so success probabilities multiply. Steer the per-step success rates and the problem length; every number and both curves are recomputed from p^n and q^n as you drag.
Scratchpad, whole answer right (p^12)
88.6%
One-shot, whole answer right (q^12)
14.2%
Scratchpad advantage
6.2x
Output tokens: 157 vs 13
assuming 12 tokens per written step (illustrative)
| n (digits) | Scratchpad p^n | One-shot q^n | Advantage |
|---|---|---|---|
| 2 | 98.0% | 72.2% | 1.4x |
| 4 | 96.1% | 52.2% | 1.8x |
| 8 | 92.3% | 27.2% | 3.4x |
| 12 | 88.6% | 14.2% | 6.2x |
| 16 | 85.1% | 7.43% | 11.5x |
| 24 | 78.6% | 2.02% | 38.8x |
| 32 | 72.5% | 0.55% | 131x |
| 40 | 66.9% | 0.15% | 445x |
What this panel assumes
This is an error model, not a measurement: every step is assumed to succeed independently with a fixed probability. Both solvers compound, p^n and q^n both decay, so the chain of thought does not escape compounding. It wins by moving the base close to 1: each written step is a tiny local problem, while each unwritten digit hides a whole carry chain. The constant q is actually generous to the one-shot solver; in the experiment below its measured per-digit accuracy gets worse as problems grow.
The experiment: scratchpad against one-shot, trained in your browser
This is the classic scratchpad result in miniature: two networks, the same multi-digit addition task, the only difference being whether intermediate steps are written down. This is the research ideal scaled to what a browser tab can honestly train in about a second; the full-scale version fine-tunes a transformer, but the mechanism is the same.
Solver A: one-shot
A single-hidden-layer network (64 units) that reads both operands, padded to 5 digits, and must emit all 6 answer digits in one forward pass. No intermediate state anywhere: every carry must be resolved inside the network.
Solver B: scratchpad
An even smaller network (32 units) that only ever learns one column: digit + digit + carry-in to digit + carry-out. At answer time it runs once per column, feeding its own predicted carry forward, exactly like a model writing its working out loud.
Both networks train right here in your browser with plain SGD (30,000 column examples for the scratchpad model, 60,000 full problems for the one-shot model) from fixed seeds, then face 200 held-out problems per length from a separate seed. Every number below is measured from that run. Seeds are fixed, so running again reproduces the same numbers exactly.