FineLIP: Extending CLIP's Reach via Fine-Grained Alignment with Longer Text Inputs
Mothilal Asokan, Kebin Wu, Fatima Albreiki
TL;DR
FineLIP extends CLIP to handle long, detailed captions by stretching positional embeddings and introducing Adaptive Token Refinement Module (ATRM) to densify visual and textual tokens. It then applies a token-to-token Cross-Modal Late Interaction Module (CLIM) to perform fine-grained cross-modal alignment, trained with a bidirectional triplet margin loss. Evaluations on long-caption zero-shot retrieval and long-text-to-image generation demonstrate state-of-the-art performance across multiple backbones and datasets, with extensive ablations validating each component. The approach also enables integration with SDXL for longer prompt image generation and shows generalization benefits to short-caption tasks, suggesting broad practical impact for vision-language systems relying on detailed descriptions.
Abstract
As a pioneering vision-language model, CLIP (Contrastive Language-Image Pre-training) has achieved significant success across various domains and a wide range of downstream vision-language tasks. However, the text encoders in popular CLIP models are limited to processing only 77 text tokens, which constrains their ability to effectively handle longer, detail-rich captions. Additionally, CLIP models often struggle to effectively capture detailed visual and textual information, which hampers their performance on tasks that require fine-grained analysis. To address these limitations, we present a novel approach, \textbf{FineLIP}, that extends the capabilities of CLIP. FineLIP enhances cross-modal text-image mapping by incorporating \textbf{Fine}-grained alignment with \textbf{L}onger text input within the CL\textbf{IP}-style framework. FineLIP first extends the positional embeddings to handle longer text, followed by the dynamic aggregation of local image and text tokens. The aggregated results are then used to enforce fine-grained token-to-token cross-modal alignment. We validate our model on datasets with long, detailed captions across two tasks: zero-shot cross-modal retrieval and text-to-image generation. Quantitative and qualitative experimental results demonstrate the effectiveness of FineLIP, outperforming existing state-of-the-art approaches. Furthermore, comprehensive ablation studies validate the benefits of key design elements within FineLIP.
