Abstract
Existing data-dependent hashing methods usually learn hash functions from pairwise or triplet data relationships, which only capture the data similarity locally, and often suffer from low learning efficiency and low collision rate. In this work, we propose a new global similarity metric, termed as central similarity, with which the hash codes of similar data pairs are encouraged to approach a common center and those for dissimilar pairs to converge to different centers, to improve hash learning efficiency and retrieval accuracy. We principally formulate the computation of the proposed central similarity metric by introducing a new concept, i.e., hash center that refers to a set of data points scattered in the Hamming space with a sufficient mutual distance between each other. We then provide an efficient method to construct well separated hash centers by leveraging the Hadamard matrix and Bernoulli distributions. Finally, we propose the Central Similarity Quantization (CSQ) that optimizes the central similarity between data points w.r.t. their hash centers instead of optimizing the local similarity. CSQ is generic and applicable to both image and video hashing scenarios. Extensive experiments on large-scale image and video retrieval tasks demonstrate that CSQ can generate cohesive hash codes for similar data pairs and dispersed hash codes for dissimilar pairs, achieving a noticeable boost in retrieval performance, i.e. 3%–20% in mAP over the previous state-of-the-arts.
Introduction
In large-scale image and video retrieval, high-dimensional data must be transformed into compact binary hash codes to enable millisecond-level searches across millions of items. Most existing "deep hashing" methods learn these codes by optimizing local relationships: they compare pairs or triplets of images to minimize or maximize their distance.
However, these local approaches suffer from three primary drawbacks. First, computational complexity grows quadratically ($O(n^2)$) with the number of data points, making them difficult to scale. Second, they lack a global context of the overall data distribution. Third, they are often overwhelmed by data imbalance, as dissimilar pairs vastly outnumber similar ones in real-world datasets.
Methodology: Central Similarity Hashing
To overcome these challenges, we propose Central Similarity Hashing (CSH). Instead of comparing items to each other, we define fixed "Hash Centers"—points in the binary Hamming space that are mathematically optimized to be as far apart as possible.
Constructing Hash Centers
We utilize two primary mathematical techniques to create these global anchors:
- Hadamard Matrices: These ensure that every center is orthogonal to every other center, providing perfect separation in binary space.
- Bernoulli Distributions: When Hadamard dimensions are not applicable, we randomly sample bits to statistically ensure high mutual distance between centers.
Central Similarity Quantization (CSQ)
The neural network is trained using a Central Similarity Loss. Rather than relative comparisons, the loss function pulls the hash code of an image toward its pre-assigned category center. For multi-label data, the target is a "centroid" calculated via bit-wise voting among the relevant category centers. This approach reduces training complexity from $O(n^2)$ to $O(nm)$, where $m$ is the number of classes, leading to significantly faster convergence.
Experimental Results
We evaluated CSQ on five major benchmarks, including ImageNet, MS COCO, and video datasets like UCF101. The results demonstrate that CSQ consistently outperforms previous state-of-the-art methods (such as HashNet and DCH) by 3% to 20% in Mean Average Precision (mAP).
Beyond accuracy, CSQ offers a massive efficiency gain, training 3x to 5.5x faster than HashNet. Qualitative analysis via t-SNE visualizations confirms that CSQ creates much tighter, more cohesive clusters around fixed centers, effectively solving the "scattering" problem seen in pairwise and triplet methods.
Conclusion and Future Work
Central Similarity Hashing introduces a robust global similarity metric that improves both retrieval accuracy and training efficiency. While analytic centers (Hadamard) currently provide the most stable anchors, future research will explore "learnable" centers that might adapt to the natural hierarchies of data, potentially keeping related categories (e.g., different dog breeds) closer in Hamming space than unrelated ones.
Summary updated