NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Similarity Reasoning and Filtration for Image-Text Matching

Haiwen Diao, Ying Zhang, Lin Ma, Huchuan Lu

Abstract

The SGRAF (Similarity Graph Reasoning and Attention Filtration) network significantly enhances image-text matching by moving beyond simple scalar similarity scores. By representing similarities as high-dimensional vectors and employing graph-based reasoning (SGR) alongside an attention-driven noise filter (SAF), the model captures complex semantic associations and suppresses uninformative alignments. SGRAF achieves state-of-the-art performance on major benchmarks including MSCOCO and Flickr30K.

Introduction

Image-text matching—the task of finding the most relevant image for a given sentence or vice versa—is a cornerstone of cross-modal retrieval. Despite advancements in deep feature encoding, current models often suffer from three major limitations: the use of simplistic scalar similarities, poor aggregation of local alignments, and the inclusion of "noise" from common, uninformative words like "a" or "the."

Example of image-text alignment challenges where multiple regions correspond to different parts of a sentence.

Methods

The proposed SGRAF network introduces two novel modules to refine how similarities are calculated and aggregated:

Similarity Graph Reasoning (SGR)

Instead of using a single scalar, the model learns a vector representation for every potential alignment. The SGR module treats these local and global similarity vectors as nodes in a graph. Using a Graph Convolutional Neural Network (GCNN), the model reasons across these nodes, allowing information to flow between local alignments (e.g., a "dog" and "grass") and the global alignment (the overall "park" scene). This results in a more holistic matching score where global context validates local details.

Similarity Attention Filtration (SAF)

The SAF module acts as an intelligent filter, learning to assign higher weights to significant, representative alignments while suppressing uninformative ones. For instance, it emphasizes the alignment for the word "splashes" while down-weighting functional words like "in." This selective attention makes the model robust against "hard negatives"—images or texts that are visually or semantically similar but do not match.

Overview of the SGRAF framework, illustrating global and local alignments processed through SGR and SAF modules.

Experimental Results

The model was evaluated on the MSCOCO and Flickr30K datasets. SGRAF achieved state-of-the-art (SOTA) results, outperforming previous leaders like IMRAM and SCAN.

  • MSCOCO (1K test): Achieved a Recall@1 of 79.6% for sentence retrieval and 63.2% for image retrieval.
  • Flickr30K: Achieved a Recall@1 of 77.8% for sentence retrieval and 58.5% for image retrieval.

Qualitative analysis of the SAF module demonstrated its ability to successfully identify key cues while correctly ignoring functional words, confirming the effectiveness of the attention-driven filtration.

Conclusion

SGRAF demonstrates that treating similarity as a feature to be processed, rather than just an output, is a powerful approach for cross-modal retrieval. By integrating graph reasoning and attention filtration, the model achieves a more nuanced understanding of image-text relationships. Future work will focus on optimizing the joint training of these modules and reducing the computational overhead of graph construction for large-scale applications.

Summary updated

BibTeX
@inproceedings{diao2021similarity,
  author = {Haiwen Diao and Ying Zhang and Lin Ma and Huchuan Lu},
  title = {{Similarity Reasoning and Filtration for Image-Text Matching}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i2.16209},
}
Figure