Towards Optimal Binary Code Learning via Ordinal Embedding

Hong Liu, Rongrong Ji, Yongjian Wu, Wei Liu

Abstract

Ordinal Embedding Hashing (OEH) is an unsupervised hashing technique designed to learn binary codes by preserving the relative ranking of data points. Unlike traditional methods that focus on absolute distance preservation, OEH prioritizes ordinal relations, ensuring that local neighborhood structures are maintained in the Hamming space. Experimental results on image and music retrieval benchmarks demonstrate that OEH achieves superior accuracy and significant computational speedups compared to state-of-the-art unsupervised hashing methods.

Introduction

The explosive growth of high-dimensional data has made efficient similarity search a critical challenge. Hashing has emerged as a powerful solution, mapping complex data into short binary strings to enable fast retrieval via Hamming distance calculations. However, most existing unsupervised hashing methods focus on minimizing quantization error or preserving absolute distances, which may not align with the ultimate goal of retrieval: maintaining the correct ranking of results.

Ordinal Embedding Hashing (OEH) addresses this by shifting the objective from distance preservation to rank preservation. By ensuring that if point A is closer to B than to C in the original space, the same relationship holds in the binary space, OEH creates more robust and semantically meaningful hash codes.

Methodology

The OEH framework consists of four primary stages designed to capture and embed ordinal information efficiently.

Conceptual framework of Ordinal Embedding Hashing (OEH), illustrating the transition from original space distances to an ordinal graph, and finally to learned hash codes.
  1. Ordinal Graph Construction: A directed graph is built where edges represent relative distance relationships between pairs of points (e.g., distance between $i$ and $j$ is smaller than between $k$ and $l$).
  2. Landmark-Based Scaling: To manage the computational complexity of quadruplet relations, OEH utilizes a landmark-based approach. By selecting representative points, the system only computes ordinal relations relative to these landmarks, drastically reducing complexity.
  3. Differentiable Relaxation: To optimize discrete binary codes, the authors employ a $tanh$ relaxation for bits and a sigmoid-based probabilistic model for ranking correctness.
  4. Optimization: Stochastic Gradient Descent (SGD) is used to learn the projection matrix that maps raw features into the binary space while maximizing the likelihood of preserving the ordinal graph structure.

Experimental Evaluation

The performance of OEH was evaluated on three distinct benchmarks: CIFAR10 (60,000 categorized images), LabelMe (22,019 real-world images), and MIR-QBSH (a music retrieval dataset for "Query by Humming").

Key Results

OEH consistently outperforms traditional unsupervised methods such as Iterative Quantization (ITQ) and Spectral Hashing (SH) across various bit lengths and datasets.

Comparative performance metrics (mAP, Precision, and Recall) for OEH and other hashing algorithms on the CIFAR10 and LabelMe datasets.

As shown in the performance summary, OEH achieves a mean Average Precision (mAP) of 0.1682 on CIFAR10 with 8-bit codes, significantly higher than ITQ (0.1512). In the music retrieval task, OEH demonstrated its versatility by embedding the complex Dynamic Time Warping (DTW) metric into Hamming space. This hybrid OEH+DTW approach achieved a 90.7% Top-10 Hit Rate while reducing query time by 80% compared to standard methods.

Discussion and Insights

The success of OEH highlights that ranking is more important than distance for retrieval tasks. By focusing on the local ordinal structure, OEH captures semantic similarities even without manual labels. Furthermore, its metric-independent nature allows it to be applied to non-Euclidean spaces, as evidenced by the music retrieval results. This technology has already seen real-world application, having been integrated into the Tencent QQ Music platform.

Conclusion and Future Work

OEH provides a robust framework for unsupervised hashing by prioritizing ordinal consistency. While highly effective, the computational cost of gradient updates remains a factor for extremely large-scale systems. Future research will explore scaling OEH to even larger datasets and refining the optimization process for longer bit lengths.

Summary updated

BibTeX
@inproceedings{liu2016towards,
  author = {Hong Liu and Rongrong Ji and Yongjian Wu and Wei Liu},
  title = {{Towards Optimal Binary Code Learning via Ordinal Embedding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2016},
  doi = {10.1609/aaai.v30i1.10167},
}
Figure