Scaling test-time compute: parallel vs sequential
Compare two ways of spending inference compute. In parallel: sample many answers, then take a majority vote or let a verifier (a checker or scoring model) pick one. Sequentially: produce longer reasoning chains. Explain why accuracy rises roughly log-linearly with thinking tokens and when each strategy wins.
Builds on: Chain of thought as extra computation, Temperature
What the animation says
Chances or depth?
You have extra compute for one hard problem. You can spend it two ways. Sixteen independent attempts side by side, or one chain of thought sixteen times longer. Both generate about the same number of tokens, so the cost is about the same. The long chain costs slightly more, because attention over a longer context adds work. Parallel buys more chances. Sequential buys more depth: more steps in a row, and room to check and revise. This problem needs ten dependent steps, and a short chain manages four. Which spend can solve it?
Coverage
The long chain wins there. Every short attempt has the same reach, so sampling more never adds steps. Parallel helps when one attempt sometimes succeeds. Sample at nonzero temperature so the attempts differ. Say each attempt is right thirty percent of the time, independently. Take eight. All eight miss with chance point seven to the eighth, about six percent. So coverage, the chance at least one is right, is about ninety-four percent. A perfect verifier picks that right one every time. Without a checker, you vote.
Majority vote
Majority vote picks the most common final answer. Where it lands depends on the wrong answers. Case one: the correct answer at thirty percent, and seven wrong answers at ten percent each. Case two: the correct answer still at thirty percent, but one wrong answer at fifty. In both cases, coverage climbs toward one hundred percent as you sample more. As the number of votes grows, what happens to vote accuracy in case two?
Simulate the vote
Here's a simulation. This line draws n answers per trial, and this line picks the most common one. With one sample, both cases score thirty percent. With scattered wrong answers, the vote reaches about sixty percent at five votes, and about eighty-five at twenty-five. With one popular wrong answer, it barely moves at five votes, then sinks below twenty percent at twenty-five, heading to zero. Yet coverage nears one hundred percent. The right answer is in the pile, but the vote can't find it. A verifier could.
Each doubling, same gain
For one long chain, accuracy grows by about the same amount each time thinking tokens double. Each problem is solved once the budget passes its own threshold. Those thresholds spread evenly on a log scale: about as many problems need one to two thousand tokens as need two to four thousand. So each doubling unlocks a similar slice, until accuracy saturates. Forty percent at one thousand tokens, forty-eight at two thousand, fifty-six at four thousand. Tap the budget that reaches seventy-two.
Which to buy
Sixteen times the tokens bought thirty-two more points. Each extra eight points doubles the cost. So pick the spend that matches the problem. Parallel buys chances. Use it when single attempts sometimes succeed, when answers can be voted on or checked, and when latency matters. Sequential buys depth. Use it when the problem needs more dependent steps than a short chain can take. And before you trust a vote, ask whether one wrong answer is more popular than the right one.
More chances vs more depth
Coverage, voting, and the log-linear trend
Numbers for both strategies
Simulate majority vote
import numpy as np
rng = np.random.default_rng(0)
def vote_acc(probs, n, trials=5000): # answer 0 is correct; ties go to 0
s = rng.choice(len(probs), size=(trials, n), p=probs)
counts = np.apply_along_axis(np.bincount, 1, s, minlength=len(probs))
return (counts.argmax(1) == 0).mean()
spread = [0.3] + [0.1] * 7 # wrong answers scattered
biased = [0.3, 0.5, 0.2] # one popular wrong answer
for n in [1, 5, 25]:
print(n, round(1 - 0.7**n, 3), vote_acc(spread, n), vote_acc(biased, n))
What to remember
On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.
Bytewise
All courses