Top Rank Supervised Binary Coding for Visual Search

Dongjin Song, Wei Liu, Rongrong Ji, David A. Meyer, John R. Smith

Abstract

In large-scale image retrieval, search accuracy at the top of the results list is paramount. Traditional supervised hashing methods often fail to distinguish between ranking errors at the top versus the bottom of a list. This paper presents Top Rank Supervised Binary Coding (Top-RSBC), a novel approach that explicitly optimizes for precision at the highest ranks. By employing a logarithmic loss function, Top-RSBC applies a "top-heavy" penalty that forces the model to prioritize correcting errors where they matter most to users. Experimental results on SUN397, ImageNet100, and YouTube Faces demonstrate that Top-RSBC consistently outperforms existing unsupervised and supervised hashing techniques in both accuracy and search efficiency.

1. Introduction

Searching through massive image collections requires efficient indexing. Binary coding, or hashing, addresses this by mapping high-dimensional features into short Hamming-space bitstrings. While supervised hashing leverages labels to improve retrieval, most existing methods treat all ranking errors equally. In practical search scenarios, users typically only inspect the first few pages of results. A relevant image placed at rank 1,000 is effectively lost. Top-RSBC addresses this by introducing a rank-preserving binary coding framework that focuses on the top of the search results.

2. Methodology

The core of Top-RSBC is a disciplined ranking loss function designed to emphasize top-tier accuracy.

2.1 The Top-Rank Loss Function

The authors define the rank $R$ of a similar sample as the count of dissimilar samples ranked above it. They apply a logarithmic loss: $$L(R) = \log(1 + R)$$ As shown in Figure 1, the derivative $L'(R) = 1/(1+R)$ is significantly larger when $R$ is small. This mathematical property ensures that the optimization gradient—the signal used to update the model—is strongest for mistakes occurring at the top of the list.

The logarithmic loss function $L(R)$ and its derivatives. The steep gradient at low $R$ values creates a "top-heavy" penalty for ranking errors.

2.2 Continuous Relaxations and Optimization

To handle the non-differentiable nature of binary codes and Hamming distances, the authors employ smooth surrogates: the sign function is replaced by $\tanh$, and the indicator function by a sigmoid. Optimization is performed via two methods:

  • Stochastic Gradient Descent (SGD): A robust triplet-based approach.
  • Online Learning: A high-speed variant that updates the model only upon detecting ranking violations, significantly reducing training time for large datasets.

3. Experiments and Results

Top-RSBC was evaluated against three benchmarks: SUN397 (scene categories), ImageNet100 (object categories), and YouTube Faces (biometric search).

3.1 Performance Comparison

Top-RSBC consistently achieved higher Mean Average Precision (MAP) than both unsupervised methods (e.g., LSH, ITQ) and supervised competitors (e.g., HDML, CGH). For instance, on SUN397 with 256-bit codes, Top-RSBC reached a MAP of 0.3441, surpassing the 0.2982 achieved by CGH.

Mean Average Precision (MAP) vs. number of binary bits ($r$) across three datasets: (a) SUN397, (b) ImageNet100, and (c) YouTube Faces. Top-RSBC variants consistently outperform baseline methods.

3.2 Efficiency

Beyond accuracy, Top-RSBC maintains the speed advantages of binary coding. Query times range from 1.8 to 5.0 microseconds, enabling real-time search on massive datasets. While SGD provides the highest accuracy, the Online Learning version offers a significant training speedup with minimal performance loss.

4. Conclusion

Top-RSBC demonstrates the effectiveness of rank-aware loss functions in supervised hashing. While the current linear implementation is highly efficient, future work could integrate this "top-rank" framework into deep learning architectures to capture more complex, non-linear data relationships.

Summary updated

BibTeX
@inproceedings{song2015top,
  author = {Dongjin Song and Wei Liu and Rongrong Ji and David A. Meyer and John R. Smith},
  title = {{Top Rank Supervised Binary Coding for Visual Search}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2015},
  doi = {10.1109/iccv.2015.223},
}
Figure