One way learning from scratch could possibly be done is through RLAIF. I’m not sure if the oversight LLM would be able to meaningfully rank the gibberish strings during early training. If not, an alternative could be to start with a small context length and as the model learns to produce coherent strings the context length can be increased. This could be augmented with methods like Pretraining Language Models with Human Preferences to encourage the model to be aligned with human values.
LLMs are shockingly good at gibberish, leading to macaronic attacks and other non-obvious implications, so I would not be surprised if an oversight LLM could. (Humans can probably also do this due to dark knowledge but it would be so painful & expensive as to be impractical, as you note.)
However, I don’t think that really gives any kind of equivalent to AlphaZero. At best, you’d wind up exploiting the oversight LLM (like happens in RLHF if you let it optimize hard enough against the reward model). The most important question to ask about a bootstrap is: “where does improvement come from?” Are you applying compute to extract knowledge that the model already knows implicitly, in a Kolmogorov-complexity-esque sense of ‘knows’, or are you acquiring more data? And if so, who, where, and what?
AlphaZero gets improvement from doing planning/search over a perfect model, the simulator used by the tree search. MuZero gets improvement from doing that over a learned model. In the former case, the simulator is assumed to be bug-free and so represents the full game tree; and there is nothing to Go outside the full game tree, so one can become an arbitrarily good Go player, in theory, needing nothing beyond the simulator. In the latter case, you have a learned model, which may not have learned some critical Go rule, and so that’s not true, but if you allow it to periodically play actual groundtruth games and update the learned model based on any glitches, it may quickly become good enough that it is now like the former: the improvement comes from using compute to search more of the full game tree as implicit in the learned model/simulator. Each time it explores the game tree, it is acquiring ‘more data’. (You could imagine setting up a literal, in real life, Go board and filming it, to make concrete that this is ‘data’. However, since the Go game tree is an abstract mathematical object, you don’t need to—you just use compute to simulate it, either with hand-written code or a big RNN. In this special case, there is a highly convenient pun of compute=data.)
In other cases, like inner-monologue or self-distillation, the gain comes from amortizing compute: the model gains absolutely no additional data about the external world, it just gets to see what it already thinks at greater length, and retrain to shortcut to its best already-known answer.
So, if we try to train a LLM from scratch using just feedback from a pre-existing LLM, where would we get the improvement from (if we gained any)? We don’t gain any more data about the world that was not in the pre-existing LLM, so our improvement can’t be coming from new or better data; and it’s not obvious that this is doing anything for us computationally either: what slow lengthy outputs from the pre-existing LLM are we ‘distilling’ into the student LLM? It looks like the student LLM would just gradient-ascend its way to some extremely-specific gibberish attack on the teacher, learn next to nothing about the wide diversity of text the teacher LLM knows as it mode-collapses, and certainly not become ‘superhuman’ in any sense, because there is nothing in the teacher LLM which corresponds to the Go game tree.
So, a viable self-play scheme for LLM needs to answer this question of where it’s getting data and/or compute from which can gradually improve itself. Self-play for LLM probably looks rather different than what you’re imagining from RLAIF, and more like a Bayesian or mathematical ‘game’.
Here’s a semi-concrete example of what I think a LLM self-play scheme needs to look like, since it’s unclear what ‘game a LLM plays’ if we are trying to borrow RL techniques. Perhaps something like Silver & Veness 2010, or maybe something like generating a large argument tree, with key unknowns highlighted, and then after lengthy computations exploring the implications of key claims and bringing in additional ‘facts’ as they become relevant, the most influential ✕ unknown premise X is kicked up to an oracle (human) for labeling and training on the resulting argument tree? (In a tree with arguments and confidences, it should be possible to find the node with the highest Value of Information, which is both uncertain and its possible values change the root the most on average.) Then you can see where it’s getting improvement from: it’s using a lot of computation to elicit its implicit knowledge that premise X affects a lot of other premises, targeting its learning on X, and finetuning on that, thereby becoming able to focus on a new argument tree which can build on X and all of the reasoning steps that were validated by the outcome for X. Thus, it covers both bases and can bootstrap itself.
This would be applicable to any specific domain you might want answers in, like math proofs or code problems, but you could also simply have the LLM run autonomously, posing itself random questions where it is uncertain about the answer even after a lot of self-play; and then you could, say, finetune it to predict which questions had a high uncertainty rating, and use that to continually keep asking itself new questions. So you would see a big bank of GPUs churning away, periodically asking the human raters very baffling, arbitrary-seeming, even absurd questions (‘Who would win in a fight, a box of nails or a bowl of jelly?’), but where your answer each time resolves a bunch of mysteries for the LLM and reduces its error rate on benchmarks, and where you can periodically finetune or retrain a much better LLM from scratch on the new improved (and highly proprietary?) dataset of text.
In other cases, like inner-monologue or self-distillation, the gain comes from amortizing compute: the model gains absolutely no additional data about the external world, it just gets to see what it already thinks at greater length, and retrain to shortcut to its best already-known answer.
This can only give a bounded amount of improvement, but nothing in particular says that the bounds have to be low in practical terms. For a concrete example, LLMs are currently pretty bad at noticing and self-correcting when they make a reasoning error, but they are capable of the following:
Given an example of a valid chain of reasoning, come up with a description of a mistake that might be made during that chain of reasoning
Given a valid chain of reasoning and a description of a reasoning error, generate a chain of reasoning that exhibits that reasoning error. This gives training examples of “chains of reasoning with errors in them”.
Given an invalid chain of reasoning, determine where the first error occurred.
Given an invalid chain of reasoning and the location of the first error, attempt to recover from that error
Given an invalid chain of reasoning and a recovery attempt, and also given the correct chain of reasoning, determine whether the recovery attempt succeeded.
Given all of the above, determine whether the scenario makes a good example of recovering from a reasoning error and should thus be included in the next training set.
I expect that this cycle would produce improved reasoning error recovery as long as recognizing a good output is easier than generating a good output. And I expect that would probably remain true for a while. Also I expect that something like this has already been done, especially since it rhymes with constitutional AI.
Obviously this doesn’t work “from scratch”, you need enough training for the model to be able to distinguish good outputs from bad outputs and also ever produce good outputs on its own. We’re not going to get a ChatGPT-Zero. But I think this post does gesture in the general direction of something real.
The gain from such approaches are real and part of why LLMs work so well now.
However, the problem is that the gains from self-distillation or finetuning always top out quickly thus far. You can’t train more than 2 or 3 iterations before it stops working. There is something missing compared to self-play successes like TD-Gammon or AlphaZero. There cannot be any ChatGPT-Zero as currently constituted, because you’d run a few iterations and then it’d either stop progressing or collapse in some way as the LLM centipede eats its own increasingly degenerate outputs. Pretty soon, you do stop recognizing ‘better’ outputs because you were just trained to generate only better outputs! (Where does any additional ‘betterness’ or ‘betterness recognition’ come from? ‘Sorry, y’all look the same to me.’) RLHF or self-distillation are more about specialization than they are about increasing capability: they increase the prior of pre-existing outputs, nothing less, nothing more.
The search for LLMs is not great. It’s analogous to doing runtime search in a Go/chess model: you get a big boost in Elo from searching even 1 or 2 ply (especially in avoiding blunders), but then you run into fast diminishing returns, and your search doesn’t feed back into the original model to improve it (outside training). But I think that, beyond some highly abstract niches like math theorem proving (which pose different challenges), the main missing part is the active selection of new data for LLMs, which is implicit in games where your ‘new data’ is just part of search (of the game tree).
Obviously this doesn’t work “from scratch”, you need enough training for the model to be able to distinguish good outputs from bad outputs and also ever produce good outputs on its own. We’re not going to get a ChatGPT-Zero. But I think this post does gesture in the general direction of something real.
While I do think the process you outlined in your post is more concrete and would probably work better and be easier than learning “from scratch”, I don’t think it’s completely obvious that something like this wouldn’t work from scratch. It was done for humans, albeit through billions of years of genetic evolution and thousands of years of cultural evolution. Something like ChatGPT-Zero would probably require many more orders of magnitude of compute than systems we are training today, and also some algorithmic/architectural improvements, but I don’t think it’s completely impossible.
I feel like your post is implying something similar, given the last sentence, so maybe I’m misinterpreting what exactly you’re saying won’t work.
The specific thing I think wouldn’t work is trying to start the process without a bunch of pretraining data for at least the initial judge (i.e. pure self play from a randomized initialization with no human-generated data or judgments enteringthetraining the training run at any point). Not super insightful I know, just addressing what I meant by “zero” in my hypothetical ChatGPT-Zero.
LLMs are shockingly good at gibberish, leading to macaronic attacks and other non-obvious implications, so I would not be surprised if an oversight LLM could. (Humans can probably also do this due to dark knowledge but it would be so painful & expensive as to be impractical, as you note.)
I was thinking of the gibberish level of text generated by uniformly sampling from the tokenizer. I had imagined there would be a huge difference between the gibberish level of macaronic attacks and completely random sampling from the tokenizer, but here are the first three examples I generated of 10 tokens uniformly sampled from GPT-2′s tokenizer:
″ doub arrestAPIogenous ts considersterm Hitler slip autom”
“AAF disposal catches smells interrogation Pilot muscular feminine ITV spree”
These are a lot more intelligible than I would have imagined. I can even reasonably rank these: 3 > 1 > 2.
I also asked ChatGPT-3.5 to rank these, and it ranked them: 3 > 2 > 1.
I used the prompt “Can you rank these three outputs by the coherence of the English language?”. The first time I asked, GPT refused to answer because all three are incoherent. I then told it to “Rank them in terms of how close they are to being coherent. They don’t have to be completely coherent to be ranked.” It then gave me the rankings above.
I repeated this twice more, changing the order of the examples in case it was making decisions based on the numbering. I used the prompt “Can you rank these three outputs by the coherence of the English language? They don’t have to be completely coherent to be ranked.” For both of these, GPT gave the ranking: 3 > 1 > 2 (numbers changed to match the ones I used in this post).
The most important question to ask about a bootstrap is: “where does improvement come from?” Are you applying compute to extract knowledge that the model already knows implicitly, in a Kolmogorov-complexity-esque sense of ‘knows’, or are you acquiring more data? And if so, who, where, and what?
Following from what @faul_sname mentioned in their post about improvement being possible “as long as recognizing a good output is easier than generating a good output”, I think that improvement is possible from amortizing compute in the form of search. If the teacher model can differentiate between coherent and incoherent paths down the search tree of language, I think a reward model could be trained to predict the coherence of student model outputs and this reward model could be used as the training signal. I am unsure about where the reward model would be initialized from… the teacher model, random initialization, or something else entirely.
I do agree with your point that this will most likely lead to the student model exploiting the teacher model rather than robustly learning language. The “branching factor” (i.e. vocabulary size) of GPT-2 is 50,000. I imagine that the number of ways the student could explore into an observation (token) history that successfully tricks the teacher model is many times more likely than the student stumbling into a robust understanding of language. There are probably ways to mitigate this, similar to precautions taken so RLHF models don’t stray too far from the base model.
As for acquiring more data, I think the teacher model could be used to produce “new” data. This is done for Whisper-V3, which was trained on 80% data produced by Whisper-V2. How the teacher LLM generates what it knows is modulated by the temperature. It is trained with a temperature of 1, so generating data with a different temperature (and maybe a less strict top-p) could be seen as generating data on a (slightly) different distribution. Training on this new data could lead to new generation patterns without learning any new facts or knowledge.
None of this would allow the student model to gain knowledge the teacher model does not have, but I think it could allow the student model to more easily access this knowledge. I view this as the model learning to compress the observation (token) history required to approximate some hidden state. A student model that can “reach” a hidden state in 64 tokens is more powerful than one that requires 256 tokens to “reach” the same hidden state.
something like generating a large argument tree, with key unknowns highlighted, and then after lengthy computations exploring the implications of key claims and bringing in additional ‘facts’ as they become relevant, the most influential ✕ unknown premise X is kicked up to an oracle (human) for labeling and training on the resulting argument tree?
This and the process @faul_sname outlined in their comment do seem like more concrete methods for eliciting knowledge from compute. Reasoning and math chains can be proven as correct or incorrect, in the same way that Go games can be won or lost, while language is much more subjective.
So you would see a big bank of GPUs churning away, periodically asking the human raters very baffling, arbitrary-seeming, even absurd questions (‘Who would win in a fight, a box of nails or a bowl of jelly?’), but where your answer each time resolves a bunch of mysteries for the LLM and reduces its error rate on benchmarks, and where you can periodically finetune or retrain a much better LLM from scratch on the new improved (and highly proprietary?) dataset of text.
Something like this is what I imagined initially for the student model’s search over random token space. If someone highly intelligent (e.g. Von Neumann) could rank every output from the model in terms of coherence, I imagine it would result in a model more competent than current LLMs (at least in whatever domains Von Neumann was competent in). Obviously this is impossible, but even getting enough humans of any intelligence level to provide feedback for this process would also be impossible. This is why I fell back to relying on AI feedback for the process. This paper shows that RLAIF performs on par or better than RLHF, although I imagine RLAIF is less robust and more vulnerable to exploitation, as you mentioned. And this result is highly dependent on the domain and which human is giving the feedback.
I’m not surprised BPEs are semi-coherent. As I said, dark knowledge, and anyway, BPEs are a compression algorithm (compression=intelligence) which were trained on a large English text corpus, so them not being random linenoise is no more surprising than n-grams or gzip being able to generate English-y text.
As for acquiring more data, I think the teacher model could be used to produce “new” data. This is done for Whisper-V3, which was trained on 80% data produced by Whisper-V2.
But Whisper-V2 is processing real data still, so it’s a mix of learning from data (the Whisper models haven’t extracted all possible knowledge from the first pass through the data) and amortizing compute (the training+runtime compute of the Whisper-V2 is being distilled into cleaner pseudo-data for Whisper-V3 to train faster on). You would not generate freeform gibberish, unanchored in any real audio or text, from Whisper-V3 to train V4 and then V5 and then V6 and then V7, and expect V7 to be wildly better.
I view this as the model learning to compress the observation (token) history required to approximate some hidden state. A student model that can “reach” a hidden state in 64 tokens is more powerful than one that requires 256 tokens to “reach” the same hidden state.
This knowledge distillation of inner-monologue can be, and has been, done directly, so detouring through a from-scratch RLAIF-ish approach would seem to offer a lot of complexity and downsides compared to just the obvious direct thing.
Reasoning and math chains can be proven as correct or incorrect, in the same way that Go games can be won or lost, while language is much more subjective.
It is also just that there is a world outside language, while there is much less of an outside for logic, math, or Go. That’s why it’s useful to take a broader Bayesian view, so you can have an argument tree which is statistical/decision-theoretic and can do things like request empirical data. The LLM could insert arbitrary hypotheticals into the tree like “if we administer drug Y to cancer patients with Z, survival rates would be +10%”, and this can be tested in the real world (or just given an expert’s best guess, doesn’t have to actually be real to keep the search & self-improvement going—note that it could also be framed in terms of raw data, MCTS and other tree approaches can be made to work on continuous/infinite observation & action spaces, as they are iterative anytime and don’t need to expand all possible nodes).
I’m not surprised BPEs are semi-coherent. As I said, dark knowledge, and anyway, BPEs are a compression algorithm (compression=intelligence) which were trained on a large English text corpus, so them not being random linenoise is no more surprising than n-grams or gzip being able to generate English-y text.
I had this intuition for n-grams (natively) and gzip (from this paper). Never really considered how much BPE compresses the token space, not sure why.
But Whisper-V2 is processing real data still, so it’s a mix of learning from data (the Whisper models haven’t extracted all possible knowledge from the first pass through the data) and amortizing compute (the training+runtime compute of the Whisper-V2 is being distilled into cleaner pseudo-data for Whisper-V3 to train faster on). You would not generate freeform gibberish, unanchored in any real audio or text, from Whisper-V3 to train V4 and then V5 and then V6 and then V7, and expect V7 to be wildly better.
This makes sense. This made me think whether there’d be some way to chain learning between modalities for a multimodal model, but it would probably fall into the same pit: beyond the initial data, the change in modality would still be producing and learning from synthetic data, not real data as is the case for Whisper.
This knowledge distillation of inner-monologue can be, and has been, done directly, so detouring through a from-scratch RLAIF-ish approach would seem to offer a lot of complexity and downsides compared to just the obvious direct thing.
I do agree that distilling inner monologue is easier than learning the same thing from scratch. I don’t think this RLAIF-from-scratch is the end-all-be-all of what’s gonna work; I find it a useful frame of thinking for considering other approaches that could work better for learning language more from scratch.
For example, this discussion with you popped the idea of using GANs into my head, which it turns out has been tried extensively. Not to the same scale as next token prediction though. DeepMind has this paper on using a GAN with LSTMs for the generator and discriminator to learn language “from scratch”. This survey paper presents other papers using GANs for text generation. Some highlights from quickly skimming through it: 1, 2, 3, 4.
This paper says (paraphrasing the abstract) that GANs are overkill for NLP since minimizing distinguishability (between generator and real outputs) can be seen as maximizing likelihood for NNs with a softmax output layer. I think that being able to define more complex loss functions with GANs is one benefit. You could use multiple discriminators: one for the pre-training data, one for a helpfulness data set, one for a harmlessness data set, etc.
Kind of as an aside, this paper connects GANs to inverse RL (e.g. learning a reward model from human feedback data), and to energy-based models (where Yann LeCun seems to think the future of self-supervised learning is going).
It is also just that there is a world outside language, while there is much less of an outside for logic, math, or Go.
Good point. Maybe what I’m thinking of will only become possible once language models are more grounded in the real world. Multi-modality is a step in that direction, and robotics. We’re probably at least a few years from robots collecting enough of their own data in the real world though.
Yeah, GANs for sequences are one of those ideas that people kept trying and it never worked. It wasn’t entirely clear why; I suspect that much of it was simply that due to the inefficiency of RL and the very very smolness of all the GAN sequence work back then*, that it was all dead on arrival. (I never really bought the “it’s just equivalent to likelihood” argument. GANs always seemed to operate in images in a very qualitatively distinct way from all likelihood-based approaches; and if you look at things abstractly enough, you can make anything equivalent to anything like that.) It’s possible that retrying today with proper scale might work, same way that image GANs now work at scale (despite being left for dead by contemporary researchers who had failed to note that BigGAN scaled just fine to JFT-300M).
But my real suspicion is that direct generative learning is too efficient, so the proper role for GANs would be as an additional phase of training, to sharpen a standard LLM.
AFAIK, this has not been done except inasmuch as you interpret the various preference-learning approaches as actor-critic RL (which means you can also further interpret them as GANs). Given how well diffusion models can be tuned by a simple adversarial loss into a GAN-like single-step Generator, I suspect that some adversarial training of LLMs might be quite useful. I should poke around in Arxiv and see if anyone’s tried that yet...
* LSTM RNNs, or heck, GPTs, wouldn’t look all that impressive if they were trained with similar compute/data as those sequence GAN papers were
LLMs are shockingly good at gibberish, leading to macaronic attacks and other non-obvious implications, so I would not be surprised if an oversight LLM could. (Humans can probably also do this due to dark knowledge but it would be so painful & expensive as to be impractical, as you note.)
However, I don’t think that really gives any kind of equivalent to AlphaZero. At best, you’d wind up exploiting the oversight LLM (like happens in RLHF if you let it optimize hard enough against the reward model). The most important question to ask about a bootstrap is: “where does improvement come from?” Are you applying compute to extract knowledge that the model already knows implicitly, in a Kolmogorov-complexity-esque sense of ‘knows’, or are you acquiring more data? And if so, who, where, and what?
AlphaZero gets improvement from doing planning/search over a perfect model, the simulator used by the tree search. MuZero gets improvement from doing that over a learned model. In the former case, the simulator is assumed to be bug-free and so represents the full game tree; and there is nothing to Go outside the full game tree, so one can become an arbitrarily good Go player, in theory, needing nothing beyond the simulator. In the latter case, you have a learned model, which may not have learned some critical Go rule, and so that’s not true, but if you allow it to periodically play actual groundtruth games and update the learned model based on any glitches, it may quickly become good enough that it is now like the former: the improvement comes from using compute to search more of the full game tree as implicit in the learned model/simulator. Each time it explores the game tree, it is acquiring ‘more data’. (You could imagine setting up a literal, in real life, Go board and filming it, to make concrete that this is ‘data’. However, since the Go game tree is an abstract mathematical object, you don’t need to—you just use compute to simulate it, either with hand-written code or a big RNN. In this special case, there is a highly convenient pun of compute=data.)
In other cases, like inner-monologue or self-distillation, the gain comes from amortizing compute: the model gains absolutely no additional data about the external world, it just gets to see what it already thinks at greater length, and retrain to shortcut to its best already-known answer.
So, if we try to train a LLM from scratch using just feedback from a pre-existing LLM, where would we get the improvement from (if we gained any)? We don’t gain any more data about the world that was not in the pre-existing LLM, so our improvement can’t be coming from new or better data; and it’s not obvious that this is doing anything for us computationally either: what slow lengthy outputs from the pre-existing LLM are we ‘distilling’ into the student LLM? It looks like the student LLM would just gradient-ascend its way to some extremely-specific gibberish attack on the teacher, learn next to nothing about the wide diversity of text the teacher LLM knows as it mode-collapses, and certainly not become ‘superhuman’ in any sense, because there is nothing in the teacher LLM which corresponds to the Go game tree.
So, a viable self-play scheme for LLM needs to answer this question of where it’s getting data and/or compute from which can gradually improve itself. Self-play for LLM probably looks rather different than what you’re imagining from RLAIF, and more like a Bayesian or mathematical ‘game’.
Here’s a semi-concrete example of what I think a LLM self-play scheme needs to look like, since it’s unclear what ‘game a LLM plays’ if we are trying to borrow RL techniques. Perhaps something like Silver & Veness 2010, or maybe something like generating a large argument tree, with key unknowns highlighted, and then after lengthy computations exploring the implications of key claims and bringing in additional ‘facts’ as they become relevant, the most influential ✕ unknown premise X is kicked up to an oracle (human) for labeling and training on the resulting argument tree? (In a tree with arguments and confidences, it should be possible to find the node with the highest Value of Information, which is both uncertain and its possible values change the root the most on average.) Then you can see where it’s getting improvement from: it’s using a lot of computation to elicit its implicit knowledge that premise X affects a lot of other premises, targeting its learning on X, and finetuning on that, thereby becoming able to focus on a new argument tree which can build on X and all of the reasoning steps that were validated by the outcome for X. Thus, it covers both bases and can bootstrap itself.
This would be applicable to any specific domain you might want answers in, like math proofs or code problems, but you could also simply have the LLM run autonomously, posing itself random questions where it is uncertain about the answer even after a lot of self-play; and then you could, say, finetune it to predict which questions had a high uncertainty rating, and use that to continually keep asking itself new questions. So you would see a big bank of GPUs churning away, periodically asking the human raters very baffling, arbitrary-seeming, even absurd questions (‘Who would win in a fight, a box of nails or a bowl of jelly?’), but where your answer each time resolves a bunch of mysteries for the LLM and reduces its error rate on benchmarks, and where you can periodically finetune or retrain a much better LLM from scratch on the new improved (and highly proprietary?) dataset of text.
This can only give a bounded amount of improvement, but nothing in particular says that the bounds have to be low in practical terms. For a concrete example, LLMs are currently pretty bad at noticing and self-correcting when they make a reasoning error, but they are capable of the following:
Given an example of a valid chain of reasoning, come up with a description of a mistake that might be made during that chain of reasoning
Given a valid chain of reasoning and a description of a reasoning error, generate a chain of reasoning that exhibits that reasoning error. This gives training examples of “chains of reasoning with errors in them”.
Given an invalid chain of reasoning, determine where the first error occurred.
Given an invalid chain of reasoning and the location of the first error, attempt to recover from that error
Given an invalid chain of reasoning and a recovery attempt, and also given the correct chain of reasoning, determine whether the recovery attempt succeeded.
Given all of the above, determine whether the scenario makes a good example of recovering from a reasoning error and should thus be included in the next training set.
I expect that this cycle would produce improved reasoning error recovery as long as recognizing a good output is easier than generating a good output. And I expect that would probably remain true for a while. Also I expect that something like this has already been done, especially since it rhymes with constitutional AI.
Obviously this doesn’t work “from scratch”, you need enough training for the model to be able to distinguish good outputs from bad outputs and also ever produce good outputs on its own. We’re not going to get a ChatGPT-Zero. But I think this post does gesture in the general direction of something real.
The gain from such approaches are real and part of why LLMs work so well now.
However, the problem is that the gains from self-distillation or finetuning always top out quickly thus far. You can’t train more than 2 or 3 iterations before it stops working. There is something missing compared to self-play successes like TD-Gammon or AlphaZero. There cannot be any ChatGPT-Zero as currently constituted, because you’d run a few iterations and then it’d either stop progressing or collapse in some way as the LLM centipede eats its own increasingly degenerate outputs. Pretty soon, you do stop recognizing ‘better’ outputs because you were just trained to generate only better outputs! (Where does any additional ‘betterness’ or ‘betterness recognition’ come from? ‘Sorry, y’all look the same to me.’) RLHF or self-distillation are more about specialization than they are about increasing capability: they increase the prior of pre-existing outputs, nothing less, nothing more.
The search for LLMs is not great. It’s analogous to doing runtime search in a Go/chess model: you get a big boost in Elo from searching even 1 or 2 ply (especially in avoiding blunders), but then you run into fast diminishing returns, and your search doesn’t feed back into the original model to improve it (outside training). But I think that, beyond some highly abstract niches like math theorem proving (which pose different challenges), the main missing part is the active selection of new data for LLMs, which is implicit in games where your ‘new data’ is just part of search (of the game tree).
While I do think the process you outlined in your post is more concrete and would probably work better and be easier than learning “from scratch”, I don’t think it’s completely obvious that something like this wouldn’t work from scratch. It was done for humans, albeit through billions of years of genetic evolution and thousands of years of cultural evolution. Something like ChatGPT-Zero would probably require many more orders of magnitude of compute than systems we are training today, and also some algorithmic/architectural improvements, but I don’t think it’s completely impossible.
I feel like your post is implying something similar, given the last sentence, so maybe I’m misinterpreting what exactly you’re saying won’t work.
The specific thing I think wouldn’t work is trying to start the process without a bunch of pretraining data for at least the initial judge (i.e. pure self play from a randomized initialization with no human-generated data or judgments enteringthetraining the training run at any point). Not super insightful I know, just addressing what I meant by “zero” in my hypothetical ChatGPT-Zero.
Thanks for clarifying! I do agree that that wouldn’t work, at least if we wanted what was produced to be in any way useful or meaningful to humans.
Thanks for the feedback!
I was thinking of the gibberish level of text generated by uniformly sampling from the tokenizer. I had imagined there would be a huge difference between the gibberish level of macaronic attacks and completely random sampling from the tokenizer, but here are the first three examples I generated of 10 tokens uniformly sampled from GPT-2′s tokenizer:
“ournament annually amused charismaling Superintendent sushi WiiRONMeat”
″ doub arrestAPIogenous ts considersterm Hitler slip autom”
“AAF disposal catches smells interrogation Pilot muscular feminine ITV spree”
These are a lot more intelligible than I would have imagined. I can even reasonably rank these: 3 > 1 > 2.
I also asked ChatGPT-3.5 to rank these, and it ranked them: 3 > 2 > 1.
I used the prompt “Can you rank these three outputs by the coherence of the English language?”. The first time I asked, GPT refused to answer because all three are incoherent. I then told it to “Rank them in terms of how close they are to being coherent. They don’t have to be completely coherent to be ranked.” It then gave me the rankings above.
I repeated this twice more, changing the order of the examples in case it was making decisions based on the numbering. I used the prompt “Can you rank these three outputs by the coherence of the English language? They don’t have to be completely coherent to be ranked.” For both of these, GPT gave the ranking: 3 > 1 > 2 (numbers changed to match the ones I used in this post).
Following from what @faul_sname mentioned in their post about improvement being possible “as long as recognizing a good output is easier than generating a good output”, I think that improvement is possible from amortizing compute in the form of search. If the teacher model can differentiate between coherent and incoherent paths down the search tree of language, I think a reward model could be trained to predict the coherence of student model outputs and this reward model could be used as the training signal. I am unsure about where the reward model would be initialized from… the teacher model, random initialization, or something else entirely.
I do agree with your point that this will most likely lead to the student model exploiting the teacher model rather than robustly learning language. The “branching factor” (i.e. vocabulary size) of GPT-2 is 50,000. I imagine that the number of ways the student could explore into an observation (token) history that successfully tricks the teacher model is many times more likely than the student stumbling into a robust understanding of language. There are probably ways to mitigate this, similar to precautions taken so RLHF models don’t stray too far from the base model.
As for acquiring more data, I think the teacher model could be used to produce “new” data. This is done for Whisper-V3, which was trained on 80% data produced by Whisper-V2. How the teacher LLM generates what it knows is modulated by the temperature. It is trained with a temperature of 1, so generating data with a different temperature (and maybe a less strict top-p) could be seen as generating data on a (slightly) different distribution. Training on this new data could lead to new generation patterns without learning any new facts or knowledge.
None of this would allow the student model to gain knowledge the teacher model does not have, but I think it could allow the student model to more easily access this knowledge. I view this as the model learning to compress the observation (token) history required to approximate some hidden state. A student model that can “reach” a hidden state in 64 tokens is more powerful than one that requires 256 tokens to “reach” the same hidden state.
Will take a look at this, thank you.
This and the process @faul_sname outlined in their comment do seem like more concrete methods for eliciting knowledge from compute. Reasoning and math chains can be proven as correct or incorrect, in the same way that Go games can be won or lost, while language is much more subjective.
Something like this is what I imagined initially for the student model’s search over random token space. If someone highly intelligent (e.g. Von Neumann) could rank every output from the model in terms of coherence, I imagine it would result in a model more competent than current LLMs (at least in whatever domains Von Neumann was competent in). Obviously this is impossible, but even getting enough humans of any intelligence level to provide feedback for this process would also be impossible. This is why I fell back to relying on AI feedback for the process. This paper shows that RLAIF performs on par or better than RLHF, although I imagine RLAIF is less robust and more vulnerable to exploitation, as you mentioned. And this result is highly dependent on the domain and which human is giving the feedback.
I’m not surprised BPEs are semi-coherent. As I said, dark knowledge, and anyway, BPEs are a compression algorithm (compression=intelligence) which were trained on a large English text corpus, so them not being random linenoise is no more surprising than n-grams or gzip being able to generate English-y text.
But Whisper-V2 is processing real data still, so it’s a mix of learning from data (the Whisper models haven’t extracted all possible knowledge from the first pass through the data) and amortizing compute (the training+runtime compute of the Whisper-V2 is being distilled into cleaner pseudo-data for Whisper-V3 to train faster on). You would not generate freeform gibberish, unanchored in any real audio or text, from Whisper-V3 to train V4 and then V5 and then V6 and then V7, and expect V7 to be wildly better.
This knowledge distillation of inner-monologue can be, and has been, done directly, so detouring through a from-scratch RLAIF-ish approach would seem to offer a lot of complexity and downsides compared to just the obvious direct thing.
It is also just that there is a world outside language, while there is much less of an outside for logic, math, or Go. That’s why it’s useful to take a broader Bayesian view, so you can have an argument tree which is statistical/decision-theoretic and can do things like request empirical data. The LLM could insert arbitrary hypotheticals into the tree like “if we administer drug Y to cancer patients with Z, survival rates would be +10%”, and this can be tested in the real world (or just given an expert’s best guess, doesn’t have to actually be real to keep the search & self-improvement going—note that it could also be framed in terms of raw data, MCTS and other tree approaches can be made to work on continuous/infinite observation & action spaces, as they are iterative anytime and don’t need to expand all possible nodes).
I had this intuition for n-grams (natively) and gzip (from this paper). Never really considered how much BPE compresses the token space, not sure why.
This makes sense. This made me think whether there’d be some way to chain learning between modalities for a multimodal model, but it would probably fall into the same pit: beyond the initial data, the change in modality would still be producing and learning from synthetic data, not real data as is the case for Whisper.
I do agree that distilling inner monologue is easier than learning the same thing from scratch. I don’t think this RLAIF-from-scratch is the end-all-be-all of what’s gonna work; I find it a useful frame of thinking for considering other approaches that could work better for learning language more from scratch.
For example, this discussion with you popped the idea of using GANs into my head, which it turns out has been tried extensively. Not to the same scale as next token prediction though. DeepMind has this paper on using a GAN with LSTMs for the generator and discriminator to learn language “from scratch”. This survey paper presents other papers using GANs for text generation. Some highlights from quickly skimming through it: 1, 2, 3, 4.
This paper says (paraphrasing the abstract) that GANs are overkill for NLP since minimizing distinguishability (between generator and real outputs) can be seen as maximizing likelihood for NNs with a softmax output layer. I think that being able to define more complex loss functions with GANs is one benefit. You could use multiple discriminators: one for the pre-training data, one for a helpfulness data set, one for a harmlessness data set, etc.
Kind of as an aside, this paper connects GANs to inverse RL (e.g. learning a reward model from human feedback data), and to energy-based models (where Yann LeCun seems to think the future of self-supervised learning is going).
Good point. Maybe what I’m thinking of will only become possible once language models are more grounded in the real world. Multi-modality is a step in that direction, and robotics. We’re probably at least a few years from robots collecting enough of their own data in the real world though.
Yeah, GANs for sequences are one of those ideas that people kept trying and it never worked. It wasn’t entirely clear why; I suspect that much of it was simply that due to the inefficiency of RL and the very very smolness of all the GAN sequence work back then*, that it was all dead on arrival. (I never really bought the “it’s just equivalent to likelihood” argument. GANs always seemed to operate in images in a very qualitatively distinct way from all likelihood-based approaches; and if you look at things abstractly enough, you can make anything equivalent to anything like that.) It’s possible that retrying today with proper scale might work, same way that image GANs now work at scale (despite being left for dead by contemporary researchers who had failed to note that BigGAN scaled just fine to JFT-300M).
But my real suspicion is that direct generative learning is too efficient, so the proper role for GANs would be as an additional phase of training, to sharpen a standard LLM.
AFAIK, this has not been done except inasmuch as you interpret the various preference-learning approaches as actor-critic RL (which means you can also further interpret them as GANs). Given how well diffusion models can be tuned by a simple adversarial loss into a GAN-like single-step Generator, I suspect that some adversarial training of LLMs might be quite useful. I should poke around in Arxiv and see if anyone’s tried that yet...
* LSTM RNNs, or heck, GPTs, wouldn’t look all that impressive if they were trained with similar compute/data as those sequence GAN papers were