Give an open LLM one hard problem and let it keep training on its own attempts. On a GPU kernel contest it wrote a kernel that runs in 1,161 µs, faster than the best human's 1,371 µs. The same model, frozen and sampled 25,600 times, never got below 5,390 µs.
Pick a method and press Play. Watch the cloud of 512 attempts at each step, the best kernel so far, and the average. Then we build the method from zero. The problem becomes a game, a frozen model searches it, and a new objective cares only about the best. A rule picks where to start, and we add up the cost.
You need what an LLM does (it writes text, including code, one token at a time) and what reinforcement learning is (try, get a score, make high-scoring attempts more likely). We build the rest.
Press Play. Each step, the method writes 512 kernels and an evaluator times them on an H100.
The task is GPUMode's TriMul on an H100. Final best runtimes are from the paper's ablation table, all timed by the same evaluator (Table 8): best-of-25,600 5,352 µs, frozen model with the paper's reuse rule 2,061 µs, TTT-Discover 1,203 µs. The best human kernel is 1,371 µs (Table 4); the lede's 1,161 µs and 5,390 µs are the official leaderboard timings (Table 4). Curves are traced by eye from Figure 4. The clouds of dots are illustrative shapes drawn to match those curves; the paper shows such clouds only for TTT-Discover (Figure 1).
Chapter 0
Meet the kind of problem where only the single best answer counts, and see why a frozen model plateaus on it
Think back to your hardest programming assignment. You knew the textbook. You tried a few guesses, and they gave small signs of life, nothing more. So you studied your failed attempts, and each new attempt got a little smarter. After hours of this you understood the new idea, and the next attempt worked.
That story has two parts: trying and learning from the tries. Today's AI systems for scientific discovery mostly do only the first part. This paper adds the second.
Start with the problems themselves. Each one comes with a number that says how good a candidate is. A GPU kernel has a runtime. A mathematical construction certifies a bound. A contest program earns a score. The best number anyone has found so far is the state of the art.
The paper defines a discovery very simply: you find a candidate whose number beats the state of the art. The bigger the margin, the bigger the discovery. Nothing else counts. A thousand good attempts that all fall short are worth nothing. One attempt that beats the record is worth everything.
Pick a domain. Each bar is the best result of one method. Longer is better, whichever way the raw number goes. The yellow line is the best human result.
Numbers from the paper's summary table (page 1) and Tables 2, 4, 6 and 7. Erdős: upper bound, lower is better. TriMul A100: runtime in µs, lower is better. AtCoder ahc039: contest score, higher is better. Denoising (PBMC): benchmark score, higher is better. Bars are drawn on a scale that starts near the worst shown value, so small gaps stay visible; the read-out gives exact values. "Best-of-25,600" is the same open model, frozen, with the same number of attempts as TTT-Discover. No prior AI result exists for TriMul or denoising.
The bars tell a consistent story. The same open model, gpt-oss-120b, sampled 25,600 times without any training, lands below the best human in three of the four domains. On the Erdős problem plain sampling does edge past the old record, by far less. The same model trained on its own attempts lands above the human result every time. In the Erdős problem, its margin over the previous record is 16 times bigger than the previous record's margin over the human result.
The usual way to throw compute at such problems is test-time search. You prompt a frozen model many times, keep the good attempts, and feed them back into new prompts. AlphaEvolve is the famous example. The prompts get better, but the model never changes. It is like a student who keeps a notebook of past attempts but never really learns the idea behind them.
TTT-Discover does reinforcement learning at test time. The model attempts the problem, an evaluator scores each attempt, and the model's weights take a gradient step toward the better attempts. Then it attempts again, now a slightly different model. Fifty steps later it is a specialist in one problem.
That second half matters as much as the first. A naive version of test-time RL barely beats sampling, as we will see in the ablations. The paper's gains come from two changes that point the whole loop at the maximum. Here is the road.
Chapter 1
Turn a math bound, a GPU kernel and a contest into the same four parts: a state, an action, a transition and a reward
Before the model can learn anything, the problem must become a game with a score. The paper follows AlphaEvolve's recipe. Every problem arrives as a text description, which we call d. It might say: "Here is a slow PyTorch module. Write a faster Triton kernel that gives the same output." The model always sees d.
A state s is a candidate solution: a kernel, a C++ program, or a step function stored as a list of numbers. An action a is what the model writes: some thinking tokens, then code. The transition turns the action into the next state. The reward R(s) scores that state.
Pick a problem, then press Next to follow one attempt from prompt to reward. Press Break it to see what happens to a kernel that gives the wrong answer.
The four parts per problem follow Table 1 and Sections 4.1 to 4.3. Token limits are from Section 3.3 and Table 9: a 32,768-token context, with prompt plus thinking capped at 26,000 tokens. Time limits: kernels are timed on H100s through Modal (Sec. 4.2); math code gets 10 minutes in Sec. 4.1 (Appendix B says up to 1,100 s); AtCoder programs get 2 s and 1,024 MB (Sec. 4.3). The code snippets are short illustrations, not the paper's code.
Look at the transition. For a kernel or a contest program, the code is the new state, so the environment just parses it out of the text. For math, the code is a program that builds the construction, often by running an optimizer. So the environment parses the code and runs it, and the output array is the new state.
Every reward comes after a validity check. A kernel must match the PyTorch reference output within the contest's tolerance. A step function for the Erdős problem must stay between 0 and 1 and integrate to 1. A program must finish in time. Fail the check, and the reward is 0. That rule matters later: many attempts fail, and the learning signal must handle a pile of zeros.
| Problem | State s | Transition | Reward R(s) |
|---|---|---|---|
| Erdős minimum overlap | step function (array) | run the parsed Python | 1 / certified upper bound |
| Autocorrelation, first | step function | run the parsed Python | 1 / certified upper bound |
| Autocorrelation, second | step function | run the parsed Python | certified lower bound |
| GPU kernel | Triton kernel code | parse the code | 1 / runtime |
| AtCoder contest | C++ program | parse the code | score on local tests |
| Single-cell denoising | analysis code | parse the code | 1 / MSE |
Why "one over" the bound or runtime? Because the method always maximizes reward. A smaller runtime must become a larger reward, and dividing does that. Keep this in mind: on a 1/runtime scale, going from 2,000 µs to 1,900 µs raises the reward by only about 5%. That small number will cause trouble in Chapter 3.
One more choice hides in the action. The model writes its action conditioned on the description and a starting state: a ~ πθ( · | d, s). Which starting state to give it is a real design decision. It could be empty. It could be the current record holder. It could be one of the model's own earlier attempts. The next chapter is about exactly this choice.
Chapter 2
Compare sampling from scratch with reusing the best attempts, and find the limit that no amount of reuse removes
Suppose the model's weights are fixed. How can more compute still help? There are two classic answers. Both appear as baselines in the paper, so it pays to know them well.
The simplest is best-of-N. Give the model the description and an empty starting state. Sample N independent attempts. Keep the best one. The attempts never see each other. The paper sets N = 25,600, exactly the number of attempts TTT-Discover makes, so the two use the same sampling budget.
Best-of-N has a weakness. Each attempt starts from nothing, so it must invent every idea in one go. A great kernel might stack five tricks: lower precision, then fusing one layer, then another, and so on. If one attempt can only add one or two tricks, starting from scratch caps how far it can get. The paper calls this a short effective horizon.
Each rung is one more trick stacked into a solution. One attempt climbs a few rungs from its starting rung, or fails. Pick a method and press Run for 400 attempts. Then raise the reach slider: that is what learning changes.
A toy, not the paper's data. An attempt adds one more rung with probability equal to the reach, again and again until it stops; 30% of attempts fail outright. Reuse picks a start from the five best states found so far. In "Reuse + learn" the reach rises by one point every 10 attempts, a cartoon of weight updates. The paper's real versions are best-of-25,600, OpenEvolve, and its own reuse rule with a frozen model (the "No TTT" ablation).
The fix is state reuse. Keep a buffer of past attempts with their rewards. For each new attempt, pick a starting state from the buffer, favouring high rewards but sometimes choosing weaker ones. The model now improves an existing solution instead of starting over. Each reuse adds one more timestep to that solution's history, so chains of improvements can grow long.
Evolutionary search, the family that includes AlphaEvolve, goes one step further. It also reuses the actions: the thinking and intermediate results behind each past solution. A hand-written reuse routine turns that history into extra natural-language context c for the next prompt. These routines often borrow ideas from evolution, such as mutation, crossover and measures of fitness and diversity.
Now run the toy above with Reuse, then with Reuse + learn. Reuse breaks the horizon limit: the best rung climbs steadily, because each good attempt becomes a launch pad. But look at the reach slider. Under search it never moves. The model is exactly as good at adding a trick at attempt 25,600 as at attempt 1.
That is the limit the paper attacks. "While these prompts can help the LLM improve previous solutions," the authors write, "the LLM itself cannot improve." The model's experience with this problem only ever changes the next prompt, never the model.
Chapter 3
Add one line to the search loop that updates the weights, then see why plain RL aims that update at the wrong target
Here is the whole idea in one change. Take the search loop from the last chapter. After the evaluator scores each attempt, use it as training data: take a gradient step on the model's weights. The next attempt comes from a slightly different model, one that has learned from this very problem.
The paper writes the general loop as Algorithm 1. Read it as a recipe with two blanks, reuse and train. Everything in the rest of the lesson is about filling those two blanks well.
Look at the last step. The output is not the trained model. It is one solution, the best one found. Nobody needs the model afterwards; it is not the point. That one detail changes what "good training" means.
The natural first try is to fill the blanks with standard RL. For train, use a policy gradient that maximizes the expected reward, as PPO or GRPO do. For reuse, always start from the empty state:
This is a sensible baseline, and the paper runs it. On the kernel task it reaches 5,329 µs, almost the same as plain sampling's 5,352 µs (Table 8). Learning, aimed this way, buys almost nothing. Why?
In standard RL, the policy is the product. A robot policy will run a million times after training, so its average performance is what matters. In discovery, the paper lists three ways that goal goes wrong.
The first point deserves a toy, because it is the heart of the paper. Below are two policies. Safe almost always writes a decent kernel. Bold often writes a mediocre one, but its attempts spread out more.
The curves show where each policy's attempts land. Drag Bold's spread wider. Watch the averages (dashed) and the typical best of 25,600 attempts (stars). The yellow line is the record to beat.
A toy with bell-shaped reward distributions. Safe has average 1.20 and spread 0.15. The star marks the median of the best of N draws, computed exactly for a bell curve. Rewards are in the units of the paper's Figure 4, where the best human kernel sits near 2.2; that line is the only number here taken from the paper.
Set Bold's average well below Safe's and its spread wide. Expected reward prefers Safe, clearly. Yet over 25,600 attempts, Bold's best attempt beats the record and Safe's never does. Standard RL would train the model toward Safe. Discovery wants Bold.
So the paper fills both blanks again, this time with the maximum in mind. For train, it uses an entropic objective that weighs the best attempts far more than the rest. For reuse, it uses PUCT, a rule borrowed from AlphaZero that scores a start state by the best thing ever found from it. The next three chapters build them.
Chapter 4
Weigh each attempt by an exponential of its reward, and turn one knob from "push toward the average" to "push toward the best"
We want an objective that behaves like the maximum but still gives a smooth gradient. The maximum itself is useless for learning: only one attempt in a batch is the max, and a tiny change to the model rarely changes which one. We need something in between the average and the max, with a knob.
The paper uses the entropic objective, also explored by concurrent work on pass@k training. Instead of averaging the rewards, it averages e raised to β times the reward, then takes the log:
Why does this act like a max? Take two attempts with rewards 1 and 2, and β = 10. Their exponentials are e10 ≈ 22,000 and e20 ≈ 485 million. The average is almost exactly half the second one, so the log of it is about 20 − log 2, which is β times the max minus a little. Make β smaller and the gap closes. As β approaches 0, the objective behaves like β times the plain average.
Now the gradient. Differentiating the log of an average of exponentials gives a policy gradient where each attempt carries a weight:
A worked number. Four kernels from one start state get rewards 1.0, 1.2, 1.5 and 2.0. Their average is 1.425.
β → 0: advantages proportional to reward − mean = (−0.43, −0.23, +0.08, +0.58)
β = 2: w = (0.32, 0.47, 0.86, 2.35) → A = (−0.68, −0.53, −0.14, +1.35)
β = 3.5: w = (0.10, 0.19, 0.55, 3.16) → A = (−0.90, −0.81, −0.45, +2.16)
Watch the third kernel, at 1.5. It is above average, so under the plain average it gets a small push up. Under the entropic weights it gets a push down. Being better than average is not enough any more. The update reinforces only attempts near the top of the group.
The top row shows 64 attempts from one start state, sorted by reward; failures sit at 0. The bottom row shows each attempt's advantage. Drag β and watch the push concentrate on the best few. Press Adaptive to let the KL budget of the next chapter choose β.
Illustrative rewards in Figure 4's units. Advantages use the paper's leave-one-out estimator (App. A.1): each attempt's exponential is divided by the average exponential of the other 63, minus 1. The slider runs on a square-root scale over 0 to 12 for the early group and 0 to 40 for the late group. The KL penalty term is left out because it depends on the model's token probabilities.
Small β is the old average-maximizer in disguise. A short expansion shows it: for small β, eβR ≈ 1 + βR, so w − 1 ≈ β(R − mean R). That is the ordinary policy gradient with a mean baseline, scaled by β. Large β puts nearly all the push on the single best attempt in the group, like training on the max.
So which β? The paper first tried a fixed β = 2, the value the concurrent work recommends. It found it hard to tune. Early in a run, rewards can jump a lot, and a big β lets one lucky outlier dominate the update, which makes training unstable. Late in a run, gains are small, and a small β makes every advantage tiny, so learning stalls. On the kernel task, the fixed β = 2 run ends at 1,484 µs, against 1,203 µs with the adaptive rule (Table 8). The adaptive rule is the next chapter.
Chapter 5
Choose the sharpness separately for every start state, so that the reweighted batch never moves too far from the batch you sampled
Here is the problem in plain words. The right β depends on the group. If one attempt is far better than the rest, even a small β already gives it almost all the weight. If all attempts are close, you need a large β before the best ones stand out. A single fixed number cannot serve both.
The paper's fix is to fix a different quantity instead: how concentrated the weights may get. Picture the 64 attempts of one group as 64 equal shares of a vote, the uniform distribution u. The entropic weights move the vote toward the best attempts. The paper limits how far the vote may move.
The KL grows smoothly as β grows, so a simple bisection finds the β where it equals ln 2: try a β, check the KL, halve the interval, repeat. This mirrors Relative Entropy Policy Search, an older RL method that sets its temperature by the same kind of constraint.
Each curve is one group's KL as β grows. The budget is the warm line. Where a curve crosses it, that group gets its β. Drag the budget and watch the two β values move apart.
The two groups are the illustrative ones from Chapter 4. The KL, the bisection and γ = ln 2 follow App. A.1. The "acts like" count is our own reading of the formula: KL from uniform equals log N minus the entropy of q, so the exponential of the entropy is N times e to the minus KL.
The two groups get very different β. The early group, with one big jump, hits the budget at a small β. The late group, with small gaps, needs a large β. This is exactly the behaviour the paper wanted: no single lucky outlier takes over an early update, and late updates still separate the best from the rest.
There is a neat way to read the budget of ln 2 (this reading is ours, not the paper's). The KL from uniform equals log N minus the entropy of the shares. So a KL of ln 2 means the entropy is log(N/2). The reweighted vote is exactly as spread out as an equal vote among half the group. Every update, whatever the rewards, behaves as if it trained evenly on the best 32 of 64 attempts, softly.
N = 64, KL = ln 2 → entropy = ln 64 − ln 2 = ln 32 → effective vote ≈ 32 attempts
Two more details complete the estimator. First, the advantage of attempt n divides its exponential by the average exponential of the other attempts, a leave-one-out baseline, with a small ε for safety. Second, the paper subtracts the group's best reward inside every exponential before dividing. This changes nothing mathematically but avoids overflow.
Finally, the paper points out that this estimator ignores the reward's units. Multiply every reward by a positive number, or add a constant, and the advantages come out the same, because β simply rescales to hit the same KL. That is why a reward of "1/runtime" and a reward of "1/bound" need no hand-tuned scaling.
Chapter 6
Score every saved solution by the best thing ever grown from it, plus a bonus for being tried rarely, and start the next attempts from the winner
We have filled the train blank. Now the reuse blank. Each training step, the method must choose 8 starting states from its archive of past solutions. Each chosen start gets a group of 64 attempts. Choose badly and the 512 attempts either repeat the same idea or wander among weak solutions.
This is the old tension between exploitation (build on what works) and exploration (try what has been tried less). AlphaZero faced it when picking moves in a game tree, and solved it with a rule called PUCT. The paper adapts that rule to an archive of solutions.
Each dot is a saved solution, placed by its reward (right is better) and its depth in the family tree. The warm ring is the state PUCT picks next. Press Expand to grow two children from it. Move c to 0 and watch it get greedy.
The scoring rule, the rank prior, Q as the best child, visits flowing to every ancestor and "keep the top 2 children per expansion" follow App. A.2. The rewards are a toy: five seed solutions each hide a ceiling, and children climb part of the way toward their parent's ceiling, plus noise. Averaged over 200 random versions of this toy, the best reward after 30 expansions is about 1.0 with c = 1 and about 0.55 with c = 0. The real run picks 8 starts per step and blocks a chosen state's whole lineage from the rest of that batch.
Two choices make this rule fit discovery. First, Q is the maximum child reward, not the mean as in AlphaZero. A state that once produced a record is worth revisiting, even if most of its children were poor. That is the same "only the best counts" logic as the entropic objective, applied to search.
Second, visits flow up to every ancestor. If you expand a grandchild, the grandparent's bonus shrinks too. So one productive family cannot hog the budget by spreading its expansions over many members. The paper adds one more diversity rule: within one step's batch of 8 starts, once a state is chosen, its ancestors and descendants are blocked.
The archive itself stays bounded. After each expansion, the best 2 of the 64 children are inserted. Then the archive keeps only the 1,000 highest-reward states, plus the initial seed states, which are never dropped.
Chapter 7
Trace one training step from the archive to the weight update, and add up what fifty steps cost
Now put the pieces together and attach the real numbers. The paper runs the same recipe, with the same settings, on every problem. Only the description, the evaluator and the KL coefficient change.
Press Step to send one training step through the pipeline. Each stage lights up with what flows through it and its size. The counter adds up attempts and tokens over the run.
Sizes from Section 3.3, Table 9 and App. A: gpt-oss-120b with a rank-32 LoRA, 8 groups of 64 rollouts per step, 50 steps, temperature 1.0, a 32,768-token context, Adam at a learning rate of 4 × 10−5, one gradient step per batch, PUCT with c = 1.0, archive of the top 1,000 states. The token totals assume the paper's own averages of 3,000 prompt tokens and 16,000 sampled tokens per rollout.
Read the pipeline from the top. These are the stages of one training step.
Why a LoRA and not the full model? A rank-32 adapter is small, so each step is cheap, and the base model's knowledge stays intact. The KL penalty adds a second guard: it keeps the adapted model's choices close to the original model's.
The paper prices a run at about $500 on Tinker. Its assumption is 3,000 prompt tokens and 16,000 sampled tokens per rollout. That gives a simple count, which is our arithmetic, not the paper's:
50 steps × 512 rollouts = 25,600 rollouts · 25,600 × (3,000 + 16,000) ≈ 486 million tokens · $500 / 486 M ≈ $1 per million tokens, all-in
That figure covers sampling and training on Tinker. It does not include the evaluators. Timing kernels needs real GPUs, which the paper rents on Modal; math code runs on CPUs with 2 cores and 1 GB each (Appendix B). The paper does not price those parts.
Compare this with the frontier-model search systems the paper beats. AlphaEvolve used Gemini 2.0 Pro and Flash. ShinkaEvolve and ALE-Agent used ensembles of GPT-5, Gemini 2.5 Pro, Claude Sonnet 4 and others. TTT-Discover uses one open model you can download, and its code is public. That is a real practical difference, separate from the question of which method is better at equal footing.
Chapter 8
Walk through every problem the paper attempted, and sort the fair comparisons from the ones that differ in model or budget
The paper says it reports every problem it attempted. That is worth a lot: we see the misses as well as the records. Before reading the numbers, sort the baselines into two kinds.
fair comparisons
Best-of-25,600 and OpenEvolve (an open version of AlphaEvolve) use gpt-oss-120b with the same 25,600 attempts and the same context limit. These isolate the method. One caveat: OpenEvolve's prompts grow long, and many of its rollouts were cut off by the 32,768-token limit. The authors kept its prompts unchanged.
records, not controlled tests
AlphaEvolve, ShinkaEvolve, ALE-Agent and ThetaEvolve use other models, often frontier ones, and their own budgets. Beating them sets a new record. It does not by itself show the method is better, except where the paper matches the setup, as it does for ThetaEvolve with Qwen3-8B.
Pick a domain, then a task. Bars are sorted best first. A teal tag marks the same-model, same-budget baselines.
Values from Tables 2 to 7. Bars use a scale that starts below the worst value shown, so tiny gaps (the math bounds differ in the fifth decimal) are visible; never compare bar lengths across tasks. TriMul B200 and MI300X, and all MLA values, are means of 10 trials on a GPUMode-replicated setup, not the official leaderboard. MLA shows instance 1 of 3; the other two instances tell the same story.
On Erdős' minimum overlap problem the upper bound falls from AlphaEvolve's 0.380924 to 0.380876. The construction is a 600-piece step function, and unlike the earlier records it is not symmetric. The human record by Haugland used 51 pieces; AlphaEvolve's used 95. Surprisingly, plain best-of-25,600 also beat AlphaEvolve here, with 0.380906.
On the first autocorrelation inequality the bound falls to 1.50287 in Table 2 (the text says 1.50286), with a 30,000-piece step function built from scratch. The previous record, 1.50314, came from ThetaEvolve refining AlphaEvolve's construction. The model got there in stages: Adam on a softmax parameterization to about 1.510, linear programming to about 1.504, and finally heuristics that focus only on the nearly tight constraints. The authors say they never intervened.
On the second autocorrelation inequality there is no discovery. TTT-Discover certifies 0.9591; AlphaEvolve V2 holds 0.9610. On circle packing, TTT-Discover with the small Qwen3-8B matches the best known values for 26 and 32 circles and improves neither.
Against ThetaEvolve, the closest concurrent work, the paper runs a matched test. ThetaEvolve used DeepSeek's R1-Qwen3-8B for 65 steps of 512. TTT-Discover used the original Qwen3-8B, reported to be weaker, for 50 steps of 512. It still certifies tighter bounds on both autocorrelation inequalities: 1.50525 against 1.50681, and 0.9472 against 0.9468.
TriMul is the triangular matrix multiplication at the heart of AlphaFold's architecture. The model was trained with H100 timings only, yet its kernels set records on all four GPUs. On H100 it takes 1,161 µs against 1,371. On A100, 2,198 against 4,532. On B200, 914 against 1,039, and on AMD's MI300X, 1,556 against 2,516. The A100 kernel takes 51% less time than the best human kernel.
The paper also says the improvement over the best human is above 15% on every GPU. Our check: on B200 the human kernel takes 13.6% longer than TTT-Discover's (1,038.9 against 914.2 µs), so that claim does not hold for B200 as stated. The record itself does.
The GPUMode organizers reviewed the kernels. The model found that the problem is limited by memory traffic from the many element-wise operations. So it fuses the input LayerNorm, the gating sigmoid and multiply, and the output LayerNorm and gating, and hands the big matrix multiply to cuBLAS in FP16. The organizers note that FP16 activations fit the contest's tolerances but might cause numerical trouble in full workloads.
On MLA decode (DeepSeek's attention for inference, on MI300X) TTT-Discover lands within the noise of the top human kernels on all three instances, but never better with statistical significance. The paper says so plainly. Its best MLA kernels also lean on a torch.compile configuration rather than custom Triton code.
AtCoder Heuristic Contests are optimization contests with hundreds of entrants. On ahc039 (a geometry problem: draw a net that captures fish), TTT-Discover starts from the same ALE-Agent program ShinkaEvolve started from, a 5th-place solution. It reaches 567,062, just above the human winner's 566,997. ShinkaEvolve reached 558,026, second place, using frontier models. On ahc058 (scheduling upgrades), it starts from scratch and scores 848,414,228, above every human entry and just above ALE-Agent's 848,373,282. These are past contests, submitted afterwards to the official scorer.
Single-cell RNA sequencing counts which genes each cell uses, but the counts are noisy. On the OpenProblems denoising benchmark, TTT-Discover starts from the MAGIC code and adds gene-adaptive transforms, a low-rank SVD refinement and log-space polishing. It trains on the Pancreas dataset and is tested on two held-out datasets: score 0.71 against MAGIC's 0.64 on PBMC, and 0.73 against 0.64 on Tabula. OpenEvolve, with the same model and budget, is close behind at 0.70 and 0.71. The paper's own disclaimer applies: a benchmark score is not biological validity, and the reviewing biologist asks for tests on downstream tasks.
Chapter 9
Remove one part at a time on the kernel task and see how far the best kernel falls
The method has two parts, the training objective and the reuse rule. The paper removes or swaps each one on the TriMul H100 task, with the same budget of 512 attempts per step for 50 steps. Every run is timed by the paper's own evaluator, so the numbers are comparable with each other (but not exactly with the leaderboard's 1,161 µs).
Pick a variant. Its curve is the best kernel found up to each step, with the full method in faint teal for reference. The bar on the right is the final best runtime. The yellow line is the best human kernel.
Final runtimes from Table 8. Curves are traced by eye from Figure 4 (left panel, "max reward up to step") and converted to runtime. The conversion is our reading: the figure's reward axis matches 3,016 divided by the runtime in microseconds, which puts the best human's 1,371 µs on the figure's "previous SOTA" line at 2.2 and every Table 8 runtime on its curve's end point. Figure 4's caption says N = 256,000 for best-of-N; with 50 × 512 it is 25,600, a typo.
Read the variants in pairs. The full method reaches 1,203 µs, below the best human's 1,371. It is the only variant that beats the human record.
Two lessons stand out. Learning needs reuse: without a way to build on earlier kernels, the gradient steps add almost nothing. And reuse needs learning aimed at the max: the frozen model with the same reuse rule plateaus at 2,061 µs, while the same rule plus entropic training reaches 1,203.
Now go back to the hero and play it again with this in mind. Sample is the best-of-N row. Search is the No-TTT row: same reuse rule, frozen model. Learn is the full method. Watch the small chart of the average: TTT-Discover's average attempt improves too, but even at step 50 it is far below its best kernel. The method never needed a good average. It needed one great kernel.
Chapter 10
Lock in the cheat sheet, run the core in a few lines of Python, and place TTT-Discover among its neighbours
You can now read this paper and defend each of its choices. Why a discovery is judged by one number. Why a frozen model's reach never grows, however clever the prompts. Why the average reward is the wrong target, and how the entropic weights aim at the best. Why β is solved for instead of tuned. Why PUCT keeps the best child, not the mean. Let's lock it in.
Discovery problems ask for a single solution that beats the state of the art, scored by a continuous, checkable reward. Search methods such as AlphaEvolve prompt a frozen LLM many times and reuse its best attempts, so the prompts improve but the model does not.
TTT-Discover runs reinforcement learning on the one test problem. Each of 50 steps, PUCT picks 8 starting solutions from an archive; the model writes 64 attempts from each; an evaluator scores them; and a rank-32 LoRA on gpt-oss-120b takes one gradient step. The objective is entropic: each attempt is weighted by an exponential of its reward, with the sharpness β chosen per group so the weights stay within a KL budget of ln 2. PUCT scores each saved solution by its best child plus an exploration bonus.
It uses one open model and about $500 of compute per run. It sets new records on Erdős' minimum overlap problem, the first autocorrelation inequality, the TriMul kernel on four GPUs, two past AtCoder contests and a denoising benchmark. It ties on circle packing and MLA decode and misses on the second autocorrelation inequality. Ablations on the kernel task show that both parts, the entropic training and the reuse, are needed.
| Quantity | Value | Source |
|---|---|---|
| Model | gpt-oss-120b, reasoning effort high; LoRA rank 32 | Sec. 3.3, Table 9 |
| Budget per run | 50 steps × 512 rollouts (8 groups × 64) = 25,600 | Sec. 3.3, 4 |
| Context | 32,768 tokens; prompt + thinking ≤ 26,000 | Sec. 3.3 |
| Optimizer | Adam, lr 4 × 10−5, one step per batch; KL λ = 0.1 (0.01 for AtCoder) | Table 9, App. A |
| Objective | entropic, adaptive β per start state, KL budget γ = ln 2 | Sec. 3.2, App. A.1 |
| Reuse | PUCT, c = 1.0, Q = best child, top-2 children kept, archive of 1,000 | App. A.2 |
| Cost | about $500 per run on Tinker (3k prompt + 16k sampled tokens per rollout) | Sec. 3.3 |
| Erdős upper bound | 0.380924 → 0.380876 (600 pieces) | Table 2 |
| Autocorrelation 1 | 1.50314 → 1.50287 (30,000 pieces) | Table 2 |
| Autocorrelation 2 | 0.9591, below AlphaEvolve V2's 0.9610 (no discovery) | Table 2 |
| TriMul H100 | 1,161 µs vs best human 1,371; best-of-25,600 5,390 | Table 4 |
| TriMul A100 | 2,198 µs vs 4,532 (trained on H100 timings only) | Table 4 |
| AtCoder ahc039 / ahc058 | 567,062 / 848,414,228, both above the human winners | Table 6 |
| Denoising, PBMC / Tabula | 0.71 / 0.73 vs MAGIC 0.64 / 0.64 | Table 7 |
| Ablation, TriMul H100 | full 1,203; no TTT 2,061; no reuse 5,274; best-of-N 5,352 µs | Table 8 |
The sketch below is the whole method in miniature, and it runs as written with NumPy. The "LLM" is a Gaussian step with a learnable mean, standing in for the LoRA. The reward has a decoy peak near −1 and the real one at 3. It keeps the paper's shape: 50 steps of 8 groups of 64, PUCT over an archive of 1,000 with the top 2 children kept, and adaptive entropic advantages.
pythonimport numpy as np def entropic_advantages(r, gamma=np.log(2), eps=1e-8): """Leave-one-out entropic advantages for one group (App. A.1).""" r = np.asarray(r, float); N = len(r) z = (r - r.mean()) / (r.std() + 1e-12) # shift/scale do not change the answer def kl(beta): # KL(q_beta || uniform) on the batch q = np.exp(beta * (z - z.max())); q /= q.sum() return float(np.sum(q * np.log(N * q + 1e-300))) lo, hi = 0.0, 1.0 while kl(hi) < gamma and hi < 1e6: hi *= 2 # grow until over budget for _ in range(60): # bisection: KL(beta) = gamma mid = (lo + hi) / 2 lo, hi = (mid, hi) if kl(mid) < gamma else (lo, mid) e = np.exp(lo * (z - z.max())) Z_loo = (e.sum() - e) / (N - 1) # average of the OTHER rollouts return e / (Z_loo + eps) - 1.0 def puct_pick(archive, T, c=1.0): R = np.array([s["R"] for s in archive]) rank = np.argsort(np.argsort(-R)) # 0 = best P = (len(R) - rank) / np.sum(len(R) - rank) # linear rank prior Q = np.array([s["m"] if s["n"] > 0 else s["R"] for s in archive]) n = np.array([s["n"] for s in archive]) scale = R.max() - R.min() + 1e-12 return int(np.argmax(Q + c * scale * P * np.sqrt(1 + T) / (1 + n))) reward = lambda x: np.exp(-(x - 3) ** 2) + 0.3 * np.exp(-4 * (x + 1) ** 2) rng = np.random.default_rng(0) mu, lr = 0.0, 0.05 # mu stands in for the LoRA weights archive = [{"x": 0.0, "R": reward(0.0), "m": 0.0, "n": 0}] best = (archive[0]["R"], 0.0) for step in range(50): # 50 training steps for g in range(8): # 8 start states per step s = archive[puct_pick(archive, T=step * 8 + g)] a = rng.normal(mu, 1.0, size=64) # 64 attempts from one start xs = s["x"] + a; rs = reward(xs) A = entropic_advantages(rs) mu += lr * np.mean(A * (a - mu)) # REINFORCE step with entropic advantages s["m"] = max(s["m"], rs.max()); s["n"] += 1 # paper also credits ancestors for j in np.argsort(-rs)[:2]: # keep the top 2 children archive.append({"x": xs[j], "R": rs[j], "m": 0.0, "n": 0}) archive = sorted(archive, key=lambda d: -d["R"])[:1000] if rs.max() > best[0]: best = (rs.max(), xs[rs.argmax()]) print(f"best reward {best[0]:.4f} at x = {best[1]:.3f}") # best reward 1.0000 at x = 3.000
Three things to try. Replace entropic_advantages(rs) with rs - rs.mean(), the mean-reward version. Set c=0.0 to make PUCT greedy. Change the step spread from 1.0 to 0.5: with that narrow reach, our runs stall on the decoy peak at −1, the toy version of a short horizon.
Now press Present or Teach and explain, out loud and from memory, why the average reward is the wrong target for discovery and how the entropic weights fix it. If you can, you own this paper. Then go back to the kernel contest and spend 25,600 attempts one more time.