Source-linked AI summary

Similarity Reasoning and Filtration for Image-Text Matching

Haiwen Diao, Ying Zhang, Lin Ma, Huchuan Lu

arXiv:2101.01368v1cs.CVcs.MM

TL;DR

Prior image-text matching approaches can miss local interactions between image regions and sentence fragments. SGRAF models local and global alignments with vector-based similarities, graph reasoning, and attention filtration. Experiments on benchmark datasets show that SGR and SAF discover image-text associations and achieve further improvements when used together.

  • Problem

    Prior image-text matching approaches often miss local interactions between image regions and sentence fragments, limiting interpretability and performance gains.

    Source: Introduction · p. 1
  • Method

    SGRAF represents local and global alignments with similarity vectors, reasons over their relationships with SGR, and uses SAF to aggregate meaningful alignments.

    Source: Method · p. 3, Vector Similarity Function · p. 3
  • Results

    Experiments on benchmark datasets show that SGR and SAF discover image-text associations and achieve further improvements when cooperating.

    Source: Conclusion · p. 7
  • Takeaways & Limitations

    The experiments support exploiting relationships between local and global alignments and suppressing disturbances from less-meaningful alignments.

    Source: Conclusion · p. 7

Abstract

from arXiv · show

Image-text matching plays a critical role in bridging the vision and language, and great progress has been made by exploiting the global alignment between image and sentence, or local alignments between regions and words. However, how to make the most of these alignments to infer more accurate matching scores is still underexplored. In this paper, we propose a novel Similarity Graph Reasoning and Attention Filtration (SGRAF) network for image-text matching. Specifically, the vector-based similarity representations are firstly learned to characterize the local and global alignments in a more comprehensive manner, and then the Similarity Graph Reasoning (SGR) module relying on one graph convolutional neural network is introduced to infer relation-aware similarities with both the local and global alignments. The Similarity Attention Filtration (SAF) module is further developed to integrate these alignments effectively by selectively attending on the significant and representative alignments and meanwhile casting aside the interferences of non-meaningful alignments. We demonstrate the superiority of the proposed method with achieving state-of-the-art performances on the Flickr30K and MSCOCO datasets, and the good interpretability of SGR and SAF modules with extensive qualitative experiments and analyses.

Introduction

Image-text matching must handle complex correspondences and semantic gaps between images and text. SGRAF addresses shortcomings in similarity computation with vector-based representations, graph reasoning, and attention-based filtering.

Introduction

  • Image-text matching supports tasks including cross-modal retrieval, captioning, text-to-image synthesis, and multimodal translation, but remains challenging.The stated challenges are complex matching patterns and large semantic discrepancies between images and text.Source: Introduction · p. 1
  • Prior approaches can miss local region–fragment interactions and often aggregate alignments without accounting for information exchange or distractions.The paper identifies scalar cosine similarities and simple max or average pooling as limitations in similarity computation.Source: Introduction · pp. 1–2
  • SGRAF combines vector-based alignment representations, graph reasoning, and attention filtration to improve image-text similarity computation.It models global image–sentence and local region–fragment alignments, reasons over their relationships, and suppresses less-meaningful interactions.Source: Introduction · p. 2
  • Vector-based similarity representations model global and local alignments more expressively than scalar cosine similarities.The representations characterize associations between whole images and sentences, as well as between regions and words.Source: Introduction · pp. 1–2
  • SGR uses graph reasoning to capture relationships between local and global alignments and infer more accurate image-text similarities.Its graph convolutional neural network aims to identify complex matching patterns.Source: Introduction · p. 2
  • SAF assigns significance scores to alignments to suppress irrelevant interactions and improve matching accuracy.This filtration addresses distractions from less-meaningful alignments, such as those involving “a” and “in.”Source: Introduction · p. 2

Related Work

Prior image-text matching work encoded features and combined global or local alignments using established similarity measures. This paper distinguishes its approach by reasoning over vector-based cross-modal similarities and filtering less-meaningful alignments.

Image-Text Matching

  • Prior feature-encoding work used varied text encoders and visual attention or region features; this paper applies self-attention to region or word features.Earlier visual approaches included block-based attention, region-based object features, and methods for adding relationships to objects; the paper focuses instead on encoding global and local image-text alignments and fine-grained relations.Source: Image-Text Matching · p. 2
  • Prior methods learned joint embeddings, used inner products or ordered representations globally, and simply fused scalar local alignments; this network reasons over vector alignments and global-local relationships while suppressing less-meaningful ones.The paper describes its similarity aggregation as exploring global-local relationships among vector-based alignments and reducing distraction from less-meaningful alignments.Source: Image-Text Matching · p. 2

Graph Convolution Network

  • Prior graph approaches enhanced single-modality contextual features, whereas SGR performs similarity reasoning over global and local cross-modal alignments.Earlier methods used scene graphs or graph networks to refine visual or textual representations; SGR targets more complex matching patterns.Source: Graph Convolution Network · pp. 2–3

Attention Mechanism

  • Prior image-text attention methods pursued precise cross-modal attention or progressive region-word correspondence, while SAF discards less-semantic alignments.The paper adopts textual-to-visual attention with region-word pairs to calculate textual-attended alignments, then uses SAF to filter less-semantic alignments.Source: Attention Mechanism · p. 3

Method · Generic Representation Extraction · Similarity Representation Learning

SGRAF encodes images and sentences into local and global representations, computes vector-valued similarities across cross-modal pairs, and uses SGR and SAF to reason over and filter alignments.

Visual Representations.

  • Images are represented by Faster R-CNN region features projected to d dimensions, with self-attention over regions producing a global image representation.The detector is pretrained on Visual Genomes.Source: Visual Representations · p. 3

Textual Representations.

  • Sentences are split into words encoded by a bidirectional GRU; averaged forward and backward states form word vectors, and self-attention produces a global text representation.Source: Textual Representations · p. 3

Vector Similarity Function.

  • Instead of a scalar distance, SGRAF represents similarity between d-dimensional cross-modal vectors as an m-dimensional similarity vector using learnable parameters.The passage contrasts this representation with cosine or Euclidean distance, which provides less detailed correspondence.Source: Vector Similarity Function · p. 3

Global Similarity Representation.

Local Similarity Representation.

  • For local similarities, textual-to-visual attention attends to image regions for each word, then computes a vector representation of each word-region alignment.The attention uses cosine similarity with a temperature parameter λ; these local representations capture fine-grained visual-semantic associations.Source: Local Similarity Representation · p. 3

Method

  • SGRAF computes local and global cross-modal similarities, then uses SGR to reason over alignment relationships and SAF to attend to informative alignments for similarity prediction.The method overview also identifies training objectives and inference strategies for both modules.Source: Method · p. 3, Figure 2 · p. 4

Similarity Graph Reasoning

SGR represents word-attended local similarities and global similarity as graph nodes, then propagates information among them to produce a reasoned similarity score.

Graph Building.

  • SGR builds nodes from word-attended similarity representations and the global similarity representation, connecting them with directed edges using learned incoming and outgoing transformations, following Kuang et al. 2019.Source: Graph Building · p. 4

Graph Reasoning.

  • SGR iteratively updates the graph for N steps, then feeds the final global node representation to a fully connected layer to infer the similarity score.This propagates information between local and global alignments to capture their interactions for similarity prediction.Source: Graph Reasoning · p. 4

Similarity Attention Filtration · Training Objectives and Inference Strategies

SAF weights local and global similarity representations to emphasize informative alignments and suppress weak ones, then aggregates them to predict a final similarity. The SGR and SAF modules are trained with bidirectional ranking objectives using joint or independent training, and their scores are averaged at inference.

Similarity Attention Filtration

  • SAF enhances important local alignments while suppressing ineffectual ones, such as alignments involving “the” or “be”.The paper motivates filtration by noting that undifferentiated aggregation of all possible alignments can hinder matching discrimination.Source: Similarity Attention Filtration · p. 4
  • SAF assigns each similarity representation sp a weight βp using sigmoid, batch normalization, and a linear transformation.Source: Similarity Attention Filtration · p. 4
  • The module aggregates the weighted representations into sf and feeds it to a fully connected layer to predict image–sentence similarity.Source: Similarity Attention Filtration · p. 4

Training Objectives and Inference Strategies

Experiments

Experiments evaluate SGRAF on MSCOCO and Flickr30K and examine its components, training strategies, and alignment behavior. Results support the combined method’s retrieval performance and show how SGR and SAF contribute through complementary alignment operations.

Datasets.

  • Experiments use MSCOCO and Flickr30K, report Recall at K, and select the best validation snapshot for testing.MSCOCO has 113,287 training, 5,000 validation, and 5,000 test images, with results averaged over five 1K folds and also reported on the full 5K test set; Flickr30K uses 1,000 validation and 1,000 test images. R@1, R@5, and R@10 are evaluated. Implementation uses Faster-RCNN/ResNet-101 with 36 region proposals, 300-dimensional word embeddings, 1,024 hidden states, and 256-dimensional similarity representations.Source: Datasets · p. 5, Protocols · p. 5, Implementation Details · pp. 5–6

Comparisons on MSCOCO.

  • On MSCOCO, SGRAF reaches 1K-test sentence/image R@1 of 79.6%/63.2% and improves 5K-test R@1 results by more than 3%.The paper reports that SGRAF outperforms existing methods on both test settings.Source: Table 2 · p. 5, Comparisons on MSCOCO · p. 6
  • On Flickr30K, combined SGR and SAF achieve best sentence/image R@1 of 77.8%/58.5%, improving on SGR alone at 75.2%/56.2%.SAF alone produces comparable retrieval results; SGR alone achieves state-of-the-art performance in the reported comparison.Source: Comparisons on Flickr30K · p. 6

Configurations of SGR module.

  • On Flickr30K, SGR improves R@1 over a global-alignment baseline by 12.8% for sentence retrieval and 10.2% for image retrieval; three reasoning steps maximize performance.Combining global and local alignments improves R@1 by at least 1.6% for sentence retrieval and 1.9% for image retrieval.Source: Configurations of SGR module · p. 6, Table 3 · p. 6

Configurations for Similarity Computation.

  • For similarity computation, SGR benefits from word-attended local alignments, while SAF improves matching in both I2T and T2I modes.The authors report that SGR gains little from I2T, attributing this to region features being redundant, relatively independent, and irregularly ordered; averaging learned local alignments also beats averaging local cosine distances.Source: Configurations for Similarity… · pp. 6–7, Table 4 · p. 6

Configurations for Training Process.

  • Independent training gives SGRAF an additional performance promotion, as SGR and SAF cooperate despite their differing strengths and sensitivities.Joint learning helps SAF sentence retrieval and SGR image retrieval, while SAF is more susceptible to hard negatives and SGR faces greater difficulty integrating numerous semantic alignments.Source: Table 5 · p. 6, Configurations for Training Process · p. 7

Qualitative Results and Analysis

  • SAF highlights useful alignments, including mismatches such as “brown,” while SGR reinforces that cue to lower similarity for a hard negative.In the illustrated black-and-white-dog example, average aggregation obscures the color discrepancy; SAF also suppresses irrelevant interactions.Source: Qualitative Results and Analysis · p. 7, Figure 3 · p. 7

Conclusion

SGRAF combines similarity graph reasoning (SGR) with similarity attention filtration (SAF) to improve image-text matching by modeling relationships between local and global alignments and suppressing less-meaningful alignments.

  • SGR performs multistep reasoning over global and local similarity nodes, capturing their relations through information propagation.Source: Conclusion · p. 7
  • SAF emphasizes discriminative, meaningful alignments when aggregating similarities.Source: Conclusion · p. 7
  • Experiments on benchmark datasets show that SGR and SAF discover image-text associations effectively and yield further improvements when combined.Source: Conclusion · p. 7
  • The results underscore the importance of exploiting relationships between local and global alignments while suppressing disturbances from less-meaningful alignments.Source: Conclusion · p. 7

Appendix Overview

The supplementary document expands SGRAF’s method description and reports additional quantitative and qualitative studies.

  • The appendix adds SGRAF diagrams and descriptions of self-attention and SGR, studies graph-dimension impact, and presents bidirectional retrieval examples and model visualizations.Source: Appendix Overview · p. 11

Network Details

SGRAF extracts global and local visual-textual representations, learns local and global similarity vectors, and produces similarity scores through graph reasoning or attention filtration.

Generic Representation Extraction

  • The network uses Faster R-CNN (Anderson et al. 2018) and self-attention (Vaswani et al. 2017) for 1024-d visual and textual representations.It extracts 36 image regions, embeds words as 300-d vectors, and encodes words with a Bi-GRU.Source: Network Details · p. 11

Similarity Representation Learning

  • For a sentence with L words, the method computes L textual-attended 256-d similarity vectors and one global 256-d similarity vector, yielding L+1 local-plus-global 256-d similarity vectors.Source: Network Details · p. 11

Similarity Graph Reasoning

  • Similarity Graph Reasoning treats the L+1 vectors as nodes, learns edge weights, and aggregates connected-node features before predicting similarity.A reasoned 256-d global vector passes through a fully connected layer and sigmoid to produce a scalar score.Source: Network Details · p. 11

Similarity Attention Filtration

  • Similarity Attention Filtration learns L+1 attention weights over the similarity vectors, aggregates them into one 256-d vector, and predicts a scalar score.The aggregated vector is passed through a fully connected layer and sigmoid.Source: Network Details · p. 11

Quantitative Studies

The SGR module is reported to be robust to the similarity-representation graph dimension, with m = 256 selected for the best image-text retrieval results.

Quantitative Studies

  • With three reasoning steps and unshared parameters, SGR is insensitive to graph dimension; m = 256 can yield the best retrieval results.The evaluation considers global and local alignments on Flickr30K.Source: Quantitative Studies · p. 11, Table 7 · p. 11

Qualitative Studies

Qualitative examples show SGRAF’s bidirectional retrieval behavior and illustrate how SAF filters alignments while SGR reasons over fine-grained similarities.

Visualization of the SGRAF Model

  • SAF highlights discriminative alignments, such as “man,” “dancing,” and “street,” while suppressing less-meaningful alignments such as “the” and “in.”The visualization presents SAF attention weights and shows suppression of irrelevant interactions.Source: Qualitative Studies · pp. 11–12, Figure 8 · p. 15
  • SGR captures fine-grained alignments, stressing “young boy” and “Texas” to produce larger gaps between matched and unmatched pairs.The visualization describes SGR as propagating information among similarities to capture crucial alignments.Source: Qualitative Studies · p. 12, Figure 8 · p. 15

Retrieval Examples of Bidirectional Retrieval

  • SGRAF retrieves correct sentences and ground-truth images in examples, even when image negatives share semantic concepts, attributes, and relations with the text.The F30K-Query3 sentence mismatch is described as reasonable because the retrieved description shares relevant concepts and scene details with the image.Source: Qualitative Studies · p. 11, Figure 6 · p. 13, Figure 7 · p. 14
Loading 2101.01368v1…