Enhancing Multimodal Understanding with CLIP-Based Image-to-Text Transformation

Chang Che, Qunwei Lin, Xinyu Zhao, Jiaxin Huang, Liqiang Yu · DOI

TL;DR

This paper introduces an ensemble framework that enhances image-to-text transformation by combining two specialized adaptations of the CLIP (Contrastive Language-Image Pretraining) model. By merging a multi-layered architecture using differential learning rates with a zero-shot K-Nearest Neighbors (KNN) fusion approach, the authors achieve superior semantic alignment between images and text compared to standalone CLIP models.

What Problem Does This Paper Address?

The core challenge in multimodal AI is bridging the "semantic gap" between computer vision (CV) and natural language processing (NLP). While models like CLIP are excellent at determining if an image and a caption match, transforming a raw image into a coherent, high-quality textual representation remains difficult.

Current methods often struggle to capture the intricate, nuanced relationships within image-text pairs. The authors aim to improve the "interpretability and accessibility of visual data" by creating a more robust pipeline for generating embeddings that accurately reflect the content of an image in a textual space.

Methods

The researchers propose a dual-model ensemble strategy:

  1. Model A (Enhanced Architecture): This model refines the visual embeddings from a pre-trained CLIP vision encoder. It adds two additional fully connected (FC) layers and layer normalization steps. To preserve the knowledge already stored in CLIP while allowing the new layers to learn, they use differential learning rates: a small learning rate for the pre-trained CLIP backbone and a larger one for the newly added FC layers.
  2. Model B (KNN-based Fusion): This model leverages CLIP’s zero-shot capabilities. It maps images and a large corpus of text into a shared embedding space. For a new image, it uses a K-Nearest Neighbors (KNN) approach to find the most relevant text embeddings, weighting them based on Euclidean distance to create a "fused" text representation.
  3. Model Ensemble: The final output is a weighted combination of the embeddings from Model A and Model B ($Ens\_Emb = \alpha \cdot A\_Emb + (1-\alpha) \cdot B\_Emb$), allowing the system to benefit from both structural refinement and contextual retrieval.

Datasets

The paper utilizes a dataset of image-text pairs (referencing the Conceptual Captions dataset in the literature review).

  • Initial Size: 90,000 instances.
  • Processed Size: 60,000 instances.
  • Preprocessing: The authors applied standard data augmentation (rotations, flips, synonym replacement) and a novel Cosine Similarity Filtering step to remove redundant or overly similar textual prompts, ensuring a more diverse training set.

Key Insights and Ideas

  • The Power of Pruning: One of the most practical insights is the impact of "Cosine Similarity Filtering." By removing samples where textual prompts had a similarity score higher than 0.85, the authors reduced the dataset size by 33%. Surprisingly, this didn't just maintain performance—it enhanced the model's metrics while slashing training time from 6 hours to 4 hours per epoch.
  • Differential Learning is Essential: The authors highlight that when adding new layers to a massive pre-trained model like CLIP, a "one size fits all" learning rate is detrimental. Nuanced tweaks to the backbone combined with substantial updates to the new, randomly initialized layers provide the best "harmonious parameter adjustment."
  • Symbiotic Ensemble: While Model B (the KNN approach) actually performed slightly worse than the baseline CLIP on its own, it provided unique contextual information that, when combined with Model A, pushed the final ensemble to the highest overall score.

Key Results

The primary metric used was Average Cosine Similarity (Avg-CosSim), which measures how well the predicted text embedding aligns with the ground truth.

Model Avg-CosSim
CLIP (Baseline) 0.5642
Model B (KNN Fusion) 0.5531
Model A (Enhanced) 0.5753
Ensemble Model 0.5961

The results demonstrate that the ensemble approach provides a statistically significant improvement over standalone models, validating the strategy of combining architectural refinement with zero-shot retrieval.

Limitations and Future Work

While the paper demonstrates clear improvements, a few areas remain open for exploration:

  • Hyperparameter Sensitivity: The paper mentions the weighting coefficient ($\alpha$) for the ensemble but does not provide an exhaustive study on how sensitive the results are to different values of $\alpha$.
  • Computational Overhead: Running two separate models and a KNN search adds computational complexity during inference compared to a single CLIP pass.
  • Scaling: The authors suggest that the "promising trajectory of ensemble learning" should be tested on even more intricate multimodal tasks, such as complex video-to-text transformation or real-time accessibility tools for the visually impaired.

Summary updated

Abstract

The process of transforming input images into corresponding textual explanations stands as a crucial and complex endeavor within the domains of computer vision and natural language processing. In this paper, we propose an innovative ensemble approach that harnesses the capabilities of Contrastive Language-Image Pretraining models.
BibTeX
@misc{che2024enhancing,
  author = {Chang Che and Qunwei Lin and Xinyu Zhao and Jiaxin Huang and Liqiang Yu},
  title = {{Enhancing Multimodal Understanding with CLIP-Based Image-to-Text Transformation}},
  year = {2024},
  eprint = {2401.06167},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.06167},
}
Figure