# CDL-GAN: Contrastive Distance Learning Generative Adversarial Network for Image Generation
## 4 Experiments
### Results  
For improved image synthesis, we achieved a coincident and remarkable improvement in FID scores across three public datasets over the existing models mentioned above. All the models use the DCGAN as the backbone. As seen in Table 1, CDL-GAN improves FID scores on CIFAR-10 by 1.54 points over ICR-GAN, 18.75 points over CFD-GAN, and 7.96 points over WGAN-GP. On CelebA dataset, CDL-GAN achieved an improvement of 2.25 points over ICR-GAN, 7.30 points over CFD-GAN, and 4.67 points over WGAN-GP at a resolution of \(64\times 64\). On the high-resolution of CelebA, CDL-GAN improved by 3.03 points over ICR-GAN, 9.20 points over CFD-GAN, and 6.55 points over WGAN-GP. The results in Figure 2 show that CDL-GAN significantly outperforms all other models in terms of FID scores. We determined the FID scores in each dataset with five validations for different models. The improvement is still significant compared to the measurement variance. The height difference of each rectangle suggests that our method is more reliable than the existing models in terms of the quality of image synthesis. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Models**} & **MNIST** & **CIFAR-10** & \multirow{2}{*}{**CelebA (64\%64)**} & **CelebA-HD** \\  & **(32\%32)** & **(32\%32)** & & **(128\%128)** \\ \hline ICR-GAN & 0.55 & 15.87 & 15.43 & 19.56 \\ CFD-GAN & 0.53 & 33.08 & 20.48 & 25.73 \\ WGAN-GP & 0.69 & 22.29 & 17.85 & 23.98 \\ \hline CDL-GAN (ours) & 0.48 & 14.33 & 13.18 & 16.53 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Fréchet Inception Distance (FID) scores for CDL-GAN and the existing models. For improved training stability, we verified it in two aspects: using the Adam parameters \((\beta_{1},\beta_{2})\) to evaluate the sensitivity of model performance based on the SNGAN [14] backbone and observing the convergence rate of GAN training without any hyperparameter tuning. As seen in Table 2, in comparison to the baseline SNGAN, SNGAN + CDL achieves lower FID scores than SNGAN. When the Adam optimizer hyperparameter set was \((0.0,0.9)\), SNGAN + CDL improved by 2.89 points over SNGAN. Meanwhile, SNGAN + CDL achieved an improvement of 4.31 points over SNGAN with the Adam parameters \((0.5,0.999)\). Furthermore, the variability in FID scores for SNGAN + CDL on different Adam parameters was 0.49 points, which is smaller than SNGAN with 1.97 points. In Figure 3, we show the relationship between FID scores and training iterations on the baseline SNGAN. It is obvious that SNGAN + CDL converges faster in the early training period and achieves better FID scores in the end. Thereby, our method possesses better robustness in all of these settings. \begin{table}
\begin{tabular}{c c c c c} \hline \((\beta_{1},\beta_{2})\) & **SNGAN** & **SNGAN + CoCD** & **SNGAN + ChCD** & **SNGAN + CDL** \\ \hline (0.0, 0.9) & 12.97 & 12.12 & 11.35 & 10.08 \\ (0.5, 0.999) & 14.88 & 13.33 & 12.98 & 10.27 \\ \hline \end{tabular}
\end{table} 
Table 2: FID scores (lower is better) among SNGAN, SNGAN + CoCD, SNGAN + ChCD, and SNGAN + CDL on CelebA-HD. “SNGAN + CoCD” means combining SNGAN with the consistent contrastive distance, “SNGAN + ChCD” means combining SNGAN with the characteristic contrastive distance, and “SNGAN + CDL” means combing SNGAN with contrastive distance learning. Figure 2: FID scores (lower is better) for CDL-GAN and the existing models for different datasets. The FID scores in each dataset with 5 validations for different models. For a lower computational cost, we profile CDL-GAN's training time with SNGAN backbone for 100 generator update steps, which is similar to [14]. From Figure 4, we can see that our approach takes up minimal time at less than 0.1% of training time per update for all datasets. GANs training with less time taken means decreasing computational costs, and we can easily integrate CDL into the existing GAN frameworks without worrying about extra burden. For mitigating mode collapse, we followed the procedure in [43; 48] evaluated mode recovery with DCGAN [43] and ICR-GAN [21].