Hybrid Sharing for Multi-Label Image Classification

Zihao Yin, Chen Gan, Kelei He, Yang Gao, Junfeng ZhangICLR 2024

Overview

The Hybrid Sharing Query (HSQ) framework treats multi-label image classification as a multi-task learning problem to solve the "seesaw effect," where learning one label often degrades the performance of another. By introducing a Mixture-of-Experts (MoE) architecture with both shared and task-specific experts, HSQ adaptively fuses common semantic knowledge with label-specific nuances, achieving state-of-the-art results on major benchmarks like MS-COCO and PASCAL VOC.

The Challenge: Label Heterogeneity

In Multi-Label Classification (MLC), a single image can contain many different objects (e.g., a "dog," a "person," and a "car"). Traditionally, models use a shared backbone to extract features for all labels simultaneously. However, this leads to label heterogeneity: the features needed to identify a "sink" might conflict with those needed to identify a "cloud."

In the world of Multi-Task Learning (MTL), this is known as negative transfer. When a model tries to learn everything at once, the gradients from conflicting labels can "obscure" each other, leading to a performance plateau. Previous transformer-based methods focused heavily on label correlation (how labels appear together) but neglected this heterogeneity (how labels compete for model capacity).

The Hybrid Sharing Query (HSQ) Architecture

To address these challenges, the authors propose HSQ, which consists of three main stages:

  1. Feature Extraction Backbone: A standard CNN or Vision Transformer (like ResNet or ConvNeXt) extracts global image features.
  2. Query Transformer: Inspired by recent "Query2Label" approaches, the model uses learnable "classification tokens" (one for each label) that interact with the image features via cross-attention. This helps the model focus on regions relevant to specific objects.
  3. Hybrid Sharing Layer: Instead of a standard feed-forward network, HSQ uses a specialized Mixture-of-Experts (MoE) structure.
HSQ Architecture

This core innovation relies on three components:

  • Shared Experts: A pool of experts that capture universal features and correlations across all labels.
  • Task-Specialized Experts: Dedicated groups of experts for each specific label, ensuring that unique, non-shared characteristics are preserved.
  • Gating Networks: For every label, a gate adaptively weights the contributions of the shared experts and its own specialized experts. This allows the model to "decide" on the fly how much general vs. specific information it needs for a given image.

Key Insights

  • MLC is MTL: The most significant conceptual shift is explicitly treating each label as an individual "task." This allows the authors to borrow mature MoE techniques from the multi-task learning field to solve computer vision problems.
  • Balancing the General and the Specific: The hybrid approach (Shared + Specialized) is crucial. Ablation studies showed that using only specialized experts prevents the model from learning useful correlations, while using only shared experts (like a standard model) leads back to the negative transfer problem.
  • Modular Internal Representation: The model learns to route information dynamically. Some experts become "generalists" used by almost everything, while others become "specialists" that only fire for specific categories like "chair" or "horse."

Results and Performance

The model was evaluated on two gold-standard benchmarks for multi-label classification: MS-COCO (80 object categories) and PASCAL VOC 2007 (20 object categories).

State-of-the-art comparison on MS-COCO

HSQ achieved impressive quantitative gains across the board:

  • MS-COCO: Reached a state-of-the-art 92.0% mAP (mean Average Precision) using a ConvNeXt-L backbone. Even with a smaller ResNet-101 backbone, it outperformed previous transformer-based models.
  • PASCAL VOC: Achieved 96.4% mAP, setting a new high bar for the dataset.
  • Mitigating Negative Transfer: The model showed significant improvements in "difficult" pairs. For example, it significantly reduced the performance gap between visually similar categories like "cow" and "horse" or "bike" and "motorbike," where standard models often get confused.

Limitations and Future Directions

While HSQ is powerful, the paper notes a few areas for growth:

  • Computational Complexity: MoE architectures naturally involve more parameters than standard networks. Although the authors use a gated approach, the memory footprint of having specialized experts for every label could become a bottleneck as the number of categories scales into the thousands.
  • Routing Efficiency: The current routing/gating mechanism is relatively simple (linear layers). More sophisticated routing strategies—perhaps those that group semantically similar labels together into "expert clusters"—could further improve efficiency and performance.
  • Scaling to "In-the-Wild" Data: Most experiments were on curated benchmarks. Testing how this hybrid sharing handles extremely unbalanced or noisy real-world web data remains an open question.

Summary updated

BibTeX
@inproceedings{yin2024hybrid,
  author = {Zihao Yin and Chen Gan and Kelei He and Yang Gao and Junfeng Zhang},
  title = {{Hybrid Sharing for Multi-Label Image Classification}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=yVJd8lKyVX},
}
Figure