top of page

Quantum Generative Adversarial Network on Cifar-10.

Writer's picture: Jash ShahJash Shah

Updated: Jul 13, 2024




Generative Adversarial Networks (GANs): GANs consist of two neural networks - a generator and a discriminator - trained in an adversarial manner. The generator tries to produce synthetic data samples that mimic the real data distribution, while the discriminator tries to distinguish between the real and generated samples. Through this adversarial training process, the generator learns to produce increasingly realistic samples.

However, the base GAN architecture faced challenges in modeling the complex CIFAR-10 distribution, which consists of 60,000 32x32 color images across 10 classes (airplanes, automobiles, birds, cats, deer, dogs, frogs, horses, ships, and trucks). The diversity within each class, varying backgrounds, orientations, and subject scales posed difficulties for the standard GAN in capturing the intricate features and characteristics of the dataset.

Deep Convolutional GANs (DCGANs): DCGANs are a variant of GANs that use deep convolutional neural networks for both the generator and discriminator. This architectural change enables DCGANs to learn hierarchical feature representations and generate higher-quality images compared to traditional GANs.

Results on CIFAR-10:

  • The generator's loss initially spiked and then stabilized, indicating its improved adaptability in producing visually compelling images over time.

  • The discriminator's performance fluctuated as it continually learned to differentiate between real and generated samples, eventually reaching a stable equilibrium.

  • In the later epochs, both generator and discriminator losses peaked, signaling convergence and an equilibrium in the adversarial learning process.

  • Qualitative evaluation showed that the generated images became increasingly recognizable and detailed, capturing features like beaks, wings, and plumage patterns, although still slightly blurry.

  • The discriminator's accuracy metrics initially started high but gradually converged towards 50%, indicating the generator's ability to produce more realistic samples that the discriminator could no longer distinguish reliably.

Explanation: The deep convolutional architecture of DCGANs allowed them to learn and represent the hierarchical features present in the CIFAR-10 dataset more effectively. The adversarial training process, coupled with the convolutional layers, enabled the generator to progressively improve its ability to produce visually compelling and detailed images. The fluctuations in the discriminator's performance and the eventual convergence of losses suggest a stable equilibrium was reached, where the generator could generate samples that were challenging for the discriminator to distinguish from real data.

Conditional GANs (CGANs): CGANs are an extension of GANs that incorporate additional conditional information, such as class labels, during the training process. This allows for class-conditional image generation, where the model can generate samples specific to a particular class.

Results on CIFAR-10:

  • The model demonstrated an improved ability to generate images that matched specific class labels and represented the features of the dataset.

  • After the first epoch, the discriminator loss was 0.3560, and the generator loss was 4.0177. By the 120th epoch, the discriminator loss was 0.6427, and the generator loss was 0.8364.

  • The training loss curves for the discriminator and generator showed the generator's loss initially decreasing rapidly, indicating early learning and development, before stabilizing.

  • The losses converged as training progressed, suggesting an equilibrium where the generator's fake samples were plausible enough to be mistaken for real data at random times.

Explanation: By incorporating class labels as conditional inputs, CGANs could guide the generation process towards producing samples specific to each class in the CIFAR-10 dataset. The rapid initial decrease in the generator's loss and subsequent stabilization suggest that the model learned to capture the class-specific features effectively. The convergence of losses indicates that the generator could produce fake samples that were plausible enough to be mistaken for real data, addressing the mode collapse issue faced by traditional GANs.

Overall, the DCGAN and CGAN architectures demonstrated improved performance over the base GAN in modeling the complex CIFAR-10 dataset. DCGANs leveraged convolutional layers to learn hierarchical representations, enabling the generation of more detailed and visually compelling images. CGANs incorporated conditional information to guide the generation process, resulting in class-specific samples that captured the dataset's diverse features while addressing mode collapse issues.This pioneering research endeavor has successfully harnessed the burgeoning field of quantum computing to push the boundaries of generative modeling for complex image distributions. By ingeniously integrating quantum convolutional neural networks into the generator component of a Generative Adversarial Network (GAN) framework, this project has demonstrated a tangible advancement in modeling the intricate CIFAR-10 dataset, a challenging real-world benchmark that has historically posed significant hurdles for classical GAN architectures.


43 views0 comments

Recent Posts

See All

Comments


bottom of page