Cross-Modality Attention with Semantic Graph Embedding for Multi-Label Classification

Renchun You, Zhiyao Guo, Lei Cui, Xiang Long, Yingze Bao, Shilei Wen

Abstract

Multi-label classification presents a unique challenge in computer vision, requiring models to simultaneously recognize multiple objects of varying scales and handle complex inter-label dependencies. This paper introduces a novel framework that integrates Adjacency-based Similarity Graph Embedding (ASGE) with Cross-Modality Attention (CMA). By mapping labels into a structured semantic space and using these embeddings to guide visual attention, the proposed model bridges the gap between visual features and semantic categories. Experimental results on MS-COCO, NUS-WIDE, and YouTube-8M datasets demonstrate that this approach sets new state-of-the-art benchmarks in both image and video multi-label classification.

Introduction

Multi-label image classification (MLIC) is inherently more complex than single-label tasks. A single scene may contain numerous objects from diverse categories, often with significant overlap or varying levels of visibility. To achieve high accuracy, a model must possess two critical capabilities: contextual awareness of label co-occurrences (e.g., "car" and "road") and spatial precision to locate specific objects within the frame.

Existing approaches, such as those using Recurrent Neural Networks (RNNs) for label dependencies, often neglect spatial localization. Conversely, standard attention mechanisms frequently operate in an unsupervised manner, lacking explicit semantic guidance. This research addresses these limitations by using label semantics to directly inform the attention process.

Methodology

The proposed framework consists of two primary components designed to align visual data with semantic knowledge.

Adjacency-based Similarity Graph Embedding (ASGE)

To capture label dependencies, the authors construct a label graph where nodes represent categories and edges represent conditional probabilities of co-occurrence. The ASGE module maps these labels into a high-dimensional semantic space. Unlike generic word embeddings, ASGE is optimized to ensure that the cosine similarity between label vectors directly reflects their real-world co-occurrence patterns in the training data.

Cross-Modality Attention (CMA)

The core innovation is the CMA mechanism, which uses label embeddings as queries to generate category-specific attention maps. Because visual features and semantic embeddings reside in different mathematical spaces, a Cross-Modality Transformer (CMT) is employed to project visual features into the semantic space.

Figure 1: The overall architecture of the proposed framework for multi-label image classification.

As shown in the architecture, the model calculates the similarity between projected visual features and each individual label embedding. This process yields a unique attention map for every category, allowing the model to focus on the most discriminative regions for each specific label rather than a generic "interesting" region.

Figure 3: Conceptual diagram illustrating the ASGE and CMA processes, showing how labels are attracted or repelled in the semantic space to guide attention.

Experimental Results

The model was rigorously evaluated across three major benchmarks, demonstrating superior performance over previous state-of-the-art (SOTA) methods:

  • MS-COCO: The Multi-Scale CMA (MS-CMA) variant achieved a Mean Average Precision (mAP) of 83.8%, outperforming the previous best (ML-GCN) of 82.4%.
  • NUS-WIDE: The model reached an mAP of 61.4%, representing a 1.3% improvement over existing benchmarks.
  • YouTube-8M Segments: To test temporal generalization, the model was applied to video data. The CMA-SNet variant achieved 55.8% mAP, significantly higher than the 53.2% achieved by standard self-attention baselines.

Key Insights

  • Semantic Guidance: By using label embeddings as a query, the attention mechanism becomes "aware" of what it is looking for, effectively ignoring background noise and focusing on relevant object regions.
  • Contextual Priming: The model leverages label relationships to handle difficult cases. For instance, if a "dog" is detected, the proximity of the "frisbee" embedding in the semantic space primes the model to look for regions likely to contain a frisbee, even if the object is small or blurry.
  • Domain-Specific Embeddings: ASGE outperformed pre-trained Word2vec embeddings because it captures visual co-occurrence rather than general linguistic relationships, which are more relevant for image classification tasks.

Conclusion and Future Work

This research demonstrates that bridging the modality gap between visual features and semantic labels through graph-based embeddings and guided attention significantly enhances multi-label classification. While the model shows robust performance, its effectiveness depends on the richness of the label graph; sparser graphs (as seen in NUS-WIDE) yield slightly lower gains. Future work may explore reducing the computational overhead of generating category-specific maps and extending this cross-modality framework to tasks like image captioning and visual question answering.

Summary updated

BibTeX
@inproceedings{you2020cross,
  author = {Renchun You and Zhiyao Guo and Lei Cui and Xiang Long and Yingze Bao and Shilei Wen},
  title = {{Cross-Modality Attention with Semantic Graph Embedding for Multi-Label Classification}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i07.6964},
}
Figure