LoTLIP: Improving Language-Image Pre-training for Long Text Understanding


1University of Science and Technology of China, 2Ant Group, 3Zhejiang University, 4Northeastern University, China, 5Institute of Automation, Chinese Academy of Sciences, 6Shanghai Jiao Tong University

Understanding long text is of great demands in practice but beyond the reach of most language-image pre-training (LIP) models. In this work, we empirically confirm that the key reason causing such an issue is that the training images are usually paired with short captions, leaving certain tokens easily overshadowed by salient tokens. Towards this problem, our initial attempt is to relabel the data with long captions, however, directly learning with which may lead to performance degradation in understanding short text (e.g., in the image classification task). Then, after incorporating corner tokens to aggregate diverse textual information, we manage to help the model catch up to its original level of short text understanding yet greatly enhance its capability of long text understanding. We further look into whether the model can continuously benefit from longer captions and notice a clear trade-off between the performance and the efficiency. Finally, we validate the effectiveness of our approach using a self-constructed large-scale dataset, which consists of 100M long caption oriented text-image pairs.

Pre-training Dataset

Our dataset contains long captions for 100M images, where each image is paired with three long captions generated by , , and , respectively. (Click To See)

Evaluation Dataset

Existing short-text-image retrieval tasks primarily rely on short textual input. We collected long text-image pairs from DCI, IIW, and ShareGPT4V datasets for constructing long-text-image retrieval evaluation task.

Benefits and Drawbacks from Long Captions in Pre-training

The impacts of long v.s. short captions on image-language pre-training. Training with short text-image pairs leaves certain tokens (e.g., garden token) easily overshadowed by salient tokens (e.g., castle token). long captions-image pairs can help bring the overshadowed tokens back into the light.

As the length of text (the number of sub-captions) increases, the performance of the pre-trained model on long-text-image retrieval consistently improves and becomes stable. However, there is degradation in the retrieval task and classification when the model is trained with longer text.

Pipeline

In order to find a solution that well balances both long and short texts, we design to add extra text tokens for text encoders, termed corner tokens ([Cor 1], [Cor 2], . · · · ), to aggregate diverse text features.


Experiments

Results on long-text-image retrieval tasks

BibTeX

@inproceedings{LoTLIP2024,
        title   = {LoTLIP: Improving Language-Image Pre-training for Long Text Understanding},
        author  = {Wu, Wei and Zheng, Kecheng and Ma, Shuailei and Lu, Fan and Guo, Yuxin and Zhang, Yifei and Chen, Wei and Guo, Qingpei and Shen, Yujun and Zheng-Jun, Zha},
        journal = {arXiv},
        year    = {2024}
    }