LiT: Zero-Shot Transfer with Locked-image text Tuning

Xiaohua Zhai, Xiao Wang, Basil Mustafa, Andreas Steiner, Daniel Keysers +2 more
11/15/2021
cs.CVcs.CLcs.LG
transformer-attention

Official code: google-research/vision_transformer (12,757 stars, Apache-2.0, last commit 2026-10-01). 1 more implementation below.

Abstract

This paper presents contrastive-tuning, a simple method employing contrastive training to align image and text models while still taking advantage of their pre-training. In our empirical study we find that locked pre-trained image models with unlocked text models work best. We call this instance of contrastive-tuning "Locked-image Tuning" (LiT), which just teaches a text model to read out good representations from a pre-trained image model for new tasks. A LiT model gains the capability of zero-shot transfer to new vision tasks, such as image classification or retrieval. The proposed LiT is widely applicable; it works reliably with multiple pre-training methods (supervised and unsupervised) and across diverse architectures (ResNet, Vision Transformers and MLP-Mixer) using three different image-text datasets. With the transformer-based pre-trained ViT-g/14 model, the LiT model achieves 85.2% zero-shot transfer accuracy on the ImageNet test set, and 82.5% on the challenging out-of-distribution ObjectNet test set.

View on arXivView PDF

Code Implementations(2)

Apache-2.0
12,7571,480Python, Jupyter NotebookOct 21, 20203 weeks agoApache-2.0
Apache-2.0

Official codebase used to develop Vision Transformer, SigLIP, MLP-Mixer, LiT and more.

3,554235HTML, SCSSApr 4, 20221 years agoApache-2.0

Similar Papers

Cite this paper

@article{zhai2021lit,
  title  = {LiT: Zero-Shot Transfer with Locked-image text Tuning},
  author = {Xiaohua Zhai and Xiao Wang and Basil Mustafa and Andreas Steiner and Daniel Keysers and Alexander Kolesnikov and Lucas Beyer},
  year   = {2021},
  eprint = {2111.07991},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.07991}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.07991.svg)](https://codeofpaper.com/paper/2111.07991)

Discussion