Analyze the minimax optimization process used in GAN training. Write the original GAN value function and explain how the Generator and Discriminator update their parameters alternately during adversarial training.
What's actually being asked
A focused analysis of the minimax optimization itself — the value function, and precisely how G's and D's parameters are updated in alternating steps during training.
Answer
The original GAN value function
min_G max_D V(D,G) = 𝔼_{x∼p_data}[log D(x)] + 𝔼_{z∼p_z}[log(1 − D(G(z)))]
This is a two-player, zero-sum-style game: D tries to push V(D,G) as high as possible, G tries to push the same function as low as possible, and the two never optimize simultaneously against a fixed opponent — each sees the current state of the other.
Why it's framed as minimax, not two independent losses
If G and D were each minimizing their own unrelated loss, there'd be no guarantee of any equilibrium. Writing it as one function V(D,G) with nested min/max formalizes a contest with a well-defined (theoretical) solution: the Nash equilibrium where neither player can improve by unilaterally changing their strategy. For GANs, that equilibrium is p_G = p_data, D(x) ≡ 0.5.
Alternating updates, mechanically
In practice the nested min/max is never solved exactly (D isn't trained to full convergence before each G step) — instead, parameters are updated with alternating gradient steps.
Discriminator step (k steps, often k=1): with G's parameters θ_g fixed, take a minibatch of real x and noise z, and update:
θ_d ← θ_d + η_d · ∇_{θ_d} [ (1/m)Σ log D(x_i) + (1/m)Σ log(1 − D(G(z_i))) ]
(gradient ascent, since D maximizes V).
Generator step: with D's parameters θ_d now fixed at their just-updated values, take a fresh noise batch and update:
θ_g ← θ_g − η_g · ∇_{θ_g} [ (1/m)Σ log(1 − D(G(z_i))) ]
(gradient descent on the original saturating loss, since G minimizes V). In practice this is replaced by gradient ascent on the non-saturating loss (1/m)Σ log D(G(z_i)) — mathematically a different objective, but the same fooling goal, chosen purely for better gradient behaviour (next section).
These two steps repeat, alternating, for the whole training run — never jointly in one combined backward pass, since each one treats the other network's parameters as constant.
The saturating-gradient problem, and why it matters here
Early in training, G is weak, so D correctly assigns D(G(z)) ≈ 0 with high confidence. Look at the generator's original loss log(1−D(G(z))) in this regime: as D(G(z))→0, log(1−D(G(z)))→log(1)=0, and crucially its gradient w.r.t. D(G(z)) is −1/(1−D(G(z))), which is small in magnitude precisely when D(G(z)) is near 0 — i.e., the gradient is weakest exactly when G most needs a strong learning signal (when it's performing badly). This is the saturation problem.
The non-saturating alternative log D(G(z)) has gradient 1/D(G(z)) w.r.t. D(G(z)), which is large exactly when D(G(z)) is near 0 — strong gradient precisely when G is weak. This is why virtually every practical GAN implementation trains G by maximizing log D(G(z)) rather than literally minimizing log(1−D(G(z))), even though both express "fool the discriminator."
Convergence behaviour
Because D and G are updated against a constantly-shifting opponent, the overall optimization doesn't behave like ordinary convex gradient descent — losses can oscillate rather than monotonically decrease, and there's no guarantee of convergence to the Nash equilibrium outside the idealized theoretical setting (infinite capacity networks, D trained to optimality at each step). This is the root cause of practical GAN training instabilities like oscillation and mode collapse.
Exam tip
If the question says "analyze the minimax optimization," make sure gradient-ascent-for-D / gradient-descent(or ascent-on-non-saturating)-for-G is stated explicitly with the +/− signs — a common half-mark loss is writing both updates with the same sign direction.