Recursive CLIP: Vision-Language Distillation with Looped Transformer Blocks
Organizations: Samsung AI Center Warsaw, Poland · AGH University of Krakow, Poland · ACC Cyfronet AGH, Poland · Institute of Fundamental Technological Research, Polish Academy of Sciences, Poland
Abstract
Contrastive vision-language models such as CLIP typically rely on independently parameterized transformer blocks across depth. We investigate the extent to which these blocks can instead be reused recurrently while preserving the transferable capabilities of CLIP. We study recursive transformer backbones in which a small set of transformer blocks is applied times per forward pass. By holding fixed to the depth of a standard ViT-B, our models preserve computational depth while progressively increasing parameter sharing. We consider two recursive CLIP model families: rCLIP, where only the vision encoder is recursive, and rCLIP, where recurrence is also introduced in the text encoder. We study these models under both direct contrastive training and through knowledge distillation from a strong ViT-B/16 teacher pretrained on DFN-2B, using the substantially smaller CC3M and CC12M datasets. We evaluate the resulting models on zero-shot classification and cross-modal retrieval, and further study their adaptability through few-shot learning, visual grounding, and concept unlearning. Our results show that CLIP can tolerate substantial recurrent block reuse, although its effect depends on the encoder and downstream task. Recurrence also provides parameter efficiency by construction, since fewer distinct transformer blocks need to be stored and adapted. Our results establish recurrent block reuse as a practical design space for vision-language models and highlight its implications for knowledge transfer, downstream adaptation, and parameter efficiency.
Figures & tables
| CLIP Model | Visual [M] | Text [M] | Total [M] |
| Ref. CLIP | 86.19 | 63.43 | 149.62 |
| rCLIP 1b12i | 8.22 | 63.43 | 71.65 |
| rCLIP 2b6i | 15.31 | 63.43 | 78.74 |
| rCLIP 3b4i | 22.40 | 63.43 | 85.83 |
| rCLIP 4b3i | 29.48 | 63.43 | 92.91 |
| rCLIP 6b2i | 43.65 | 63.43 | 107.08 |
| Ref. CLIP | rCLIP 1b12i | ||||
| Objective | IN | IN-R | IN | IN-R | Ret. |
| CRD + ICL + FD | 37.3 | 46.9 | 30.3 | 33.2 | 81% |
| FD | 37.0 | 46.3 | 28.2 | 29.2 | 76% |
| CRD | 26.2 | 28.8 | 22.4 | 22.6 | 86% |
| ICL | 19.3 | 22.3 | 18.4 | 19.6 | 95% |
| AM | 31.0 | 47.5 | 15.5 | 17.0 | 50% |
| Setting | CLIP Model | ImageNet | SUN | Aircraft | EuroSAT | Food | Pets | Flowers | Caltech | DTD | UCF |
| Zero-shot | ViT-B/16 (OAI chkpt) | 66.73 | 62.57 | 23.97 | 42.09 | 85.27 | 88.28 | 67.28 | 93.23 | 44.39 | 65.16 |
| Teacher | 75.91 | 70.68 | 21.60 | 48.09 | 88.27 | 91.47 | 79.09 | 96.96 | 56.86 | 61.83 | |
| Ref. CLIP | 71.86 | 70.45 | 16.59 | 44.43 | 81.05 | 91.66 | 66.10 | 95.46 | 55.67 | 60.19 | |
| rCLIP 1b12i | 56.34 | 61.22 | 4.35 | 33.53 | 58.80 | 84.57 | 48.76 | 89.45 | 42.49 | 49.38 | |
| rCLIP 3b4i | 64.65 | 66.30 | 8.73 | 41.88 | 70.63 | 87.24 | 59.11 | 92.54 | 50.77 | 53.61 | |
| rCLIP 6b2i | 68.54 | 68.22 | 12.87 | 39.83 | 75.39 | 89.81 | 61.92 | 93.55 | 54.43 | 56.54 |
| CLIP Model | RefCOCO | RefCOCO+ | RefCOCOg | ReferIt | Flickr | |||||
| val | testA | testB | val | testA | testB | val | test | test | test | |
| ViT-B/16 (OAI chkpt) | 83.99 | 86.86 | 78.45 | 73.96 | 81.98 | 63.06 | 74.16 | 74.39 | 68.62 | 80.85 |
| Teacher | 83.03 | 85.97 | 78.26 | 72.89 | 79.19 | 63.10 | 73.43 | 73.52 | 68.26 | 79.65 |
| Ref. CLIP | 84.31 | 86.68 | 78.85 | 73.21 | 78.46 | 64.74 | 75.25 | 74.00 | 68.98 | 80.18 |
| rCLIP 1b12i | 80.08 | 82.81 | 74.55 | 67.61 | 74.13 | 57.95 | 69.26 | 68.73 | 67.12 | 76.44 |
| rCLIP 3b4i | 81.75 | 84.56 | 76.96 | 70.99 | 76.78 | 61.30 | 72.24 | 71.93 | 68.19 | 78.28 |
| CLIP Model | Flowers102 | Pets | Food101 | Average | ||||
| (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | |
| Zero-shot | ||||||||
| ViT-B/16 (OAI chkpt) | ||||||||
| Teacher | ||||||||
| Ref. CLIP | ||||||||
| rCLIP 1b12i | ||||||||
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Components | IN | IN-V2 | IN-R | IN-S |
| Ref. CLIP | CRD + ICL + FD | 37.3 | 32.5 | 46.9 | 27.0 |
| Ref. CLIP | FD | 37.0 | 31.7 | 46.3 | 27.9 |
| Ref. CLIP | CRD | 26.2 | 22.4 | 28.8 | 14.2 |
| Ref. CLIP | ICL | 19.3 | 16.4 | 22.3 | 9.8 |
| Ref. CLIP | AM | 31.0 | 26.5 | 47.5 | 23.9 |
| rCLIP 1b12i | CRD + ICL + FD | 30.3 | 26.0 | 33.2 | 16.3 |
| Model | IN | IN-V2 | IN-R | IN-S | |
| Ref. CLIP | 1 | 20.4 | 17.6 | 23.0 | 10.3 |
| Ref. CLIP | 2000 | 31.0 | 26.5 | 47.5 | 23.9 |
| rCLIP 1b12i | 1 | 15.7 | 13.0 | 15.9 | 5.6 |
| rCLIP 1b12i | 2000 | 15.5 | 13.1 | 17.0 | 5.9 |
| Model | CRD | ICL | FD | IN | IN-V2 | IN-R | IN-S |
| rCLIP 1b12i | 1 | 1 | 500 | 26.7 | 23.0 | 28.4 | 13.4 |
| rCLIP 1b12i | 1 | 1 | 1000 | 27.9 | 24.2 | 30.6 | 14.5 |
| rCLIP 1b12i | 1 | 1 | 2000 | 30.3 | 26.0 | 33.2 | 16.3 |
| rCLIP 1b12i | 1 | 1 | 3500 | 31.7 | 27.1 | 35.6 | 18.0 |
| rCLIP 1b12i | 1 | 1 | 5000 | 32.0 | 28.1 | 34.8 | 17.8 |
| rCLIP 1b12i | 0.5 | 1 | 5000 | 31.9 | 27.9 | 34.9 | 18.2 |
| CLIP Model | ImageNet | ImageNet-V2 | ImageNet-R | ImageNet-S | MSCOCO | Flickr | ||
| I2T | T2I | I2T | T2I | |||||
| Ref. CLIP | 38.6 | 33.2 | 49.3 | 26.4 | 36.4 | 26.5 | 63.0 | 48.9 |
| rCLIP 1b12i | 32.8 | 28.6 | 36.8 | 17.8 | 30.6 | 22.4 | 57.6 | 42.9 |
| rCLIP 2b6i | 35.5 | 30.5 | 42.4 | 21.0 | 33.9 | 24.4 | 58.3 | 45.9 |
| rCLIP 3b4i | 36.2 | 30.6 | 45.0 | 23.3 | 35.5 | 25.0 | 60.0 | 47.6 |
| rCLIP 4b3i | 36.5 | 31.1 | 45.6 | 23.4 | 34.4 | 25.0 | 59.6 | 47.8 |
| CLIP Model | ImageNet | ImageNet-V2 | ImageNet-R | ImageNet-S | MSCOCO | Flickr | ||
| I2T | T2I | I2T | T2I | |||||
| Teacher | 76.29 | 68.15 | 83.10 | 62.05 | 60.42 | 43.39 | 85.50 | 69.10 |
| Ref. CLIP | 72.50 | 64.30 | 81.60 | 58.50 | 61.04 | 44.00 | 86.20 | 70.00 |
| rCLIP 1b12i | 56.70 | 48.80 | 62.60 | 40.80 | 51.48 | 34.68 | 77.10 | 61.10 |
| rCLIP 2b6i | 62.80 | 54.60 | 70.70 | 48.10 | 55.68 | 38.19 | 81.80 | 65.68 |
| rCLIP 3b4i | 65.20 | 57.00 | 73.30 | 50.50 | 57.36 | 39.68 | 83.50 | 66.94 |
| Setting | CLIP Model | ImageNet | SUN | Aircraft | EuroSAT | Food | Pets | Flowers | Caltech | DTD | UCF |
| Zero-shot | ViT-B/16 (OAI chkpt) | 66.73 | 62.57 | 23.97 | 42.09 | 85.27 | 88.28 | 67.28 | 93.23 | 44.39 | 65.16 |
| Teacher | 75.91 | 70.68 | 21.60 | 48.09 | 88.27 | 91.47 | 79.09 | 96.96 | 56.86 | 61.83 | |
| Ref. CLIP | 71.86 | 70.45 | 16.59 | 44.43 | 81.05 | 91.66 | 66.10 | 95.46 | 55.67 | 60.19 | |
| rCLIP 1b12i | 56.34 | 61.22 | 4.35 | 33.53 | 58.80 | 84.57 | 48.76 | 89.45 | 42.49 | 49.38 | |
| rCLIP 2b6i | 62.13 | 64.90 | 7.98 | 37.22 | 67.62 | 86.10 | 57.53 | 91.28 | 48.82 | 52.50 | |
| rCLIP 3b4i | 64.65 | 66.30 | 8.73 | 41.88 | 70.63 | 87.24 | 59.11 | 92.54 | 50.77 | 53.61 |
| CLIP Model | RefCOCO | RefCOCO+ | RefCOCOg | ReferIt | Flickr | |||||
| val | testA | testB | val | testA | testB | val | test | test | test | |
| ViT-B/16 (OAI chkpt) | 83.99 | 86.86 | 78.45 | 73.96 | 81.98 | 63.06 | 74.16 | 74.39 | 68.62 | 80.85 |
| Teacher | 83.03 | 85.97 | 78.26 | 72.89 | 79.19 | 63.10 | 73.43 | 73.52 | 68.26 | 79.65 |
| Ref. CLIP | 84.31 | 86.68 | 78.85 | 73.21 | 78.46 | 64.74 | 75.25 | 74.00 | 68.98 | 80.18 |
| rCLIP 1b12i | 80.08 | 82.81 | 74.55 | 67.61 | 74.13 | 57.95 | 69.26 | 68.73 | 67.12 | 76.44 |
| rCLIP 2b6i | 81.66 | 83.34 | 76.57 | 70.07 | 75.44 | 60.85 | 71.22 | 70.82 | 67.74 | 78.16 |
| CLIP Model | Flowers102 | Pets | Food101 | Average | ||||
| (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | |
| Zero-shot | ||||||||
| ViT-B/16 (OAI chkpt) | ||||||||
| Teacher | ||||||||
| Ref. CLIP | ||||||||
| rCLIP 1b12i | ||||||||
| Phase | Blocks † | Epochs ∗ | LR | Batch |
| Warmup | – | 60 / 30 | 640 | |
| Stage 1 | 1st group | 20 / 5 | 480 | |
| Stage 2 | 2nd group | 20 / 5 | 480 | |
| Stage 3 | all | 20 / 5 | 320 |
Vision-Language Models
Vision-language models connect visual inputs with text for retrieval, question answering, generation, and grounded multimodal reasoning.
See all 736 papers