Skip to main content
QUICK REVIEW

[Paper Review] Focus Your Attention: A Bidirectional Focal Attention Network for Image-Text Matching

Chunxiao Liu, Zhendong Mao|arXiv (Cornell University)|Sep 25, 2019
Multimodal Machine Learning ApplicationsComputer Science36 references18 citations
TL;DR

This paper proposes a Bidirectional Focal Attention Network (BFAN) that enhances image-text matching by focusing attention exclusively on semantically relevant image regions and text words, eliminating interference from irrelevant fragments. By preassigning attention, identifying relevant fragments via intra-modality relations, and reassigning attention through a focal mechanism, BFAN achieves state-of-the-art performance with relative Recall@1 gains of 2.2% on both Flickr30K and MSCOCO benchmarks.

ABSTRACT

Learning semantic correspondence between image and text is significant as it bridges the semantic gap between vision and language. The key challenge is to accurately find and correlate shared semantics in image and text. Most existing methods achieve this goal by representing the shared semantic as a weighted combination of all the fragments (image regions or text words), where fragments relevant to the shared semantic obtain more attention, otherwise less. However, despite relevant ones contribute more to the shared semantic, irrelevant ones will more or less disturb it, and thus will lead to semantic misalignment in the correlation phase. To address this issue, we present a novel Bidirectional Focal Attention Network (BFAN), which not only allows to attend to relevant fragments but also diverts all the attention into these relevant fragments to concentrate on them. The main difference with existing works is they mostly focus on learning attention weight while our BFAN focus on eliminating irrelevant fragments from the shared semantic. The focal attention is achieved by pre-assigning attention based on inter-modality relation, identifying relevant fragments based on intra-modality relation and reassigning attention. Furthermore, the focal attention is jointly applied in both image-to-text and text-to-image directions, which enables to avoid preference to long text or complex image. Experiments show our simple but effective framework significantly outperforms state-of-the-art, with relative Recall@1 gains of 2.2% on both Flicr30K and MSCOCO benchmarks.

Motivation & Objective

  • To address semantic misalignment in image-text matching caused by attention mechanisms that inadvertently attend to irrelevant image regions and text words.
  • To improve the accuracy of cross-modal semantic correspondence by eliminating the influence of irrelevant fragments during attention computation.
  • To develop a bidirectional attention mechanism that avoids bias toward long text or complex images by jointly modeling image-to-text and text-to-image attention.
  • To enable more precise and robust alignment between image and text modalities through a focal attention mechanism that emphasizes only relevant fragments.

Proposed method

  • Preassign attention scores to image regions and text words based on their inter-modality relevance to the query fragment.
  • Identify relevant fragments using intra-modality relations, such as spatial or syntactic coherence, to distinguish important from irrelevant components.
  • Reassign attention weights by suppressing irrelevant fragments and concentrating all attention on the most relevant ones, forming a focal attention mechanism.
  • Apply the focal attention mechanism in both image-to-text and text-to-image directions to ensure balanced and bidirectional alignment.
  • Use a learnable scoring function to dynamically assess fragment relevance based on preassigned attention and inter-modality context.
  • Combine two variants—BFAN-prob and BFAN-equal—through ensemble to improve robustness and performance in fragment selection.

Experimental results

Research questions

  • RQ1Can a focal attention mechanism that suppresses irrelevant fragments improve semantic alignment in image-text matching?
  • RQ2How does bidirectional attention in both image-to-text and text-to-image directions affect performance and reduce bias toward longer or more complex modalities?
  • RQ3To what extent does removing interference from irrelevant fragments lead to improved Recall@1 and other matching metrics?
  • RQ4Can a preassigned attention mechanism combined with intra-modality relation learning effectively identify relevant image regions and text words without explicit annotations?

Key findings

  • BFAN achieves a relative Recall@1 improvement of 2.2% over state-of-the-art methods on both the Flickr30K and MSCOCO benchmarks.
  • The combination of BFAN-prob and BFAN-equal variants yields a significant performance boost, demonstrating complementary strengths in relevant fragment selection.
  • Ablation studies show that both the focal attention mechanism and bidirectional design contribute independently and stably to performance gains across datasets.
  • Attention visualization confirms that BFAN reduces attention on irrelevant regions—such as sky or grass—while correctly aligning with target objects like 'moped' or 'water'.
  • Qualitative results demonstrate that BFAN outperforms the baseline in retrieving correct images for both short and long text queries, especially in complex scenes with distracting elements.
  • BFAN successfully discriminates between semantically similar but distinct concepts—e.g., 'cookie' and 'highchair'—where the baseline fails due to over-attention to dominant keywords.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.