Efficient Image Retrieval via Decoupling Diffusion into Online and Offline Processing

Fan Yang, Ryota Hinami, Yusuke Matsui, Steven Ly, Shin'ichi Satoh

Abstract

Diffusion-based re-ranking is a powerful technique for improving image retrieval by capturing the manifold structure of feature spaces. However, its high online computational cost has historically hindered its adoption in large-scale, real-time systems. This paper presents a novel framework that decouples the diffusion process into an intensive offline pre-computation stage and a lightweight online linear combination. Coupled with a "late truncation" strategy that preserves manifold integrity, our method achieves a 10x speedup over existing diffusion methods, matching the runtime of k-Nearest Neighbor (k-NN) search while significantly improving retrieval accuracy.

Introduction

In large-scale image retrieval, k-NN search using Euclidean distance is the standard for efficiency. However, Euclidean distance is often a poor proxy for semantic similarity due to the non-linear manifold structure of deep features. Diffusion methods mitigate this by propagating similarity through a graph, effectively traversing these manifolds. Despite their effectiveness, the online cost of solving linear systems or performing random walks remains a bottleneck. We address this by moving the computational burden to an offline indexing phase.

Methodology

Our approach centers on two key technical contributions:

1. Online/Offline Decoupling

We observe that the closed-form solution of the diffusion process allows a query's diffusion vector to be expressed as a linear combination of the diffusion vectors of its neighbors. By pre-computing and sparsifying these vectors for the entire database offline, the online phase is reduced to a simple vector addition based on initial k-NN weights.

Figure 3: Schematic of the decoupling process, showing how offline pre-computation enables fast online retrieval via linear combination.

2. Late Truncation

Traditional diffusion often employs "early truncation" to manage graph size, which can lead to biased transition probabilities. We propose "late truncation," where the full affinity matrix is normalized before sparsification. This ensures that the global manifold structure is respected, leading to more robust ranking.

Experimental Results

We evaluated our method on the Oxford and Paris landmark datasets, including their 100k distractor variants.

Figure 1: Accuracy (mAP) vs. runtime on the Oxford105k dataset. Our method (red) achieves superior accuracy at k-NN-like speeds.

As shown in Figure 1, our method achieves a Mean Average Precision (mAP) of 91.8 on Oxford105k, a substantial improvement over the 87.4 mAP of previous state-of-the-art diffusion methods. Remarkably, the query time is approximately 20ms, which is nearly identical to k-NN search and an order of magnitude faster than prior diffusion implementations.

Conclusion

This work demonstrates that the high accuracy of diffusion-based retrieval can be achieved at the speed of k-NN search through strategic decoupling and optimized truncation. While the method introduces some storage overhead for pre-computed vectors, the dramatic gains in speed and accuracy make it highly practical for modern retrieval systems. Future work will explore further compression of the pre-computed diffusion vectors to enhance scalability.

Summary updated

BibTeX
@inproceedings{yang2019efficient,
  author = {Fan Yang and Ryota Hinami and Yusuke Matsui and Steven Ly and Shin'ichi Satoh},
  title = {{Efficient Image Retrieval via Decoupling Diffusion into Online and Offline Processing}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33019087},
}
Figure