Emergence, prediction, and test-time scaling
Ask GPT-3 models of increasing size to add two three-digit numbers, with a couple of examples in the prompt. The small ones score close to zero. Then, somewhere around 13 billion parameters, accuracy shoots up. Plotted against scale, the curve looks less like a power law than like a light switch. Wei et al. (2022) collected dozens of such cases and called them emergent abilities, abilities that are absent in smaller models and present in larger ones, appearing at a scale nobody predicted in advance.
If that picture is right, it undercuts everything else in this chapter. Scaling laws predict loss beautifully, but nobody deploys a model for its loss. If useful abilities, or dangerous ones, switch on suddenly at unpredictable scales, then the smooth curves tell us little about what the next model will be able to do. In 2023 Schaeffer, Miranda, and Koyejo argued that much of the suddenness is an illusion created by how we score models, and their argument is one of the most useful pieces of measurement hygiene in the field.
This section examines both sides, then shows how labs actually predict downstream performance from small models, looks at the newer scaling axes of reinforcement learning and test-time compute, and closes with a list of what scaling laws cannot tell you.
What emergence means
Wei et al. (2022) gave the definition plainly. "An ability is emergent if it is not present in smaller models but is present in larger models." On a plot of performance against scale, emergence looks like near-chance performance up to some threshold, then a sharp rise. Their examples, measured with few-shot prompting, include these.
| task | where it emerges (training FLOPs) |
|---|---|
| modified arithmetic, 3-digit addition and subtraction | about (GPT-3, 13B) and (LaMDA, 68B) |
| IPA transliteration, word unscrambling, Persian QA | around the same scale |
| TruthfulQA | only at Gopher's scale, about (280B) |
| MMLU, 57 subjects | near chance up to about , above it from to (70B to 280B) |
| word-in-context (WiC) | at chance up to about , above it only with PaLM at (540B) |
Wei et al. also noticed something important in their own data. For six BIG-Bench tasks, the models' cross-entropy loss on the correct answers kept improving smoothly at small scales, where exact match, BLEU, and accuracy sat flat near chance. The models were getting better all along. The metric just did not show it. As they put it, this "does not explain why downstream metrics are emergent or enable us to predict the scale at which emergence occurs." That gap is where the critique begins.
Sudden changes also happen during training, a different but related phenomenon. Induction heads, the copying circuit built by hand in §4.7, form in a brief phase change early in training, visible as a bump in the loss curve, which you watched happen in §6.8, and small networks trained on algorithmic tasks can generalize abruptly long after they have memorized their training set, which Power et al. (2022) called grokking.
The metric-choice critique
Schaeffer et al. (2023) start from a simple model. Suppose the per-token cross-entropy of a family of models falls as a power law in parameters , as every law in this chapter says it does,
The probability that the model gets one token of the answer right is then about , which rises smoothly toward 1. Now score an answer of tokens in two ways.
- Exact match requires every token to be right, so .
- Token edit distance counts the wrong tokens, so it is about .
In plain words, the same smooth improvement in per-token probability is raised to the -th power by exact match, and merely scaled by by edit distance.
The power is what creates the switch. Take . If per-token accuracy improves from 0.80 to 0.95, a modest and steady gain, exact match goes from to , and if per-token accuracy is 0.5 it is , indistinguishable from zero. A nonlinear metric turns a gentle slope into a cliff, and the longer the answer, the sharper and later the cliff.
∂ Where the cliff sits and how steep it is
Exact match crosses a level (say ) when , that is when . With , that happens at
So doubling the answer length delays the apparent emergence by a factor in model size. With (the widget's toy family), that is a factor of about 4.8.
The steepness against is
using and . At the crossing, and , so the slope there is , the same for every in units of . What changes with is where the rise happens, and the fact that before it exact match is exponentially close to zero. On a plot whose range starts below , a curve that is smooth on a logarithmic scale of accuracy looks like a step on a linear one.
Here is the toy model in numbers, for a family of eleven models from 10 million to 1 trillion parameters, with answers ten tokens long and a benchmark of 200 questions.
The per-token loss falls by the same factor, , at every step, and per-token accuracy and edit distance improve steadily. Exact match is below 1 percent for every model up to 100 million parameters, which the 200-question benchmark reports as exactly zero, and then it climbs past one half within about two decades of scale. Nothing about the models changed abruptly. Only the scoring did.
When does exact match appear to emerge?
Implement exact_match(N, c, a, m) returning , the toy model's exact-match accuracy on -token answers, and emergence_size(c, a, m, q=0.5) returning the size at which exact match equals . Both should work elementwise on arrays.
Too few examples to see small numbers
The second half of the argument is about resolution. A test set of examples cannot report an accuracy between 0 and . If a small model's true exact-match accuracy is and the benchmark has 200 questions, the chance it scores even one is percent, so it will almost always score exactly zero. A family of models whose accuracy rises smoothly from to on a log scale will show a row of zeros followed by a jump. This is the rule of three of §0.11 read backward. Zero successes in trials only bound the accuracy below about , so a row of zeros on 200 questions says the small models are under 1.5 percent, not that they are at zero. Schaeffer et al. showed that with enough test data, all the models in their arithmetic study scored above zero.
How big a test set do you need?
Implement prob_all_wrong(acc, n), the probability that a model with per-example accuracy acc gets none of n independent test examples right, and test_size_to_see(acc, conf=0.95), the smallest integer for which the probability of at least one correct answer is at least conf. Avoid floating-point loops over .
The evidence
Schaeffer et al. tested their explanation three ways. They re-scored the GPT-3 and InstructGPT arithmetic results that had been cited as emergent, two-shot multiplication of two-digit numbers and addition of four-digit numbers, and found that the jumps under accuracy became smooth, predictable curves under token edit distance. They surveyed BIG-Bench and found that over 92 percent of the emergent abilities annotated there appear under just two metrics, multiple-choice grade and exact string match, both discontinuous. And they created emergence on demand in vision models, autoencoders on CIFAR-100 and Transformers on Omniglot, by scoring them with a sharp threshold metric. Their conclusion was that emergent abilities "appear due to the researcher's choice of metric" and "evaporate with different metrics or with better statistics."
Here is the same effect in a real experiment. We train MLPs of five sizes to add two four-digit numbers, and score them by per-digit accuracy and by exact match of the five-digit answer.
Per-digit accuracy climbs steadily from about 0.40 to 0.97, and the loss falls steadily with it. Exact match stays below 7 percent for the three smallest models and then leaps to 0.6 and 0.87. The same networks, the same predictions, two pictures.
Not all emergence is a mirage
The critique is powerful, but it does not settle everything, and a good answer in an interview acknowledges both sides.
- Some tasks are genuinely all-or-nothing. A proof with one wrong step is wrong, and a program that fails one test does not work. For such tasks exact match is the metric users care about, and a sharp rise in it is a real change in what the model can do, even if a smooth quantity underlies it.
- Knowing a smooth quantity exists is not the same as predicting the jump. To predict when exact match crosses 50 percent, you need the right underlying quantity, its exponent, and the mapping from it to the metric, which is the subject of the next part. Wei et al.'s point that smooth cross-entropy does not by itself predict where emergence happens still stands.
- Some abilities track loss thresholds. Du et al. (2024) found that models of different sizes and amounts of data gain certain abilities once their pre-training loss falls "below a specific threshold", and perform at chance before. That is emergence with respect to loss rather than to parameters, and it is predictable if you can forecast loss.
The practical conclusion is to measure with continuous metrics during development (log-likelihood of the correct answer, edit distance, Brier score), use large enough test sets to resolve small probabilities, and treat a jump in a discontinuous metric as a prompt to look for the smooth quantity underneath.
Predicting downstream performance
Labs do not wait to see what a model can do. They predict it from small models before training, using variations of one idea. First forecast a smooth quantity that scales well with compute, then map it to the metric with a function fitted on models that already exist.
GPT-4. OpenAI predicted GPT-4's final loss on an internal codebase by "fitting a scaling law with an irreducible loss term", , to models trained with the same methodology using at most 10,000 times less compute, and predicted its pass rate on a subset of HumanEval coding problems from models with at most 1,000 times less compute, by fitting the mean log pass rate as a power law, (OpenAI 2023). The prediction was shown for one of six difficulty buckets, and on the easiest bucket GPT-4 fell short of it, a reminder that even good forecasts have exceptions.
Llama 3. Meta used two steps (Dubey et al. 2024). First, for compute-optimal models from their isoFLOP study (up to FLOPs), they related the normalized negative log-likelihood of the correct answer on a benchmark to training FLOPs. Second, they fitted a sigmoid mapping that log-likelihood to accuracy, using both the small scaling-law models and the existing Llama 2 models, which reach the high-accuracy part of the curve. Composing the two predicted the 405B model's ARC Challenge accuracy across four orders of magnitude of compute, and it "only slightly underestimates the final performance of the flagship Llama 3 model."
Over-trained models and averages. Gadre et al. (2024) related loss to the average top-1 error over 17 tasks, , as described in §9.4.
Observational scaling laws. Ruan et al. (2024) skipped training altogether. Using about 100 public models from many families, they found that benchmark performance is well described by a low-dimensional "capability space", with families differing mainly in how efficiently they turn compute into those capabilities. With it they predicted several supposedly emergent abilities as smooth sigmoids from smaller models, and the agent performance of models such as GPT-4 from simpler benchmarks.
The two-step method is a classic interview task, so you will build it.
Predict downstream accuracy in two steps
The setup provides SMALL_C and SMALL_NLL, the training compute and the negative log-likelihood of correct answers for small scaling-law models, and FAMILY_NLL and FAMILY_ACC, the same likelihood and the benchmark accuracy for a family of existing models of many sizes. The benchmark has four choices, so chance is 0.25. Implement two_step_predict(C_target) that (1) fits the likelihood as a straight line in using the small models, (2) fits accuracy as using the family, with scipy.optimize.curve_fit, and (3) returns the predicted accuracy at C_target. It should also work for an array of targets.
New axes, reinforcement learning and test-time compute
For years "scaling" meant pretraining compute. Two other axes now matter as much, and both show scaling behavior of their own. They are developed fully in Chapter 18, so here we only connect them to this chapter.
Test-time compute. A model can spend more computation on each problem at inference time, by generating a longer chain of thought, sampling many answers and picking one, or searching with a verifier. OpenAI's o1 announcement reported that "the performance of o1 consistently improves with more reinforcement learning (train-time compute) and with more time spent thinking (test-time compute)" (OpenAI 2024). Brown et al. (2024) found that coverage, the fraction of problems solved by at least one of samples, grows smoothly over four orders of magnitude of , following an exponentiated power law, . On SWE-bench Lite, DeepSeek-Coder-V2-Instruct went from 15.9 percent with one sample to 56 percent with 250, past the single-sample state of the art of 43 percent at the time. Turning coverage into accuracy needs a way to pick the right sample, a verifier, which is the topic of §18.2.
Trading training for inference. Jones (2021), studying AlphaZero on the board game Hex, found that train-time and test-time compute trade off log-linearly, "for each additional 10× of train-time compute, about 15× of test-time compute can be eliminated." Snell et al. (2024) asked the same question for language models on math. Spending test-time compute adaptively, by problem difficulty, improved efficiency "by more than 4× compared to a best-of-N baseline", and in a FLOPs-matched comparison, on problems where a smaller model already had some success, test-time compute could "outperform a 14× larger model". On the hardest problems, and when inference would be heavy relative to pretraining, more pretraining remained the better buy. This is the same kind of trade-off as §9.4, with test-time compute as one more term in the budget (§18.7).
Reinforcement learning compute. Reinforcement learning on reasoning tasks (§18.4) also scales predictably, but its curves saturate. Khatri et al. (2025), in a study using more than 400,000 GPU-hours, fit reward against RL compute with a sigmoid, , where is the asymptotic reward, the efficiency exponent, and the compute at half the gain, and used early parts of runs to predict later ones. Some recipe choices raised the ceiling , while many others changed only the efficiency , reaching the same ceiling faster or slower. Telling the two apart from the early part of a run is the RL analogue of comparing two architectures' scaling laws.
Coverage from repeated sampling
A set of problems has per-sample success probabilities p (one per problem). Implement coverage(p, k), the expected fraction of problems solved by at least one of k independent samples, which should accept an array of k values and return one coverage per k. Then implement samples_for_coverage(p, target), the smallest integer k whose coverage reaches target, or None if no k can (some problems have p = 0). Use doubling followed by bisection, not a linear scan, because the answer can be in the millions.
What scaling laws cannot tell you
Scaling laws are the most reliable quantitative tool in modern AI, and that makes it easy to forget their limits. Here they are, gathered in one place.
- Which specific abilities appear, and when. Loss is an average over everything in the data. A particular skill can sit on a flat or a steep part of its own curve, and its metric can hide it. Ganguli et al. (2022) summarized this as an "unusual combination of predictable loss on a broad training distribution ... and unpredictable specific capabilities, inputs, and outputs."
- Whether bigger is better on every task. The Inverse Scaling Prize (McKenzie et al. 2023) collected tasks where larger models do worse, for reasons including a preference for repeating memorized text over following instructions, imitating undesirable patterns in the data, distractor tasks, and misleading few-shot examples. Some of these trends later turned U-shaped at still larger scales (Wei et al. 2023), which shows how unreliable extrapolating a downstream trend can be.
- How a model behaves where it was not measured. Safety properties, robustness to adversarial prompts, and behavior far from the training distribution are not functions of loss. They are measured, not extrapolated (§19.4).
- What a change in recipe will do. A law describes one architecture, data mixture, tokenizer, and training recipe. A new optimizer, a better data filter, or a mixture-of-experts layer (§13.1) shifts the constants and sometimes the exponents, and the only way to know is to fit again.
- Whether loss is the right target. Lower loss on web text is a proxy for usefulness, and post-training (§14.1) can move capabilities much more than the pretraining loss suggests.
- Where the floor really is. is fitted, not measured, and over a short range of scales it is poorly identified (§9.1). Statements like "we are close to the irreducible loss" are extrapolations of extrapolations.
- Whether the inputs will exist. A law that calls for 100 trillion high-quality tokens or a gigawatt of power says nothing about whether you can get them (§9.4).
Read more
- Wei et al. (2022). Emergent Abilities of Large Language Models. The definition, the examples, and the cross-entropy analysis in the appendix.
- Schaeffer, Miranda & Koyejo (2023). Are Emergent Abilities of Large Language Models a Mirage? The metric-choice argument, the re-analysis, and emergence induced on purpose.
- Du et al. (2024). Understanding Emergent Abilities of Language Models from the Loss Perspective. Abilities that appear below a pre-training loss threshold.
- OpenAI (2023). GPT-4 Technical Report. Section 3 describes predictable scaling of loss and of HumanEval pass rates.
- Ruan, Maddison & Hashimoto (2024). Observational Scaling Laws and the Predictability of Language Model Performance. Predicting capabilities from about 100 public models.
- Snell et al. (2024). Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters and Brown et al. (2024), Large Language Monkeys. Test-time compute as a scaling axis.
- Ganguli et al. (2022). Predictability and Surprise in Large Generative Models and McKenzie et al. (2023), Inverse Scaling. Why aggregate predictability and specific surprises coexist.