Symbolic Knowledge Distillation: from General Language Models to Commonsense Models (Explained)
deep learning machine learning arxiv explained neural networks ai artificial intelligence paper gpt-3 knowledge distillation teacher student nlp natural language processing gpt3 prompt engineering symbolic knowledge symbolic reasoning symbolic nlp knowledge graphs triples what does gpt-3 know does gpt-3 understand
#gpt3 #knowledge #symbolic

Symbolic knowledge models are usually trained on human-generated corpora that are cumbersome and expensive to create. Such corpora consist of structured triples of symbolic knowledge. This paper takes a different approach and attempts to generate such a corpus by prompting GPT-3. Results show that clever prompting, combined with targeted small critic models trained on human ratings can outperform both human-generated data, as well as the teacher model (GPT-3) itself. The results of this paper give a general recipe for automatically building corpora for various NLP tasks by extracting samples from large language models.

OUTLINE:
0:00 - Intro & Overview
2:30 - Sponsor: Weights & Biases
4:15 - Commonsense Knowledge Graphs
7:50 - ATOMIC dataset
10:00 - Generating the corpus from a model
13:00 - Prompting GPT-3
15:30 - Generating Events
18:40 - Generating Inferences
23:00 - Evaluating the created dataset
26:45 - Introducing the critic
31:25 - Using the critic to filter the data
36:30 - Training a student on the generated data
41:00 - Key Findings
44:45 - Comments & Conclusion

Paper: https://arxiv.org/abs/2110.07178
Code & Corpus: https://github.com/peterwestai2/symbolic-knowledge-distillation

Sponsor: Weights & Biases
https://wandb.com
https://community.wandb.ai/

Abstract:
The common practice for training commonsense models has gone from-human-to-corpus-to-machine: humans author commonsense knowledge graphs in order to train commonsense models. In this work, we investigate an alternative, from-machine-to-corpus-to-machine: general language models author these commonsense knowledge graphs to train commonsense models. Our study leads to a new framework, Symbolic Knowledge Distillation. As with prior art in Knowledge Distillation (Hinton et al., 2015), our approach uses larger models to teach smaller models. A key difference is that we distill knowledge symbolically-as text-in addition to the neural model. We also distill only one aspect-the commonsense of a general language model teacher, allowing the student to be a different type, a commonsense model. Altogether, we show that careful prompt engineering and a separately trained critic model allow us to selectively distill high-quality causal commonsense from GPT-3, a general language model. Empirical results demonstrate that, for the first time, a human-authored commonsense knowledge graph is surpassed by our automatically distilled variant in all three criteria: quantity, quality, and diversity. In addition, it results in a neural commonsense model that surpasses the teacher model's commonsense capabilities despite its 100x smaller size. We apply this to the ATOMIC resource, and share our new symbolic knowledge graph and commonsense models.

Authors: Peter West, Chandra Bhagavatula, Jack Hessel, Jena D. Hwang, Liwei Jiang, Ronan Le Bras, Ximing Lu, Sean Welleck, Yejin Choi


Links:
TabNine Code Completion (Referral): http://bit.ly/tabnine-yannick
YouTube: https://www.youtube.com/c/yannickilcher
Twitter: https://twitter.com/ykilcher
Discord: https://discord.gg/4H8xxDF
BitChute: https://www.bitchute.com/channel/yannic-kilcher
Minds: https://www.minds.com/ykilcher
Parler: https://parler.com/profile/YannicKilcher
LinkedIn: https://www.linkedin.com/in/ykilcher
BiliBili: https://space.bilibili.com/1824646584

If you want to support me, the best thing to do is to share out the content :)

If you want to support me financially (completely optional and voluntary, but a lot of people have asked for this):
SubscribeStar: https://www.subscribestar.com/yannickilcher
Patreon: https://www.patreon.com/yannickilcher
Bitcoin (BTC): bc1q49lsw3q325tr58ygf8sudx2dqfguclvngvy2cq
Ethereum (ETH): 0x7ad3513E3B8f66799f507Aa7874b1B0eBC7F85e2
Litecoin (LTC): LQW2TRyKYetVC8WjFkhpPhtpbDM4Vw7r9m
Monero (XMR): 4ACL8AGrEo5hAir8A9CeVrW8pEauWvnp1WnSDZxW7tziCDLhZAGsgzhRQABDnFy8yuM9fWJDviJPHKRjV4FWt19CJZN9D4n
 Hi there. Today we'll look at symbolic knowledge distillation from general language models to common-sense models by Peter West and others of the University of Washington and the Allen Institute for Artificial Intelligence. On a high level this paper takes a new approach to symbolic knowledge generation, so to automatically coming up with knowledge graphs, with symbolic knowledge graphs, and rather than trying to mine this symbolic knowledge automatically from raw text or from existing knowledge bases, they mine it from GPT-3. So they use the GPT-3 large language model in order to first come up with a corpus that gives them a corpus of symbolic knowledge and then they use that corpus in order to train a model that they call a common-sense model, but essentially a knowledge graph completion model. So this is a new paradigm where you go what they say from machine to corpus to machine and it is there the paradigm they advertise here in contrast to what people did before the from human to corpus to machine, which is where humans generate a corpus and then you train the machine on that corpus. So we're gonna look into how they do it. It's pretty surprising what they find in that for example the distilled model, the models they come up with at the end, they tend to be better not only than the humans or the human fed models, they even tend to be better than the original teacher, the GPT-3 teacher, and this is a result of how they combine the different elements here of the system and they strategically bring in outside help in the form of human knowledge. So this could be a recipe for much more broad applications, not only knowledge graph generation but various natural language tasks. They combine cleverly prompting, training small models and as I said bringing in small amounts of human annotated data strategically. So as I said we'll go through it, we'll look at the different stages and yeah tell me what you think in the comments, subscribe if you haven't and let's dive in. But first a quick word from our sponsor Weights and Biases, your one-stop-shop. If you're a machine learning researcher, practitioner, a hobbyist, a power user, it does not matter. Weights and Biases is with you from the inception of your idea, tracking your experiments, to really getting the fine details right, optimizing your hyper parameters up until you deploy your model and track all of your metrics. Not only does it do that, it also organizes your data sets, your models and you can generate super cool reports from all of that. In addition to that, it lets you have great insight into what you research and what you produce and all of this runs in the cloud really effortless with a single line of code. Though today I want to talk to you about a yet not so well known feature of Weights and Biases and that is the Weights and Biases community. So I believe they recently migrated this from like a giant slack onto this new sleek community website. It's a discourse based forum essentially where you can get help not only for Weights and Biases stuff but also machine learning in general. But not only is it a help page, it's a discussion forum about all things machine learning. Also they organize regular events, book reading groups and paper discussions and so on. So if you're interested don't hesitate and hop over to the introduce yourself thread and take part in the discussion. As I said this is still a pretty young place but it's bound to grow over the near future. And of course if you want any advice on Weights and Biases, how to use it, what are the best practices are, this is the best place to do so. Thanks again to Weights and Biases for sponsoring this video. It's an awesome system, I invite you to check it out and back to the video. So what's the deal with knowledge? I can't read this without pronouncing knowledge as knowledge. So what you want to do is you want to have symbolic knowledge. And in this particular case the symbolic knowledge they're after is what they they always have to have what they call an event and a relation. So an event, relation, an event they give some examples but essentially the event is some kind of situation that a person finds themselves in. It's common sense reasoning. So it's not like Napoleon was born in France or something like that. I don't even know if that's true but it's not that it's common sense reasoning. So the event is a person finds themselves in some sort of situation or two people. It can be one or two people. Then the relation is some sort of, well it's probably better we make an example. The relation is some sort of this. For example this is the situation right here. X starts running. The relation is, these are predefined relations and we deal with seven different relations right here. The seven relations are chosen because they represent sort of causal knowledge. One of them is effect which means what is the effect of this event or what is one possible effect of this event. And the goal of the model is to come up with this thing down here. So you prompt the model by saying X starts running. We have the effect relation so the model is supposed to come up with the effect of starting to run. Now there is not only one correct example. There are many correct examples right here but one example is X gets in shape. This is not a direct logical, you can't prove it mathematically right or you can't check it and that's why it's called common sense reasoning. A human would look at this says X starts running. Is the effect of that that X might get in shape? Yes probably. So that is a valid triple. Let's look at another one. Let's maybe take one with two people in it. No there is none with two people right here. Let's see X is not well liked. That is the event. The relation that we give to the model right here is the react relation which means how does X react to that event. So X feels lonely and that as well kind of makes sense. If you as a human judge this you apply your common sense makes sense. So I hope the task is clear. Given an event and a relation where the event can be anything like anything involving X or X and Y which are one or two people and any piece of text. This is any piece of text right here and the relation they are seven different predefined relations. You have to give the result right here the inference and the inference again can be any text. So this is quite a challenging task. Humans have come up with a data set for this task. I don't know where they describe it right here. They have come up with a data set called atomic 2020. So the atomic data set is a data set that where humans go and humans make these triples right. It's a data set made by humans as you would make data sets. This takes a lot of work, costs a lot of money and we would like to have methods for not having to do that necessarily. So either to cut out the humans all together or to use the human labor more strategically such that it doesn't cost as much. And they also the the model that's trained on this human corpus is called common sorry comet 2020. That is if we simply feed the human corpus to a deep learning model have it learn to predict the inference from the event in relation that model is called comet 2020 and that's going to be our baseline and obviously we're going to surpass that. So the result of this paper is going to be a another corpus called atomic 10x which is 10 times the size of the human atomic data set which is going to be better or larger and with appropriate filtering also better in quality than the original corpus which is surprising right. And then also the comet distill model which is the model that's trained on the atomic 10x data set and that is going to be as well depending on the filtering largely better than the original comet 2020 model that's trained on human data. So that's the goal that we we get there we get to a model that is better than it had we trained on human data and along we get a corpus that we that is better than the human corpus. So again the original the original paradigm was humans go humans think with their brains like here from the brain comes a corpus right so I invent a bunch of corpus entries right maybe I'm many like many I let many humans do this I come up with a corpus manually then I feed that corpus to the model through the machine so there is a neural network right here I trained the neural network on that machine neural network thinks yeah cool the new paradigm is the following I take a big giant neural network such as GPT 3 that is not necessarily trained on this task right I'm gonna make GPT 3 have one more layer than the other network to symbolize its absolute bigness so GPT 3 is trained on the whole world wide is this a globe this is a globe GPT 3 is trained on the whole world wide web or at least readable part of it and I'm gonna use GPT 3 in order to come up with the corpus okay so I'm gonna use GPT 3 to come up with this corpus and then optionally optionally I'm going to filter that corpus with a model that I train on human data so this is where the human component can come in right here now we're gonna see how this happens but the obvious the obvious effect of this is that the human no longer needs to come up with examples the human simply has to rate examples in order for the filtering mechanism to get better which is much easier and much cheaper and we don't need as much I guess maybe we do but it's it's essentially it's much cheaper for the human to rate than to come up with stuff so we use GPT 3 to come up with a corpus and then we use that corpus to train our model so we're gonna use the power of these large language models to come up with corpus and of course the magic is going to be how are we going to do this and the answer is clever prompting so there's a bunch of math right here about knowledge distillation I'm not sure I guess they just had to put this in to get accepted because you need like a bunch of math and yada yada yada but essentially it's irrelevant so yeah sorry if if you disagree authors but yeah this is it's essentially irrelevant so the key findings of the paper so you ain't we're gonna skip this because we get this at the end so what do we mean by clever prompting we want to come up with a corpus the corpus should have events the corpus should have inference relations the relations of course we know the corpus should have inferences so they have this general template for prompting GPT 3 they start off with a task prompt where you briefly describe the task inside the prompt and then they have a bunch of examples so the input the output the input the output the input the output and then they have another input and this is the input they're actually interested in and they're gonna let GPT 3 complete the output right here now given that they have the task description right here and they have this pattern of repeating inputs and outputs you can get GPT 3 to continue the pattern and actually give you what you want right here we've seen this a number of times right here this is called prompting or prompt engineering and I predicted this right away when GPT 3 came out that prompt engineering would sort of be like a quite an important thing to do in the future so importantly we don't train GPT 3 we simply query GPT 3 in a very structured way in order for us to create a data set essentially I think that's even against the terms of service of GPT 3 but they must have gotten an exception here this paper is also cool because it finds a number of interesting things in prompting now some of you might have been aware of this others not but there are interesting effects for example you want to number these things right here you want to label them with actual numbers such as that they say this increases the degree to which GPT 3 follows previous examples and also when they construct examples for example like this X goes jogging they also say if they replace X and Y and so on by common names it also works better so you really want to I think it's it's still a bit of an art form to see exactly how you have to phrase the things you put into GPT 3 such that you get out something good so the first task they're gonna do is they gonna create these events ultimately we want to create the data set but the first step is we create the events so they go to the atomic data set this human generated data set and what they do is they simply sample so they collect a set of 100 high quality events from atomic 2020 to use in our prompt note that yes they do make use of the human corpus right here which is a little bit unfair when you think of comparing to that but given that it is a hundred examples that is something you could still easily come up with even even as a researcher right or you could you could pay a bunch of humans 100 examples isn't that much so we go and we collect a hundred and then we simply every time we go to GPT 3 we randomly sample 10 we put the 10 inside of the prompt right we simply list the 10 events for example X overcomes evil with good X does not learn from Y and so on we simply list that and then we put 11 and we let GPT 3 continue the prompt right here and that here is going to give us an a next event I guess we could even let it continue more but there are these issues like repeating and so on so I'm not exactly sure how well that would go but in any case you can generate essentially infinity events because even if you even if you put the exact 10 same events in the exact same order right since you sample you sample with with nuclear sampling it doesn't give you the same results therefore you can generate a lot of events in fact they generate 165,000 unique events which is as you can see quite a bit more than the human authored corpus which only has 6.2 thousand events and all you needed as a base is 100 of these events right 100 were enough in order to create 165,000 that is the power of these large language models you can essentially count on them already having built in all of this sort of language modeling all of this well you might call it knowledge or you might simply call it data that they have absorbed but you can query that in a particular way and the way we create here it gives us new events alright so this is the way pretty simple that we create new events now from these events we want to create these triples right the triples are going to actually make up the data set so for a triple remember we need an we need an event we need a relation and then we need an inference so the events we now have check the relations there are just seven of them they're always the same in this data set so we have them as well so now we can simply pair take an event from the data we created pair it with a relation and then we have to come up with an inference and again we're going to use clever prompting and GPT-3 so what the authors do is that for each relation they come up with a they come up with a textual representation of that relation so the by the way the the relations are described right here there is X adder how X is perceived after an event how X reacts in response to an event what effect does it have on X what was X's intent in event and so on so these are the kinds of relations that we're dealing with right here they give an example here for the need relation which is here what X needed for the event to happen and their textual representation is as follows so I'm going to put the event with an event number right here according to what they said at the beginning it helps when you number the individual entries then they're gonna write prerequisites for this to happen comma and then the actual inference goes here right until here so they're going to repeat this this is one if they're going to repeat it two three and so on again they're going to put ten samples into the prompt with the inference filled out and then for the eleventh one they're simply going to put the event right here and the prompt that they have already used and then they're gonna let GPT-3 fill in the rest right here and that thing is going to be the GPT-3 provided inference so they say as in 3.2 we sample ten few-shot examples for each prompt from a set of 100 human authored cases for each pair of event and relation we generate ten inferences with the second largest form following the same hyperparameters as event generation now they don't use the largest form of GPT-3 because it would cost them too much money so they use the second largest one but you do the same thing you you generate just very very very few human authored cases so that's 100 100 human authored cases and I don't know if that is 100 per relation or just 100 in total I don't know I'm gonna guess maybe per relations I don't know it doesn't say just says we replace anonymous names with generic names as this improves quality however it doesn't matter if it's a hundred or or 700 it's still very very few compared to having humans come up with an entire corpus so what you want to do is you simply want to give GPT-3 a little bit of input like ten different things of input and these ten things you may vary a little bit over time you might not even have to and let's not forget the task description up here that also seems to be important and then they come up with 165,000 times 7 inferences which you can filter a little bit but in the end this results in 6.46 million atomic date atomic style data triples they call it atomic 10 X as it contains an order of magnitude more triples than the atomic 2020 with respect to the seven relations they investigate so this is a giant corpus right now of machine generated of machine generated data I'm trying to find table one where they compare the size right here okay so here you can see just the the comparison of what that cost you can see the total count in atomic 2020 is 600,000 triples and atomic 10 X has 10 times more triples yet cost only a fraction of what atomic 2020 cost now the question is of course is this data set any good you know this here at least has been generated by humans you know humans aren't perfect but at least they have some common sense therefore for a common-sense data set it might be important does the atomic 10 X data set is it any good and that's what they go about investigating right now so they evaluate degenerated common-sense knowledge graph so they evaluate now these triples first of all they look for diversity so they have a few diversity related metrics such as like hard diversity or this what they call blue soft uniqueness where they check for overlap between the triples and look how many of them are unique they also look they also try to train a GPT-2 model and look at the entropy of the different data sets and in general they find that the machine generated data is quite diverse as quite high entropy there's not much of a problem right there it's also quite unique it is not as unique it seems as the human generated data but given that you have so much more of it the absolute number of unique things is way way higher the real kicker comes when you do actual human evaluation so they have spent a lot of time into humanly evaluating the quality of whatever they produce the humans have been asked to rate these triples into for example always often so when you see an event a relation and an inference you as a human have to say does this inference always or often come from the event and relation is it sometimes is it likely if you said one of the two it would be accepted the triplet would be counted as good if you if you as a human say ah that's kind of far-fetched or that never happens or is invalid then you would you would reject the triple if you look at this then you can see right here in the human authored data set the humans accepted 68% of the triples and rejected 11% whereas this top row right here is the unfiltered data set we got from GPT-3 with the prompting and you can see that the accept probability is slightly lower actually quite a bit lower like 8% lower and humans also reject more often and even sometimes not available means that you can't make any any judgment on it so the number is it's way larger right but it's a bit lowering quality as assessed by humans as it seems so now they gear up they say okay can we make this better and their answer is yes by introducing a critic so making the teacher model more critical where they go about the following they have this formula right here maybe that math isn't as useless after all so if you simply generate language you simply have GPT-3 be a model a probabilistic sequence model a language model that simply says what is the probability of the next token and I'm going to sample by that probability but now what you can do is you can introduce a critic so if this is your language model can introduce a critic and the critic also will have an opinion on how likely a particular sequence is so now you consider both you can you generate data with GPT-3 and then you let a critic evaluate that data which essentially amounts to multiplying the two probabilities but in practice you would simply run the critic on the data and then the critic decides is this data good data or bad data and that together GPT-3 and the critic they you hope that they will produce a better data set than just GPT-3 alone because now the critic is able to filter whatever GPT-3 says and only let the good data pass note that I think it's maybe the critic is probably capped at one or something like this so this is a filtering mechanism it's not like you can you can introduce new bad data so we would expect that the filtered corpus is is hopefully better the question is how much better is it ok so now we introduce this critic and the critic is now is where we strategically bring in human data the critic would remove unacceptable knowledge in practice this means filtering the generations in the large corpus and creating a range of new corporate that are higher quality yet still larger scale than the human the human authored one so for this they gather a training set of correct versus incorrect humans who human judgments on a randomly sampled set of 10k entries of atomic 10x so they take their large corpus they take 10,000 entries of it and they let humans rate those 10,000 entries much like they did here for the evaluation but this now counts as this now goes as training data for the critic and that's where I said we strategically bring in human knowledge and not only do we strategically bring it in rather than letting letting humans generate the entire corpus we also make it easier for humans because this isn't coming up with examples coming up with examples is hard it takes time these humans here they simply need to read examples of the corpus these 10,000 examples and for each one they have to rate it and this can even be noisy so other than in the evaluation where I think they gather three labels per data set they say we only gather one annotation for each example so this can be noisy since its training data and yeah that seems to be quite a quite a good way of thinking about human labor in machine learning it's sort of where can we bring it in to make the biggest difference now when they do that yeah so they argue this here it's vastly cheaper than human construction instead we argue that a more useful and efficient role for humans in knowledge graph construction is to correct the mistakes of the teacher by evaluating a small number of examples so they train a Roberta large model on the human annotated data as the critic the critic of course doesn't have to be a language model it doesn't have to generate anything it simply has to look at the data and decide is it good or is it not good so they train that and and and yeah now we go back to the table right here these here as we go down the table more and more filtering is applied by the critic so now you have a choice as a designer right you have this critic model it tells you about how good a particular sample is and now you get to the side the cutoff you know how much do I want to filter this data right here now this will have a trade-off the more you filter the smaller the resulting data set is going to get so we can look at a few examples for the first step you go from 5.6 million as for sorry from 6.5 to 5.1 which is a reduction in somewhere between somewhere on the order of 20% of data so you throw away 20% of data look at that the accept percentage jumps from 78% to 88% so now human raters human raters rate these triples in the corpus that you generate and then filter as more likely a more acceptable than the corpus that was authored by humans like this is this is astounding already right now there might be a little bit of an effect here in that probably the humans that rated were the same humans or at least you know humans from the same population or distribution then the humans that rated the training data for the critic and therefore all of these humans might sort of have the same taste whereas the humans that came up with the atomic 2020 data set might be different humans I'm not sure but it is astounding and even more astounding as you filter more you can clearly see the accept percentage therefore the quality of the data set going up and to the point where you keep about 40% of the data that you've generated from GPT-3 yet the accept percentage is like 96% which is 10% higher 10 percentage points higher than the accept percentage of the human generated data right this is quite this is quite astounding and still you have like four to five times more data than the human created corpus and they do some they do some they do some evaluation also again on the diversity of the data and actually turns out that as you go as you filter more the diversity increases so that would be the relative diversity meaning sort of how how many percent of the data are you know different from other how are unique and so on so it appears to be that GPT-3 when it just creates data it will create a lot of good stuff but also some garbage and as it turns out the garbage seems to be always the same kind of garbage therefore if you filter out the garbage also the uniqueness and diversity of your overall data set increases so it's quite the opposite of you know you always hear this no I guess I guess it's that the saying that all was it was it all unhealthy families are the same or all healthy ones I don't know but in this case all the garbage GPT-3 produces is kind of the same kind of garbage or the same few types of garbage whereas all the good stuff it produces is relatively unique alright so now we have a really yeah this is what gets filtered out right here so first of all logical misalignment consists of events or inferences joined in a logically inconsistent manner that makes sense that that gets filtered out X cannot find his shirt as a result X is wearing a shirt that should probably not be in there and two awkward phrasings which consists of events or inferences that in isolation are incoherent ambiguous or awkwardly phrased so when an event itself is already poorly phrased the model essentially has no chance of generating good inference like person X has a fire in the bath yeah so there there is just there's a high chance that a human would would negatively rate this or not accept it or say it not available even like from the get-go doesn't even matter what the relation and the inference is right so the last step is the last step is we want to go back to a model so we have taken GPT-3 a model we have used it strategically to come up with a corpus that is both better in quality more diverse and larger than the corpus that humans have generated and now we want to go back to creating a model from that corpus so when a train an inference model because right now we can only generate data but we would like to have an inference model and remember the original task the inference is to given an event and a relation to produce and to produce either produce an inference right which you could do with GPT-3 but it's it's sort of not super good so you have to filter with the critic but that means you have to like sample until the critic says it's okay what you'd rather have is you just like to have a model that is trained on this data to produce directly the inference rather than having to prompt GPT-3 right so the model can be way smaller than GPT-3 because it's directly trained on the task and you don't have to pay open AI every time you call it so now I want to go back to a model and that's pretty easy right we simply take a the same architecture as this comet model remember the comet model is the model that's trained on this human data to do this inference simply take same architecture and we train it on the large corpus and you know what what turns out so on it turns out that we do that and then we let again humans rate the triples that the models produce so for the comet 2020 this is the model that's trained on the human corpus this here you can again see the accept percentage by the raters of of the corpus itself when we train the model on it to do this inference for us the model produces triples that get accepted 81% of the time which is pretty good right so if the corpus gets accepted this much we train a model on it an NLP model it's pretty good to drop only a little bit in the accept percentage that means the model has essentially learned because this is obviously on a on a validation set the model has obviously learned to do this inference somewhat correctly now if we do the same on our large corpus that has lower accept percentage we see the same effect so the model kind of learns in fact overall we see the same effects if we now add a critic with a low threshold then we surpass already this model and we if we add a critic with the high threshold so that would correspond to throwing away 60% of the data as we saw before then the model that we end up with has an 87.5% accept rating so now we have a model that's the same size as this comet 2020 right it is an a trained model it's not GPT-3 it's not prompting it's a trained model that does inference in these triples and it is better it is better than the model the same model that's been trained on the human corpus which is pretty cool right so you even you it not only does it surpass GPT-3 itself it also surpasses the human generated data and yeah that's pretty cool so this was essentially the the findings of this paper I guess we can go back to conclude with what they said at the beginning the key findings right here learning symbolic knowledge from language models can be framed as a symbolic extension to knowledge distillation okay so that's the that's the mathy part symbolic knowledge distillation constructs a high quality knowledge graph at scale okay that's their data generation process a critical teacher results in a higher quality student now granted the critical teacher makes the quality of the data set better and therefore any model the student that is trained on that data set it will become better a notable ingredient right here is that here is where we actually bring in the human the human annotated data into this process of automated knowledge graph generation because we need to train that critic critical teachers or not a student can outperform the knowledge source so this is about that the student model they exceed the quality of GPT-3 which so if you simply prompt GPT-3 you get some of these triples right yet the student models that are trained on these triples that come from GPT-3 outperform GPT-3 which can make sense since GPT-3 is a general purpose language model and these student models are specifically trained on that particular kind of data and also I have to say the student models they are their GPT-2 so in the student model what you would do is you have your corpus you have event relation inference event relation inference where these are your samples this is this is all text essentially right so the relation you can abstract that in a either a single token or you can make it into a text as they did so they feed that into a GPT-2 which is something that you can train and that GPT-2 is trained to take in an event and a relation into the context and then generate the inference much like GPT-3 but now you actually train it specifically on this particular data structure and data set and the GPT-2 you pre train it of course on language modeling and it could be that some of the effect that the students model exceed the quality of GPT-3 might be due to the fact that it starts out already from a GPT-2 checkpoint it's it's a possib like there's a possibility that that also plays into the game right here machines can now win over humans for automatic knowledge graph construction so that is a little bit it's a little bit is a little bit shady since the critics you train are still using humans but I would agree that at least the paper shows that there are better places to use human knowledge than letting humans come up with a text corpus because these text corpora can be generated pretty easily using large language models and proper prompting and if you do that then you can use the human knowledge to filter whatever the language models output and that might be much more effective so this was it for this paper I hope to not only show this paper but show give you a little bit of an idea of what all is possible with these language models and proper prompt engineering and I think this serves as a little bit of a recipe for many or a lot of things to come a lot of NLP tasks to be done could be tackled in this particular way alright so yeah let me know what you think in the comments and bye bye
 Hi there. Today we'll look at symbolic knowledge distillation from general
 language models to common-sense models by Peter West and others of the University
 of Washington and the Allen Institute for Artificial Intelligence. On a high
 level this paper takes a new approach to symbolic knowledge generation, so to
 automatically coming up with knowledge graphs, with symbolic knowledge graphs,
 and rather than trying to mine this symbolic knowledge automatically from
 raw text or from existing knowledge bases, they mine it from GPT-3. So they
 use the GPT-3 large language model in order to first come up with a corpus
 that gives them a corpus of symbolic knowledge and then they use that corpus
 in order to train a model that they call a common-sense model, but essentially a
 knowledge graph completion model. So this is a new paradigm where you go what they
 say from machine to corpus to machine and it is there the paradigm they
 advertise here in contrast to what people did before the from human to
 corpus to machine, which is where humans generate a corpus and then you train the
 machine on that corpus. So we're gonna look into how they do it. It's pretty
 surprising what they find in that for example the distilled model, the models
 they come up with at the end, they tend to be better not only than the humans or
 the human fed models, they even tend to be better than the original teacher, the
 GPT-3 teacher, and this is a result of how they combine the different elements
 here of the system and they strategically bring in outside
 help in the form of human knowledge. So this could be a recipe for much more
 broad applications, not only knowledge graph generation but various
 natural language tasks. They combine cleverly prompting, training small
 models and as I said bringing in small amounts of human annotated data
 strategically. So as I said we'll go through it, we'll look at the different
 stages and yeah tell me what you think in the comments, subscribe if you haven't
 and let's dive in. But first a quick word from our sponsor Weights and Biases,
 your one-stop-shop. If you're a machine learning researcher, practitioner, a
 hobbyist, a power user, it does not matter. Weights and Biases is with you from the
 inception of your idea, tracking your experiments, to really getting the fine
 details right, optimizing your hyper parameters up until you deploy your
 model and track all of your metrics. Not only does it do that, it also organizes
 your data sets, your models and you can generate super cool reports from all of
 that. In addition to that, it lets you have great insight into what you
 research and what you produce and all of this runs in the cloud really effortless
 with a single line of code. Though today I want to talk to you about a yet not so
 well known feature of Weights and Biases and that is the Weights and Biases
 community. So I believe they recently migrated this from like a giant slack
 onto this new sleek community website. It's a discourse based forum essentially
 where you can get help not only for Weights and Biases stuff but also machine
 learning in general. But not only is it a help page, it's a discussion forum about
 all things machine learning. Also they organize regular events, book reading
 groups and paper discussions and so on. So if you're interested don't hesitate
 and hop over to the introduce yourself thread and take part in the discussion.
 As I said this is still a pretty young place but it's bound to grow over the
 near future. And of course if you want any advice on Weights and Biases, how to
 use it, what are the best practices are, this is the best place to do so. Thanks
 again to Weights and Biases for sponsoring this video. It's an awesome system, I
 invite you to check it out and back to the video.
 So what's the deal with knowledge? I can't read this without
 pronouncing knowledge as knowledge. So what you want to do is you want to have
 symbolic knowledge. And in this particular case the symbolic knowledge
 they're after is what they they always have to have what they call an event and
 a relation. So an event, relation, an event they give some examples but
 essentially the event is some kind of situation that a person finds themselves
 in. It's common sense reasoning. So it's not like Napoleon was born in France or
 something like that. I don't even know if that's true but it's not that it's
 common sense reasoning. So the event is a person finds themselves in some sort of
 situation or two people. It can be one or two people. Then the relation is some
 sort of, well it's probably better we make an example. The relation is some
 sort of this. For example this is the situation right here. X starts running.
 The relation is, these are predefined relations and we deal with seven
 different relations right here. The seven relations are chosen because they
 represent sort of causal knowledge. One of them is effect which means what
 is the effect of this event or what is one possible effect of this event. And
 the goal of the model is to come up with this thing down here. So you prompt the
 model by saying X starts running. We have the effect relation so the model is
 supposed to come up with the effect of starting to run. Now there is not only
 one correct example. There are many correct examples right here but one
 example is X gets in shape. This is not a direct logical, you can't prove it
 mathematically right or you can't check it and that's why it's called common
 sense reasoning. A human would look at this says X starts running. Is the
 effect of that that X might get in shape? Yes probably. So that is a valid triple.
 Let's look at another one. Let's maybe take one with two people in it. No there
 is none with two people right here. Let's see X is not well liked. That is the
 event. The relation that we give to the model right here is the react relation
 which means how does X react to that event. So X feels lonely and that as
 well kind of makes sense. If you as a human judge this you apply your
 common sense makes sense. So I hope the task is clear. Given an event and a
 relation where the event can be anything like anything involving X or X and Y
 which are one or two people and any piece of text. This is any piece of
 text right here and the relation they are seven different
 predefined relations. You have to give the result right here the inference and
 the inference again can be any text. So this is quite a challenging task.
 Humans have come up with a data set for this task. I don't know where they
 describe it right here. They have come up with a data set called atomic 2020. So
 the atomic data set is a data set that where humans go and humans make these
 triples right. It's a data set made by humans as you would make data sets. This
 takes a lot of work, costs a lot of money and we would like to have methods for
 not having to do that necessarily. So either to cut out the humans all
 together or to use the human labor more strategically such that it doesn't cost
 as much. And they also the the model that's trained on this human corpus is
 called common sorry comet 2020. That is if we simply feed the human corpus to a
 deep learning model have it learn to predict the inference from the event in
 relation that model is called comet 2020 and that's going to be our baseline and
 obviously we're going to surpass that. So the result of this paper is going to be
 a another corpus called atomic 10x which is 10 times the size of the human atomic
 data set which is going to be better or larger and with appropriate filtering
 also better in quality than the original corpus which is surprising right. And then
 also the comet distill model which is the model that's trained on the atomic
 10x data set and that is going to be as well depending on the filtering largely
 better than the original comet 2020 model that's trained on human data. So
 that's the goal that we we get there we get to a model that is better than it
 had we trained on human data and along we get a corpus that we that is better
 than the human corpus. So again the original the original paradigm was
 humans go humans think with their brains like here from the brain comes a corpus
 right so I invent a bunch of corpus entries right maybe I'm many like many I
 let many humans do this I come up with a corpus manually then I feed that corpus
 to the model through the machine so there is a neural network right here I
 trained the neural network on that machine neural network thinks yeah cool
 the new paradigm is the following I take a big giant neural network such as GPT
 3 that is not necessarily trained on this task right I'm gonna make GPT 3
 have one more layer than the other network to symbolize its absolute
 bigness so GPT 3 is trained on the whole world wide is this a globe this is a
 globe GPT 3 is trained on the whole world wide web or at least readable part
 of it and I'm gonna use GPT 3 in order to come up with the corpus okay so I'm
 gonna use GPT 3 to come up with this corpus and then optionally optionally
 I'm going to filter that corpus with a model that I train on human data so this
 is where the human component can come in right here now we're gonna see how this
 happens but the obvious the obvious effect of this is that the human no
 longer needs to come up with examples the human simply has to rate examples in
 order for the filtering mechanism to get better which is much easier and much
 cheaper and we don't need as much I guess maybe we do but it's it's
 essentially it's much cheaper for the human to rate than to come up with stuff
 so we use GPT 3 to come up with a corpus and then we use that corpus to train our
 model so we're gonna use the power of these large language models to come up
 with corpus and of course the magic is going to be how are we going to do this
 and the answer is clever prompting so there's a bunch of math right here about
 knowledge distillation I'm not sure I guess they just had to put this in to
 get accepted because you need like a bunch of math and yada yada yada but
 essentially it's irrelevant so yeah sorry if if you disagree authors but
 yeah this is it's essentially irrelevant so the key findings of the paper
 so you ain't we're gonna skip this because we get this at the end so what
 do we mean by clever prompting we want to come up with a corpus the corpus
 should have events the corpus should have inference relations the relations of
 course we know the corpus should have inferences so they have this general
 template for prompting GPT 3 they start off with a task prompt where you briefly
 describe the task inside the prompt and then they have a bunch of examples so
 the input the output the input the output the input the output and then
 they have another input and this is the input they're actually interested in and
 they're gonna let GPT 3 complete the output right here now given that they
 have the task description right here and they have this pattern of repeating
 inputs and outputs you can get GPT 3 to continue the pattern and actually give
 you what you want right here we've seen this a number of times right here this
 is called prompting or prompt engineering and I predicted this right
 away when GPT 3 came out that prompt engineering would sort of be like a
 quite an important thing to do in the future so importantly we don't train GPT
 3 we simply query GPT 3 in a very structured way in order for us to create
 a data set essentially I think that's even against the terms of service of GPT
 3 but they must have gotten an exception here this paper is also cool because it
 finds a number of interesting things in prompting now some of you might have
 been aware of this others not but there are interesting effects for example you
 want to number these things right here you want to label them with actual
 numbers such as that they say this increases the degree to which GPT 3
 follows previous examples and also when they construct examples for example like
 this X goes jogging they also say if they replace X and Y and so on by common
 names it also works better so you really want to I think it's it's still a bit of
 an art form to see exactly how you have to phrase the things you put into GPT 3
 such that you get out something good so the first task they're gonna do is they
 gonna create these events ultimately we want to create the data set but the
 first step is we create the events so they go to the atomic data set this
 human generated data set and what they do is they simply sample so they collect
 a set of 100 high quality events from atomic 2020 to use in our prompt note
 that yes they do make use of the human corpus right here which is a little bit
 unfair when you think of comparing to that but given that it is a hundred
 examples that is something you could still easily come up with even even as a
 researcher right or you could you could pay a bunch of humans 100 examples isn't
 that much so we go and we collect a hundred and then we simply every time we
 go to GPT 3 we randomly sample 10 we put the 10 inside of the prompt right we
 simply list the 10 events for example X overcomes evil with good X does not
 learn from Y and so on we simply list that and then we put 11 and we let GPT 3
 continue the prompt right here and that here is going to give us an a next event
 I guess we could even let it continue more but there are these issues like
 repeating and so on so I'm not exactly sure how well that would go but in any
 case you can generate essentially infinity events because even if you even
 if you put the exact 10 same events in the exact same order right since you
 sample you sample with with nuclear sampling it doesn't give you the same
 results therefore you can generate a lot of events in fact they generate 165,000
 unique events which is as you can see quite a bit more than the human authored
 corpus which only has 6.2 thousand events and all you needed as a base is
 100 of these events right 100 were enough in order to create 165,000 that
 is the power of these large language models you can essentially count on them
 already having built in all of this sort of language modeling all of this well
 you might call it knowledge or you might simply call it data that they have
 absorbed but you can query that in a particular way and the way we create
 here it gives us new events alright so this is the way pretty simple that we
 create new events now from these events we want to create these triples right
 the triples are going to actually make up the data set so for a triple remember
 we need an we need an event we need a relation and then we need an inference
 so the events we now have check the relations there are just seven of them
 they're always the same in this data set so we have them as well so now we can
 simply pair take an event from the data we created pair it with a relation and
 then we have to come up with an inference and again we're going to use
 clever prompting and GPT-3 so what the authors do is that for each relation
 they come up with a they come up with a textual representation of that relation
 so the by the way the the relations are described right here there is X adder
 how X is perceived after an event how X reacts in response to an event what
 effect does it have on X what was X's intent in event and so on so these are
 the kinds of relations that we're dealing with right here they give an
 example here for the need relation which is here what X needed for the event to
 happen and their textual representation is as follows so I'm going to put the
 event with an event number right here according to what they said at the
 beginning it helps when you number the individual entries then they're gonna
 write prerequisites for this to happen comma and then the actual inference goes
 here right until here so they're going to repeat this this is one if they're
 going to repeat it two three and so on again they're going to put ten samples
 into the prompt with the inference filled out and then for the eleventh one
 they're simply going to put the event right here and the prompt that they
 have already used and then they're gonna let GPT-3 fill in the rest right here and
 that thing is going to be the GPT-3 provided inference so they say as in 3.2
 we sample ten few-shot examples for each prompt from a set of 100 human authored
 cases for each pair of event and relation we generate ten inferences with
 the second largest form following the same hyperparameters as event generation
 now they don't use the largest form of GPT-3 because it would cost them too
 much money so they use the second largest one but you do the same thing you you
 generate just very very very few human authored cases so that's 100 100 human
 authored cases and I don't know if that is 100 per relation or just 100 in total
 I don't know I'm gonna guess maybe per relations I don't know it doesn't say
 just says we replace anonymous names with generic names as this improves
 quality however it doesn't matter if it's a hundred or or 700 it's still very
 very few compared to having humans come up with an entire corpus so what you
 want to do is you simply want to give GPT-3 a little bit of input like ten
 different things of input and these ten things you may vary a little bit over
 time you might not even have to and let's not forget the task description up
 here that also seems to be important and then they come up with 165,000 times 7
 inferences which you can filter a little bit but in the end this results in 6.46
 million atomic date atomic style data triples they call it atomic 10 X as it
 contains an order of magnitude more triples than the atomic 2020 with
 respect to the seven relations they investigate so this is a giant corpus
 right now of machine generated of machine generated data I'm trying to
 find table one where they compare the size right here okay so here you can see
 just the the comparison of what that cost you can see the total count in
 atomic 2020 is 600,000 triples and atomic 10 X has 10 times more triples yet
 cost only a fraction of what atomic 2020 cost now the question is of course is
 this data set any good you know this here at least has been generated by
 humans you know humans aren't perfect but at least they have some common sense
 therefore for a common-sense data set it might be important does the atomic 10 X
 data set is it any good and that's what they go about investigating right now so
 they evaluate degenerated common-sense knowledge graph so they evaluate now
 these triples first of all they look for diversity so they have a few diversity
 related metrics such as like hard diversity or this what they call blue
 soft uniqueness where they check for overlap between the triples and look how
 many of them are unique they also look they also try to train a GPT-2 model and
 look at the entropy of the different data sets and in general they find that
 the machine generated data is quite diverse as quite high entropy there's
 not much of a problem right there it's also quite unique it is not as unique it
 seems as the human generated data but given that you have so much more of it
 the absolute number of unique things is way way higher the real kicker comes
 when you do actual human evaluation so they have spent a lot of time into
 humanly evaluating the quality of whatever they produce the humans have
 been asked to rate these triples into for example always often so when you see
 an event a relation and an inference you as a human have to say does this
 inference always or often come from the event and relation is it sometimes
 is it likely if you said one of the two it would be accepted the triplet would
 be counted as good if you if you as a human say ah that's kind of far-fetched
 or that never happens or is invalid then you would you would reject the triple if
 you look at this then you can see right here in the human authored data set the
 humans accepted 68% of the triples and rejected 11% whereas this top row right
 here is the unfiltered data set we got from GPT-3 with the prompting and you can
 see that the accept probability is slightly lower actually quite a bit
 lower like 8% lower and humans also reject more often and even sometimes not
 available means that you can't make any any judgment on it so the number is it's
 way larger right but it's a bit lowering quality as assessed by humans as it
 seems so now they gear up they say okay can we make this better and their answer
 is yes by introducing a critic so making the teacher model more critical where
 they go about the following they have this formula right here maybe that math
 isn't as useless after all so if you simply generate language you simply have
 GPT-3 be a model a probabilistic sequence model a language model that
 simply says what is the probability of the next token and I'm going to sample
 by that probability but now what you can do is you can introduce a critic so if
 this is your language model can introduce a critic and the critic also
 will have an opinion on how likely a particular sequence is so now you
 consider both you can you generate data with GPT-3 and then you let a critic
 evaluate that data which essentially amounts to multiplying the two
 probabilities but in practice you would simply run the critic on the data and
 then the critic decides is this data good data or bad data and that together
 GPT-3 and the critic they you hope that they will produce a better data set than
 just GPT-3 alone because now the critic is able to filter whatever GPT-3 says
 and only let the good data pass note that I think it's maybe the critic is
 probably capped at one or something like this so this is a filtering mechanism
 it's not like you can you can introduce new bad data so we would expect that the
 filtered corpus is is hopefully better the question is how much better is it
 ok so now we introduce this critic and the critic is now is where we
 strategically bring in human data the critic would remove unacceptable
 knowledge in practice this means filtering the generations in the large
 corpus and creating a range of new corporate that are higher quality yet
 still larger scale than the human the human authored one so for this they
 gather a training set of correct versus incorrect humans who human judgments on
 a randomly sampled set of 10k entries of atomic 10x so they take their large
 corpus they take 10,000 entries of it and they let humans rate those 10,000
 entries much like they did here for the evaluation but this now counts as this
 now goes as training data for the critic and that's where I said we
 strategically bring in human knowledge and not only do we strategically bring
 it in rather than letting letting humans generate the entire corpus we also make
 it easier for humans because this isn't coming up with examples coming up with
 examples is hard it takes time these humans here they simply need to read
 examples of the corpus these 10,000 examples and for each one they have to
 rate it and this can even be noisy so other than in the evaluation where I
 think they gather three labels per data set they say we only gather one
 annotation for each example so this can be noisy since its training data and
 yeah that seems to be quite a quite a good way of thinking about human labor
 in machine learning it's sort of where can we bring it in to make the biggest
 difference now when they do that yeah so they argue this here it's vastly cheaper
 than human construction instead we argue that a more useful and efficient role
 for humans in knowledge graph construction is to correct the mistakes
 of the teacher by evaluating a small number of examples so they train a
 Roberta large model on the human annotated data as the critic the critic
 of course doesn't have to be a language model it doesn't have to generate
 anything it simply has to look at the data and decide is it good or is it not
 good so they train that and and and yeah now we go back to the table right here
 these here as we go down the table more and more filtering is applied by the
 critic so now you have a choice as a designer right you have this critic
 model it tells you about how good a particular sample is and now you get to
 the side the cutoff you know how much do I want to filter this data right here
 now this will have a trade-off the more you filter the smaller the resulting
 data set is going to get so we can look at a few examples for the first step you
 go from 5.6 million as for sorry from 6.5 to 5.1 which is a reduction in
 somewhere between somewhere on the order of 20% of data so you throw away 20% of
 data look at that the accept percentage jumps from 78% to 88% so now human
 raters human raters rate these triples in the corpus that you generate and then
 filter as more likely a more acceptable than the corpus that was authored by
 humans like this is this is astounding already right now there might be a
 little bit of an effect here in that probably the humans that rated were the
 same humans or at least you know humans from the same population or distribution
 then the humans that rated the training data for the critic and therefore all of
 these humans might sort of have the same taste whereas the humans that came up
 with the atomic 2020 data set might be different humans I'm not sure but it is
 astounding and even more astounding as you filter more you can clearly see the
 accept percentage therefore the quality of the data set going up and to the
 point where you keep about 40% of the data that you've generated from GPT-3 yet
 the accept percentage is like 96% which is 10% higher 10 percentage points
 higher than the accept percentage of the human generated data right this is quite
 this is quite astounding and still you have like four to five times more data
 than the human created corpus and they do some they do some they do some
 evaluation also again on the diversity of the data and actually turns out that
 as you go as you filter more the diversity increases so that would be the
 relative diversity meaning sort of how how many percent of the data are you
 know different from other how are unique and so on so it appears to be that GPT-3
 when it just creates data it will create a lot of good stuff but also some
 garbage and as it turns out the garbage seems to be always the same kind of
 garbage therefore if you filter out the garbage also the uniqueness and
 diversity of your overall data set increases so it's quite the opposite of
 you know you always hear this no I guess I guess it's that the saying that all
 was it was it all unhealthy families are the same or all healthy ones I don't
 know but in this case all the garbage GPT-3 produces is kind of the same kind
 of garbage or the same few types of garbage whereas all the good stuff it
 produces is relatively unique alright so now we have a really yeah this is what
 gets filtered out right here so first of all logical misalignment consists of
 events or inferences joined in a logically inconsistent manner that makes
 sense that that gets filtered out X cannot find his shirt as a result X is
 wearing a shirt that should probably not be in there and two awkward phrasings
 which consists of events or inferences that in isolation are incoherent
 ambiguous or awkwardly phrased so when an event itself is already poorly
 phrased the model essentially has no chance of generating good inference
 like person X has a fire in the bath yeah so there there is just there's a
 high chance that a human would would negatively rate this or not accept it or
 say it not available even like from the get-go doesn't even matter what the
 relation and the inference is right so the last step is the last step is we
 want to go back to a model so we have taken GPT-3 a model we have used it
 strategically to come up with a corpus that is both better in quality more
 diverse and larger than the corpus that humans have generated and now we want to
 go back to creating a model from that corpus so when a train an inference
 model because right now we can only generate data but we would like to have
 an inference model and remember the original task the inference is to given
 an event and a relation to produce and to produce either produce an inference
 right which you could do with GPT-3 but it's it's sort of not super good so you
 have to filter with the critic but that means you have to like sample until the
 critic says it's okay what you'd rather have is you just like to have a model
 that is trained on this data to produce directly the inference rather than
 having to prompt GPT-3 right so the model can be way smaller than GPT-3
 because it's directly trained on the task and you don't have to pay open AI
 every time you call it so now I want to go back to a model and that's pretty
 easy right we simply take a the same architecture as this comet model
 remember the comet model is the model that's trained on this human data to do
 this inference simply take same architecture and we train it on the
 large corpus and you know what what turns out so on it turns out that we do
 that and then we let again humans rate the triples that the models produce so
 for the comet 2020 this is the model that's trained on the human corpus this
 here you can again see the accept percentage by the raters of of the
 corpus itself when we train the model on it to do this inference for us the
 model produces triples that get accepted 81% of the time which is pretty good
 right so if the corpus gets accepted this much we train a model on it an NLP
 model it's pretty good to drop only a little bit in the accept percentage that
 means the model has essentially learned because this is obviously on a on a
 validation set the model has obviously learned to do this inference somewhat
 correctly now if we do the same on our large corpus that has lower accept
 percentage we see the same effect so the model kind of learns in fact overall we
 see the same effects if we now add a critic with a low threshold then we
 surpass already this model and we if we add a critic with the high threshold so
 that would correspond to throwing away 60% of the data as we saw before then
 the model that we end up with has an 87.5% accept rating so now we have a
 model that's the same size as this comet 2020 right it is an a trained model
 it's not GPT-3 it's not prompting it's a trained model that does inference in
 these triples and it is better it is better than the model the same model
 that's been trained on the human corpus which is pretty cool right so you even
 you it not only does it surpass GPT-3 itself it also surpasses the human
 generated data and yeah that's pretty cool so this was essentially the the
 findings of this paper I guess we can go back to conclude with what they said at
 the beginning the key findings right here learning symbolic knowledge from
 language models can be framed as a symbolic extension to knowledge
 distillation okay so that's the that's the mathy part symbolic knowledge
 distillation constructs a high quality knowledge graph at scale okay that's
 their data generation process a critical teacher results in a higher quality
 student now granted the critical teacher makes the quality of the data set better
 and therefore any model the student that is trained on that data set it will
 become better a notable ingredient right here is that here is where we actually
 bring in the human the human annotated data into this process of automated
 knowledge graph generation because we need to train that critic critical
 teachers or not a student can outperform the knowledge source so this is about
 that the student model they exceed the quality of GPT-3 which so if you simply
 prompt GPT-3 you get some of these triples right yet the student models
 that are trained on these triples that come from GPT-3 outperform GPT-3 which
 can make sense since GPT-3 is a general purpose language model and these student
 models are specifically trained on that particular kind of data and also I have
 to say the student models they are their GPT-2 so in the student model what you
 would do is you have your corpus you have event relation inference event
 relation inference where these are your samples this is this is all text
 essentially right so the relation you can abstract that in a either a single
 token or you can make it into a text as they did so they feed that into a GPT-2
 which is something that you can train and that GPT-2 is trained to take in an
 event and a relation into the context and then generate the inference much
 like GPT-3 but now you actually train it specifically on this particular data
 structure and data set and the GPT-2 you pre train it of course on language
 modeling and it could be that some of the effect that the students model
 exceed the quality of GPT-3 might be due to the fact that it starts out already
 from a GPT-2 checkpoint it's it's a possib like there's a possibility that
 that also plays into the game right here machines can now win over humans for
 automatic knowledge graph construction so that is a little bit it's a little bit
 is a little bit shady since the critics you train are still using humans but I
 would agree that at least the paper shows that there are better places to
 use human knowledge than letting humans come up with a text corpus because these
 text corpora can be generated pretty easily using large language models and
 proper prompting and if you do that then you can use the human knowledge to
 filter whatever the language models output and that might be much more
 effective so this was it for this paper I hope to not only show this paper but
 show give you a little bit of an idea of what all is possible with these language
 models and proper prompt engineering and I think this serves as a little bit of a
 recipe for many or a lot of things to come a lot of NLP tasks to be done could
 be tackled in this particular way alright so yeah let me know what you
 think in the comments and bye bye