InfoGAN, CycleGAN and StyleGAN: steering what a GAN makes
Three GANs that add control. InfoGAN ties part of the noise to something visible, CycleGAN translates between unpaired collections with a round-trip loss, and StyleGAN injects a style code at every layer. All three are explained here.
What runs in CodeSplash
You will be able to
- Explain InfoGAN's mutual-information term and why a recovered code needn't mean a real factor
- Write the cycle-consistency loss and say what it can't guarantee
- Describe adaptive instance normalization and how StyleGAN uses it
- Say why these image methods are explained, not run, in CodeSplash
Make part of the noise mean something
ReadIn a plain GAN, nothing says which noise coordinate controls what. InfoGANInfoGANA GAN that also asks a helper network to recover part of the noise from each fake, so that part controls something visible. splits the input into ordinary noise and a short code , then adds a helper network that tries to recover from each fake. The generator is rewarded when succeeds:
That term is a lower bound on the mutual information between the code and the fake, up to the code's own entropy. In the reference's example, a helper that mostly recovers three categorical codes gives a bound of 0.786 nats.
Reference · DNN048 · Explained hereInfoGANInfoGAN adds structured latent codes and a mutual-information incentive so that generated observations retain information about those codes.A recovered code isn't a real factor
PredictPredict first
InfoGAN learns a code coordinate that, when swept, changes stroke thickness in generated digits. Has it discovered a true factor of how digits vary?
Reveal
Not necessarily. The term only asks that the code be recoverable from the fake. Which visible change it ends up controlling depends on the architecture, the seed and the data. Sweep the code and look; don't name factors from the objective alone.
Translate without pairs
ReadCycleGAN learns two maps, and , between two collections with no matched pairs, such as photos and paintings. Each direction has its own discriminator. A cycle-consistency lossCycle-consistency lossFor unpaired translation, mapping A→B→A (and B→A→B) should return the input; the loss is the round trip's error. asks that a round trip comes back:
In the reference's example the two round trips miss by a combined 0.30. A small cycle loss shows the maps undo each other. It doesn't show they are faithful: a map can hide information in tiny details and still round-trip.
Reference · DNN049 · Explained hereCycleGANCycleGAN learns translation between two unpaired domains using two generators and discriminators. Cycle consistency discourages arbitrary mappings by asking translation in the reverse direction to recover the original…A style code at every layer
ReadStyleGAN maps noise through a small network to a style code , then feeds into every layer of the generator through adaptive instance normalizationAdaptive instance normalizationNormalizes each channel of a feature map, then rescales and shifts it with values computed from a style code. (AdaIN): normalize each channel of a feature map to mean 0 and SD 1, then scale and shift it by values computed from .
In the reference's example two channels are normalized and restyled. Each channel's new mean equals its shift exactly; the first channel's values become −1.81 to 2.21. Early layers set coarse features such as pose; later layers set fine detail.
Reference · DNN050 · Explained hereStyleGANStyleGAN separates the input latent distribution from intermediate style controls and injects styles at multiple generator scales. This improves control over image synthesis;What runs here
ReadThe tabular GAN that does run, the Synthetic studio's GAN, has no code sweep or style input. To steer what it makes, filter or condition the table you feed it.
Check: steering GANs
CheckpointCheck yourself
What does InfoGAN's helper network Q do?
Show the answer
Answer: a
The generator is rewarded when Q can recover c, which forces c to have a visible effect on the sample.
Check yourself
Which claim can InfoGAN's training objective support on its own?
Show the answer
Answer: b
The term rewards recoverability. Interpreting a coordinate as a real factor needs inspection and outside evidence.
Check yourself
What does CycleGAN's cycle-consistency loss measure?
Show the answer
Answer: b
Each round trip, A to B to A and B to A to B, should return the input. The discriminators separately judge realism.
Check yourself
A CycleGAN has a near-zero cycle loss. What doesn't that guarantee?
Show the answer
Answer: a
The maps can encode information in tiny, invisible details and still round-trip. Faithfulness needs checks on the content itself.
Check yourself
After adaptive instance normalization, what is each channel's mean?
Show the answer
Answer: c
AdaIN normalizes each channel to mean 0 and SD 1, then scales and shifts it. The shift becomes the new mean, the scale the new SD.
Check yourself
In StyleGAN, what tends to change when you alter the style input to the early layers rather than the late ones?
Show the answer
Answer: a
Early layers work at low resolution and set coarse structure; later layers refine detail. Mixing styles across layers shows this.
Recap
Recap- InfoGAN rewards recovering a code from fakes; a controllable coordinate isn't proof of a real factor.
- CycleGAN translates unpaired collections with a round-trip loss that doesn't guarantee faithful content.
- StyleGAN injects a style code into every layer through AdaIN.
- All three are explained here; CodeSplash's GAN generates tables.
Concepts in this lesson