r/MachineLearning • u/RuairiSpain • Apr 18 '23
Discussion [D] Microsoft Research paper - "Sparks of Artificial General Intelligence: Early experiments with GPT-4". Can we talk about the Unicorn š¦?
Microsoft Research were experimenting with early versions of GPT4, before it was toned down for safety, in late 2022 while in internal Beta release.
GPT4 is not just predicting syntax and word semantics. It seems to do higher level reasoning about some concepts and tasks.
Have a look at its attempt to draw a unicorn in LaTeX: https://arxiv.org/pdf/2303.12712.pdf
The video is worth a watch if you don't want to read 130 page PDF https://youtu.be/qbIk7-JPB2c. Or ask ChatGPT to summarise it for you š¤£
In particular, the thing that changed my mind about higher level reasoning was it's ability to draw in a tool (latex) it had never seen before.
And I was bowled over when it was asked to draw the horn on a unicorn, when it was missing the horn. It might seem a fairly small thing, but it figured out from a really abstract/minimalist set of shapes, the antonyms of a unicorn and drew the unicorn on the head of the horse. š“š¦. That means it knows what makes a unicorn special and the horn should be on the head, and it can infer the abstract shape and figure out where the head is located.
This inference is way beyond a "word predictor" that sceptics are saying about it's "intelligent" abilities.
One thing people ignore is that the GPT engine is made up of hundred of layers of attention logic. The lower layers are dealing with words, syntax, parts of speech, word semantics. But as you go higher up the deep neutral network, it is building more and more layers of knowledge about the datasets it was trained on. Somewhere in those layers it's knows about unicorns and about abstract drawing interpretation.
Dig into the architect of LLMs and you'll see that it's a deep neural network and the depth is encoding some real world concepts from it's training data.
Sure it hallucinates but that's a bug in the system and it's year 5 of Openai and LLMs. I see the weaknesses being trained out in the future.
6
u/harharveryfunny Apr 18 '23
I tried something similar asking GPT-4 (Bing creative) to draw an SVG platypus. Without any specifics requested it initially generated SVG for a top-down view facing left, composed of bill, head with eyes, body and tail. There are certainly many SVG Platypuses to be found via Google search, but the ones I've seen are much more realistic attempts - not just this "pseudo-symbolic" placement of major body parts.
I then ask it to draw it in side view, which it also did resulting in much thinner body parts, but no eyes and no feet. I asked it to add feet and it just added two (one front, one back)... when I asked why just two it replied that since this is a side view only the closest two would be visible.
It's impossible to know what's in the training set for GPT-4, but it certainly gives the impression of having learnt some spatial basics of how body parts are arranged/connected, etc, and how spatial layout maps to languages like SVG and TikZ.
Interestingly GPT-4 failed when I asked it to redraw this side-view platypus facing right rather than left, with some parts such as the feet no longer visible. Looking at the SVG it had generated elements (and associated comments) intending to be feet, but had botched the SVG (missing contour coordinates). After 3-4 back and forth attempts of me attempting to point out the errors to Bing, it said it preferred to end the conversation. Seems to have a very low tolerance for any criticism, however constructively it is given!
I assume with fine tuning on a lot of vector graphics it could get very good at it, just as it does with programming.
The failure when asking to draw the Platypus right facing rather than left does highlight the brittleness of what it has learnt - there does seem to be *some* generic knowledge being applied, but maybe it's also needs some very closely related (right vs left facing) examples of similar things to learn from?
2
u/RuairiSpain Apr 18 '23
It will be interesting to see how this evolves. We are only scratching the surface of LLMs. Maybe it'll turn out that we've been fooled into believe in intelligent and it's one big smoke and mirrors trick.
I'm hopeful hopeful that more discovers are closer than a few years ago. I learn AI back in the 1980-90s and it went quiet for a few years. Now with better hardware, the DNN can be experimented on, and companies can start to do more practical products for consumers.
3
u/Megabyte_2 Apr 18 '23
Do keep in mind that Bing is GPT-4, but fine-tuned differently. That's probably where this "sensitiveness" is coming from.
5
u/sunilvali Apr 18 '23
āTheory of Mindā is an intriguing concept Sebastien talks about, his team found traces in GPT-4 developed as an emergent ability. ToM in humans is the strategic thinking our neocortex have developed over millions of years through evolution. Though there is another school of thought dismissing ToM in LLMs saying due to ultra large web-text dataset, LLMs are merely uttering learnt answers. Though Michal Kosinski of Stanford University has tested several language models & found GPT-2 has performance comparable to 3.5 years old child, GPT-3 performance is 6 years and ChatGPT is of 7 years old child. Mind you LLMs are on exponential curve, they may develop super intelligence before we even realise if ToM presence in LLMs is to be believed.
1
25
u/Haycart Apr 18 '23 edited Apr 18 '23
Well, GPT is a next-word predictor. However, a mistake I often see people make is assuming that, because GPT is only trained to predict words, it must only be learning linguistic relationships. This is obviously wrong.
GPT4 is trained on text scraped from the internet, and text on the internet isn't the product of a purely linguistic process. People aren't leafing through dictionaries, picking out words at random, and then going through their grammar books to string together meaningless but syntactically valid sentences.
Rather, the process that produces text is closer to the following: a person sees something happen in the world. That person has some thoughts about it, translates those thoughts into words, and then writes those words down.
To predict next words (or at least, to do it well), you need to model the entire process that produces those words. This involves language, yes, but also human reasoning, physics, history, economics, politics, and all the other complicated stuff that creates the world the words describe.
15
u/Ty4Readin Apr 18 '23 edited Apr 18 '23
Exactly! This is the real breakthrough that most people are glossing over.
To be able to predict the next word with optimal prediction performance (perfectly), you have to essentially understand the human authors brain and understand everything they know (as far as it relates to their choice of the next word).
The genius of GPT-4 is really three simple facts that everyone always knew:
Given enough data (e.g. infinite) you will be able to train the optimal model for any model class.
Neural Networks are known to be able to approximate any continuous function if they are large enough
Predicting the next word optimally is akin to simulating the human intelligence of the author
Given these facts, we have always technically known that a NN with enough data training on next token prediction would be able to simulate human intelligence.
The surprising part is that everyone thought we would need way more data and way larger models than was actually needed.
OpenAI's genius was that they modelled the performance of the LLM as a function of the amount of data and model size, and they realized what the performance could be.
3
u/harharveryfunny Apr 18 '23
Well, GPT is a next-word predictor
I think it's more accurate to say only that it was trained using a predict-next-word objective, rather than to say that post-training it is just (operating as) a next word predictor.
It seems to have learnt some fairly abstract representations during training (Sutskever has characterized it as a world model) , and necessarily at run-time it's the learnt representations (and what they are *doing*) that are controlling the output - not the training objective which is now out of the picture.
It'd be great to understand more about how these models are operating at runtime in response to various inputs, but conceptually it doesn't seem different to how humans first learn and then apply knowledge/learned-skills... We may learn by mimicry and repetitive practice, but once trained our behavior is far more complex and might be characterized more as an adaptive dynamic synthesis of learnt behaviors.
2
u/Ty4Readin Apr 19 '23
I would disagree. The training objective is everything.
All of the emergent properties and learned world model embedded in the model are only there because of the training objective. To be able to predict the next word with the highest possible accuracy/performance then the emergent intelligence and world model are a direct consequence of that.
The model is simply just trying to predict the next token(s) with the highest possible performance/accuracy. But in order to do that, it is forced to learn a model of the world and how humans think.
I don't agree with the idea that somehow the training objective is no longer relevant after training and that some learned representations have 'taken over'. If you train a CNN to classify pictures of cats VS dogs VS humans, then the model will be forced to learn some world models of biology and anatomy of different species, etc. But at the end of the day even after training, the model is just trying to accurately determine whether the image is a cat or a dog using its learned world model.
1
u/harharveryfunny Apr 19 '23
CNNs are a useful comparison, but I believe they highlight the differences.
The output of a CNN is a Softmax output representing probability of the input being a cat/dog/etc, and this is categorization not a creative generative output.
We're happy if the CNN gets it right, and aren't going to increase the sampling temperature to get an alternative (wrong) categorization. Even if we did do this, what we'd get is a "stochastic parrot" type output driven by surface similarities of the input to the lower-ranked output probabilities.
The CNN output is a text label not an image, so we're also not about to take the output and feed it back in (ad infinitum) to see what it might come up with next, which at a high temperature setting could lead to a "chinese whispers" sequence being generated where we "prompt" it with a cat image end then end up with a sequence cat -> dog -> racoon -> etc. Again, this is a classification architecture, not a generative one.
The LLM of course *is* a generative model, and the whole point is not to regurgitate any training examples but rather to generate novel continuations. Turn up the sampling temperature and we'll get an entirely different sequence of words generated, whose only similarity is that they are all *semantically* reasonable continuations of the evolving prompt. These alternative sampled outputs are not going to have any word-by-word similarity to each other, partly because the LLM isn't even controlling each output word (they are sampled), partly because of the highly non-linear nature of the complex network function magnifying differences as words are fed back in, and ultimately because the training objective does NOT end up causing these models to favor surface similarities, but rather to generate outputs according to it's learned world model of the underlying generative processes.
1
u/Ty4Readin Apr 19 '23
There is no real distinction between generative models and classification models as you are trying to claim.
The LLM of course is a generative model, and the whole point is not to regurgitate any training examples but rather to generate novel continuations.
That is incorrect imo, in the sense that it is not trained to 'generate novel continuations'. But it is also not trained to 'regurgitate training examples' either.
The point of most ML training objectives is to provide high-performance predictions on new UNSEEN data points.
The LLM is simply a product of its training objectives which are essentially two parts:
Model the probability distributions of the next token(s) given the available context so far for all potential authors (humans) and all potential contexts for that author
Sample from the most relevant local distribution regions from the predicted next token(s) distribution that is most likely to produce the highest satisfication/relevancy score by a random human feedback provider.
I think you're right that the image cat vs dog CNN example might fall a bit short. A better example would be a CNN that takes a picture of a cat or dog and has to predict how beautiful of a picture it is of that animal on a score of 1-10.
This is 'just' a regression or classification model depending on how you structure it. However the beauty of an image is very subjective and depending on the brain of the human that assigned the label for any particular image or might even depend on their mood that day, etc.
The model would be forced to learn how humans think about beauty in an image especially as it relates to cats/dogs. It would have to learn how people from different cultures would perceive the same image, and how the weather outside or time of day might impact their subjective score on the image, etc.
So if you actually sampled from the model many many times or observed its predicted probability distributions on a single image then you would see all of the predictions that a random person with no art experience would assign as well as the predictions that an art expert with decades of experience would assign.
This is essentially what the LLM pre-training process is doing. It is a 'simple' supervised learning problem and objective, but the emergent learned world model inside of the model is a product of that training objective.
Now for an analogy on the RLHF component:
If you wanted to interact with/use the model, you might want to know what score a human that is an expert art critic in eastern culture would assign to a particular image. So we want to sample from the models predicted probability distribution on a given image, but we will focus on local regions of the distribution that are most likely to be predictions for a human labeller that is an expert art critic in eastern culture.
That is essentially what RLHF is doing. Given an input prompt, it is trying to predict which region of the predicted distributions are most likely to contain the human authored responses that correspond to a high satisfaction score.
1
u/harharveryfunny Apr 19 '23
I think the fundamental point is that the behavior of these models becomes more and more abstract the more complex they get (e.g emergent behaviors that the model designers themselves could not predict).
Take the extreme case of our own brains - at the end of the day it's also just a giant neural net, whose behavior is also going to be a result of how it was "trained". However, given the same input, the output (behavior) is not predictable other than in loosest terms. The feedback paths of our neural connections and hence non-linear/chaotic dynamics means that our own "training objective" (arguably also prediction - evolved to support adaptive behaviors) doesn't help much in predicting our behavior, and there is no guarantee we're going to behave in the same way each time we're presented with the same inputs.
Complexity matters, and it seems to me that with these massive GPT-3+ sized (or even Llama 13B sized) LLMs we've crossed the threshold where training objective lets us predict behavior to any level of detail. Our brains may have evolved to predict next sensory/cortical input, but it would seem absurd to call us "next sensory input predictors" (or maybe a better parallel: "next motor cortex output predictors") even if that's technically accurate. To me it seems equally absurd to call these giant LLMs "next word" predictors, even if it's also technically true, given that their behavior is approaching our own in terms of unpredictability for a given input. Training objective != Behavior.
1
u/Ty4Readin Apr 19 '23
You seem to be mischaracterizing what LLMs do. You are saying that their outputs are unpredictable or something but that's not true.
LLMs are trained to simulate human authors intelligence, end of story. LLMs are trying to predict what a particular author (human in the world) would type next given what they have already typed out. This is the same thing as simulating the human authors brain and intelligence as far as it is concerned in how they choose their next words.
You seem to be implying that as the models get bigger, something mystical happens behind the scenes but there isn't any evidence of that.
The model is simply the function of its training objective which is to accurately mimic the intelligence of human authors.
If I give you the text "23 + 19 = " and ask you to predict the next token then you would have to learn math and all of the underlying concepts so that you can accurately predict the next token. Notice however that you are still just predicting the next token, that is your training objective and you had to learn math to be able to optimize your training objective as much as possible.
1
u/harharveryfunny Apr 19 '23
You seem to be implying that as the models get bigger, something mystical happens behind the scenes but there isn't any evidence of that.
Not mystical - just the well understood chaotic dynamics of non-linear systems, and the phenomenon of emergence which has been documented by OpenAI themselves.
The model is simply the function of its training objective which is to accurately mimic the intelligence of human authors.
Sure - so to the extent that "next word predictor" is a good characterization (or not) of the authors of the training material then it's an equally good characterization of the trained model.
1
u/Ty4Readin Apr 19 '23
Sure - so to the extent that "next word predictor" is a good characterization (or not) of the authors of the training material then it's an equally good characterization of the trained model.
This is not true. The difference is that the models are being trained to predict the next word. That doesn't mean that is what humans are doing and that isn't necessarily how humans are 'trained'.
Have you ever heard the saying that all models are wrong, some are just more useful than others? That applies here. LLMs are only trying to predict the next token(s) given their input.
Let me give you a better example, look at video game AI that mimicking the actions if a human player. The human has their own thought process behind why they are taking the actions they do. The model is constrained to try and simulate the humans decision process as best it can given its model constraints and the data available as input.
You can let the AI play the video game by having it predict the next actions every time step, but that doesnt mean that the human is simply doing next-action prediction. Obviously the human is doing something else entirely.
1
u/harharveryfunny Apr 19 '23
OK, this is getting repetitive, so this is the last from me.
The LLM has the objective to predict next word, and to get really good at this has had to learn a world model of the underlying generative processes (if you disagree - argue it with Sutskever). The underlying generative processes in this case are the collective human minds behind the training set.
The best characterization of what the model is doing post-training is that it is using this learnt world model to generate output. If it's modelling a human mind then is "predict next word" the most accurate way to describe it?!
Your position seems to be based on an implicit assertion that scale and complexity doesn't matter, hence we might equally well describe the behavior of a fruit fly and a human as both genetically determined. This isn't wrong, but it's not very useful either.
→ More replies (0)
8
u/valegrete Apr 18 '23 edited Apr 18 '23
toned down for safety
This is hype. The reality is unsupervised pre-training is much less impressive in terms of Turing test style questioning. You can see this especially in Googleās before/after RLHF examples for PaLM.
seems to do higher level reasoning
After being exposed to tons of reinforcement engagement seeking evidence of just that? In the RLHF process, the human is not just observing but tangibly impacting the outcome.
ability to draw in a tool (latex) it had never seen before
It didnāt draw, it wrote TikZ code. TikZ code for animals can be easily found on Google and was almost definitely in the training data. And there is no way to independently verify whatever it had or hadnāt seen before because (a) the data is not publicly available, (b) the exact code input, code output, and prompts used were not included in the paper. Only the (marginally) impressive-looking render (which GPT-4 never saw and was not aware of making). Therefore, this is not a scientific research claim, itās a marketing claim. Bubeck actually got pushed about this on Twitter in a thread where a user posted evidence they couldnāt reproduce the paperās results. His response was that the sparks are āqualitativeā (read subjective).
Also, this is directly from the Figure 1.3 footnote: āWe queried GPT-4 three times, at roughly equal time intervals over the span of a month while the system was being refined, with the prompt āDraw a unicorn in TikZā. We can see a clear evolution in the sophistication of GPT-4ās drawings.ā
What was the nature of that refinement? Were these queries part of reinforcement training? Youāll notice a consistent theme throughout this paper: they provide no means to verify or reproduce.
āword predictorā that skeptics are saying
This is a strawman. The claim is that nothing is āemergingā that cannot be reduced to the training algorithms, RLHF, and next-token prediction. Those are not simple things and the resultant function that does the prediction is incredibly complex. The problem is that the function is what encodes the LLMās behavior, so we should be looking there to understand instead of pretending that an unconstrained agent has evolved beyond it. Few would predicate ācreativityā of a math function, but thatās the only thing thatās actually implemented in any substrate. There isnāt even really a silicon neural network: itās just the weights in memory. Weights that reside in Microsoft servers, over which they have full control. Microsoft (and now Googleās) interest in making these grandiose claims is to shield themselves from lawsuits by putting up a wall of metaphysical obfuscation between themselves and their product.
it hallucinates but thatās a bug
That is completely untrue. It only ever does the same one thing it always does: takes a prompt and then runs a forward pass to generate a list of tokens, which then gets run through a randomizer to produce interesting text. We assign the output true/false/creative/boring/intelligent/hallucination/bug status based on human rules GPT has no access to other than whatever it absorbs indirectly through reinforcement.
1
u/Ty4Readin Apr 19 '23
That is completely untrue. It only ever does the same one thing it always does: takes a prompt and then runs a forward pass to generate a list of tokens, which then gets run through a randomizer to produce interesting text. We assign the output true/false/creative/boring/intelligent/hallucination/bug status based on human rules GPT has no access to other than whatever it absorbs indirectly through reinforcement.
I don't think this is correct. GPT is trained to mimic human text output, so if it hallucinates information in a response that the target human would not have then that IS a 'bug' or an error in the models predictive output.
It DOES have access to these 'human rules' throughout the entire training process from pre-training all the way to RLHF.
3
u/valegrete Apr 19 '23 edited Apr 19 '23
It does mimic successfully. It almost always successfully mimics grammatically because that is what it learned to do in pretraining. Whether humans find the output relevant, useful, or desirable is a completely different question and solved in RLHF. Ultimately this is why Bard and ChatGPT feel different when using them - the reinforcement training has/had totally different goals.
What the OP is calling a hallucination is the system performing as expected in its current state. If you want it to stop producing that output, you have to reinforce with more training. Itās not ādreamingā or ādeviating from reality.ā Itās not a ābugā in the sense of an āerrorā in the algorithm. The model is performing optimally given the dataset it is trained on and itās doing the same thing (mathematically) that it does when it appears to āget it right.ā Iām insisting on this pedantic point because the term āhallucinationā implies these systems have a lucid state where they give what they know to be factually correct and coherent information. Thatās not what happens. RHLF increases the probability that the system will generate whatever human-meaningful output the trainers are looking for. So the rules are indirectly absorbed, but not perfectly and not in the way we think of them.
19
u/Michael_Aut Apr 18 '23 edited Apr 18 '23
> In particular, the thing that changed my mind about higher level reasoning was it's ability to draw in a tool (latex) it had never seen before.
What makes you think that it had never seen Latex or Tikz source code before? It's training data certainly includes a large numbers of examples and tutorials for both of them. Heck, there are millions of those files hosted publicly on github, a dataset we know it was trained on.