Abstract
Multi-label image classification (MLIC) presents unique challenges compared to single-label tasks, primarily due to the complex spatial layouts of objects and the intricate co-occurrence relationships between labels. Traditional methods often struggle with noisy localization or fail to model cross-image category relationships. This paper introduces Semantic-Aware Dual Contrastive Learning (SADCL), a framework that leverages Transformer-based feature extraction and a dual contrastive learning strategy. By contrasting label-specific features across samples and against category prototypes, SADCL learns a highly discriminative embedding space, achieving state-of-the-art performance across multiple benchmarks including MS-COCO and Visual Genome.
Introduction
Multi-label image classification (MLIC) involves identifying all relevant objects or attributes within a single image. Unlike single-label classification, MLIC must account for multiple objects that may be partially occluded, vary significantly in scale, or appear against cluttered backgrounds. Furthermore, the semantic relationships between labels—such as the frequent co-occurrence of "keyboard" and "monitor"—provide critical context that models must capture to perform accurately.
Previous approaches have largely relied on Graph Convolutional Networks (GCNs) to model label dependencies or Class Activation Maps (CAMs) for object localization. However, these methods have distinct drawbacks: GCNs often overfit to the specific statistics of a training set, while CAMs are frequently "noisy," highlighting irrelevant background regions rather than precise object boundaries. Crucially, most existing methods focus on intra-image relationships, neglecting the valuable information found in cross-image semantic similarities. SADCL addresses these gaps by introducing a label-level contrastive learning framework.
The SADCL Framework
The SADCL framework is built upon three synergistic components designed to improve feature representation and category discrimination.
1. Semantic-Aware Representation Learning (SARL)
To move beyond noisy CAMs, the SARL module employs a Transformer-based architecture. A Transformer encoder captures global scene context from the feature map, while a Transformer decoder extracts label-specific features. By using "category semantic embeddings" as queries, the decoder can pinpoint the precise spatial locations of each object. This results in cleaner, more localized features compared to traditional attention mechanisms.
2. Sample-to-Sample Contrastive Learning (SSCL)
While standard contrastive learning (e.g., SimCLR) operates at the image level, SADCL operates at the label level. The SSCL module utilizes a memory bank to compare features across the entire mini-batch. It pulls together features representing the same category from different images while pushing apart features of different categories. This ensures that the model learns a consistent representation of a "cat" or a "chair" regardless of the specific image context.
3. Prototype-to-Sample Contrastive Learning (PSCL)
To provide stable anchors for learning, the model maintains "category prototypes"—mathematical representations of the "ideal" feature for each class. The PSCL module forces active features (labels present in the image) to align with their respective prototypes, while inactive features (labels absent from the image) are pushed away. This dual approach prevents feature drift and improves the model's ability to handle negative samples.
Experimental Results
SADCL was evaluated on five major benchmarks, demonstrating superior performance in mean Average Precision (mAP).
- MS-COCO: The model achieved 86.8% mAP, surpassing previous leading methods such as Query2Label and TDRG.
- Visual Genome (VG500): On this challenging dataset featuring 500 categories, SADCL reached 40.5% mAP. This significant improvement over the previous best (39.5%) highlights the model's robustness in "long-tail" scenarios where many categories have few samples.
- PASCAL VOC & NUS-WIDE: Consistent improvements were observed across these datasets, confirming the framework's versatility.
Qualitative analysis using t-SNE visualizations further supports these results, showing that SADCL produces much tighter and more distinct clusters for different categories compared to baseline models. The SARL module also demonstrated superior localization, producing tighter attention maps that focus strictly on the objects of interest.
Discussion and Conclusion
The success of SADCL underscores the importance of label-level contrastive learning in multi-label tasks. By treating an image as a collection of distinct semantic concepts rather than a single point, and by using category prototypes as anchors, the model achieves a more nuanced understanding of complex scenes.
While the framework introduces some computational overhead due to the Transformer architecture and memory bank requirements, the gains in precision—especially on large-scale datasets like Visual Genome—are substantial. Future work may explore the application of these semantic-aware techniques to related fields such as weakly supervised semantic segmentation or multi-modal image-text retrieval.
Summary updated