                           GMAIL: Generative Modality Alignment for generated Image Learning


Table 1. Image captioning. We perform fine-tuning on pre-trained ClipCap, IFCap, LLaVA, and LLaMA-3 for image captioning on
COCO. We report the standard metrics to evaluate the quality of generated captions. The best results are indicated in bold.
         Method                          B@4 (↑)    METEOR(↑)         CIDEr (↑)   SPICE (↑)    ROUGE-L (↑)     WMD (↑)
         ClipCap (Mokady et al., 2021)    32.15          27.10          108.35      20.12            –                –
         ClipCap + GMAIL (ours)           38.12          31.67          119.53      23.75          56.27            62.16
         IFCap (Lee et al., 2024)         33.25          28.60          115.27      21.58          51.35            56.72
         IFCap + GAMIL (ours)             39.32          32.07          127.86      23.98          59.83            63.51
         LLaVA (Liu et al., 2023)         39.67          32.38          134.29      24.17          61.36            65.78
         LLaVA + GMAIL (ours)             43.26          34.89          146.38      27.23          65.25            71.39
         Llama3 (Meta, 2024)              47.36          35.21          158.13      28.35          68.32            75.13
         Llama3 + GMAIL (ours)            50.21          38.59          168.53      32.58          73.29            80.25

Table 2. Zero-shot image retrieval on COCO. We perform zero-shot retrieval on pre-trained CLIP models for image retrieval on the
COCO benchmark. We report the image-to-text and text-to-image Recall@1,5,10 metrics to evaluate the quality of retrieved images.
                                                         Image-to-Text                        Text-to-Image
              Method
                                               R@1 (↑)     R@5 (↑) R@10 (↑)         R@1 (↑)     R@5 (↑) R@10 (↑)
              CLIP (Radford et al., 2021)         51.8       76.8          84.3       32.7       57.7        68.2
              CLIP + GMAIL (ours)                 56.8       80.1          87.2       37.5       62.7        73.2
              Long-CLIP (Zhang et al., 2024)      57.2       80.8          87.8       40.4       65.9        75.7
              Long-CLIP + GMAIL (ours)            62.3       84.1          91.2       45.6       69.8        79.5

and 62.16 WMD, significantly outperforming the baseline              on real images by 5.0 R@1, 3.3 R@5, and 2.9 R@10. For
ClipCap and the ClipCap + LoRA setup. Specifically, our              text-to-image retrieval, CLIP + GMAIL scores 37.5 R@1,
GMAIL approach boosts the original ClipCap (Mokady                   62.7 R@5, and 73.2 R@10, demonstrating gains of 4.8
et al., 2021) by 5.97 B@4, 4.57 METEOR, 11.18 CIDEr,                 R@1, 5.0 R@5, and 5.0 R@10 compared to the baseline
and 3.63 SPICE. These results highlight the advantages of            CLIP. These improvements validate the effectiveness of our
aligning generated and real images within a unified seman-           alignment strategy in bridging the gap between generated
tic space, allowing for enhanced image captioning perfor-            and real image modalities, enhancing zero-shot retrieval
mance. Similarly, when applied to LLAMA-3, our LLAMA-                capabilities. Similarly, when applied to the Long-CLIP ar-
3 + GMAIL model reaches 50.21 B@4, 38.59 METEOR,                     chitecture (Zhang et al., 2024), our Long-CLIP + GMAIL
168.53 CIDEr, 32.58 SPICE, 73.29 ROUGE-L, and 80.25                  configuration further boosts performance, achieving 62.3
WMD, demonstrating notable improvements over both the                R@1, 84.1 R@5, and 91.2 R@10 on image-to-text retrieval,
baseline and the LoRA fine-tuning strategy. Compared to              and 45.6 R@1, 69.8 R@5, and 79.5 R@10 on text-to-image
LLAMA-3 alone, GMAIL achieves gains of 2.85 B@4,                     retrieval. This demonstrates that GMAIL consistently en-
2.46 METEOR, 10.35 CIDEr, and 4.30 SPICE, establish-                 hances model performance across different backbone archi-
ing our approach as a robust technique for enhancing mod-            tectures by facilitating better alignment of generated images
els through Gen-Real alignment. The substantial gains ob-            with real-world data. On the Flickr30k dataset, our CLIP
served across both model architectures confirm the effec-            + GMAIL model achieves 47.1 R@1, 71.2 R@5, and 79.6
tiveness of our GMAIL framework. By fine-tuning with                 R@10 for image-to-text retrieval, outperforming CLIP by
generated images while maintaining alignment with real               3.0 R@1, 3.2 R@5, and 2.6 R@10. In text-to-image re-
image modalities, our method effectively bridges the modal-          trieval, the model scores 39.3 R@1, 61.5 R@5, and 71.8
ity gap, resulting in better understanding and generation of         R@10, with respective gains of 14.6 R@1, 16.0 R@5, and
descriptive captions aligned with real-world data.                   17.2 R@10 over CLIP. These results validate the robustness
                                                                     of our approach in learning meaningful representations from
Zero-shot Image Retrieval. The comparative results in
                                                                     generated images for zero-shot retrieval on real images.
Tables 2 and 3 highlight our model’s superior recall rates,
showcasing its robustness in understanding and associating           Zero-shot Image Classification. We evaluate the zero-shot
visual and textual data. Our method is evaluated on two              classification performance of our model across eight di-
benchmarks: COCO and Flickr30k, using both image-to-                 verse benchmarks, including DTD, Stanford Cars, SUN397,
text and text-to-image retrieval tasks, demonstrating signif-        Food 101, Aircraft, Oxford Pets, Caltech 101, and ImageNet
icant improvements over prior baselines. On the COCO                 1K. As shown in Table 4, our model consistently achieves
dataset, our approach, CLIP + GMAIL, achieves 56.8 R@1,              top-1 accuracy surpassing previous approaches, validating
80.1 R@5, and 87.2 R@10 for image-to-text retrieval, out-            the advantage of leveraging generated images through our
performing the original CLIP (Radford et al., 2021) trained          framework for enhancing zero-shot learning capabilities.

                                                                 6
