Enabling Small Models for Zero-Shot Classification through Model Label Learning

Jia Zhang, Zhi Zhou, Lan-Zhe Guo, Yu-Feng Li

Abstract

Vision-language models (VLMs) like CLIP have demonstrated impressive zero-shot ability in image classification tasks by aligning text and images but suffer inferior performance compared with task-specific expert models. On the contrary, expert models excel in their specialized domains but lack zero-shot ability for new tasks. How to obtain both the high performance of expert models and zero-shot ability is an important research direction. In this paper, we attempt to demonstrate that by constructing a model hub and aligning models with their functionalities using model labels, new tasks can be solved in a zero-shot manner by effectively selecting and reusing models in the hub. We introduce a novel paradigm, Model Label Learning (MLL), which bridges the gap between models and their functionalities through a Semantic Directed Acyclic Graph (SDAG) and leverages an algorithm, Classification Head Combination Optimization (CHCO), to select capable models for new tasks. Compared with the foundation model paradigm, it is less costly and more scalable, i.e., the zero-shot ability grows with the sizes of the model hub. Experiments on seven real-world datasets validate the effectiveness and efficiency of MLL, demonstrating that expert models can be effectively reused for zero-shot tasks.

Introduction

The current landscape of zero-shot learning is dominated by massive Vision-Language Models (VLMs) like CLIP. While these models are versatile, they are computationally expensive to train and often underperform when compared to specialized "expert" models in niche domains. Conversely, the AI community has produced a vast number of small, highly accurate expert models (e.g., on HuggingFace) that lack the flexibility to handle unseen tasks.

This research introduces Model Label Learning (MLL), a framework designed to bridge this gap. By organizing specialized models into a hub and aligning them with semantic labels, MLL enables a collection of small models to perform zero-shot classification with higher accuracy and lower cost than monolithic foundation models.

The MLL Paradigm

The MLL framework operates through a structured three-step process that transforms a static model hub into a dynamic, zero-shot engine.

The MLL Paradigm: A three-step process involving model labeling via a Semantic DAG, selection via CHCO, and ensembling for zero-shot prediction.
  1. Model Labelling: Models are indexed using a Semantic Directed Acyclic Graph (SDAG) based on WordNet. Each node in the graph represents a semantic concept (e.g., "Canine") and is associated with representative images. Models are "pre-tested" against these nodes to generate "functionality labels," identifying which concepts they can recognize.
  2. Model Selection via CHCO: When a new task is presented, the system maps the target classes to the SDAG. The Classification Head Combination Optimization (CHCO) algorithm then identifies the best internal classification heads within the hub models. Rather than selecting a model as a black box, CHCO finds the optimal linear combination of existing heads to distinguish the new target classes.
  3. Model Reuse: The system selects the top $k$ expert predictors and ensembles them. To ensure reliability, MLL uses an entropy-based weighting system, giving higher priority to models that demonstrate high confidence in their specific predictions.

Experimental Results and Scalability

The framework was evaluated using a hub of 48 classification models across seven diverse datasets, including specialized sets like MA-DOG (dogs) and Oxford Flowers-102.

Performance Comparison

On tasks fully covered by the model hub, MLL achieved an average accuracy of 97.23%, significantly outperforming CLIP’s 85.07%. Remarkably, MLL achieved these results with a "reuse budget" ($k$) of only 2, meaning it only needed to ensemble two expert predictors per class to surpass the state-of-the-art.

Scalability

A key advantage of MLL over traditional foundation models is its scalability. While VLMs require exponential increases in data and parameters for marginal gains, MLL’s performance improves linearly as the model hub grows in size and diversity.

Model Hub Scalability: MLL performance improves as more models are added to the hub, consistently outperforming CLIP and other selection baselines.

As shown in the scalability analysis, MLL consistently outperforms baseline selection methods like LogME and LEEP. As more experts are added to the hub, MLL effectively leverages the increased "semantic coverage" to improve zero-shot accuracy.

Conclusion and Future Work

Model Label Learning demonstrates that a hub of small, specialized models can collectively outperform giant VLMs in zero-shot tasks. This paradigm is not only more accurate but also more efficient and scalable.

Future work will focus on moving beyond the discrete WordNet-based SDAG toward more flexible, continuous model labeling. Additionally, the researchers aim to refine the "interim patch" logic, where a general VLM handles classes not yet covered by the expert hub, ensuring a seamless transition as the hub evolves to cover more of the semantic landscape.

Summary updated

Abstract

Vision-language models (VLMs) like CLIP have demonstrated impressive zero-shot ability in image classification tasks by aligning text and images but suffer inferior performance compared with task-specific expert models. On the contrary, expert models excel in their specialized domains but lack zero-shot ability for new tasks. How to obtain both the high performance of expert models and zero-shot ability is an important research direction. In this paper, we attempt to demonstrate that by constructing a model hub and aligning models with their functionalities using model labels, new tasks can be solved in a zero-shot manner by effectively selecting and reusing models in the hub. We introduce a novel paradigm, Model Label Learning (MLL), which bridges the gap between models and their functionalities through a Semantic Directed Acyclic Graph (SDAG) and leverages an algorithm, Classification Head Combination Optimization (CHCO), to select capable models for new tasks. Compared with the foundation model paradigm, it is less costly and more scalable, i.e., the zero-shot ability grows with the sizes of the model hub. Experiments on seven real-world datasets validate the effectiveness and efficiency of MLL, demonstrating that expert models can be effectively reused for zero-shot tasks. Our code will be released publicly.
BibTeX
@misc{zhang2024enabling,
  author = {Jia Zhang and Zhi Zhou and Lan-Zhe Guo and Yu-Feng Li},
  title = {{Enabling Small Models for Zero-Shot Classification through Model Label Learning}},
  year = {2024},
  eprint = {2408.11449},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.11449},
}

Loading related content...

Figure