In 5-1, the AI watched a stick figure move and recognized it as "littering." This time it is the other way around. If we give it the word "throw," can we get it to create a brand-new throwing motion for the stick figure? A motion is a table of 1,196 numbers. Average two motions and the arms fold; roll dice for each number and the body jitters. We compare four generators with the Evaluator's score sheet to find out what a "believable new motion" needs.
The litterer has been caught. But HQ still has a second question. Using the same numbers we used to recognize motions, can we now create one?
The same three boxes; only the direction of the arrows differs. Try switching between the two directions.
A common summary is that a discriminative model learns "the probability of the answer given the input," while a generative model learns "the probability of what the data itself looks like" [R1]. If you know the shape of the data, you can draw new data that follows that shape. Today's generative AI (GANs [R2], VAEs [R3], diffusion models [R5]) all tackle this "learn the shape, draw new points" task in different ways.
Here a stick-figure scene from 5-1 is spread out as a table. These 1,196 cells are exactly the blanks a generative model must fill in. Hover the mouse over the cells.
The cells of the table are not random. In the same frame, the "right elbow" and the "right wrist" are always 0.16 apart (bone length), and the values in two neighboring frames are almost the same (motion is continuous). A discriminative model can give an answer without knowing these ties, but a generative model that fails to keep them gives itself away immediately. In the next section we break them ourselves.
The easiest way to "make a new motion" is to mix two existing ones. Try changing what gets mixed. The bars below show how far each of the ten bones in the current frame strays from its original length (the longer the bar, the more it is distorted; red above 5%).
Mixing throw + wave by averaging coordinates gives an average bone-length error of 11.4%, and 99.9% at the worst moment. At the moment when the two wrists were on opposite sides, their midpoint almost overlapped the shoulder, and the forearm vanished. Drop-in + walk-by gives 1.9% (worst 25.7%), and throw + pick-up gives 1.4% (worst 20.4%). Averaging angles gives 0.0% for all three pairs. It is the same "average" in name, but what you average decides the result.
What a generative model learns is not a single scene but the shape in which scenes are scattered. Here are 100 throws, varied in speed, position and size in the same way as in 5-1. Click a dot on the left to pick a scene.
We make six new throws from the 100 throws. The Evaluator checks five things: does it look real (bone length, jitter, throwing power), is it diverse, and was it not copied. Switch generators and press "Generate again."
The screen above redraws six at a time in the browser, so its numbers differ slightly. The table below is the result of actually running Code 2 (100 training throws, 20 generated). "Novelty" is the distance to the nearest training scene (in units of body height, root mean square over coordinates).
| Generator | Bone-length error | Jitter | Max wrist speed | Diversity | Novelty | Evaluator's one-line review |
|---|---|---|---|---|---|---|
| Training data (reference) | 4.7% | 0.0288 | 2.55 | 0.126 | 0.000 | Because of pose-estimation jitter, even the real data's bone lengths wobble by 4.7% |
| A One average | 1.7% | 0.0045 | 1.36 | 0.000 | 0.033 | Smooth, but always the same, and half the power is gone |
| B Dice per coordinate | 44.2% | 0.2659 | 10.00 | 0.149 | 0.109 | Diverse, but not human. The wrists teleport |
| C Pick one and copy | 4.7% | 0.0300 | 2.75 | 0.125 | 0.000 | Looks real, but it is a copy |
| D Sample 3 knobs | 0.0% | 0.0125 | 2.71 | 0.123 | 0.022 | Passes all five items. But it knew the knobs in advance |
The Evaluator in this part only scores the results after they are made. Real generative models feed the scores straight back into training. They either adjust the weights to reduce a loss function, a single number measuring how different the results are from the training data (VAE [R3]), or they set up a discriminator that tells real from fake as the Evaluator and make it compete with the generator (GAN [R2]). In effect, the discriminative model from 5-1 comes back as the Evaluator in 5-2.
D won because it sampled from 3 numbers (speed, position, size) instead of 1,196. However you change those 3 numbers, they pass through the skeleton (fk) and unfold into a human shape.
Both code notebooks use only libraries preinstalled in Colab. After "Download notebook (.ipynb)", open it in Colab via File → Upload notebook, or copy the code and paste it into a new notebook cell.
We added a bone-length check (bone_error) and mixing (blend) to the scene functions from 5-1. Three pairs are mixed by coordinate averaging and by angle averaging, and their bone-length errors are compared. To use your own data, put real motion coordinates in the two scene slots of blend (the fact that only coordinate averaging is possible there is exactly the problem of this part).
Builds generators A–D from the 100 throws, samples 20 from each and scores them. The score sheet under Section 6 is made directly from this output. To test a new generator, pass a list of scenes shaped (46, 13, 2) to judge("name", list of results).
These are prompts to paste into AI assistants such as ChatGPT, Qwen, or Claude. When you press "Copy," the selected code is attached after the prompt. Just replace the parts in 〔 〕 with your own situation.
The AI's answer is only a starting point. Always check suggested papers, figures and library functions against the original sources and official documentation. When using real human motion data, first check filming consent and the dataset's terms of use (such as whether commercial use is allowed).
The same dictionary as the yellow dotted underlines in the text. Click a section name to jump to where the term first appears.
Analogies are a first step toward understanding, but they can also plant misconceptions. Analogies to human perception are marked by strength. Direct there is evidence that it actually does the same thing · Partial only some properties are similar · None no known counterpart
| Concept | Everyday analogy | Human perception analogy | Where the analogy breaks |
|---|---|---|---|
| Discriminative vs. generative | Grading a test (is the answer right?) vs. setting a test (writing believable new questions) | Partly For people, recognizing a face and drawing one are different skills | A test setter writes questions with intent, but a generative model just samples following the shape of the data |
| Distribution | How the heights of students in a class cluster together | None | Height is a single number, but a motion is 1,196 numbers moving together, so its shape cannot be drawn by eye |
| Coordinate average | Overlaying two people's photos semi-transparently | None | Overlaid photos still show both people, but a coordinate average makes one person halfway between them, and that person's arms are folded |
| Latent variable (knob) | A few volume and tone knobs on an audio mixer | Partly Remembering a motion in a few words, like "fast, big" | Mixer knobs come with labels, but knobs found by learning have no names and mix several meanings (5-3) |
| Evaluator | Judges at an audition | None | Judges have tastes, but the Evaluator in this part looks only at five fixed numbers. It misses any awkwardness the numbers do not capture |
E-1 About the author · E-2 Academic references · E-3 Sources of figures and numbers
A teaching guide for instructors, on-the-job (OJT) trainers and tutors. Times are estimates, so adjust them to your actual class.
| Audience | University students and working professionals who have finished 5-1. Planners and practitioners who want a feel for what generative AI "learns" |
|---|---|
| Prerequisites | The 13-point stick figure and six kinds of scenes from 5-1; mean and standard deviation |
| Learning goals | ① Explain the difference between discriminative and generative models in terms of the arrow's direction and "the number of answers" ② Give an example of why averaging coordinates breaks bone lengths ③ Evaluate generated results on three branches: realism, diversity and novelty |
| Estimated time | Reading 30–40 min · Animation demos 20 min · Colab practice 25 min (Code 1 10 min, Code 2 15 min) |
Intro 5 min (Sections 1·2, flipping) → Section 3 motion table 8 min → Section 4 mixing experiment 12 min → Section 5 data cloud 7 min → Section 6 four generators 13 min → check questions 5 min.
Section 2, 15 min → apply the Section 6 score sheet to your own work's generated outputs (documents, images, motions) and build "realism · diversity · novelty" criteria, 30 min → discussion on "choosing a representation" with Section 4, 15 min → run Code 2 and add a new criterion, 30 min.
Beginners: Sections 2·4·6 only. Intermediate learners: have them build generator E (mixing two training scenes by averaging angles) in Code 2 themselves and add it to the score sheet.
| Section | Question to pause and ask | Hands-on tip |
|---|---|---|
| 2 Flip | "How many correct answers does creating have?" | Switch back and forth between Recognize → Create |
| 3 Motion is a table | "What rules between cells in this table must not be changed freely?" | In the throw, hover over the columns from 0.8 to 1.2 seconds |
| 4 Mix | "We mixed half and half — why did the arm disappear?" | With throw + wave and coordinate averaging, find the frames where the red bars grow long |
| 5 Data | "If we draw a new point from this cloud, what kind of throw will come out?" | Click near the boundary between the red and green dots |
| 6 Generators | "On which scoring item do A, B and C each fail?" | Press "Generate again" two or three times for each generator |
| Misconception | Correct explanation | Scene to show |
|---|---|---|
| A generative model produces one correct answer | It samples one from a distribution of believable answers. It is normal for it to differ every time | Section 2, Section 6 "Generate again" |
| The average is the safest generation | The average has zero diversity, and averaging motions with different timing drains the power (wrist speed 2.55 → 1.36) | Section 6, generator A |
| The more numbers, the better the representation | The 1,196 numbers are tied together. A few numbers that keep those ties (angles, knobs) are better for generation | Section 4 angle average, Section 6 generator D |
| Being identical to the training data is the best generation | Copying has zero novelty. It also risks putting out the individuals in the data as they are | Section 6, generator C |
| If it looks real, the evaluation is done | Realism, diversity and novelty must be checked together. Look at only one, and A or C wins | Score sheet under Section 6 |
3 seconds is 46 frames (including 0 s) × 26 = 1,196 numbers. 5 seconds is 76 frames × 26 = 1,976 numbers.
Hand = (0, 1), the same point as the shoulder. The arm length is 0, a bone-length error of 100%. The "worst 99.9%" in Section 4 is exactly this kind of moment. If you average the angles instead (the average of −90° and +90° is 0°), you get an arm of length 0.33 hanging straight down.
Its novelty is 0. It only memorizes and hands back the training data; it cannot make new motions. If the data contains real people's motions or faces, it also causes the problem of putting out personal information as it is.
The moment of the throw (timing) differs from scene to scene, so averaging coordinates spreads the fast swing thinly over many frames. The peak gets smeared out, and the result is a throw with no power.
D knew in advance the knobs that made the scenes (speed · position · size). Real motion data does not come with such knobs. Finding the knobs just by looking at the data is the job of the encoder and decoder in 5-3.
In Code 1, change the mixing ratio to 0, 0.25, 0.5, 0.75 and 1, and make a table of the bone-length error of throw + wave under coordinate averaging. Write two sentences on which ratio gives the largest error and why.
Add generator E, "pick two training scenes and average their coordinates," and F, "sample the 3 knobs outside the training range (size ×1.6)," to Code 2 and score them. Report what problem F's results have even if they pass realism (where does the can fly?).
| Beginners | Grasp just one thing firmly, "coordinate average vs. angle average" in Section 4, and you get half of this part |
|---|---|
| Advanced | Have students research and present how GANs and VAEs bring the "Evaluator" into training. Check the papers in the original |
| Next episode | 5-3 Encoder and decoder — finding the knobs (latent variables) on our own, just from the data |
You have read "5-2 From Recognizing to Creating" to the end. The lab crew each sum it up in a word.