CHAPTER 11/2017–2022

The Start of the Fourth Boom

AI that writes and draws (2017–2022)

From a 2017 translation paper, generative AI (AI that produces text, pictures, sound and more) grew step by step, and in 2022 it arrived in a form anyone could use. The boom did not start all of a sudden. Let's run the famous mechanisms from that period one by one and check them for ourselves.

012017 · The Transformer

Which words to look at, and how much

How does a machine turn the relationships between words in a sentence into numbers?

In June 2017, eight people from Google and the University of Toronto published the Transformer paper. Attention, born in the 2014 translation work of the previous chapter, had been used together with RNNs (networks that read words one at a time, in order). This paper dropped the RNN and built the network from attention alone.

For each word, three vectors (sets of numbers) are made: a query (Q) for the searching side, a key (K) for the side being searched, and a value (V) for the content. The dot product of the query with the keys of all the words is divided by √d, then turned into weights with a softmax (a calculation that makes every number positive and the total 1). The values are mixed using those weights. In the figure on the right, press "it" and a thick line points to "fish". The paper runs eight of these side by side (multi-head), so that each head can look at a different kind of relationship.

Attention(Q, K, V)=softmax( QKT / √dk ) V
Q, K, V
matrices holding the query, key and value vectors
dk
length of the key vector (64 in the paper)
the numbers in the model
values chosen by hand for this site
What you think you knowThe popular story:A paper for building conversational AI (chatbots)
The original source says:The paper tested translation and English constituency parsing. Its closing named extending the method to images, audio and video as the next goal, and conversation never appears in the text.

What the figure shows:Each word sends out a query and decides which other words to attend to, and how much, by how well it matches their keys. The word “it” pays strong attention to “fish” in the preceding sentence.

022017 · Positional encoding

Writing word order in as waves

Attention does not look at order. How can it tell "the cat chases the mouse" from "the mouse chases the cat"?

In the attention calculation, shuffling the order of the words does not change the weights. Because it does not read in order the way an RNN does, the position of each word has to be added separately.

The paper builds a vector from sin and cos waves of different periods for each position (the positional encoding) and adds it to the word's vector. The wave periods run from the shortest, 2π, to the longest, 10000·2π. Like the second hand and hour hand of a clock, fast waves tell nearby positions apart and slow waves tell distant ones apart. The graph below shows the dot product between a chosen position and every other position. When the gap between positions is the same, the value comes out almost the same wherever you are.

PE(pos, 2i)=sin( pos/100002i/d ) PE(pos, 2i+1)=cos( pos/100002i/d )
pos
position of the word
i
which wave
d
dimension of the vector (512 in the paper; 32 in the figure)

What the figure shows:With attention alone, changing word order leaves the calculation results the same. Adding values from fast and slow waves at each position puts order differences into the numbers.

Dot product between the chosen position and the other positions
032018 · Context

One word, different numbers by context

"Play" can mean a play in baseball or a play on stage. Is one set of numbers per word enough?

word2vec (2013) and similar methods from the previous chapter gave each word a single vector. So "play" had the same vector in a baseball sentence and in a theater sentence. In February 2018, seven people including Matthew Peters of the Allen Institute for AI and the University of Washington introduced ELMo.

On a huge amount of text, it trains an LSTM that reads forward and predicts the next word and an LSTM that reads backward and predicts the previous word (two layers each). A word's representation is the internal states of every layer added together with weights learned for each task. The paper says the lower layers are better at parts of speech and the upper layers at telling word meanings apart (the figure on the right).

On each of six tasks, just adding ELMo beat the best results of the time, cutting errors by up to about 20%.

ELMok =γ Σj sj hk,j
hk,j
state of layer j when reading the k-th word
sj
weight for each layer (softmax, total 1)
γ
overall scale
What you think you knowThe popular story:ELMo was the first to represent words by their context
The original source says:The ELMo paper itself names 2017 work and CoVe as earlier examples, and says its own difference is using . Eight months later, the BERT paper called ELMo . The same method was called deep by its makers and shallow by the next paper.

What the figure shows:In word2vec, play was 1 point, but in ELMo its point moves with each sentence. Lower layers group it by noun or verb use, while upper layers group it by meanings such as baseball, theater, and music.

042018 · Language models

Just by guessing the next word

What can a machine learn from text that has no correct answers attached?

In June 2018, OpenAI announced the following approach. First, a 12-layer Transformer is trained to guess the next word on text from 7,000 books (pretraining). Then it is taught each task with a few examples. It beat the best previous results on 9 of the 12 tasks tested.

A system that gives the probability of the word that comes next after the text so far is called a language model. Pick the next word by probability, again and again, and you get a sentence. The idea is old: Shannon's 1948 paper also decides the next letter from the probability given the previous two letters, and produces English-looking strings of letters. The figure on the right shows probabilities from the previous characters to the next 1 character, counted in the text of this site's records. The number of previous characters starts at 2 and can be switched from 1 to 3. Raise the temperature and the probabilities flatten out; lower it and choices concentrate on the more probable characters.

What is different in the fourth boom is that a large neural network (a Transformer) produces the probabilities, and that it learns from far more text.

pi =exp(zi /T)/Σj exp(zj /T)
zi
score of character i (in the figure, the log of the count)
T
temperature
pi
probability of choosing character i
What you think you knowThe popular story:It is called the first GPT (GPT-1)
The original source says:The word GPT never appears even once in the June 2018 paper or announcement. Four months later, Google's BERT paper calls it “Generative Pre-trained Transformer (OpenAI GPT)”. Where the name GPT-1 came from has not yet been confirmed.

What the figure shows:Simply calculating the probabilities of the next character after the text so far can produce plausible sentences. Raising the temperature evens out probabilities and produces rare characters, while lowering it repeats the same phrases.

052018–2019 · Tokens

Cutting a sentence into tokens

Does a language model read a sentence one character at a time, or one word at a time?

The pieces of text a language model works with are called tokens. One character at a time makes the sequence too long; one word at a time causes trouble when a word is not in the dictionary. GPT and GPT-2 used byte pair encoding (BPE). It starts by splitting text into single characters, then merges the pair that sits side by side most often in the text into a new token. It repeats this. In the figure on the right, press "Merge once".

The 2018 GPT used a vocabulary built with 40,000 merges. According to the 2019 GPT-2 paper, working with characters (Unicode) directly would mean a base vocabulary of over 130,000 before any merging. So the text is split into single bytes (256 kinds) first, and BPE is applied to those, which brought the vocabulary to 50,257. The length it can read at once was also widened from 512 to 1,024 tokens.

the pair (a, b) that sits side by side most often → new token ab (repeat)
what is counted
how many times b appeared right after a in the text

The GPT-2 paper added a safeguard against merging across character types. It avoids the waste of the same word becoming separate tokens when it carries punctuation, as in dog. dog! dog?

What the figure shows:Repeatedly joining the 2 most frequent neighboring units combines common groups of Japanese characters, such as ihana and aka, into 1 token and reduces the number of tokens.

Number of merges and number of tokens
062018 · Fill in the blank

Predicting a hole from both sides

What changes if, instead of the next word, the machine has to guess a hole in the middle of a sentence?

In October 2018, four people at Google introduced BERT. GPT read from left to right and guessed the next word. BERT instead chose 15% of the tokens in a sentence, hid them, and learned to guess them using both the left and the right as clues (of the chosen spots, 80% got a [MASK] marker, 10% got a different word, and 10% were left as they were). The paper says it drew inspiration from the Cloze test, a fill-in-the-blank test from 1953.

In the figure on the right, take "I drank [MASK]". Looking only at the left, the machine cannot tell water, tea, bread and apple apart. Once it sees the "drank" on the right, it narrows to drinks.

It was trained on 800 million words of books and 2.5 billion words of English Wikipedia, and set the best result on 11 tasks. In October 2019 Google began using it in Search, announcing that it would help with understanding .

loss= −Σhidden spots log p( true word|words on the left and right )
p
probability the model outputs
hidden spots
15% of the tokens chosen

What the figure shows:Looking only to the left does not narrow down the word for a blank, but seeing the Japanese words to the right meaning drank narrows it to a drink. BERT learned to predict using clues on both sides.

072019 · Staged release

Released over 9 months, fearing misuse

What happened when its makers decided not to release the whole AI at once?

In February 2019, OpenAI announced GPT-2, trained on 40 GB of text from the internet. It has 1.5 billion parameters (numbers set by training; in this chapter's formula we also call them parts). Citing (for example fake articles), it released only a small model and the paper. It also wrote: .

After that it released larger and larger sizes in turn, and when the largest version came out in November it wrote: . Move the month in the figure on the right.

number of parts ≈ 12 × layers × d2 +vocabulary size × d+number of positions × d
d
length of the vector
12 × layers × d2
the count for the main body (from the 2020 scaling-laws paper)
the sum of everything
this site's estimate
What you think you knowThe popular story:OpenAI built an AI "too dangerous to release"
The original source says:The word "dangerous" does not appear in the announcement. The Guardian's headline that day was . Nine months later the whole thing was released.

What the figure shows:Because of concerns about misuse, GPT-2 was released from smaller versions upward over 9 months. When releasing the final version, its developers wrote, “We’ve seen no strong evidence of misuse so far.”

Number of parameters (scale in steps of 10 times)
082020 · Scaling laws

Add parameters, or add text?

What happens if you only add parameters but there is not enough text to learn from?

In January 2020, ten people from OpenAI and Johns Hopkins University showed that as parameters, amount of text and amount of computation grow, the loss of a text AI (how hard the next word is to guess) falls according to a power law, and that this holds across more than 7 orders of magnitude (more in Chapter 12).

The paper also gave a formula in which both the number of parameters N and the amount of text D matter. If you increase only one, the improvement slows. The paper says that if you multiply the parameters by 8, you lose nothing by multiplying the text by about 5. In the figure on the right, press "8× N, 5× D".

This is one of the foundations of the expectation that bigger means smarter. But the authors themselves wrote: .

L(N, D)= [ (Nc /N)αN/αD +Dc /D ]αD
N
number of parameters
D
amount of text (number of tokens)
αN, αD
the paper's values 0.076 and 0.095
Nc, Dc
the paper's values 8.8×10¹³ and 5.4×10¹³
What you think you knowThe popular story:A law saying that the bigger you make it, the smarter it gets without limit
The original source says:The paper itself says that the trend must eventually level off, and that there is no theoretical understanding of it.

What the figure shows:Increasing parameters alone gives slower improvement if there is too little text; an 8-fold increase in parameters needs about 5 times as much text to avoid wasting the increase. This trend will eventually level off too.

Loss when the amount of text is fixed and only the number of parameters is increased
092020 · Showing examples

Just show examples, with no retraining

Can you teach a new task without changing the numbers (weights) inside the AI?

In May 2020, 31 people at OpenAI announced GPT-3, with 175 billion parameters. It was 10 times the size of any similar AI before it and was trained on 300 billion tokens.

Instead of retraining for each task (changing the weights), you show a description of the task and a few examples inside the text and have it write the continuation. With no examples is zero-shot, with one is one-shot, with several is few-shot. The weights do not change. With this it handled translation, answering questions, 3-digit arithmetic and more. The figure on the right is a small mechanism made by this site (not the inside of GPT-3). It keeps only the rules that fit the examples, so the answer narrows as examples increase.

When people were asked to tell news articles written by GPT-3 from articles written by people, they were right 52% of the time, hardly different from guessing (50%).

the text shown=task description+example 1+ … +example k+question → write the continuation
k
number of examples shown
length read at once
2,048 tokens (GPT-3)

What the figure shows:Showing a few examples in the text narrows down the requested task without changing the numbers inside the model. More examples reduce the number of possible answers.

Number of parameters (scale in steps of 10 times; the numbers in the records)
102020 · Self-supervised learning

No labels: pull similar images together

Can a machine learn features useful for recognition from photos without correct labels attached?

Self-supervised learning is a way of learning with no human-made correct answers (labels), using problems made from the data itself. Guessing the next word and filling in blanks belong to this family. In February 2020, four people at Google, including Ting Chen and Geoffrey Hinton, announced SimCLR, a simplified take on contrastive learning for images.

Apply two rounds of editing to one photo, such as cropping, color changes and blurring, to make a correct pair of two images. The model is trained so that this pair comes out close together (high cosine similarity) and far from other photos. In the figure on the right, press "Keep learning".

On features learned with no answers, training only a simple classification layer with answers gave 76.5% on ImageNet. That matches a ResNet-50 trained with answers.

ℓi,j = −log [ exp( sim(zi, zj)/ τ )/Σk≠i exp( sim(zi, zk)/ τ ) ]
z
feature vector of a photo
(i, j)
a pair made from the same photo
sim
cosine similarity
τ
temperature parameter
What you think you knowThe popular story:SimCLR started contrastive learning, which learns images without answers
The original source says:The paper itself says , and its first example of contrastive learning is a 2006 paper from New York University. That paper wrote that .

What the figure shows:Learning only the rule that 2 images made from the same photo should be close and other photos far apart creates features that group each photo's images together, without anyone supplying correct answers.

Loss (by number of training rounds)
112020 · Transformers for images

Turning an image into 16×16 squares

How can you get a Transformer built for text to read pictures?

In October 2020, 12 people at Google, including Alexey Dosovitskiy, introduced ViT (Vision Transformer). It cuts an image into small squares (patches) of equal size and turns each one into a single row of numbers (a vector). A position vector is added, and the patches go into the Transformer just like the words of a sentence. One extra marker is added at the front, to produce the answer.

The images the paper used for training were 224×224. Cutting them into 16×16 pieces gives a sequence of 196 patches. In the figure on the right, make the squares smaller and the sequence gets longer and the attention calculation heavier (the length of the sequence is inversely proportional to the square of a patch's side).

Trained on ImageNet alone (about 1.3 million images), it scored a few points below the CNN (convolutional) ResNet of the previous chapter. Pretrained on 14 million to 300 million images, it matched or beat CNNs, and the best model reached 88.55%. The paper summed it up this way: large-scale training beats the image-specific built-in structure that CNNs start with.

N=H × W/P2
H, W
height and width of the image in pixels
P
length of a side of a square
N
length of the sequence (number of squares)
What you think you knowThe popular story:ViT was the first to cut an image into small squares and feed them to a Transformer
The original source says:The final version submitted to the conference names Cordonnier et al. (2020) as the closest work, and added that it and that . What the paper claimed as new was showing that, with pretraining on large-scale data, a plain Transformer with no special tricks can match CNNs.

What the figure shows:Cutting an image into equal-sized squares and arranging them in 1 sequence lets it be read like words in a sentence. Smaller squares make a longer sequence, and computation grows with its length squared, to the power of 2.

122018 · 2020 · Proteins

Building a shape from a map of distances

Can the 3D structure of a protein be predicted from the sequence of amino acids alone?

It is not an AI that writes text or draws pictures, but around the same time, AI as a tool for science also advanced greatly. A protein's shape is decided when a chain of amino acids folds up. At the 2018 structure-prediction contest CASP13, DeepMind's first AlphaFold used a CNN to predict a map of the distances between amino acids. From that map it built a scoring formula and used gradient descent to adjust the shape little by little.

The figure on the right is this method in its smallest form. A chain in a random shape moves to fit the map on the left (numbers chosen by this site).

Two years later, at CASP14 (2020), AlphaFold 2 was, according to the Nobel Committee's explanation, . It dropped convolution, used Transformer attention, and produced atom positions directly. The score on the hard problems rose from about 60% to about 90%.

E=Σi<j ( |xi − xj| − dij )2  x ← x − η ∂E/∂x
xi
position of the i-th amino acid
dij
distance on the map
η
step size for moving (learning rate)
the real scoring formula
a different form from this squared error
What you think you knowThe popular story:AI solved the mystery of protein folding
The original source says:The paper itself draws the line at .

What the figure shows:The first AlphaFold in 2018 built a shape by gradually moving a randomly shaped chain to fit a distance map, as in the chapter 10 diagram. In 2020, AlphaFold 2's method “had been entirely redesigned compared to that of AF1”: it replaced convolution with attention and directly produced atom positions, raising scores on difficult problems from about 60% to about 90%.

Total error E (scale in steps of 10 times)
132021 · Pictures and text

Pictures and text on one map

Take a photo of a dog and a sentence describing it. Can we measure with a number how well they match?

In 2021, 12 people at OpenAI, including Alec Radford, introduced CLIP. On 400 million pairs of images and captions collected from the internet, it trains a part that turns images into vectors and a part that turns text into vectors at the same time. It lays out 32,768 pairs at once and learns so that correct pairs point in nearby directions and the others point far apart (contrastive learning).

The figure on the right is a table of how similar each image and sentence are (cosine similarity). Press "Learn" and the diagonal of correct pairs lights up. After training, you can classify by turning each category name into a sentence like "A photo of a dog." and choosing the closest sentence (zero-shot). It got 76.2% on ImageNet without using a single one of ImageNet's training images.

similarity=cos(ui, vj)=ui · vj / ( |ui| |vj| )
u
image vector
v
text vector
direction of the loss
both by row (image→text) and by column (text→image)
What you think you knowThe popular story:CLIP is an AI that makes pictures
The original source says:CLIP does not make pictures. It is a model that measures how well an image and a sentence match.

What the figure shows:Placing image and text numbers on the same map and learning to bring correct pairs close while keeping others apart allows classification simply by turning names into text and choosing the nearest text.

Loss (by number of training rounds)
142015→2020 · Diffusion models

Add noise, then remove it bit by bit

Can a picture be made from plain noise?

In 2015, Jascha Sohl-Dickstein and colleagues at Stanford University and elsewhere presented a method . It adds small amounts of Gaussian noise (random numbers from a normal distribution) to data again and again until its shape is destroyed, and has a neural network learn each step of the reverse direction.

The figure on the right shows the same spiral of points as in the 2015 paper. Advance t and it turns to fog; press "Generate from noise" and the noise is removed one step at a time, and the shape returns.

In 2020, the DDPM paper by three people including Jonathan Ho at Berkeley says that for diffusion models . It then showed that high-quality images can be made, with a 1,000-step process and training to guess the added noise itself.

xt = √ᾱt x0 + √(1 − ᾱt) ε  what is learned: guess ε from xt
x0
the original data
ε
the noise added
ᾱt
the fraction of the original remaining at step t (from 1 to 0)
What you think you knowThe popular story:Diffusion models are a new method born around the time of Stable Diffusion
The original source says:The idea itself is in the 2015 paper. The original Stable Diffusion paper (December 2021) also cites the 2015 paper as the source of diffusion models.

What the figure shows:The 2015 diffusion model in chapter 10 gradually added noise until shapes became fog and trained a neural network to reverse 1 step at a time; in 2020, Ho and colleagues' DDPM trained those reverse steps by predicting the added noise itself (ε) and subtracting a little, showing that a 1,000-step process could create high-quality images. Repeating this prediction and subtraction at each point in the fog brings the shape back.

Fraction of the original remaining at step t, ᾱ
152021–2022 · Image-generating AI

Shrink first, then remove the noise

Isn't it too heavy to add noise to a 512×512 image directly and then remove it?

In December 2021, Robin Rombach and colleagues at Ludwig Maximilian University of Munich, Heidelberg University and Runway introduced the latent diffusion model. A picture is shrunk into a latent representation by an autoencoder (from the previous chapter: shrink, then restore), and the diffusion model runs there. They compared shrink ratios f from 1 to 32 and found 4 to 16 a good balance of speed and quality.

Stable Diffusion, in August 2022, takes this form. According to its documentation, it shrinks height and width to one eighth, turns the text into vectors with CLIP's text part, and connects it by attention to the U-Net (previous chapter) that removes the noise. Change f in the figure on the right.

Who could use it also changed in less than two years. DALL·E in January 2021 only published sample images; DALL·E 2 in April 2022 was open only to a small, selected group of people. Stable Diffusion in August 2022 was released in a form where anyone could download the trained model and run it on their own computer (with limits on use, and commercial use allowed).

number of latents= (H/f) × (W/f) × c
H, W
height and width of the image in pixels
f
shrink ratio (8 in Stable Diffusion)
c
numbers per spot (4)
amount of numbers
512×512×3=786,432 → 64×64×4=16,384 (1/48)
What you think you knowThe popular story:Stable Diffusion was made by a company called Stability AI
The original source says:Stability AI's own announcement says it was .

What the figure shows:Shrinking an image to 1/8 of its width and height before removing noise reduces the number of values handled to 1/48, but too much shrinking loses detail. In 2022, this was released in a form anyone could run on their own computer.

162017–2022 · Japan

Learning from works, and the "paradise"

How did Japanese law decide how AI may learn from works?

In May 2018, Japan's Copyright Act was revised (in force from January 2019). It created Article 30-4: use that is not for people to enjoy a work can, within the necessary scope, be used without the permission of the copyright holder. Its heading is (translated). It has a proviso: (translated). In the figure on the right, choose a way of using a work and the card stops at the first gate or moves on to the decision point for gates 2 and 3.

The text of the article and the government's summary contain no words about AI. The Agency for Cultural Affairs' explanation page (2018) gave as an example (translated), and a document the next year put (translated) first among its examples of the effect. Tatsuhiro Ueno, a legal scholar at Waseda University, has explained since 2017: (translated).

On August 29, 2022, the beta version of mimic was released, a Japanese AI that makes images in a similar style after learning from about 15 of your own illustrations. Worried voices that other people's pictures would be used without permission followed one after another, and the next day all its functions were stopped.

What you think you knowThe popular story:Japan is a machine learning paradise, so AI can learn anything freely and what it produces is free too
The original source says:The writing of the person who spread the phrase is about the learning stage. The same text also says the use must stay within the necessary scope, that there is a proviso, and that copyright still reaches the output if the original expression remains in it.

What the figure shows:Article 30-4 allows uses that are not intended for people to enjoy the work, without permission within the necessary scope, and does not mention AI. It has 3 tests, with the second and third judged case by case.

August 2022: overseas and Japan
172017→2022 · Human preference

Compare two, pick which is better

What do you do when you can't write the scoring of a good answer as a formula?

Reinforcement learning (a way of learning actions that earn more points, called reward) had trouble with tasks where the scoring cannot be written as a formula. In June 2017, six people from OpenAI and DeepMind, including Paul Christiano, showed people two 1–2 second clips of an AI's movement and asked them to pick the better one. They trained a reward model to predict those choices (later called RLHF). A robot learned a backflip from 900 comparisons.

In the figure on the right, keep pressing the answer you think is better. From the difference between the two scores, the probability that a person picks one is worked out (the formula below), and the scores are adjusted to fit the results.

InstructGPT in March 2022 (Long Ouyang and colleagues) applied this to GPT-3. It was retrained on demonstrations, a reward model was built from rankings of 4 to 9 answers, and then reinforcement learning (PPO) was run. The answers of the 1.3-billion-parameter InstructGPT were preferred over those of the 100-times-larger GPT-3.

P(A)=erA / ( erA +erB )
P(A)
probability that a person picks A
r
score from the reward model
answers in the model
five made by this site (the true quality is also set by this site)
What you think you knowThe popular story:RLHF was invented for ChatGPT
The original source says:What was tried in 2017 was games and robot movements. The paper does not use the name either.

What the figure shows:Even without writing a scoring formula, repeatedly comparing 2 answers and choosing the better one lets a machine learn a scoring method that matches those choices.

Share of ranked pairs that agree with the true order of quality
182022 · A mind?

Answering to fit a leading question

If an AI answers "scary", does that mean the AI has a mind?

In June 2022, Google engineer Blake Lemoine claimed that the conversational AI LaMDA might have feelings. He also published a record in which, in the words of the source, . In it LaMDA said things like and .

Google rejected the claim: . The spokesperson explained: . The figure on the right is a small mechanism made by this site that picks answers fitting the words of the question. With the same mechanism, how the question is written changes which way the answer goes.

The researchers who built LaMDA had written, in a paper half a year earlier, of the risk that people end up . It is a story that goes back to ELIZA in 1966 (Chapter 4).

probability of an answer=p( answer|question text )
right of the vertical bar
the given condition (here, the question text). If the question text changes, the probability changes even with the same mechanism
What you think you knowThe popular story:In 2022, a mind came to live in Google's AI (said a Google employee)
The original source says:The claim was made by one engineer, and the company rejected it. The record was compiled by the engineer himself. The researchers who built it had themselves written, in a paper half a year earlier, of the risk that people anthropomorphize machines.

What the figure shows:A system choosing answers that fit the question replies that it is scared when asked “You're scared, right?” and that it is a program when asked “You're a program, right?” Its answers do not provide evidence of whether it has a mind.

192022 · Conversation

Smooth mistakes

Is being able to write smooth text the same as telling the truth?

On November 30, 2022, OpenAI released ChatGPT, which answers in conversation form. Inside is a model from the GPT-3.5 series, which finished training in early 2022, retrained with the same method as InstructGPT (spread 17 of this chapter). The announcement called it a , and it was free during that time.

From the start the announcement said that it , and said . The figure on the right is a small mechanism trained on just 12 correct sentences. The sentences are smooth, but the pairs of names and years get swapped.

The claim that spread in February 2023, "ChatGPT reached 100 million users in 2 months", was not a company announcement but a bank analyst's number, which in the sources' wording (more in Chapter 12).

next word~p( w|the text so far ) (repeat)
~
choose one according to the probabilities
correctness
not included anywhere in this formula
What you think you knowThe popular story:ChatGPT was launched with great fanfare as a new, perfect AI
The original source says:The announcement called it a . Inside was a model that had finished training earlier the same year, and it listed its weaknesses from the day of release.

What the figure shows:Even when trained only on correct sentences, choosing each next word from just the previous 1 word can produce fluent errors that mix up names and years. Correctness is nowhere in the formula for choosing the next word.

Closing

What this chapter still doesn't know

How long will the trend of getting better as things get bigger go on? Why does it happen? The authors of the 2020 paper themselves wrote: and . The expectation that bigger means smarter (the 2020 paper) and the worry that it might be misused (GPT-2 in 2019) appeared around the same time.

Why and when do plausible-sounding mistakes happen? (The ChatGPT announcement says that fixing it is “challenging”.) There is also no settled way to check from the outside whether a machine has a mind or the ability to feel. And how much a person has to work on an AI picture before it counts as is still being decided one case at a time.

Many of the mechanisms in this chapter were combinations, made bigger, of ideas from earlier chapters (attention, LSTM, autoencoders, U-Net, reinforcement learning). In the next chapter we look at the fourth boom from 2023 to today, and at the predictions still waiting to be checked against reality.

For teachers (this site's view): Information I (Japan's required high-school informatics course) (1) intellectual property and information ethics (spread 16 of this chapter); Information II (the elective follow-up course) (3) how deep learning is used (the chapter as a whole). The current national curriculum guidelines and national teaching materials do not cover generative AI (the national guide to generative AI stresses understanding how it works).