Abstract
Large-scale image retrieval systems rely on hashing to convert complex visual data into compact binary codes. However, traditional deep hashing models require full retraining and re-indexing when new image categories are introduced. We propose the Deep Incremental Hashing Network (DIHN), which utilizes an asymmetric architecture to handle incremental updates efficiently. By keeping existing hash codes invariant and learning new codes directly, DIHN achieves up to a 3x speedup in training time compared to state-of-the-art methods like ADSH without sacrificing retrieval accuracy.
Introduction
In the era of big data, hashing has become indispensable for fast image retrieval. By mapping images to short binary strings, systems can perform similarity searches across millions of items in milliseconds. Despite their success, modern deep hashing methods are often rigid. Adding a new category—such as "electric scooters" to a database of "bikes"—typically necessitates retraining the entire neural network on the combined dataset and regenerating hash codes for all existing images. This process is computationally prohibitive for real-time applications.
Methods: Asymmetric Incremental Hashing
The core innovation of DIHN is its asymmetric deep hashing strategy. Unlike symmetric models that process all images through a single network, DIHN decouples the hash function from the database codes.
The framework consists of several key components:
- Asymmetric Design: A deep CNN serves as the hash function for query images, while hash codes for new database images ($B'$) are learned as discrete variables during optimization.
- Code Preservation: Hash codes for the original database ($B$) remain unchanged, avoiding the need for massive re-indexing.
- Incremental Hashing Loss: A specialized loss function minimizes the distance between CNN outputs and binary codes, preserving pairwise similarity across old and new data.
- Optimization: The model employs an alternating optimization strategy, using backpropagation for CNN parameters and Discrete Cyclic Coordinate Descent (DCC) to solve for new binary codes bit-by-bit.
Experimental Evaluation
The authors evaluated DIHN on two standard benchmarks:
- CIFAR-10: 60,000 images across 10 classes, tested with various original/incremental splits (e.g., 7/3 and 4/6).
- NUS-WIDE: Approximately 270,000 multi-label images, focusing on the 21 most frequent concepts with an 18/3 split.
To maintain efficiency as the database grows, DIHN can be trained using a representative subset of original hash codes, significantly reducing the complexity of similarity matrix computations.
Key Results
DIHN demonstrates a significant advantage in training efficiency without compromising accuracy. On the NUS-WIDE dataset, DIHN reached peak Mean Average Precision (MAP) in approximately 28 minutes, compared to 83 minutes for the state-of-the-art ADSH model.
In terms of retrieval quality, DIHN matches or exceeds batch-retraining methods. For a 48-bit hashing task on CIFAR-10 (7/3 split), DIHN achieved a MAP of 0.9346, nearly identical to the 0.9390 achieved by ADSH, which requires full retraining. Furthermore, the computational complexity for updating codes is $O(n)$, scaling linearly with the number of new images.
Discussion and Limitations
The "aha moment" of DIHN is the realization that a network does not need to re-process every database image to maintain a searchable index. However, the model's performance is tied to the quality of the initial hash codes. If the foundation is weak, the incremental updates are less effective. Additionally, while DIHN handles supervised labels well, extending this efficiency to fully unsupervised or extremely imbalanced settings (where new classes far outnumber original ones) remains an area for future research.
Conclusion
DIHN provides a practical solution for evolving image retrieval systems. By embracing asymmetry and code invariance, it offers a scalable path for adding new knowledge to large-scale databases without the prohibitive costs of full retraining.
Summary updated