conditional gan
A plain GAN generates from pure noise, so you cannot ask it for a specific thing — you take whatever it gives. A conditional GAN adds a steering input: you tell it "make a 7", or "a face with glasses", or "this sketch, colorized", and both the generator and discriminator are given that side information. Now generation is controllable: the same model can produce any requested class or follow any conditioning input, instead of sampling blindly.
A conditional GAN (Mirza & Osindero, 2014) conditions both networks on auxiliary information y — a class label, attribute vector, text embedding, or even another image. The generator becomes G(z, y) and the discriminator D(x, y): the discriminator must now judge not just "is this real?" but "is this a real image that matches y?", so a real cat image paired with the label "dog" should be rejected. The objective is the GAN minimax with everything conditioned on y: E[log D(x, y)] plus E[log(1 − D(G(z, y), y))]. This forces the generator to respect the condition, because mismatched pairs are penalized.
Practically, y can be concatenated to z and to feature maps, but better-performing methods include conditional batch normalization (the label modulates the BN scale and shift per layer, as in BigGAN), the projection discriminator (Miyato & Koyama: take an inner product between the label embedding and image features rather than concatenating), and the auxiliary-classifier GAN, AC-GAN (the discriminator also predicts the class). Conditional GANs underpin class-conditional synthesis (BigGAN), image-to-image translation (pix2pix is a conditional GAN conditioned on an input image), and text-to-image generation.
A conditional GAN on MNIST takes (z, digit-label): fix the label to "3" and vary z to get many different handwriting styles of a 3; fix z and sweep the label 0→9 to get the "same style" written as each digit — direct evidence the label controls content while z controls style.
A conditional GAN is only as good as the alignment it is trained to enforce — if the discriminator's conditioning is weak (for example naive concatenation), the generator can produce realistic images that ignore y. The projection discriminator and AC-GAN strengthen this label-matching pressure, which is why they noticeably improve class fidelity.