iTranslated by AI
Understanding GPT-3
This article is intended for understanding GPT-3. GPT-3 is the successor to GPT-2 and is an ultra-large-scale model with more than 100 times the parameters of GPT-2. ChatGPT was announced on November 30, 2022, and GPT-3 is the background behind its development.
Key Points of GPT-3
- Capable of executing various tasks simply by providing instructions in natural language
- Performance comparable to SOTA (State-of-the-Art) on multiple tasks in zero-shot, one-shot, and few-shot settings
- Performance is likely to improve further if the number of parameters is increased
- Capable of generating news articles indistinguishable from those written by humans
Background
By performing fine-tuning using pre-trained language models utilizing Transformers, it has become possible to perform various language tasks without preparing task-specific architectures. Please refer to this article for more information on Transformers.
On the other hand, there were problems such as the need for task-specific datasets and fine-tuning, a lack of practicality and stability in the models, and the fact that the learning methods for humans and language tasks differ.
Practicality and Stability
The need for task-specific datasets means that data must be prepared for each task. In most cases, thousands to tens of thousands of data points are required per task, which is not realistic. Furthermore, from the perspective of stability, if the model has high expressivity and the training data distribution is "narrow," there is a possibility that the model may exploit spurious correlations in the training data.
Human and Language Task Learning Methods Differ
Generally speaking, when humans learn a language task, they can understand and execute it if given a few examples. For instance, if asked:
"Please tell me whether this sentence expresses joy or sadness,"
a human can understand and respond. They can also perform various tasks one after another according to questions.
In GPT-2, the authors attempted to overcome these problems with a method they called in-context learning. In-context learning is a method of specifying tasks through text input to a pre-trained language model. However, the results were far worse compared to fine-tuning. Please refer to this article for more on GPT-2.
Furthermore, GPT-2 was still underperforming on the WebText dataset, and further performance improvements were expected by increasing the number of parameters. Therefore, GPT-3 was developed with more than 100 times the parameters [1].
Architecture
The architecture is basically the same as GPT-2, but it differs in that it uses sparse attention for the attention mechanism [2]. Please refer to this article for more on Sparse Attention.
Performance
In [1], zero-shot, one-shot, and few-shot learning were verified across various tasks. Let's look at the results after confirming each setting (figure below).

From [1] Figure 2.1
Zero-shot is a method that does not allow any examples and only provides natural language instructions to the model (top left in the figure above); one-shot is a method that allows a single example (middle left); few-shot is a method that allows as many examples as can fit in the model's context window (bottom left).
The authors state that the number of examples used for few-shot is about 10 to 100 (which fits roughly into the model's context size (
On the other hand, it seems difficult for few-shot results to beat SOTA (State-of-the-Art) models that have been fine-tuned. Now, let's look at the results.
Language Modeling

[1] From Table 3.2
In LAMBADA, both acc (accuracy) and ppl (perplexity) achieve SOTA results. Although the language model is not told what kind of task LAMBADA is, more accurate reasoning becomes possible by providing a few examples. For some reason, performance is lower in one-shot than in zero-shot, but it is considered that this is likely because multiple examples are needed to recognize the pattern.
In HellaSwag and StoryCloze, both fall below SOTA. HellaSwag produced better results than the 75.4% of the 1.5B parameter model (equivalent to GPT-2), but did not reach the results of the SOTA model (ALUM [5]). In StoryCloze, while it did not reach the SOTA [6] fine-tuned with a BERT-based model, it was reported that the results improved by about 10% over previous zero-shot results.
Closed Book Question Answering

[1] From Table 3.3
In TriviaQA, performance exceeding the closed-book fine-tuned model is achieved at the zero-shot stage. In few-shot, it reaches SOTA. WebQS shows poor performance in zero-shot, but in few-shot, it achieves decent performance compared to SOTA. This suggests that WebQS is a task outside the distribution for GPT-3 (implying it cannot be solved without examples). In NaturalQS, it does not reach SOTA at all. However, it can also be seen that performance increases through zero-shot, one-shot, and few-shot. It is noted that this may indicate the limits of the pre-training distribution.
Translation

[1] From Table 3.4. Training data is 93% English and 7% others.
In the few-shot setting, SOTA was achieved in three languages for translation into English. Performance is exceptionally poor in En-Ro, which is speculated to be caused by using the GPT-2 BPE tokenizer designed for English learning. For more on BPE, please see the GPT-2 article.
Winograd-Style Tasks

From [1] Table 3.5
The Winograd Schemas Challenge is a task to identify which word a pronoun refers to. In both the Winograd dataset and the Winogrande (XL) dataset, it does not reach the fine-tuned SOTA. However, for Winograd, the performance is approaching SOTA. It can also be seen that in Winogrande, the performance improves as the number of examples increases.
Common Sense Reasoning

From [1] Table 3.6
PhysicalQA (PIQA) is a task that asks questions about general physical common sense, and it achieves SOTA at the zero-shot stage (human scores are more than 10% higher). ARC is a dataset of multiple-choice questions collected from 3rd to 9th-grade science tests. Both ARC and OpenBookQA fall well short of SOTA.
Reading Comprehension

From [1] Table 3.7
This is a task to evaluate the model's reading comprehension. It includes both dialogue-based and single-question formats, covering abstract answer formats, multiple-choice formats, and span-based answer formats. The significant variation in GPT-3's performance in the table above suggests that performance differs depending on the answer format.
SuperGLUE

From [1] Table 3.8
SuperGLUE is a natural language processing task. Given a passage and a question, there are many tasks such as answering yes/no or choosing the correct answer from options (each task corresponds to each column in the table above). Please refer to the original paper for task details.
Similar to Reading Comprehension, performance varies by task, but it outperforms a fine-tuned BERT-Large model in 4 out of 8 tasks, with 2 more tasks approaching SOTA performance.
NLI

[1] From Figure 3.9
Natural Language Inference (NLI) is a task that evaluates the understanding of the relationship between two sentences. It is typically a two-class or three-class classification problem, classifying whether the second sentence is entailed by the first sentence, or if it is neutral. As seen in the figure, only the few-shot setting of the 175B parameter model clearly exceeds random performance (though the expression "clearly" may not be entirely accurate). While signs of progress were visible, it is noted that NLI remains a difficult task even for GPT-3.
Synthetic and Qualitative Tasks
These are new tasks introduced with GPT-3. To verify the capabilities of GPT-3, the following are evaluated:
- Arithmetic
- Word Scrambling and Manipulation Tasks
- SAT Analogies (Solving SAT-style analogies with a few examples)
- Learning and Using Novel Words (Using new words in context)
- Correcting English grammar
- News Article Generation
Arithmetic

[1] From Figure 3.10
Accuracy increases as the number of digits decreases. For 2-digit addition, the accuracy is 100%, and for subtraction, it is 98.9%. Although accuracy drops for larger numbers of digits, it is suggested that generalizability is indicated.
Word Scrambling and Manipulation Tasks

[1] From Table 3.10. Values represent accuracy.
The tasks corresponding to each column in the table above are as follows:
- Cycle letter in word (CL): A task to restore words that have had their letters cycled. For example, given "lyinevitab," the model should output "inevitably."
- Anagrams of all but first and last characters (A1): A task to restore words where all but the first and last characters have been randomly shuffled. For example, given "criroptuon," it should output "corruption."
- Anagrams of all but first and last 2 characters (A2): A task to restore words where all but the first and last two characters have been randomly shuffled. For example, given "opepnnt," it should output "opponent."
- Random insertion in word (RI): A task to restore the original word after random punctuation or spaces have been inserted between each letter. For example, given "s.u!c/c!e.s s i/o/n," it should output "succession."
- Reversed words (RW): A task to restore words that have been spelled in reverse. For example, given "stcejbo," it should output "objects."
A common finding in the results above is that the model can hardly answer correctly in the zero-shot setting, and performance is significantly poor even in one-shot. This suggests that these tasks rarely appear in the pre-training data, making it appear as though the model is learning the tasks at test time (though this has not been precisely verified).
SAT Analogies

[1] From Figure 3.12
The 175B parameter model (GPT-3) achieved up to 65.2% in few-shot, 59.1% in one-shot, and 53.7% in zero-shot. For reference, the average score for college applicants is reported to be 57%.
News Article Generation

[1] From Table 3.11
GPT-3 was used to generate news articles, and humans were asked to distinguish them from real articles for evaluation. Looking at the Mean accuracy, for the 175B GPT-3, it dropped to 52%, indicating that humans could no longer accurately judge whether an article was real or not.
Learning and Using Novel Words
The model is given a definition of a non-existent word and instructed to use it in a sentence. While I am not entirely sure myself, the results are reported to be plausible. Below is a specific example:

[1] From Figure 3.16
Correcting English Grammar
This is an English grammar correction task. Results were output in few-shot and one-shot settings. Below is a specific example:

[1] From Figure 3.17
The authors note that they used the expressions "Poor English" and "Good English" while keeping in mind that the interpretation of "Poor" and "Good" can be complex. For example:
Poor English input: Mary arranged for, in St. Louis, John to rent a house cheap.
Good English output: Mary arranged for John to rent a house in St. Louis.
In this case, the meaning has changed.
Summary
I have summarized the results by omitting a fair amount, but the GPT-3 paper itself is only about halfway through at this point. Even if it doesn't reach SOTA, you can see that it can perform tasks with reasonable performance in a few-shot setting. Also, while I intentionally omitted examples to keep the article from becoming too long, there are many cases where model performance improves as the number of parameters increases. This suggests that performance might still improve if the model were made even larger (setting aside whether training such a large model is realistically feasible).
Personally, I found it more shocking that it can generate articles indistinguishable from real ones than whether it reaches SOTA or not.
That's all for now. I plan to read the remaining parts and the detailed conditions of the tasks more carefully once I start handling natural language professionally.
References
- Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., … Amodei, D. (2020). Language Models are Few-Shot Learners. arXiv. https://doi.org/10.48550/arxiv.2005.14165
- Child, R., Gray, S., Radford, A. & Sutskever, I. (2019). Generating Long Sequences with Sparse Transformers. arXiv. https://doi.org/10.48550/arxiv.1904.10509
Discussion