Improving Zero-shot Generalization and Robustness of Multi-modal Models
Authors:
Preprint
Abstract
Multi-modal image-text models such as CLIP and LiT have demonstrated impressive performance on image classification benchmarks and their zero-shot generalization ability is particularly exciting. While the top-5 zero-shot accuracies of these models are very high, the top-1 accuracies are much lower (over 25% gap in some cases). We investigate the reasons for this performance gap and find that many of the failure cases are caused by ambiguity in the text prompts. First, we develop a simple and efficient zero-shot post-hoc method to identify images whose top-1 prediction is likely to be incorrect, by measuring consistency of the predictions w.r.t. multiple prompts and image transformations. We show that our procedure better predicts mistakes, outperforming the popular max logit baseline on selective prediction tasks. Next, we propose a simple and efficient way to improve accuracy on such uncertain images by making use of the WordNet hierarchy; specifically we augment the original class by incorporating its parent and children from the semantic label hierarchy, and plug the augmentation into text prompts. We conduct experiments on both CLIP and LiT models with five different ImageNet-based datasets. For CLIP, our method improves the top-1 accuracy by 17.13% on the uncertain subset and 3.6% on the entire ImageNet validation set. We also show that our method improves across ImageNet shifted datasets, four other datasets, and other model architectures such as LiT. The proposed method is hyperparameter-free, requires no additional model training and can be easily scaled to other large multi-modal architectures. Code is available at https://github.com/gyhandy/Hierarchy-CLIP.Keywords
All Related Versions
This publication has 8 references indexed in Scilit:
- Learning to Prompt for Vision-Language ModelsInternational Journal of Computer Vision, 2022
- Conditional Prompt Learning for Vision-Language Models2022
- LiT: Zero-Shot Transfer with Locked-image text Tuning2022
- The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization2021
- Natural Adversarial Examples2021
- Large-Scale Object Classification Using Label Relation Graphs2014
- Evaluating knowledge transfer and zero-shot learning in a large-scale setting2011
- Semantic Label Sharing for Learning with Many Categories2010