Introduction
Nearest neighbor search (NNS) is a fundamental task in computer vision and information retrieval. As datasets grow in size and dimensionality, traditional search methods become computationally prohibitive. Hashing has emerged as a powerful solution, mapping high-dimensional data into compact binary strings. In this Hamming space, distances can be computed efficiently using bitwise XOR operations.
However, the effectiveness of hashing depends on how well the binary codes preserve the structural relationships of the original data. While many methods focus on pairwise or triplet-based relations, these often fail to capture the global ranking structure. This paper introduces Ordinal Constrained Hashing (OCH), an unsupervised method designed to preserve complex quartic relations—ranking relations between pairs of points—to better maintain data topology in binary space.
Methodology: Preserving Global Ranking
The primary challenge with quartic relations (e.g., "is the distance between A and B smaller than the distance between C and D?") is their computational complexity, which scales at $O(n^4)$. OCH addresses this through three innovative components.
1. Tensor Ordinal Graph (TOG)
Instead of brute-force sampling, OCH represents quartic relations using a structured graph. By utilizing the Kronecker product of affinity and dissimilarity matrices, the method defines the ranking structure mathematically, capturing the global topology without explicit tuple enumeration.
2. Ordinal Constraint Projection (OCP)
To make the $O(n^4)$ complexity manageable for large-scale datasets, OCH employs a landmark-based approach. By selecting a small set of "centers" (via K-means) to represent the dataset, the number of constraints is reduced from $O(n^4)$ to $O(L^3)$, where $L$ is the number of centers. This projection allows the model to approximate the global ordinal graph efficiently.
3. Stiefel Manifold Optimization
Learning optimal hash functions requires balancing discrete outputs with non-redundant projections. OCH relaxes the discrete constraint using a tanh function and optimizes the projection matrix on the Stiefel manifold. This ensures orthogonality between hash bits, maximizing the information carried by each bit.
Experimental Evaluation
The authors evaluated OCH on three benchmark datasets: LabelMe (22k images), Tiny100K (100k images), and GIST1M (1 million images).
Retrieval Accuracy
OCH consistently outperforms state-of-the-art unsupervised hashing methods, including ITQ, Spectral Hashing (SH), and Scalable Graph Hashing (SGH). The performance gain is particularly notable in Mean Average Precision (mAP) and Recall@K metrics across different bit lengths. For instance, on LabelMe with 128-bit codes, OCH achieved an mAP of 0.4620, significantly higher than ITQ's 0.4210.
Computational Efficiency
Beyond accuracy, OCH offers significant improvements in training speed. By constructing the Tensor Ordinal Graph upfront, it avoids the iterative re-sampling bottlenecks common in previous ranking-based methods. On the GIST1M dataset, OCH trained in approximately 36 seconds, nearly three times faster than its predecessor, Ordinal Embedding Hashing (OEH).
Conclusion
Ordinal Constrained Hashing (OCH) represents a significant step forward in unsupervised hashing. By making quartic ranking relations computationally tractable through landmark-based projection and tensor graph construction, OCH achieves superior retrieval accuracy and efficiency. Future work may involve extending this framework to deep learning architectures to capture non-linear data structures more effectively.
Summary updated