Using GPT-3 to pathfind in random graphs
jacobbrazeal.wordpress.com
jacobbrazeal.wordpress.com
Are there models that are trained to receive and respond with a purely mathematical description of the problem?
[1] https://analyticsindiamag.com/openais-neural-theorem-prover-...
Example prompt -
Every turn each gloober flomps the same gloobers. If a yellow gloober flomps a blue gloober then the blue gloober turns yellow, otherwise, gloobers stay the same color.
1. gloober Roy flomps gloober Zoo and gloober Bat
2. gloober Zoo flomps gloober Bat and gloober Crystal
3. gloober Crystal flomps gloober X-Ray
4. gloober Bat flomps gloober Blue
If gloober Zoo is the only gloober that is yellow, and all other gloobers are blue, will gloober Blue turn yellow, and, if so, at what turn?
Answer: gloober Blue
Prompt:
Every turn each gloober flomps the same gloobers. If a yellow gloober flomps a blue gloober then the blue gloober turns yellow, otherwise, gloobers stay the same color.
1. gloober Roy flomps gloober Zoo and gloober Bat
2. gloober Zoo flomps gloober Bat and gloober Crystal
3. gloober Crystal flomps gloober X-Ray
4. gloober Bat flomps gloober Blue
If gloober Zoo is the only gloober that is yellow, and all other gloobers are blue, will gloober Blue turn yellow, and, if so, at what turn?
Answer:
Continuation: gloober Blue will turn yellow on turn 4.
> I find it a little unsettling that GPT-3 is able to do this well.I agree and think that this is definitely the right reaction.
I gave GPT-3 a prompt to test this. Like a human reader would, GPT-3 seems to miss the doubled word in the last sentence. Continuation is at the asterisk.
Repeat the sentence in quotes.
"The man went to the gas station today."
The man went to the gas station today.
"I'm happy to be on holiday."
I'm happy to be on holiday.
"If you can get to the the store on time, it would be appreciated"
If you can get to the store on time, it would be appreciated.
---What's extra-odd about this is that GPT-3 can repeat random character sequences up to 1,000 characters in legnth. For each of these I just gave the sentence in quotes and let GPT-3 autocomplete the repeat. I think that's especially odd because it's showing that GPT-3 does something different when it is asked to repeat random characters (wouldn't miss a duplicate) versus when it is asked to repeat sentences that it could "read".
"I need something stronger than I'm XXXknjd used to."
I need something stronger than I'm XXXknjd used to.
"pmkkrrpjvn"
pmkkrrpjvn
"wxvbssajxczjjewmanvzznxlwzwdvfrghsstmzpvqwsstrxkzunjgxicvrshychbqsulydkiwgyryhkgjtukssacnodtggfahvus"
wxvbssajxczjjewmanvzznxlwzwdvfrghsstmzpvqwsstrxkzunjgxicvrshychbqsulydkiwgyryhkgjtukssacnodtggfahvus
"dcyvufmxwmctighwwhmamgwuyldpkzrwubvcbjirxzhuoqtktcdfjgasurcprctnxmlqfvwkxixrtqqynxfjvtfhmgsfglxhvfhnbqnixulexkqflrdxqpwgavrphkbgspgoyfjfolczssjfrmggtpcdheneaynhdwimcmvkcsauxwnlovefpmqyznynuoxraqixeveiuqotssiymrtmbiodwnhmtexfrttzdlbdwduqzvrkpmqmjcyciqsuwqmlhjrveeozktvccsspsqosutpngigzkqgaltojhvkodzoeqzhlhfqyblvqkoyvjkphmjroidjpbpnkvrchvrnvuoqhgzkypvjycfzrdsyefstckorqwgsbknslqyiwqghdinuwrapkgyvhslbfgqrslsrferhodlvukdsvvzdcwyjwtrqhqkvwbwksefuanzaarvhnmjcgtajsbivaijthercbmqfvndlsfhjtwsiztpwcehuvckmcbjvhnqbvhhqwugrodtyjfrwlkbpatpwgrlzneenyqgcdyzzhrzfsrvfqlnunfpnathcpuealrdwcliriufxdfqaygxtvdriidzzzdbbfwrowhlbasogmzfkwhaaufrcjsdgdobaozazbdfmasrgjiblluvfvfkeuwksyrzdmepmapesadqoozrpaidlgshyhpbypdzdxjdtwnfaxthjwluarbldmxvvfdissthlpdxqxjmgpuefwqvfjupxveztgrrwyobgaljqkgexeulvjucokythfkmcgnlbfkmpgrpaoztrawqciyilbzwjxagwqgwuqcwactwdtobomlkanmdbhpmubdzvolqpusjbtgqoymuovzsqbkzonabhzogabraxmnxnvfdotfisefmfbdbqjzgrhdtgtppobyndfgsrlpxyutebzlrxgahwizvtmieutqnkflkldxeathvrttyffacofuwdkhxdklcisbzbrlddtahut"
dcyvufmxwmctighwwhmamgwuyldpkzrwubvcbjirxzhuoqtktcdfjgasurcprctnxmlqfvwkxixrtqqynxfjvtfhmgsfglxhvfhnbqnixulexkqflrdxqpwgavrphkbgspgoyfjfolczssjfrmggtpcdheneaynhdwimcmvkcsauxwnlovefpmqyznynuoxraqixeveiuqotssiymrtmbiodwnhmtexfrttzdlbdwduqzvrkpmqmjcyciqsuwqmlhjrveeozktvccsspsqosutpngigzkqgaltojhvkodzoeqzhlhfqyblvqkoyvjkphmjroidjpbpnkvrchvrnvuoqhgzkypvjycfzrdsyefstckorqwgsbknslqyiwqghdinuwrapkgyvhslbfgqrslsrferhodlvukdsvvzdcwyjwtrqhqkvwbwksefuanzaarvhnmjcgtajsbivaijthercbmqfvndlsfhjtwsiztpwcehuvckmcbjvhnqbvhhqwugrodtyjfrwlkbpatpwgrlzneenyqgcdyzzhrzfsrvfqlnunfpnathcpuealrdwcliriufxdfqaygxtvdriidzzzdbbfwrowhlbasogmzfkwhaaufrcjsdgdobaozazbdfmasrgjiblluvfvfkeuwksyrzdmepmapesadqoozrpaidlgshyhpbypdzdxjdtwnfaxthjwluarbldmxvvfdissthlpdxqxjmgpuefwqvfjupxveztgrrwyobgaljqkgexeulvjucokythfkmcgnlbfkmpgrpaoztrawqciyilbzwjxagwqgwuqcwactwdtobomlkanmdbhpmubdzvolqpusjbtgqoymuovzsqbkzonabhzogabraxmnxnvfdotfisefmfbdbqjzgrhdtgtppobyndfgsrlpxyutebzlrxgahwizvtmieutqnkflkldxeathvrttyffacofuwdkhxdklcisbzbrlddtahut
On any given input, its predictions can "look" how we expect an intelligent response to "look". The job is to disprove this intuition, which is usually trivial. This cannot be done by looking at a single response.
Consider walking into a room and predicting a few people's personality traits correctly based on their star sign. This shows nothing.
Most research on deep net architecture, is about how to train it effectively on huge stacks of GPUs and TPUs. That's how/why transformers were invented.
Going eg., from 100TB training to 300BB weights. The process of training is more-or-less just "building a search index", and prediction is little more than "looking up examples in the search index and combining".
Yes, one of the key insights of modern DL-based ML is that size matters, neural networks start producing interesting generalisation only once you have large parameter spaces. Indeed, one might wonder if size is all that matters?
I don't see what is wrong with search indices, every computer is a gigantic search index, because main memory is a map from an index (the memory address) to 2^n bit integers, the value stored at the index. So anything that can be computed at all, can be computed by "a search index". The important thing that, prima facie, distinguish NNs from eg SQL databases, is the use real numbers as latent space: because real numbers are a metric space, so you have a notion of distance which allows you do use efficient local search like gradient descent. Moreover, when you ask this 'mere' search index (NNs) about something that it was not trained on, it can (and probably does) return something that is close in this metric space to something it learned.
That did not work at all in the 1990s. Today it works spectacularly well in some domains. So an interesting question now is, to use your language: is human intelligence anything more than "building a search index" and "looking up examples in the search index and combining"? So this is a variation of Searle's Chinese room, but unlike him in 1980, we have working Chinese rooms!
For example, we act in the world so as to set the state of possible causal variables -- and thereby can distinguis causes.
Above, graph algorithms operate on a discrete graph space and hence on the graph. GPT here isn't doing that.
Seeing NNs as distance-based searches in a compressed 'training space' demystifies what solutions can be found.
Here the text space defined by the training set does not permit a graph traversal, so eg., the NN 'uses' edges that don't exist
We are not searches across such spaces, which are radically impoverished and not parametrised by time or action
It is true that LLMs cannot currently solve complex mathematics problems reliably. Whether that's an intrinsic shortcoming of transformers, or not is an interesting open question, that is being investigated as we speak. A lot of well-known DL research teams bet on transformers beating humans in mathematics in the next few years, see e.g.
https://imo-grand-challenge.github.io/Yes, it is more than this. Even if we can simulate things that appear like thinking using these methods, what we do bears no comparison. That's not a criticism of the computer here but the brain doesn't work like this.
Ultimately, maybe the question "can computers think" is meaningless as Turing himself said. If the output appears like it is the product of thought, then what difference does it make?
It's really not.
You are compressing the information in that dataset. That means the model has to learn characteristics of the information in the data that represent it. This is one of the reasons why some argue that compression is a form of intelligence[1]
It's a very different mechanism to a search index or database even if in some case it appears to work similarly.
Be that as it may, universality in computing models is a well known issue. I could also say "Every Model Learned by Gradient Descent Is an x86 processor + a lot of RAM", or ""Every Model Learned by Gradient Descent Is a 2 Layer Neural Net" (as 2 layer nets are universal approximators), but this is not terribly illuminating.
Every turn each gloober flomps the same gloobers. If a yellow gloober flomps a blue gloober then the blue gloober turns yellow, otherwise, gloobers stay the same color.
1. gloober Roy flomps gloober Zoo
2. gloober Roy flomps gloober Bat
3. gloober Zoo flomps gloober Bat
4. gloober Zoo flomps gloober Crystal
5. gloober Crystal flomps gloober X-Ray
6. gloober Bat flomps gloober Lovely
gloober Zoo is the only yellow gloober. Write the turn and which gloobers are yellow.
1. Yellow gloobers - Zoo.
2. Yellow gloobers -* Zoo, Bat.
3. Yellow gloobers - Zoo, Bat, Crystal.
4. Yellow gloobers - Zoo, Bat, Crystal, X-Ray.
5. Yellow gloobers - Zoo, Bat, Crystal, X-Ray, Lovely.
6. Yellow gloobers - Zoo, Bat, Crystal, X-Ray, Lovely.
Other than thinking the spread of yellow is limited to one gloober at a time, this seems right.Yup. Here are the results I get when manually applying these rules myself.
Here I mention only the flomps that change gloobers to become yellow.
Turn 1: Zoo is yellow.
Turn 2: Zoo flomps Bat, turning Bat yellow. Zoo flomps Crystal, turning Crystal yellow.
Turn 3: Crystal flomps X-Ray, turning X-Ray yellow. Bat flomps Lovely, turning Lovely yellow.
In other words it would be:
1. Yellow gloobers - Zoo.
2. Yellow gloobers - Zoo, Bat, Crystal.
3. Yellow gloobers - Zoo, Bat, Crystal, X-Ray, Lovely.
So it’s got the order correct, and like you said it’s just that it thinks only one gloober is flomped each turn.
It 0-shotted it... but incorrectly, right?
Gloober Zoo flomps gloober Bat on turn 1. Gloober Bat flomps gloober Blue on turn 2.
Answering '4' seems like a total guess, maybe based on there being four steps, or 'Blue' being mentioned in step 4.
The replies to your post seem to assume that the answer is correct, but it is actually demonstrating a lack of step-wise reasoning.
My reading is that on line 1, no action happens, because Roy isn't yellow.
I still don't see how 4 could be a correct answer, could you post a plausible sequence of turns where Blue turns yellow on turn 4?
1. Zoo
2. Zoo, Bat, Crystal
3. Zoo, Bat, Crystal, X-Ray
4. Zoo, Bat, Crystal, X-Ray, Blue
If I understand you correctly, you are applying only one of the steps each turn, in order, which contradicts the instructions by flomping different gloobers each turn.
It is also guessable in multiple ways which is unfortunate. "There are four steps specified so I guess it happens on turn four." is one invalid way of getting the same answer.
What I changed was:
1. Used code-davinci-002 (codex)
2. Instead of using an explanation of how these tasks work, I changed your code prompts slightly and instead gave it 3 examples (two with paths, and one to show it what to output when there is no path present).
3. Changed the output so that it has to tell me which edges, instead of which nodes, it is traversing (this helps GPT to avoid using nonexistent edges it seems).
Here is an example: https://pastebin.com/D7Hn95VC Last "Problem" is the real problem we want to solve of course, everything else is static.
I'll post my code when I finish testing :)
EDIT: I used Codex not because I think it's better suited for this, but because it's currently free. I don't have enough credit ATM to run 1000 iterations with text-davinci, so I have no idea what difference using Codex made.
- Found the optimal path 504
- Found a (non-optimal) path 293
- Correctly reported no path exists 131
- Found a solution when none existed 19
- Ended on wrong node 0
- Used edges that don't exist 53
- Started with the wrong node 0
- Incorrectly reported no path exists 0
- Total: 1000
Here is the code: https://github.com/ibestvina/gpt3-graph-searchAnd then there's no hypothesis test against predictions made based on this theory, ie., no one tries to disconfirm the model works that way. It is usually trivial to disconfirm. ML models almost always work some other way, usually exploiting coincidental statistical information in the training set.
This turns the whole show into a superstitious activity, in which we think google answers our "local restaurants" query because it knows where I live (rather than say, using an IP location or one of 100 other methods).
If you present a ML model as "capable of x", you're required to disprove that claim as best you can, and present the occasions where it failed.
The fact that "it works like how I expect" and that there is a clear trajectory of working more and more "like how I expect" is a strong indicator of scientific progress.
M = mass, F = force etc.
st., the model claims we are in a world of masses and forces, and so on. And this model can be disconfirmed.
You're confusing two issues here. Nowhere in the whole of science are models presented without an explanatory semantics. Almost nowhere in the whole of ML, are they.
Here it is trivial to disconfirm even the authors interpretation of the NNs 'finding' of solutions, by noting it is often using edges that don't exist.
This whatever it is doing, we can immediately show it isn't traversing a graph. The author seems to wilfully opted for the superstitious interpretation
It shows a surprising ability of language models, code is provided and plenty of mystery is left for the reader... which can be investigated by almost anyone for tens of dollars.
What would a useless "random" algorithm find operating on these graphs as inputs? What would a useful one find? What would that be "useful" for?
Is this system much closer to the useless or the useful? We cant tell.
Without any explanation, we're left reading this blog post as a magic trick in the literal sense.
Consider the rate at which it "uses edges that don't exist" -- this makes it not a graph traversal algorithm. So it is just exploting syntax in the input whose representation has some "graphlike" qualities which can be statistically exploited.
Why is that interesting? I dont know. Is this a good system?
(EDIT: I can safely say this isn't practically useful... but it's interesting in the same way as watching a cat try to fill out a tax return. I'm not surprised the cat does it badly, I'm surprised that it seems to be doing it at all, even if it's really a trick).
That's true for models trained on small datasets, but GPT-3's dataset was anything but superficial, and on top of it we consider this task to be OOD, thus the amazement.
I'm pretty sure nearly everything, including textual representations of graph problems, are found in the training data.
"The internet is vast and infinite" - Motoko Kusanagi at the end of the original ghost in the shell...
You can find tune gpt-J or gpt-neo with a 3090
1. GPT3 is AGI
2. In combination with people, GPT3 is superintelligence
Strong claims. Anyone care to argue for or against?
You go first.
I didn’t give references for the definitions, but for intelligence, I think Legg and Hutter (2007) & Russell and Norvig (2010) work. And Wikipedia has some tests for AGI.
I asked GPT3 “if you were going to go into a person’s house and make a cup of coffee, detail what steps you’d take.” GPT3 responded with text that is indistinguishable from what I’d expect from a high school graduate, at least.
1. Knock on the door or ring the doorbell.
2. Wait for the person to answer the door.
3. If the person invites you in, step into the house.
4. Find the kitchen and locate the coffee pot and coffee beans.
5. Measure out the desired amount of coffee beans and grind them.
6. Place the ground coffee in the coffee pot.
7. Fill the coffee pot with water and turn it on.
8. Wait for the coffee to finish brewing.
9. Pour the coffee into a mug and enjoy.
By those reasonable and common definitions, GPT3 seems like a form of AGI. I mean, it is used for protein synthesis sequences, robotic sequences, design sequences— and it is a fabulous writer in a vast range of domains.
It doesn’t need to be god to be AGI v1.
I work with it every day and I recognize my contributions to it. But it is so generally intelligent. That is, it produces successful outcomes (useful text) in a vast range of contexts.
"why can't the same thing be said of human intelligence"
"if we knew more about neuroscience..."
So that's why we can't say the same thing.
Fwiw, my take is that whatever the brain does, its a machine of some sort but possibly not even a turing machine. Many disagree but noone can prove me wrong. Yet at least.
It doesn't matter by the way, if Turing machines can't replicate human minds, why would we want that anyway? "Intelligent" systems that provide outputs and solve problems for us is what we want right? I think we'll have something that is, for all intents and purposes, "AGI", using classical computers. A 'philosophical zombie' in other words.
You can start proving your point by representing the smell of incense as "text" and see how far that takes you.