Skip to main content
QUICK REVIEW

[Paper Review] DALG: Deep Attentive Local and Global Modeling for Image Retrieval

Yuxin Song, Ruolin Zhu|arXiv (Cornell University)|Jul 1, 2022
Advanced Image and Video Retrieval TechniquesComputer Science7 citations
TL;DR

This paper proposes DALG, a fully attention-based single-stage image retrieval framework that replaces multi-scale testing with single-scale inference by leveraging Swin-Transformer for global features and a window-based multi-head attention with spatial attention for local features. It introduces a learnable cross-attention module for hierarchical fusion, achieving state-of-the-art accuracy with significantly improved inference efficiency by eliminating the need for multi-scale testing.

ABSTRACT

Deeply learned representations have achieved superior image retrieval performance in a retrieve-then-rerank manner. Recent state-of-the-art single stage model, which heuristically fuses local and global features, achieves promising trade-off between efficiency and effectiveness. However, we notice that efficiency of existing solutions is still restricted because of their multi-scale inference paradigm. In this paper, we follow the single stage art and obtain further complexity-effectiveness balance by successfully getting rid of multi-scale testing. To achieve this goal, we abandon the widely-used convolution network giving its limitation in exploring diverse visual patterns, and resort to fully attention based framework for robust representation learning motivated by the success of Transformer. Besides applying Transformer for global feature extraction, we devise a local branch composed of window-based multi-head attention and spatial attention to fully exploit local image patterns. Furthermore, we propose to combine the hierarchical local and global features via a cross-attention module, instead of using heuristically fusion as previous art does. With our Deep Attentive Local and Global modeling framework (DALG), extensive experimental results show that efficiency can be significantly improved while maintaining competitive results with the state of the arts.

Motivation & Objective

  • To address the inefficiency of existing image retrieval methods that rely on multi-scale testing for robust performance.
  • To improve the effectiveness and efficiency trade-off in single-stage image retrieval by replacing convolutional networks with a fully attention-based architecture.
  • To design a novel local feature extraction branch that captures diverse visual patterns using window-based and spatial attention mechanisms.
  • To replace heuristic feature fusion strategies with a learnable cross-attention mechanism for better integration of local and global features.
  • To enable high-performance image retrieval using only single-scale input, thereby reducing computational complexity.

Proposed method

  • Utilizes Swin-Transformer as the backbone for global feature extraction, leveraging its hierarchical and local self-attention design.
  • Introduces a local branch with window-based multi-head self-attention and spatial attention to model local visual patterns in overlapping regions.
  • Employs an overlapped window partitioning strategy to preserve critical boundary information and improve local feature representation.
  • Applies a learnable cross-attention module to hierarchically fuse local and global features, replacing handcrafted orthogonal fusion.
  • Implements a gradient-stopping training strategy that decouples global and local branch optimization by halting back-propagation at specific feature stages.
  • Uses ArcFace loss for global features and auxiliary cross-entropy loss for local features, with gradients stopped at intermediate layers to encourage independent learning.

Experimental results

Research questions

  • RQ1Can a fully attention-based model eliminate the need for multi-scale testing in single-stage image retrieval while maintaining high accuracy?
  • RQ2How does window-based multi-head attention compare to full-feature map attention in local feature extraction for image retrieval?
  • RQ3Does learnable cross-attention fusion outperform handcrafted orthogonal fusion in combining local and global features?
  • RQ4What is the impact of gradient-stopping strategies on the performance of local and global feature learning in a joint training setup?
  • RQ5Can a self-attention-based local branch effectively model diverse visual patterns compared to standard convolutional operations?

Key findings

  • The proposed O-Win-MSA (overlapped window-based multi-head self-attention) outperforms both non-overlapped and full-feature map attention, achieving 78.01 mAP on Roxf-M and 88.97 mAP on Rpar-M.
  • The learnable cross-attention fusion method improves mAP by 1.13 and 0.12 points over orthogonal fusion on Roxf-M and Rpar-M, respectively.
  • Stopping back-propagation at the second stage of Swin-Transformer and at the local feature head achieves the best mAP, with 78.01 and 88.97 on Roxf-M and Rpar-M, respectively.
  • The ablation study confirms that gradient stopping enhances feature learning independence, improving performance by 1.5–2.0 mAP points compared to full back-propagation.
  • DALG achieves competitive mAP scores while eliminating multi-scale testing, resulting in a significant reduction in inference complexity.
  • The model achieves state-of-the-art performance on Google Landmark v2, Rparis, and Roxford datasets with single-scale inference.

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.