On the Dirac-GAN: \nabla_x D_\psi = \psi, so either penalty is \tfrac{\gamma}{2}\psi^2 — the two coincide here, and using both doubles the damping (\gamma \to 2\gamma) — giving
Negative real part for every\gamma > 0; critically damped at \gamma = 2|\ell'(0)|.
(R3GAN’s Eq. 12 prints this without the square — a typo; the Jacobian’s determinant is \ell'(0)^2.)
The Penalized Game Measures Linearized W2
Near equilibrium every payoff linearizes to a\,\langle p - q, D\rangle, and
\sup_D \Big\{ a \langle p - q, D\rangle - \gamma \int m \|\nabla_x D\|^2 \Big\}
= \frac{a^2}{4\gamma}\, \|p - q\|^2_{\dot H^{-1}(m)}
This is the squared linearized W_2 distance. It depends on the differencep - q rather than the density ratio and remains locally sensitive to support displacement.
penalty
at q = p
geometry
Dirac test
one-centered (WGAN-GP)
rewards unit slope
W_1
fails
zero-centered (R_1, R_2)
rewards flat critic
linearized W_2
converges
When One Penalty Is Not Enough
Near equilibrium, the supports overlap, so either penalty can control both measures; the local theorem requires only one.
Far from equilibrium, the penalty acts like implicit smoothing (Roth et al.). Smoothing p alone leaves critic gradients on generated samples uncontrolled.
In the R3GAN StackedMNIST ablation, R_1 alone diverges for both objectives over \gamma \in [0.1, 100]. StyleGAN2 nevertheless trains successfully on FFHQ with R_1 alone.
The Full Loss in Code
The implemented loss combines the pairing objective, a non-saturating generator update, and both penalties. The penalty function returns unscaled per-sample values of \|\nabla_x D\|^2; the caller applies the mean and \gamma/2 at every critic step.
def rpgan_loss_D(critic, real, fake):"""Relativistic pairing loss for the critic: -E[log sigma(D(x) - D(y))]."""return jax.nn.softplus(critic(fake) - critic(real)).mean()def rpgan_loss_G(critic, real, fake):"""Non-saturating pairing loss for the generator."""return jax.nn.softplus(critic(real) - critic(fake)).mean()def r1_r2_penalty(critic, real, fake):"""Per-sample squared critic input gradients on real (R1) and fake (R2), before the gamma/2 scale."""def sq_grad_norm(x): x = jax.lax.stop_gradient(x) grad_fn = jax.grad(lambda xi: critic(xi[None, ...]).squeeze()) grad = jax.vmap(grad_fn)(x)return (grad.reshape(x.shape[0], -1) **2).sum(axis=1)return sq_grad_norm(real), sq_grad_norm(fake)
Phase Portraits Confirm the Eigenvalues
All panels start from (\theta, \psi) = (1, 1). The flow retraces a circle, whereas the discrete iterates cross outward on every revolution. With the penalty, \gamma = 0.3 produces an inward spiral and \gamma = 1 produces a critically damped approach.
Mode Coverage on 25 Gaussians
GAN: 20/25 modes, reverse KL 0.75, on-mode fraction 0.05
off-mode mass 0.95, nearest-center distance mean 0.77 / median 0.78, 26-bin KL 4.09
GAN + $R_1 + R_2$: 25/25 modes, reverse KL 0.19, on-mode fraction 0.03
off-mode mass 0.97, nearest-center distance mean 0.69 / median 0.71, 26-bin KL 4.24
RpGAN + $R_1 + R_2$: 25/25 modes, reverse KL 0.22, on-mode fraction 0.04
off-mode mass 0.96, nearest-center distance mean 0.67 / median 0.69, 26-bin KL 4.18
Plain GAN: stable training, but it never reaches all 25 modes and uses them unevenly (markedly higher reverse KL).
Either penalized configuration covers all 25 modes in the displayed runs and uses them more evenly. The two penalized losses are indistinguishable at this scale.
Every configuration places only a small fraction of its mass within 3\sigma of the centers. The experiment measures improved reach and balance, not a close fit to the mixture.
What the Toy Cannot Show
The RpGAN-vs-GAN coverage gap needs many modes under capacity pressure — StackedMNIST (cited):
loss
modes / 1000
reverse KL
RpGAN + R_1 + R_2
1000
0.078
GAN + R_1 + R_2
693
0.927
either + R_1 only
diverged
—
In the toy experiment, the penalties improve reach and balance. The additional coverage advantage of pairing is supported by the cited StackedMNIST result. The appropriate \gamma is dataset-dependent (0.05–150 across R3GAN’s benchmarks).
Recap
A valid objective need not yield convergent training: Dirac-GAN flow follows circles, and simultaneous discrete updates spiral outward.
Zero-centered penalties give local convergence for every \gamma > 0, with critical damping at \gamma = 2|\ell'(0)|.
Near equilibrium, the penalized game is a scaled linearized W_2^2 distance, based on a difference of measures rather than a density ratio.
Far from equilibrium, symmetric regularization smooths both distributions.
In the experiments, the penalties govern convergence and balance; the StackedMNIST comparison attributes additional mode coverage to pairing.