HomeVideos

Speculations on Test-Time Scaling (o1)

Now Playing

Speculations on Test-Time Scaling (o1)

Transcript

1267 segments

0:00

speculations on test time scaling say

0:02

what you will about open AI they make

0:05

iconic graphs this graph is from the

0:07

gpt3 paper it's one of several different

0:10

graphs that demonstrate as language

0:12

model parameters get larger the models

0:15

perform better at zero shot tasks this

0:18

graph and many others like it has

0:20

occupied the interest of the language

0:22

model Community for The Last 5 Years it

0:25

really changed the way we think about

0:26

many different problems and how we build

0:28

design scale and invest in models in

0:31

fact right now it's safe to say that

0:33

there are nuclear power plants being

0:34

built just to support this graph

0:37

recently openi released a new graph

0:39

given the impact of their previous ones

0:42

I take this pretty seriously in this

0:44

graph on the leftand side we see a curve

0:47

that looks pretty similar to The Curve

0:49

we've seen before in this curve we see

0:51

that more training time compute leads to

0:54

consistently better accuracy on a hard

0:57

task on the right hand side of this

0:59

graph we see new curve this curve looks

1:02

similar in that we're seeing compute

1:04

contrasted with the performance of the

1:06

model what's different is that this

1:08

curve is showing test time compute and

1:10

what we are seeing is the performance on

1:12

this task get much better as we add more

1:14

test time compute to the system this is

1:17

new we haven't seen this before in

1:18

language modeling and it's a topic of

1:20

great interest before we dive into this

1:23

topic more it's worth noting what these

1:25

problems actually look like well they're

1:27

pretty hard we're not just doing ret Ral

1:30

or things that look a bit more like

1:32

pattern matching we're doing fullon

1:34

reasoning in technical mathematical

1:36

problems one essay that often comes up

1:39

when discussing these sort of scaling

1:40

challenges is the bitter lesson you've

1:43

probably read this blog post before but

1:45

it's worth giving you a sense of what

1:46

it's saying and how it applies to this

1:48

problem the bitter lesson is based on

1:50

the historical observations that AI

1:52

researchers have often tried to build

1:53

knowledge into their agents this always

1:55

helps in the short term and is

1:57

personally satisfying to the researcher

1:59

but in the long run it plateaus and even

2:01

inhibits further progress and

2:03

breakthrough progress eventually arrives

2:05

by opposing approaches based on scaling

2:07

computation by search and learning I

2:10

bring it up today because it's been a

2:12

popular conversation among researchers

2:14

in this space what we've seen for the

2:16

last 5 years is increase in the learning

2:18

capability of models what we might be

2:20

seeing now is a move towards search in

2:23

particular a type of search that is

2:25

facilitated by learning to allow us to

2:27

scale on some of these more technical

2:29

problems

2:30

in preparing this talk I also watched

2:32

some of the recent Talks by noan brown

2:34

one of the contributors to this system

2:36

one thing he recommended when talking

2:38

about his past work is he said that the

2:40

most important lesson is that I and

2:41

other researchers simply didn't know how

2:43

much of a difference scaling up search

2:45

would make if I had seen these scaling

2:47

results at the start of my PhD I would

2:49

have shifted to a researching search

2:50

algorithms for poker much sooner we

2:52

probably would have gotten super hum

2:54

poker Bots much sooner as well while

2:56

he's talking here about gameplaying the

2:58

goal of his conversation position is to

3:00

encourage the field in general to think

3:02

more about search one of the other

3:04

papers he brings up is a paper I found

3:06

to be very influential around people in

3:08

this area even though it's not more

3:10

widely known this is a paper from 2021

3:13

that discusses scaling laws for board

3:15

games in this setting it's easy to move

3:18

back and forth between more training and

3:20

more test time search and in the paper

3:23

they describe how these two terms relate

3:26

to each other in particular in these

3:28

curves here they show that there is

3:29

trade-off that with more training time

3:32

in the model itself you can learn better

3:34

systems but that this alone doesn't

3:36

replace the test time compute by

3:39

plotting these two points together you

3:41

can understand the relative

3:42

relationships between these two and

3:44

learn how to actually apply them in

3:45

practice when talking about similar

3:47

techniques for language models people

3:49

often bring up a paper from openai from

3:52

2021 in this paper they're going to

3:54

train what we'll call a learned verifier

3:57

to do this they will use a generative

3:59

model model to produce hundreds of

4:01

different solutions they'll then have

4:03

experts look at these Solutions and

4:05

select which are right and which are

4:06

wrong using this information they can

4:09

then train a verifier this verifier will

4:12

tell you if you're doing well on the

4:13

problem and can be used at test time to

4:16

try to improve your answers while there

4:19

are a lot of details to the paper itself

4:21

one of the most important results is

4:23

they show that searching against this

4:25

learned verifier can lead to

4:27

improvements even upon just training on

4:29

the actual good answers themselves in

4:32

this graph here the Orange Line shows

4:34

the accuracy of the model that is

4:36

running against the verifier compared to

4:38

a model that's just trained on the

4:40

trajectories themselves this is an

4:42

argument for moving beyond the standard

4:44

supervised fine-tuning or sft more to A

4:48

system that utilizes a learned verifier

4:51

in order to inject new signal into the

4:52

model this allows you to utilize that

4:55

verifier to improve the model at test

4:57

time as we'll see we don't think this is

5:00

exactly what open AI is doing but it

5:02

gives you a sense of how they were

5:04

exploring early uses of test time

5:06

compute in developing their systems and

5:09

actually on that note we really know

5:11

very little about what is going on in

5:13

open AI in fact I'm not going to really

5:16

focus too much on trying to predict what

5:18

they actually are doing but I'd like to

5:20

use the release of this model as an

5:22

opportunity to provide a survey about

5:24

what's going on in the open research

5:26

field in this talk I'll give a survey of

5:29

the public literature related to opening

5:31

eyes 01 as part of this process I also

5:34

took the opportunity to call up a lot of

5:36

different researchers in the field it's

5:38

a nice perk of being a professor that a

5:40

lot of different people will talk to me

5:41

and for this talk I talked to about 25

5:43

different people about what they think

5:45

is going on finally I will include some

5:47

rumors from social media I'm not going

5:50

to wait these too highly because who

5:52

knows what's going on in practice uh but

5:54

that will give us some constraints for

5:55

thinking about what the system could be

5:57

doing the Talk itself will have four

5:59

more parts first we'll talk about some

6:01

of the clues behind what o1 might be

6:03

then I'll provide some technical

6:05

background behind the techniques that

6:07

are actually used in these systems

6:09

finally I'll discuss four different

6:11

suspects why I think they're interesting

6:13

what papers have been written about them

6:15

and whether or not they might be what's

6:16

going on finally I'll end by talking

6:19

about some implications for researchers

6:21

or open- Source practitioners in this

6:23

area to gather Clues let's start with

6:26

open ai's own words in a blog post with

6:29

the release of 01 they wrote a lot about

6:32

this topic but much of it is mostly just

6:35

marketing there are two sentences though

6:37

that give us a sense about what might be

6:39

happening first they say our large scale

6:43

reinforcement learning algorithm teaches

6:46

the model how to think productively

6:47

using its Chain of Thought in a highly

6:50

data efficient training process this

6:52

sentence gives us three Clues into what

6:54

might be happening the first is that the

6:56

system is using reinforcement learning

6:59

the precise definition of reinforcement

7:01

learning has become quite hard to pin

7:03

down and it means different things to

7:05

different people I'm going to adapt the

7:07

most loose definition and just say it

7:10

requires some signal from some sort of

7:12

verifiable problem we're going to assume

7:15

we don't have supervised data and we

7:17

need to acquire the signal in other ways

7:20

secondly the method uses Chain of

7:22

Thought specifically it's using Chain of

7:24

Thought as its method of increasing test

7:27

time compute what this means is that

7:30

we're not doing any sort of search

7:32

during test time in fact the system is

7:35

just generating a very long output

7:37

stream and using that to make its final

7:40

prediction we'll discuss this more

7:42

throughout the talk finally the system

7:44

is data efficient what this means is

7:46

that it's learned from a relatively

7:48

small set of data examples this is not

7:51

making any Claim about compute

7:53

efficiency or even parameter efficiency

7:56

just that the amount of actual problems

7:58

it needs is Rel relatively small where

8:01

relative here is compared to say

8:02

training on the entire internet in

8:04

addition to this sentence there are

8:06

several other assumptions that people

8:07

seem to be making about these models the

8:10

first is that it is a single final

8:12

language model that generates an

8:14

extremely long and coherent Chain of

8:16

Thought just to make that clear once

8:18

again it's just a model that babbles to

8:21

itself until it thinks it has good

8:24

enough information to make a guess at

8:26

the answer to your hard problem second

8:28

we assume the is not following from

8:31

expert examples this is not to say there

8:33

isn't a huge amount of human supervision

8:36

it's just that that supervision is not

8:38

given in the form of direct human

8:40

answers to questions it's not copying

8:43

along with what humans did finally

8:46

there's an assumption that the behaviors

8:48

of exhibits are learned that means they

8:51

come somehow from data or self-play but

8:54

not from being given to the model

8:56

explicitly of these assumptions the most

8:59

important one is this idea of Chain of

9:01

Thought let's describe what this means

9:03

informally and then we'll dive into a

9:05

bit more of a formal explanation later

9:07

in The Talk The informal definition is

9:09

that the model is going to generate

9:11

intermediate steps in the process of

9:13

producing an answer these intermediate

9:15

steps are not supervised but are simply

9:17

sampled from the language model as we go

9:20

so in this example on the right we are

9:22

given a question written in red and then

9:24

we produce four steps of Chain of

9:26

Thought written in green below each of

9:29

these steps compute some intermediate

9:30

term in the process finally we produce a

9:33

final answer at the end which is used to

9:36

evaluate our performance on the

9:38

problem in the same blog post open AI

9:41

highlights this use of Chain of Thought

9:43

They say 01 learns to hone its Chain of

9:45

Thought and refine the strategies it

9:47

uses it learns to recognize and correct

9:50

its mistakes it learns to break down

9:52

tricky steps into simpler ones it learns

9:54

to try a different approach when the

9:56

current one isn't working it's hard to

9:59

pull too much signal out of this

10:00

sentence but it really highlights that

10:02

Chain of Thought is where the action is

10:04

happening unlike other systems that

10:07

build in complex search as part of their

10:09

test time this model is simply utilizing

10:12

the Chain of Thought to do these steps

10:14

as it goes in their blog post open AI

10:17

additionally included some examples of

10:19

the Chain of Thought for the system

10:21

you're not actually able to see this

10:22

Chain of Thought in the model they

10:24

released but we can look at some of the

10:26

chains they provided first off we can

10:28

see that Chain of Thought for a

10:30

programming problem just to note again

10:32

this is something the model itself

10:34

produced in the process of solving the

10:36

problem what we can see is that the

10:39

model has produced an outline of all the

10:41

steps it would like to produce outline

10:43

is numbered and includes complex

10:45

substeps if you read the rest of the

10:47

Chain of Thought you can see that it's

10:49

following this outline in the process of

10:51

producing its answer in another example

10:54

there's a form of rudimentary planning

10:57

we can see that the system is aware of

10:59

the time constraints it needs to answer

11:01

the problem it also is able to stop and

11:03

propose different options and choose

11:05

which of these it would like to follow

11:07

while this is all in English it's using

11:10

cues like first or option one in order

11:13

to specify the intermediate steps

11:15

another ability that we see in these

11:16

chains is forms of backtracking so in

11:19

this example for a math problem it

11:21

describes some intermediate term that it

11:24

might need to compute it then stops in

11:26

the middle and says well actually this

11:29

may not help us directly this allows the

11:31

model to go back and determine that it

11:33

might want to say something different

11:35

again this looks a bit like search but

11:37

it's not actually being performed with

11:39

traditional search it's simply the model

11:41

talking to itself in order to determine

11:43

the answer final ability we see is

11:46

something like

11:47

self-evaluation here we see it say let's

11:50

analyze each option it then specifies

11:53

the options it might want to consider

11:55

and it asks itself is that a good

11:57

explanation the answer is a bit informal

12:00

it says H and then goes on to the next

12:02

option itself but again this is an

12:05

ability that can be used by the model in

12:08

order to explore different possibilities

12:10

and determine which ones might make

12:11

sense so in summary Chain of Thought

12:13

here is providing our method of test

12:16

time scaling while the actual words in

12:18

the Chain of Thought look like search

12:20

and planning in a classical sense this

12:22

is not actually being run at test time

12:24

for the model how does it learn to do

12:26

this well this is the big mystery they

12:29

claim that reinforcement learning is

12:31

needed to induce this Behavior the rest

12:33

of the talk I want to explore how this

12:35

might actually come about and look at

12:37

some of the papers in the literature

12:38

which talk about how you can get models

12:40

to learn to do something like this such

12:43

that you can scale their test time

12:44

compute to get there though we're going

12:46

to need some technical background so for

12:49

this section we're just going to focus

12:50

on formalizing this idea of Chain of

12:53

Thought we're not going to do any

12:55

learning but simply talk about what it

12:57

means to start from a question go

12:59

through say four or five steps of

13:01

intermediate reasoning and then come up

13:03

with an answer formally we'll assume our

13:06

problem specification is called X this

13:09

is just the question being asked that we

13:11

need to solve our final solution will be

13:14

called y this will represent say the

13:17

conclusion or answer to our math problem

13:20

in between we'll look to produce a

13:22

series of steps Z1 through ZT these are

13:26

not individual words but instead full

13:28

step steps on the way to produce our

13:30

final answer we'll abstract a bit away

13:33

from the fact that this is a language

13:34

model and just think about it producing

13:36

steps along in this chain the final goal

13:40

at the bottom of this slide is to

13:41

produce a distribution over answers y

13:44

conditioned on our input X this

13:46

distribution is defined by taking an

13:48

expectation over these latent Chain of

13:51

Thought steps

13:52

Z as a warm-up let's consider how

13:55

standard Chain of Thought is done we

13:57

can't actually compute the expectation

13:59

over all possible intermediate steps so

14:02

instead we run ancestral sampling this

14:04

is a fancy term but just means let the

14:07

language model generate until it

14:08

produces an answer specifically we'll

14:11

sample teps Z these are represented by

14:14

the green dots in the little picture

14:16

until we get to An Answer y represented

14:19

by the dot on the right we can think

14:22

about the amount of test time compute

14:24

being applied here as T where that

14:26

represents each one of the intermediate

14:28

steps on the way to our answer in

14:30

general I use these graphs on the right

14:32

to demonstrate how the Chain of Thought

14:34

is being used in these processes many

14:37

papers have noted that there is a way to

14:39

get better answers to these problems

14:42

instead of taking a single chain of

14:43

thought and using it to produce the

14:45

answer we can instead sample n chain of

14:48

thoughts once we have these end

14:50

different chain of thoughts we can take

14:52

a majority vote in order to determine

14:54

the majority answer in this diagram here

14:57

each one of these chain of thoughts

14:59

thoughts is sampled independently and

15:01

then we do some sort of normalization

15:03

the answers that are most common are the

15:05

ones we decide this provides a strong

15:08

Baseline and a way to utilize more test

15:10

time compute to slightly improve our

15:12

answers you can obviously do this to a

15:15

large extent but people have found that

15:17

it doesn't lead to some of the amazing

15:18

results that we're seeing in the 01 blog

15:20

post the second piece of Machinery we

15:22

need is a verifier explicitly we'll

15:25

assume that we have an automatic

15:27

verifier but we only have it at training

15:30

time we'll Define this automatic

15:32

verifier as taking some answer why and

15:35

telling us if it is wrong or right this

15:38

verifier might be say regular

15:40

Expressions to check that we've solved a

15:42

math problem or it might be something

15:43

more complex like fullon unit tests for

15:46

code again just to make it clear we

15:48

don't have this at test time but we are

15:51

going to utilize it as a way to provide

15:53

training signal for us to produce a

15:55

better model throughout this talk I'm

15:58

going to assume that we have an

15:59

automatic verifier this is a common

16:02

assumption in much of the research and I

16:04

think it's a reasonable assumption for

16:05

solving these problems that being said

16:08

it's not clear whether open AI is

16:10

actually utilizing automatic verifiers

16:12

or whether they're using learned

16:14

verifiers in some of their papers they

16:16

explicitly try to learn verifiers for

16:19

some technical problems their argument

16:21

is that this can produce more general

16:23

purpose models and it's a way for them

16:25

to utilize their large annotation

16:27

facilities in order to improve proove

16:29

their models in the case of learned

16:31

verifiers there are some interesting

16:32

research challenges for instance One

16:35

Challenge is that with a learned

16:36

verifier if the generator produces say

16:39

crazy Solutions sometimes the Learned

16:41

verifier gets confused and accepts them

16:44

in this graph on the right they show

16:46

that for a math problem the model will

16:48

continue getting better but then it will

16:50

Plateau and even get worse as they take

16:52

more samples they discuss how this is a

16:54

challenge with a learned verifier and I

16:56

have to assume they've collected a lot

16:58

of data and thought about this problem a

16:59

lot more in recent years however since

17:02

we're poor both in gpus and in data

17:05

annotations we'll focus instead more on

17:07

the automatic verifier situation once

17:09

you have a verifier there are many new

17:11

things you can do one idea is to do

17:13

rejection sampling this is a way of

17:16

getting some distribution of chain of

17:18

thoughts that yield correct answers

17:21

we're going to do this just by sampling

17:23

again and different chains and simply

17:25

keeping the ones that are verified in in

17:29

my notation on the right on the top

17:30

picture we see all the different samples

17:32

that we picked and then on the bottom

17:34

picture we see the chain of thoughts

17:36

that led to correctly verified Solutions

17:39

I'll use this little square box on the

17:41

right to indicate which Solutions were

17:43

successfully verified this process may

17:46

be extremely comput tensive but it gives

17:48

us a way to get some of the good chain

17:50

of thoughts that lead to the verified

17:52

Solutions we're going to assume for now

17:54

that you can plausibly get some

17:56

solutions using this procedure although

17:58

it's it's not obvious for hard problems

18:00

that this will ever yield a correct

18:02

answer the other thing we can do is to

18:04

apply the same process but starting from

18:07

an intermediate step in our chain so in

18:09

this example here we've run three steps

18:11

of Chain of Thought and from there we'll

18:14

do what's called a roll out this roll

18:16

out is the same as rejection sampling

18:18

but it just starts from the intermediate

18:20

place in our process this can be used to

18:23

tell us how good we are doing from any

18:25

step in the chain it's not guaranteed to

18:28

always work for good problems or bad

18:30

problems but at least gives us a

18:31

direction in which to move in our system

18:34

given this formal background we now come

18:35

to our main goal we would like to learn

18:38

a model that can take into account these

18:40

ladent chain of thoughts we can write

18:43

this down explicitly as a maximum

18:45

likelihood problem where we're

18:46

interested in learning the model that

18:48

performs as well as it can at producing

18:50

verified Solutions we can then think

18:53

about this as marginalizing out over all

18:55

possible chain of thoughts that lead to

18:57

the correct answer of course this

18:59

problem is combinator extremely

19:02

difficult we can't with even nearly

19:04

infinite compute really do this

19:06

marginalization there are many different

19:08

possible steps at each point and when we

19:10

start talking about chains of thousands

19:12

of steps long this becomes extremely

19:14

intractable so figuring out how to

19:16

actually do this is the fun part of the

19:18

problem before we get into some of the

19:20

methods I want to make a quick note

19:21

about reinforcement learning as I noted

19:24

earlier I find reinforcement learning to

19:25

be quite a challenging area there are

19:28

many different conflicting definitions

19:30

about how these systems work and how

19:32

they're actually trained I think many of

19:34

the details are actually specific

19:36

choices that individual companies needed

19:38

to make in their system design many of

19:40

these things often look quite different

19:42

in open source than they might do within

19:44

a kind of big reinforcement learning lab

19:47

with that in mind I think these choices

19:48

are very important but for the sake of

19:51

this talk I'm going to leave most of

19:53

them out there are particular choices

19:55

about how to batch things how to do it

19:57

on policy or off policy see how to use K

20:00

constraints to make sure your system

20:02

doesn't go off the rails for most of the

20:04

algorithms I'm going to talk about

20:05

though you can Implement them either in

20:07

a simple way or in the more complex or

20:10

scalable method it's not that these

20:12

details aren't important when I talk to

20:14

experts they say these are some of the

20:16

most important things to actually learn

20:18

and make these systems work it's just

20:19

that I'm not the right person to tell

20:21

you about them and I think they're

20:22

interesting ideas here without going

20:24

into these systems in detail finally one

20:27

last quote from open AI that I found

20:28

sound really interesting they said that

20:30

when training a model for reasoning one

20:32

thing that immediately jumps to mind is

20:34

to have humans write out their thought

20:36

process and train on that when we saw

20:38

that if you train the model using RL to

20:41

generate and hone its own chain of

20:43

thoughts it can do even better than

20:45

having humans right chain of thoughts

20:47

for it that was the aha moment that you

20:50

could really scale this I think this

20:52

quote is pretty amazing I imagine it was

20:55

quite shocking for the first time to see

20:57

the model reason through a problem and

20:59

get it correct I don't know maybe I'm a

21:01

sucker okay with that background we can

21:03

actually get to the suspects for what

21:05

might be going on here so I narrowed

21:07

this down to four different suspects

21:10

guess and check process rewards search

21:13

or Alpha zero and learning to correct

21:16

these aren't formally different areas

21:18

but when reading this literature I did

21:20

find it a bit overwhelming there are

21:22

many different papers that think about

21:24

these problems and well everyone's kind

21:26

of convinced their method is what's

21:28

really going on that being said I found

21:31

these four to be a useful outline for

21:33

helping me think about this

21:35

problem suspect one is the

21:38

simplest three steps we sample and chain

21:41

of thoughts we check which ones were

21:43

successful and then we train on the good

21:46

ones if we think about it in terms of

21:48

our picture we will independently sample

21:51

some of the chains will go wildly off

21:54

and some will reach the solutions the

21:56

solution ones are the ones we would like

21:59

and so we can train them into our

22:01

language model if you're like me you

22:03

might find it helpful to formalize

22:05

what's going on here we can think about

22:07

this as a form of rejection sampling

22:10

expectation maximization em is a very

22:13

traditional algorithm in machine

22:15

learning and it's been applied to these

22:17

sort of reinforcement learning

22:18

algorithms for decades we can think of

22:20

the expectation step as running

22:22

rejection sampling as we saw earlier in

22:24

the talk and we can think of the

22:26

maximization step as fitting our l

22:28

language models to the samples that fit

22:30

with our posterior the more we run this

22:33

expectation step the closer to the true

22:36

expectations we've calculated and the

22:38

better our endstep will in getting to

22:40

the answer itself traditionally em is

22:43

done in a batched offline process but

22:47

there are versions that are online or

22:49

that can work with any other form of

22:51

reinforcement learning given the

22:54

Simplicity of this method it's been

22:56

discovered and noted to work many times

22:59

in MLP this works as a form of

23:02

self-training this is a method that was

23:04

described in

23:05

1995 and later used to produce

23:08

state-of-the-art syntactic parsers this

23:11

method of course has different names in

23:12

different areas open AI refers to it as

23:15

best of end training a popular recent

23:17

variant is called star or self-taught

23:21

reasoning my formalization is from the

23:23

paper rest em in some sense the name

23:26

here actually doesn't really matter too

23:27

much I mostly list them all so you don't

23:29

get intimidated or think more is going

23:32

on here than actually is and high level

23:34

all these papers come to a similar

23:36

conclusion this method is simple but it

23:39

works and it works pretty well you can

23:41

get relatively consistent improvements

23:44

particularly in lower samples across

23:46

many different problems if anything this

23:49

should be a required Baseline in most

23:51

papers of course the Assumption here is

23:53

that we have access to the verifier it

23:56

seems hard to actually scale the test

23:58

time compute if we only have this during

24:00

training of course we can try to use

24:03

what we've produced to also train the

24:06

verifier since we have a lot of samples

24:08

from rejection sampling we can further

24:11

try to train some sort of learned

24:12

verifier that we can keep around at test

24:15

time this idea which is often referred

24:17

to as

24:18

amortization basically using a learned

24:21

model to represent some sort of complex

24:23

system we can create our own sort of

24:26

learn verifier at test time this could

24:28

then be used as part of Chain of Thought

24:30

or for some sort of test time rejection

24:33

sampling so is A1 just a guess and check

24:37

RL system well there's some signs it

24:40

might be one thing that's neat is that

24:42

this approach is extremely simple and

24:45

scalable one thing openi has done in the

24:47

past is just build larger more powerful

24:50

versions of things people thought worked

24:51

reasonably well we also have seen

24:54

positive results with this and

24:55

potentially with huge amounts of data

24:57

collection with a verifier you could get

25:00

a system like this to work really really

25:02

well what we're missing though is that

25:04

there's no evidence that simply sampling

25:07

will produce some of the chain of

25:08

thoughts that we saw earlier this seems

25:11

like a big change to just have this

25:13

happen automatically from our system in

25:16

addition the Assumption here is that if

25:18

we do enough rejection sampling we'll

25:20

get some good chains but for some of the

25:22

harder problems this seems really

25:24

unlikely this seems computationally

25:26

efficient or even impossible

25:28

so let's build a bit more structure into

25:31

these systems this next section is on

25:33

process rewards suspect two during chain

25:37

thought sampling we'll have some

25:38

guidance that we'll both use to learn

25:40

and to improve our trajectories we then

25:43

run the same process where we check if

25:45

our final or partial versions are

25:46

successful and train on the good ones

25:50

the term process rewards comes from two

25:52

papers one from Google and one from open

25:55

AI in these papers they learn in early

25:58

verification model which they call a PRM

26:00

or process reward model they show that

26:03

learning this intermediate model can

26:05

improve in rejection sampling compared

26:08

to a learned model that gets the full

26:10

Solutions the graph on the right

26:12

compares the Learned intermediate model

26:14

both to majority voting and to a model

26:17

learned only on full Solutions note this

26:20

graph is not making any Claim about the

26:22

learning process just that we're able to

26:25

successfully complete more chain of

26:27

Thoughts by utilizing an intermediate

26:29

learned verification function there are

26:32

several ways for acquiring this process

26:34

reward model one might simply be to

26:37

sample trajectories from your model and

26:40

utilize human annotators to label these

26:43

another approach which is becoming more

26:44

common in the literature is to take

26:47

partial chain of thoughts from your

26:48

model and then perform rollouts these

26:51

rollouts will tell us how good the Chain

26:53

of Thought is at a given time as we

26:56

discussed earlier we can then and

26:58

utilize these rollouts to train a

27:01

learned process reward model we'll call

27:03

this RI this will give us a sense of how

27:06

good we are doing and can additionally

27:08

be used at test time there are many ways

27:11

we might choose to parameterize this

27:13

learned process re word model one

27:15

interesting idea is to learn it as a

27:18

large language model the idea here is

27:21

that the actual process reward model

27:23

that's checking how well we're doing can

27:25

itself use chain of thought it might try

27:28

to reason about individual steps and

27:30

utilize them to decide upon the answer

27:33

what's important about this step is this

27:34

is an idea that merges the generator and

27:37

the verifier you can have a single model

27:40

that is both trying to do reasoning and

27:42

also trying to verify this reasoning

27:45

this is an idea that has begun to be an

27:46

Explorer recently in the literature

27:48

where several approaches build these

27:50

generative

27:51

verifiers on medium scale problems we

27:54

can see that this learned process reward

27:56

style seems to work in this paper known

27:59

as math sheeper they train a model

28:02

utilizing rollouts they can show that in

28:05

this model they're both able to find

28:07

better Solutions with their learned

28:08

intermediate guide and they're also able

28:11

to learn a final model that's better at

28:14

math this approach also brings the full

28:17

story into a bit more Focus if we're

28:20

going to use a verifier that is also

28:22

using Chain of Thought and we're going

28:24

to merge that into a single stream we

28:26

can imagine alternating between

28:28

generation and verification and using

28:31

that to improve our test time solution

28:34

for example if we look back at one of

28:35

the chain of thoughts I mentioned

28:37

earlier we see statements like is that a

28:39

good explanation question mark while

28:42

traditionally we would think of this as

28:44

part of the generator this might be part

28:46

of a verifier that's been merged into

28:48

the same model it can move back and

28:51

forth between generation and

28:52

verification within a single language

28:55

mode so is this 01 well there's some

28:58

evidence that these intermediate guides

29:00

are effective it also removes the

29:03

challenge of just having a single

29:05

learned verifier on the negative side we

29:07

haven't really seen anything yet that

29:09

explains some of the advanced planning

29:11

that we've seen this model do and we

29:13

don't really know how to fully do this

29:15

combination of generator and process

29:18

reward model into a single Chain of

29:20

Thought uh it's a compelling idea but

29:22

there are a lot of details still

29:23

remaining if I had to guess I would say

29:25

I personally think this is probably

29:27

closest to what we might expect 01 to be

29:30

it fits with the research papers that

29:32

open AI is publishing and some of the

29:34

rumors about the Simplicity of the

29:36

system itself that being said my

29:38

confidence is quite low and a lot of

29:40

people I talked to think it's something

29:42

quite a bit more advanced so let's look

29:44

at some more search based Solutions so

29:47

in particular let's remind ourselves how

29:49

alpha0 works this was a very important

29:52

paper in the history of deep learning

29:54

and RL in this paper which was a

29:56

follow-up to Alpha go they demonstrate

29:59

that a system completely taught with

30:01

self-play could achieve expert level

30:04

performance in a very hard task at a

30:07

casual level the way the system works is

30:09

it plays games of go using a complex

30:11

search algorithm then trains a neural

30:14

network based on the trajectories of

30:16

this system it then uses that neural

30:18

network to again play some more games

30:20

and iterates on this process this is the

30:23

canical example of success stories from

30:26

very simple rl-based algorithms and

30:28

demonstrates scaling without the need

30:30

for extensive expert demonstrations

30:33

there are several reasons this system is

30:35

relevant to the discussion but one of

30:37

the more recent ones is this work on

30:39

Alpha proof we don't have a lot of

30:42

details behind how alpha proof works

30:44

just that it did extremely well at a

30:47

very hard math competition and a blog

30:49

post that says when presented with a

30:51

problem Alpha proof generates solution

30:54

candidates and then proves or disproves

30:56

them by searching over possible proof

30:58

steps in lean which is a proof assistant

31:02

each proof that was found and verified

31:04

is used to reinforce Alpha proofs

31:06

language model enhancing its ability to

31:08

solve subsequent more challenging

31:10

problems so if you squint this does seem

31:14

rather similar to some of the language

31:15

we saw in open ai's blog so how might

31:18

this work well we're going to assume

31:21

there's going to be some self-play using

31:23

some kind of guided search with

31:25

exploration we'll then label the final

31:27

outcomes of these self-play games will

31:30

train the guide and Generator and

31:33

iterate the terminology for this in the

31:35

literature is known as expert iteration

31:38

it refers to this iterative process

31:40

where an algorithm that combines a learn

31:42

model plus a complex expert search the

31:45

goal is basically to distill the search

31:48

process into the model we do this by

31:50

generating lots of samples utilizing our

31:53

reward model to improve upon them and

31:56

then labeling the good ones we iterate

31:58

on this process retraining both the

32:00

generator as well as the guide model in

32:03

order to do better on the next iteration

32:06

a popular way to do this with language

32:08

modeling is to use a search algorithm

32:10

known as beam search and then to utilize

32:12

a guide that will look very similar to

32:14

our process reward model here our guide

32:17

will tell us how well we're doing by

32:19

looking at our partial Chain of Thought

32:21

So

32:22

Far given this guide we can then perform

32:25

beam search the way beam search works is

32:28

that at every step of the process we

32:30

expand out to all possible next chain of

32:33

thoughts and then we just keep the top

32:36

four based on how well they're doing

32:38

from our guide this will keep around

32:41

four different possible solutions each

32:43

of the same length based on how close

32:45

they are to producing a good final

32:47

answer of course there's a lot of

32:49

details here I'm not specifying we have

32:51

to determine how to expand to new

32:54

possible chain of thoughts as well as

32:56

producing somewhat different chain of

32:57

thoughts thoughts that might likely give

32:59

us a different path we also have to

33:01

determine how to weigh the guide versus

33:04

what the language model thinks is the

33:05

next PATH but at high level you can see

33:08

how this expertise can then be trained

33:10

into the model instead of a guide we

33:13

might also consider using rollouts

33:15

directly in this example here we are

33:18

running beam search at each step and

33:20

using rollouts at training time in order

33:23

to tell us how well we're doing here's

33:25

our first step second step

33:28

third step and here is our fourth step

33:32

in systems like alphago these rollouts

33:34

are combined with a learned guide

33:36

function together these give us a good

33:38

sense of the problem and we learn how

33:41

much we can actually trust our learned

33:43

guide function versus explicit rollouts

33:46

remember our goal at test time is to

33:48

remove the roll outs entirely several

33:51

recent papers have experimented with

33:53

using these forms of expert iteration in

33:56

order to produce good reasoning systems

33:59

again we're working on somewhat more

34:00

mediums scale math problems but there is

34:03

some preliminary evidence that there are

34:05

significant benefits from doing this

34:07

form of search specifically we see large

34:09

increases in accuracy compared with

34:12

doing the naive guess and check system

34:14

here represented as star that we saw

34:17

earlier in the talk while beam search is

34:20

a common approach for efficiently doing

34:22

search with language models systems like

34:24

alphago used much more complex forms of

34:27

search for gamling in particular the

34:30

famous search algorithm used in those

34:32

papers is known as MCTS Monte Carlo Tre

34:35

search this is a complex algorithm that

34:38

combines search with

34:40

exploration the way it works is that for

34:42

a given math problem we're going to

34:43

start at the beginning we're then going

34:45

to walk down our tree until we hit a

34:48

leaf node when we get to that node we'll

34:51

expand five possible next steps so in

34:54

our case that node will consist of a

34:57

partial Chain of Thought and the next

34:59

five steps will be five other expansions

35:02

of steps we could try next we'll then

35:05

pick one of those at random when we get

35:07

to that step we'll do a roll out of the

35:10

next steps in the Chain of Thought

35:13

depending on whether these were

35:14

successful or not we'll then update all

35:17

of our parent notes based on the fact

35:19

that we ran that roll out and also how

35:21

well it did we can continue this process

35:24

growing our tree and applying different

35:27

rollouts

35:28

the key to the algorithm is that we are

35:29

not simply just trying to reach the end

35:32

as fast as possible but trying to

35:34

explore different parts of the tree

35:37

let's look at a demo so in this example

35:39

here we have run our selection process

35:42

and gone down the yellow nodes of the

35:45

tree we then look at the bottom node

35:48

that Chain of Thought of three steps and

35:50

we expand it to three next possible

35:53

steps here we can see the expansion and

35:56

the yellow node represent present which

35:58

of the expansions we pick to roll out we

36:01

then run our roll outs here I'm showing

36:04

eight independent rollouts several of

36:06

which reached the solution and several

36:08

of which did not based on this roll out

36:11

we then update the node and all of its

36:14

parents to tell them how well it

36:16

did okay now we start the process again

36:20

we now need to select which node to

36:22

expand next we've chosen a different set

36:25

of nodes to select and we've reached a

36:28

different Leaf this selection process is

36:30

based both on which nodes won and which

36:33

nodes were not yet explored we then

36:36

expand this node and we do another set

36:39

of

36:39

rollouts based on the success of these

36:42

rollouts we then update each of the

36:44

parents as mentioned earlier the main

36:47

benefit from this process is that when

36:49

we do selection we are basing that

36:51

selection both on how well these nodes

36:54

did and also how well they were explored

36:57

the benefit here is that we can explore

37:00

many different possible chain of

37:01

thoughts and try to find ones that we

37:03

may not have explored in the past so is

37:06

there some type of search algorithm

37:08

being explored in 01 well it fits with

37:10

the history of major demonstrated

37:12

results in RL and it's a particularly

37:15

nice way of adding more training time

37:17

into the system remember we know that o1

37:20

is data efficient but they may have used

37:23

an incredible amount of compute in order

37:25

to do training furthermore given that

37:27

the chain of thoughts that we actually

37:29

are seeing from 01 look a little bit

37:31

like search with properties like

37:33

backtracking or highle outlining it's

37:36

plausible that those came into the model

37:38

through something like training time

37:40

search however there are some negatives

37:42

to this process it's much more complex

37:45

algorithmically and it's costly to

37:47

maintain open States compared to the

37:49

first two systems it does seem much

37:51

harder to scale additionally we don't

37:54

see anything about doing this sort of

37:56

complex training Tre search in any of

37:58

the open AI release material the other

38:01

thing that's interesting is that there

38:02

are a lot of papers kind of exploring

38:04

MCTS for language modeling but at least

38:07

in the open research Community we

38:09

haven't seen too many successes it seems

38:11

like simpler methods work a bit better

38:13

for these problems our final method is

38:16

learning to correct so to motivate these

38:18

algorithms I want to note some of the

38:20

differences between gam playing and

38:22

language in game playing there is a set

38:25

of fixed moves and the main source of

38:28

exploration is to just explore these

38:30

alternative moves in language there are

38:32

really a lot of possibilities you can

38:35

get around some of this by sampling or

38:37

fixing the next possible steps you might

38:40

take but I think actually a lot of the

38:42

exploration should be in this process

38:44

itself how you determine what are

38:46

different next chain of thoughts which

38:48

ones will cause more exploration or

38:51

cause more backtracking this motivates a

38:53

series of methods on learning to correct

38:56

at a high level we're going to start

38:57

start with some failed Chain of Thought

38:59

that came from our system we're then

39:01

going to do some sort of search to find

39:04

successful Corrections of this failure

39:07

based on this outcome we're then going

39:08

to train on the entire process not just

39:11

the correction but the original as well

39:14

a motivating example is work on

39:16

self-correction the idea here is to

39:19

isolate pairs of chain of thoughts we'll

39:21

call one Z Prime and the other Z double

39:24

Prime these chain of thoughts are

39:26

similar but one leads to a correct

39:28

answer and the other does not if we can

39:31

isolate these two we can train a model

39:34

that can approve upon Z Prime in order

39:37

to move more towards Z double Prime if

39:40

we can do this at scale we can hope to

39:42

build this ability into the generator

39:45

itself this approach sounds simple but

39:47

it actually has lots of challenges in

39:49

practice one issue is that the model

39:52

will often just collapse if the First

39:55

Chain of Thought was just not very good

39:57

it'll learn to ignore it and simply just

39:59

directly try to generate the second one

40:02

the other issue is that you have to be

40:03

extremely careful of distribution shift

40:07

if you collect a lot of examples but

40:08

they look different from what your

40:10

model's actually generating it might not

40:13

actually self-correct in practice it'll

40:15

learn about your examples but not about

40:17

what your model actually produces in

40:19

mistakes one approach to get around this

40:22

issue is to try to be as UNP policy as

40:25

possible in this setting we will

40:27

generate our Z Prime and then take all

40:30

possible continuations from Z Prime to

40:33

the goal we will fix the model's

40:35

original output and try to learn what

40:38

the correction would be from that given

40:40

point there's some subtleties in getting

40:43

this right for instance in the paper

40:45

listed they first run a training round

40:47

where they only learn the correction

40:49

part of the model then in a second stage

40:52

they also learn the original part of the

40:54

model itself this is done toensure sure

40:57

that as the first part of the model

40:59

changes the correction part learns to

41:01

adapt and continues producing good

41:04

Corrections when done correctly this

41:07

approach beats both training on examples

41:10

as well as our guess and check approach

41:12

it also scales better than simply

41:14

pairing up the examples and learning to

41:16

correct from them of course our final

41:19

goal is not individual corrections but

41:21

Corrections applied repeatedly all in a

41:24

single chain this is the motivation

41:26

behind stre of search in this work they

41:29

first find an optimal Zar they do this

41:33

by applying a training time search

41:35

algorithm that produces the tree on the

41:37

right this Tree finds a very good Chain

41:40

of Thought but also intermediate

41:42

branches that go off in the wrong

41:44

direction once we have this tree though

41:47

instead of training just on the path to

41:49

the final answer we're going to instead

41:52

linearize this tree into a single stream

41:55

the picture on the bottom shows schem

41:57

aut atically what's happening we're

41:58

basically going to template construct a

42:01

synthetic Chain of Thought that goes in

42:04

windy roads to get to the final answer

42:07

when we see actual backtracking in the

42:09

tree this will become words in the

42:12

Stream this gives us something that

42:14

looks like it's doing search even though

42:17

it really is just a single path from the

42:19

start to the end we can then train on

42:22

these streams in order to get search-

42:24

likee Behavior to summarize that a bit

42:27

more informally we're going to try to

42:29

convert from a tree to a stream we do

42:32

tree search to explore multiple paths

42:34

we'll convert this stream as a linear

42:37

sequence and then we'll allow models to

42:39

see their mistakes in the Stream this

42:42

sort of method might be combined with

42:44

methods like learning to correct in

42:47

order to make each individual Step

42:49

better and more on policy this approach

42:52

is relatively complex but a lot of

42:55

experts I talked to were convinced that

42:56

something like this is behind what 01 is

42:59

doing so let's discuss the pros and cons

43:02

it seems like learning to correct and

43:04

plan is a pretty important part of the

43:06

process it's the first time we've seen

43:08

something that looks similar to what the

43:10

actual chain of thoughts from 01 do it

43:13

also seems plausible that this can be

43:15

used to induce search- likee Behavior

43:17

into a single test time model the

43:20

negative side this is also quite a

43:22

complex training procedure there are

43:23

many parts where the system could fall

43:25

apart or collapse this is because these

43:28

Corrections require giving synthetic

43:30

examples or trying to keep the model on

43:33

policy we also have limited empirical

43:35

evidence so far in the open research

43:37

literature that this can induce this

43:39

sort of interesting behavior in

43:41

particular methods like stream of search

43:43

have only been applied on relatively

43:45

simple problems still I think this is

43:47

the most interesting of the potential

43:49

ideas and it would be really cool to see

43:51

people build this in practice let me

43:53

conclude by talking about some of the

43:55

implications of This research

43:57

so first off the thing I care about most

44:00

is actually replication as an open

44:03

source Community we need to get better

44:05

at building some of these large scale

44:07

rl-based systems and showing they can

44:10

really work it's critical to have open-

44:12

Source versions of these models so that

44:14

we can explore what's going on and to

44:17

build better or more efficient ones

44:19

there are critical system aspects that

44:21

differ for how open source systems might

44:23

look versus how the ones that companies

44:25

are designed and and so it's quite

44:27

possible the open source versions may

44:29

not actually look the same or maybe

44:31

perform in different ways still even if

44:34

we can't replicate exactly what open AI

44:37

did I think the fact that they

44:38

demonstrated this result really should

44:40

motivate the community to know that it's

44:42

possible and that we can build one of

44:44

our own in addition there are incredibly

44:47

exciting research implications behind

44:49

this work I want to talk about a couple

44:51

areas that I think it's important to

44:53

consider the first is that the last 5

44:55

years have really been dead dedicated to

44:57

this idea of understanding what scaling

45:00

means and how it changes how a language

45:02

model performs much of this has been

45:04

somewhat mysterious these abilities come

45:07

out of these models as we go I'm really

45:09

excited to understand how test time

45:11

compute can be understood and how it

45:13

changes some of these stories test time

45:16

compute seems much more transparent we

45:18

can understand what the Chain of Thought

45:20

is doing and to get a sense of how it

45:22

explains or contradicts the results it

45:24

produces the other thing that's quite

45:26

interesting is the fact that these

45:28

systems are bottlenecked by their

45:29

inference time systems capabilities

45:32

we've been focusing on inference to try

45:34

to make it cheaper or faster in a kind

45:36

of chatbot setting but in this setting

45:38

here inference really becomes

45:40

prioritized if you can make a system a

45:42

thousand times faster that's say three

45:43

or a magnitude of extra reasoning

45:45

ability that's a much more interesting

45:48

capabilities change than simply kind of

45:50

serving a model cheaper another thing

45:52

I'm really excited about is just to be

45:54

done with prompting I think prompting

45:56

has been intellectually really kind of

45:58

boring area and one that has kind of

46:00

dominated the Practical use don't get me

46:02

wrong I think prompting is really useful

46:05

and there's a lot of cool things you can

46:06

do with it but there's not much more to

46:08

say about it from a research perspective

46:10

I'm really interested in the move from

46:12

prompting to some sort of formal

46:14

specification if we can produce

46:16

interesting verifiers for hard problems

46:18

and use language models to optimize

46:20

against them that opens up all sorts of

46:22

interesting new areas of work next I

46:24

think these these these models really

46:26

open up many New Paths for evaluations

46:29

my group has been thinking a lot about

46:31

evaluations that are just extremely hard

46:34

and on tasks that we'd really like to do

46:36

but are way beyond the capability of

46:38

even the best language models uh for

46:40

instance we've been working on

46:41

benchmarks where you have to write

46:42

entire new coding packages based just on

46:45

their unit tests this sort of uh

46:47

superhuman evaluation becomes really

46:49

exciting when you can have a model that

46:51

just runs forever and takes that

46:53

feedback into account in terms of

46:54

producing an answer I think we really

46:56

need to think about evaluations in terms

46:58

of what we'd like these systems to do as

47:00

opposed to just what we think the

47:01

current generation can do and finally

47:03

maybe this one is obvious but throughout

47:05

this entire talk I never really talked

47:07

about neural networks at all the move to

47:10

search-based systems really is about how

47:13

these systems are utilized what they

47:15

generate as their intermediate steps and

47:17

how you might change or explore that

47:20

this is very different than the sort of

47:21

interpretability that we've seen where

47:23

you try to dive into the model itself

47:25

and interpret its kind of Contin valued

47:27

weights I'd be really excited to see how

47:30

this changes how we think about this

47:31

problem how we understand our models or

47:33

what they do so thanks very much for

47:36

listening um I have a GitHub page with

47:38

the full bibliography slides and issues

47:42

from this talk I'll probably update it

47:44

for the next couple months as new papers

47:46

come out or come in if you have any

47:48

thoughts about where this is leading

47:50

research please leave them in the

47:51

comments or an issue page or you can

47:53

find me on Twitter thanks so much

Interactive Summary

This presentation explores the emerging shift in artificial intelligence from pure parameter scaling to test-time scaling, largely inspired by the release of OpenAI's o1 model. It defines test-time compute as the use of extra processing power (often through Chain of Thought reasoning or search) to improve model performance on hard, technical tasks rather than just increasing the size of the model. The speaker surveys various research methods for achieving this, including simple rejection sampling, process reward models, expert iteration (similar to AlphaZero), and methods for learning to correct mistakes. The talk emphasizes that these techniques enable models to engage in more sophisticated planning and verification, shifting the focus from prompt engineering to formal problem specification and verification.

Suggested questions

4 ready-made prompts