Long-CLIP: Unlocking the Long-Text Capability of CLIP

要約

Contrastive Language-Image Pre-training (CLIP) は、画像とテキストのモダリティを調整することによる、ゼロショット分類、テキスト画像の検索、およびテキスト画像の生成の基礎となっています。
CLIP は広く普及しているにもかかわらず、テキスト入力の長さが不十分であるという重大な制限があります。
テキスト トークンの長さは 77 に制限されており、実証研究によると、実際の有効長は 20 未満です。これにより、CLIP は詳細な記述を処理できなくなり、広範な前提条件を持つ画像検索やテキストから画像への生成へのアプリケーションが制限されます。

この目的を達成するために、私たちは、長いテキスト入力をサポートし、ゼロショット汎用性を維持またはそれを超え、CLIP の潜在空間を調整して、何もせずに簡単に CLIP を置き換えることができる、CLIP のプラグアンドプレイの代替手段として Long-CLIP を提案します。
下流の枠組みでのさらなる適応。
それにもかかわらず、単純な微調整は CLIP のパフォーマンスの大幅な低下につながる可能性があるため、この目標を達成するのは決して簡単ではありません。
さらに、テキスト エンコーダーをより長いコンテキストをサポートする言語モデルに置き換えると、膨大な量のデータを使用した事前トレーニングが必要となり、多額の費用が発生します。
したがって、Long-CLIP は、元の機能を維持するように設計された 2 つの新しい戦略 (1) 位置埋め込みの知識を保存したストレッチと (2) CLIP 特徴の主成分マッチングを含む、CLIP 上での効率的な微調整ソリューションを導入します。
わずか 100 万の余分な長いテキストと画像のペアを活用することで、Long-CLIP は、長いキャプションのテキストと画像の検索で約 20%、従来のテキストと画像の検索タスク (COCO や Flickr30k など) で 6% の点で CLIP よりも優れていることが示されました。
さらに、Long-CLIP は、プラグアンドプレイ方式で CLIP を置き換えることにより、詳細なテキスト記述から画像を生成する拡張機能を提供します。

要約(オリジナル)

Contrastive Language-Image Pre-training (CLIP) has been the cornerstone for zero-shot classification, text-image retrieval, and text-image generation by aligning image and text modalities. Despite its widespread adoption, a significant limitation of CLIP lies in the inadequate length of text input. The length of the text token is restricted to 77, and an empirical study shows the actual effective length is even less than 20. This prevents CLIP from handling detailed descriptions, limiting its applications for image retrieval and text-to-image generation with extensive prerequisites. To this end, we propose Long-CLIP as a plug-and-play alternative to CLIP that supports long-text input, retains or even surpasses its zero-shot generalizability, and aligns the CLIP latent space, making it readily replace CLIP without any further adaptation in downstream frameworks. Nevertheless, achieving this goal is far from straightforward, as simplistic fine-tuning can result in a significant degradation of CLIP’s performance. Moreover, substituting the text encoder with a language model supporting longer contexts necessitates pretraining with vast amounts of data, incurring significant expenses. Accordingly, Long-CLIP introduces an efficient fine-tuning solution on CLIP with two novel strategies designed to maintain the original capabilities, including (1) a knowledge-preserved stretching of positional embedding and (2) a primary component matching of CLIP features. With leveraging just one million extra long text-image pairs, Long-CLIP has shown the superiority to CLIP for about 20% in long caption text-image retrieval and 6% in traditional text-image retrieval tasks, e.g., COCO and Flickr30k. Furthermore, Long-CLIP offers enhanced capabilities for generating images from detailed text descriptions by replacing CLIP in a plug-and-play manner.

arxiv情報

著者 Beichen Zhang,Pan Zhang,Xiaoyi Dong,Yuhang Zang,Jiaqi Wang
発行日 2024-03-22 17:58:16+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV パーマリンク