This page builds the vocabulary for GAN training instability and mode collapse from nothing. Nothing here assumes you have seen probability notation, expectations, logarithms-as-scores, or gradients before. Every symbol earns its place before we use it.
Picture a landscape of hills. Where the hill is tall, that kind of x shows up often. Where the ground is flat and low, that x is rare. The whole area under all the hills adds up to 1 (something always happens). Written precisely, for a continuous x this "total area is one" rule is
∫p(x)dx=1(or, for discrete x,∑xp(x)=1).
We need two of these landscapes:
pdata(x) — the landscape of real data (real photos, real digits). This is fixed; it is the target.
pg(x) — the landscape of what the generator currently produces. This one moves during training.
Picture throwing a dart at the hill-landscape: you are more likely to hit where the hills are tall. Each dart-hit is one sample x. We need this because networks never see the whole landscape — they only ever see a bucket of samples drawn from it.
Picture a slot machine: pull a random lever (z) and the machine (G) prints a picture. Different z → different picture. As G learns, the pictures it prints get more realistic.
Why noise at all? Randomness is where variety comes from. If z were always the same, G would print one fixed picture. Mode collapse is exactly the failure where differentz all get mapped to the same output — the variety in z gets thrown away.
Picture a dial the judge turns: hard left = fake, hard right = real, middle = shrug. The judge is good when it turns the dial to 1 for real photos and to 0 for the generator's fakes.
Why does log appear all over the objective? Because we want to reward the judge for confident-correct answers and punish confident-wrong ones — and log does exactly that stretching.
Why not just use D itself as the score? Compare two nudges of the same size, 0.09. Measured with plain D, moving from 0.90 to 0.99 and moving from 0.09 to 0.18 look identical — both are "worth 0.09". Measured with log, the first nudge is worth log(0.99)−log(0.90)≈0.095, while the second is worth log(0.18)−log(0.09)≈0.693 — over seven times more reward. So log deliberately makes changes near certainty count for very little and changes near ignorance count for a lot.
Picture: score every dart-hit on the hill, then average all the scores — but hits in the tall regions count more because there are more of them (that is exactly the weight p(x) inside the integral). We need E because the objective must judge D and G over the whole landscape, not one lucky sample.
Picture standing on a foggy hillside feeling for the steepest slope with your foot, then stepping down. That's gradient descent.
We care about all this because "G receives no learning signal" — the heart of instability — literally means the arrow ∇θLG has near-zero length, so the foot feels flat ground and can't decide which way to step.
∇xD (gradient with respect to the inputx, not the weights) measures how much the judge's verdict changes if you nudge the picture. When the judge is over-confident its verdict is flat everywhere, so ∇xD→0 — no nudge changes its mind, so G gets no hint. That is the vanishing gradient in one line, exactly the saturation warned about in Section 5.
Each foundation feeds the next: landscapes → sampling → the two players → their shared score → the arrows that move them → the failures the topic is about.
That kind of real example is common; a dart aimed at the landscape often lands there.
Write the normalization condition every distribution obeys.
∫p(x)dx=1 (or ∑xp(x)=1 for discrete x) — the total area/probability is one.
Read z∼pz in plain words.
"z is a fresh blob of random numbers drawn from a simple known noise landscape."
What does D(x)=0.5 signify?
The judge genuinely cannot tell if x is real or fake.
Why logD instead of plain D as a score?
log makes a fixed-size nudge near ignorance count far more than the same nudge near certainty, sharpening the training signal.
Write the integral definition of Ex∼p[f(x)].
∫f(x)p(x)dx — the value of f averaged, weighted by the likelihood p(x).
What is ∇θL, and which way does a player step?
The arrow of fastest increase of that player's loss L; the player steps the opposite (downhill) way.
Does D climb or descend the objective V, and why?
D effectively climbs (gradient ascent on V) because its loss is LD=−V; G descends because its loss is LG=+V.
What happens to logD as D→0, and how is it handled in code?
It diverges to −∞ (undefined at 0); code clamps D to [ε,1−ε] so no log0 occurs.
In one line, what makes the generator's gradient vanish?
An over-confident judge has a flat verdict, so ∇xD→0 and no nudge to the fake changes its mind.
What would mode collapse look like in terms of pg?
pg is one tall spike on a single real hill, ignoring every other mode of pdata.
Recall Self-test: can you state the core game?
Two networks: G turns noise z into fakes and wants D(G(z)) high; D scores real-vs-fake and wants it low. Training slides pg onto pdata; D ascends the objective while G descends it, and instability and mode collapse are the two main ways this fails.