Lipsum-FT: Robust Fine-Tuning of Zero-Shot Models Using Random Text Guidance

Giung Nam, Byeongho Heo, Juho Lee · DOI

Introduction

Large-scale vision-language models, such as CLIP, have redefined the landscape of computer vision through their remarkable zero-shot capabilities. By learning a shared embedding space for images and text, these models can classify novel objects without explicit task-specific training. However, practitioners often face a dilemma: while "fine-tuning" these models on a specific reference dataset significantly boosts local accuracy, it frequently degrades the model's inherent robustness. This phenomenon, where a model performs poorly on distribution shifts—such as sketches, artistic renditions, or adversarial examples—after being tuned on natural images, is a major hurdle for deploying reliable AI systems.

Presented at ICLR 2024, Lipsum-FT introduces a novel regularization strategy designed to bridge this gap. By utilizing random "junk" text—akin to the lorem ipsum placeholder text used in publishing—the method ensures that the vision and language components of the model remain aligned during the fine-tuning process.

The Problem: Decoupling and Feature Distortion

Standard fine-tuning typically focuses on minimizing cross-entropy loss on a specific downstream dataset. While effective for that dataset, this process often "decouples" the vision and language representations. The authors argue that existing explanations, such as "feature distortion theory," which suggests that fine-tuning warps features primarily on the training data, are insufficient for multimodal models. Their research reveals a surprising counter-insight: for CLIP, features on out-of-distribution (OOD) data undergo even more significant distortion than those on the training data. This suggests that the model loses the generalized relationships learned during pre-training, leading to a collapse in zero-shot robustness.

Methodology: Random Text Guidance

Lipsum-FT approaches CLIP as a joint energy-based model. The core objective is to minimize the "Energy Gap"—the mismatch between vision and language features—that typically widens during standard fine-tuning.

1. The Energy-Based Perspective

The authors propose that fine-tuning increases the energy levels between the image encoder and the text encoder. Lipsum-FT is the first method to explicitly target the minimization of this energy gap to maintain the integrity of the multimodal embedding space.

2. Random Token Regularization

Instead of using specific, context-heavy prompts (e.g., "a photo of a..."), Lipsum-FT employs thousands of random text strings generated from the CLIP vocabulary. These random tokens act as a "global anchor." During training, the model is forced to ensure that the fine-tuned vision model’s response to an image, when compared against these random strings, remains as close as possible to the original zero-shot model’s response. This "Logit Matching" prevents the vision encoder from drifting away from the language model’s representation space across the entire energy landscape, rather than just for specific class names.

Experimental Evaluation

The researchers evaluated Lipsum-FT using CLIP-ViT architectures (B/32, B/16, and L/14) across several rigorous benchmarks:

  • DomainNet: The model was trained on "Real" images and tested on shifts including Painting, Clipart, Infograph, and Sketch.
  • ImageNet Variants: Models were fine-tuned on ImageNet-1K and tested on ImageNet-V2, ImageNet-R (Renditions), ImageNet-A (Adversarial), and ImageNet-S (Sketch).
  • CUB (Caltech-UCSD Birds-200): This dataset tested generalized zero-shot learning, requiring the model to identify both seen and unseen species.

Key Results and Insights

Lipsum-FT consistently outperformed existing state-of-the-art robust fine-tuning methods, such as WiSE-FT and CAR-FT.

  • Performance Gains: On the DomainNet Clipart shift (using a B/16 backbone), Lipsum-FT achieved 66.3% accuracy, a significant improvement over the 62.5% seen in standard fine-tuning. On the challenging ImageNet-A adversarial set, the method reached 49.9% accuracy, compared to 39.2% for standard tuning.
  • Improved Calibration: Beyond raw accuracy, Lipsum-FT significantly reduced the Expected Calibration Error (ECE). This means the model's confidence scores are more reliable, allowing it to better "know what it doesn't know."
  • Synergistic Effects: The method is "plug-and-play." When combined with other techniques like "Model Soups" (averaging weights from multiple training runs), performance metrics improved even further.

Limitations and Future Directions

While Lipsum-FT offers a robust solution to the fine-tuning trade-off, it introduces a computational overhead of approximately 20% due to the additional forward passes required for random text strings. Furthermore, while random text is a powerful stochastic regularizer, future research could explore "tailored" text guidance to see if specific token distributions provide even better regularization. Currently, the scope of the study is limited to image classification, leaving the application of Lipsum-FT to tasks like object detection or image captioning as an open area for exploration.

Conclusion

Lipsum-FT demonstrates that "junk" data can serve a sophisticated purpose in machine learning. By using random text as a global anchor, the method preserves the rich, universal connections of zero-shot models while allowing them to adapt to specific tasks, providing a path toward more robust and reliable multimodal AI.

Summary updated

BibTeX
@inproceedings{nam2024lipsum,
  author = {Giung Nam and Byeongho Heo and Juho Lee},
  title = {{Lipsum-FT: Robust Fine-Tuning of Zero-Shot Models Using Random Text Guidance}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=2JF8mJRJ7M},
}
Figure