StarFT: Robust Fine-tuning of Zero-shot Models via Spuriosity Alignment

Younghyun Kim, Jongheon Jeong, Sangkyung Kwak, Kyungmin Lee, Juho Lee, Jinwoo Shin · DOI

Abstract

Vision-language models (VLMs) like CLIP exhibit remarkable zero-shot robustness, yet this robustness is often compromised during downstream fine-tuning as models succumb to "shortcut learning." We present StarFT (Spurious Textual Alignment Regularization), a novel framework that leverages the world knowledge of Large Language Models (LLMs) to identify and mitigate spurious correlations. By aligning the fine-tuned model's behavior on corrupted textual prompts with the original zero-shot model, StarFT preserves robustness while enhancing task-specific performance. Our experiments demonstrate significant gains, including a 14.30% improvement in worst-group accuracy on the Waterbirds benchmark and superior out-of-distribution (OOD) performance across ImageNet variants.

Introduction

Large-scale vision-language models have redefined the state-of-the-art in computer vision through their ability to generalize to unseen concepts. However, a persistent challenge remains: when these models are fine-tuned on specific datasets to improve local accuracy, they often lose their inherent "zero-shot" robustness. This phenomenon, often termed "shortcut learning," occurs because the model begins to rely on spurious correlations present in the training data—such as associating a specific background or lighting condition with a class label—rather than the core semantic features of the object.

Existing robust fine-tuning methods typically attempt to mitigate this by keeping the model's weights mathematically close to the original pre-trained weights. While helpful, these methods do not explicitly address the underlying cause of robustness degradation. StarFT shifts this paradigm from weight preservation to spuriosity alignment, ensuring the model ignores the same non-essential features that the original zero-shot model was robust against.

Methodology: Spurious Textual Alignment Regularization

StarFT introduces a three-stage pipeline designed to identify and neutralize spurious features during the fine-tuning process.

1. Extracting Spuriosity via LLMs

Rather than requiring manual labeling of potential biases, StarFT utilizes the broad knowledge base of LLMs (e.g., GPT-3.5). The LLM is queried to brainstorm potential spurious features that might appear in general image classification tasks, such as specific backgrounds ("mountains," "forest"), textures ("rough," "smooth"), or image qualities ("blurry," "high-resolution").

2. Creating Corrupted Captions

These identified spurious concepts are then used to augment standard class labels. For a label like "a photo of a cat," the system generates "corrupted" captions such as "a photo of a cat in the mountains" or "a blurry photo of a cat." These captions serve as textual proxies for the types of visual shortcuts the model might encounter in the training data.

3. The StarFT Loss Function ($L_{Star}$)

During fine-tuning, the model is optimized using a standard contrastive loss alongside a specialized regularization loss, $L_{Star}$. This loss forces the fine-tuned model’s output distribution for the corrupted captions to match the distribution produced by the original, robust zero-shot model.

A critical technical component of this loss is Positive Pair Masking. By masking out the true class during regularization, the model is not penalized for correctly identifying the object itself; instead, the penalty is focused strictly on how the model reacts to the spurious textual descriptors. This ensures that the model learns to be invariant to the "noise" introduced by the LLM-generated concepts.

Experimental Results

StarFT was evaluated by fine-tuning on ImageNet-1K and testing across a variety of OOD and group-shift benchmarks.

Group Robustness and Waterbirds

In the Waterbirds benchmark, which specifically tests for background bias (e.g., landbirds on water), StarFT achieved a breakthrough. It improved worst-group accuracy by 14.30% and average accuracy by 3.02% compared to existing robust baselines. This suggests that StarFT effectively prevents the model from relying on background shortcuts.

Out-of-Distribution Performance

On ImageNet OOD tasks (using ViT-B/16), StarFT achieved an average accuracy of 64.4%. This outperforms standard fine-tuning (59.1%) and the previous state-of-the-art baseline, CaRot (63.7%). The results indicate that the model retains its ability to generalize to different renditions (ImageNet-R), adversarial examples (ImageNet-A), and sketches (ImageNet-S).

Cross-Dataset Generalization

One of the most surprising findings was that fine-tuning on ImageNet with StarFT actually improved zero-shot performance on unrelated datasets like CIFAR-100 and Caltech101. In contrast, standard fine-tuning typically causes a performance drop on these external tasks, a phenomenon known as catastrophic forgetting of robustness.

Discussion and Future Work

StarFT demonstrates that LLMs can serve as effective "bias detectors," providing a scalable way to identify potential shortcuts without manual intervention. While the method is currently reliant on the quality of LLM-generated concepts, it has proven resilient even to occasional "hallucinated" or irrelevant descriptors.

Future research directions include:

  • Task-Specific Prompting: Moving beyond general spurious features (background/texture) to identify domain-specific biases, such as those found in medical or satellite imagery.
  • VLM Generalization: Extending the StarFT framework to other vision-language architectures beyond CLIP, such as ALIGN or OpenCLIP, to verify the universality of the alignment approach.

By focusing on behavioral alignment rather than weight proximity, StarFT provides a robust path forward for adapting large-scale models to specific tasks without sacrificing the generalization that makes them valuable in the first place.

Summary updated

BibTeX
@inproceedings{kim2025starft,
  author = {Younghyun Kim and Jongheon Jeong and Sangkyung Kwak and Kyungmin Lee and Juho Lee and Jinwoo Shin},
  title = {{StarFT: Robust Fine-tuning of Zero-shot Models via Spuriosity Alignment}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/616},
}
Figure