SADIH: Semantic-Aware DIscrete Hashing.

Zheng Zhang, Guo-Sen Xie, Yang Li, Sheng Li, Zi Huang

Abstract

Supervised hashing has become a cornerstone of large-scale multimedia retrieval, enabling high-dimensional data to be compressed into compact binary strings. However, traditional supervised methods often face a scalability "wall" due to quadratic computational complexity and performance degradation from continuous relaxation. We introduce Semantic-Aware DIscrete Hashing (SADIH), a unified framework designed to overcome these bottlenecks. SADIH utilizes an asymmetric similarity approximation to achieve linear scalability and integrates a semantic-aware autoencoder to capture both label information and underlying data structures. Our approach employs discrete optimization to minimize quantization errors. Extensive evaluations on CIFAR-10, SUN397, and ImageNet demonstrate that SADIH provides state-of-the-art retrieval accuracy with orders-of-magnitude faster training times than existing supervised hashing techniques.

Introduction

In the era of big data, efficient similarity search is critical for applications ranging from image retrieval to recommendation systems. Hashing techniques address this by mapping high-dimensional data into a low-dimensional Hamming space, where similarity is measured by the Hamming distance between binary codes. Supervised hashing, which leverages semantic labels to guide the learning process, typically yields superior retrieval performance compared to unsupervised methods.

Despite their success, current supervised hashing models suffer from three primary limitations. First, many methods attempt to preserve pairwise similarities by processing an $n \times n$ similarity matrix, leading to $O(n^2)$ complexity that is prohibitive for massive datasets. Second, label information is often reduced to simple binary "similar/dissimilar" pairs, neglecting the rich discriminative power of category-level semantics. Finally, the NP-hard nature of binary optimization often leads researchers to use continuous relaxation, which introduces significant quantization errors when codes are eventually binarized. SADIH is proposed to address these challenges simultaneously within a computationally efficient framework.

Methodology

SADIH introduces several key innovations to ensure both high retrieval accuracy and linear scalability.

Asymmetric Similarity Approximation

To avoid the $O(n^2)$ complexity of symmetric similarity preservation ($B^T B \approx S$), SADIH adopts an asymmetric approach: $V^T B \approx S$. In this formulation, $B$ represents the binary codes, while $V$ is a real-valued latent semantic embedding derived directly from the labels. This mathematical shift allows the model to exploit the full similarity structure of the dataset without explicitly constructing or storing the massive $n \times n$ matrix, reducing memory and time complexity to $O(n)$.

Semantic-Aware Autoencoder

Rather than relying solely on labels, SADIH incorporates a linear autoencoder ($X \to V \to X$). This ensures that the latent space $V$ not only reflects semantic category information but also preserves the essential structural characteristics of the original visual features $X$. By bridging the "semantic gap" between low-level pixels and high-level concepts, the resulting hash codes are both discriminative for classification and representative of the data's intrinsic geometry.

Discrete Optimization and Robustness

To eliminate the "relaxation gap," SADIH utilizes Discrete Cyclic Coordinate Descent (DCC). This algorithm optimizes binary codes bit-by-bit directly in the discrete space, ensuring that the final hash codes are optimal without the need for rounding. Furthermore, the framework employs the $L_{2,1}$-norm in its loss function. Unlike the standard squared Frobenius norm, which can be overly sensitive to outliers, the $L_{2,1}$-norm provides a more robust objective that improves performance in the presence of noise.

Experimental Evaluation

The performance of SADIH was benchmarked against several state-of-the-art hashing methods across three large-scale datasets: CIFAR-10 (60,000 images), SUN397 (~108,000 images), and a subset of ImageNet (128,000 images).

Performance and Efficiency

SADIH consistently outperformed competing methods in terms of Mean Average Precision (MAP) and Precision@top100 across all bit lengths (8 to 128 bits). For instance, on the CIFAR-10 dataset with 128-bit codes, SADIH achieved a MAP of 0.7348.

Table 1: Performance comparison of SADIH against state-of-the-art methods across three benchmarks. SADIH-L1 demonstrates superior accuracy and significantly reduced computation time.

Beyond accuracy, the computational efficiency of SADIH is a standout feature. On the ImageNet dataset, the SADIH-L1 variant completed training in approximately 8.03 seconds for 128-bit codes, while the popular SDH method required over 1,490 seconds—a speedup of nearly 185x. This efficiency makes SADIH uniquely suited for real-world "big data" applications.

Retrieval Quality

The quality of the learned Hamming space is further evidenced by the precision-recall curves. SADIH maintains high precision even as recall increases, indicating that the retrieved items are consistently relevant.

Figure 1: Precision-Recall curves for different bit lengths on CIFAR-10, SUN397, and ImageNet. SADIH (black and purple lines) consistently occupies the top-right area, indicating superior retrieval performance.

Conclusion

SADIH represents a significant advancement in supervised hashing by successfully addressing the scalability and optimization challenges that have hindered previous methods. By combining asymmetric similarity, semantic-aware autoencoding, and direct discrete optimization, it provides a robust and highly efficient solution for large-scale image retrieval. Future work may involve extending this framework to deep learning architectures for end-to-end feature learning and adapting the model for multi-label retrieval scenarios.

Summary updated

BibTeX
@inproceedings{zhang2019sadih,
  author = {Zheng Zhang and Guo-Sen Xie and Yang Li and Sheng Li and Zi Huang},
  title = {{SADIH: Semantic-Aware DIscrete Hashing.}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33015853},
}
Figure