                          GMAIL: Generative Modality Alignment for generated Image Learning

Appendix
In this appendix, we provide the following material:

  • addition implementation and datasets details in Section A,

  • algorithm for our GMAIL in Section B,

  • more discussions on Gen-Real alignment in Section C,

  • more experimental analyses in Section D,

  • qualitative visualization results in Section E.

A. Implementation & Dataset Details
In this section, we provide additional implementation details to ensure the reproducibility of our experiments, along with a
comprehensive description of the datasets used.
Implementation. The base model used in our framework is the CLIP model (Radford et al., 2021), pre-trained on real
images and paired with their textual descriptions. We fine-tune the pre-trained CLIP model on generated images using the
LoRA (Hu et al., 2022) method to introduce low-rank updates, ensuring that the training remains computationally efficient.
For contrastive learning, we set the temperature parameter τ = 0.07 and optimize using the AdamW optimizer with a
learning rate of 1 × 10−4 and a batch size of 256. The synthetic training data were generated using Stable Diffusion v2
on NVIDIA A100-80GB GPUs. The number of generated images is consistent with the number of text-image pairs in the
original training set: 560k for COCO, 3.3 million for CC3M, and 12 million for CC12M. Each image was generated with 50
inference steps, balancing quality and computational efficiency. The total generation time is 5 GPU days for COCO, 30
GPU days for CC3M, and 109 GPU days for CC12M. Parallelized generation was employed for larger datasets like CC12M.
Fine-tuning for “Proj for Real” and “Proj for Gen” was performed for 50,000 steps.
Datasets. To evaluate the versatility and effectiveness of our Gen-Real Alignment framework, we employ a comprehensive
suite of datasets across a variety of tasks, including image captioning, zero-shot image retrieval, and zero-shot image
classification. This ensures a broad assessment of our model’s performance across multiple domains and challenges.

  • COCO (Lin et al., 2014): The COCO dataset is used for both image captioning and zero-shot image retrieval tasks.
    It offers a large and diverse collection of real-world images paired with detailed textual descriptions, serving as a
    benchmark for evaluating the alignment of generated and real image modalities.

  • Zero-Shot Image Classification: To evaluate the generalization capabilities of our model, we utilize eight well-known
    benchmarks, following the setup of the original CLIP (Radford et al., 2021):
       – DTD (Cimpoi et al., 2014): Tests the model’s ability to classify textures across various images.
       – Stanford Cars (Krause et al., 2013): A dataset focusing on fine-grained classification of car models, used to
         assess the model’s capacity to distinguish between visually similar objects.
       – SUN397 (Xiao et al., 2010; 2014): A large-scale scene classification dataset used to evaluate scene understanding.
       – Food 101 (Bossard et al., 2014): A benchmark used to assess the model’s ability to classify food items from
         various cuisines.
       – Aircraft (Maji et al., 2013): Used for fine-grained classification of aircraft models, testing the model’s accuracy
         in distinguishing similar objects.
       – Oxford Pets (Parkhi et al., 2012): A dataset focused on the classification of various pet breeds, including both
         dogs and cats.
       – Caltech 101 (Fei-Fei et al., 2004): A widely used object recognition dataset covering a variety of general
         categories.
       – ImageNet 1K (Deng et al., 2009): A benchmark for large-scale object classification, testing the model’s ability to
         handle diverse image categories.

                                                            13
