Local Semantic Structure Captured and Instance Discriminated by Unsupervised Hashing

Changsheng Li, Qixing Min, Yurong Cheng, Ye Yuan, Guoren Wang

Abstract

In the era of big data, efficient image retrieval is paramount. This paper introduces a novel unsupervised hashing framework that integrates contrastive learning with instance discrimination. By utilizing self-supervised techniques to establish a "pseudo-label" similarity matrix and employing a specialized loss function tailored for Hamming space, the authors demonstrate significant performance improvements over existing state-of-the-art unsupervised methods on standard benchmarks.

Introduction: The Challenge of Unsupervised Hashing

As digital data volumes explode, the need for instantaneous search capabilities grows. Hashing offers a scalable solution by mapping high-dimensional data into short, binary strings. These hash codes significantly reduce storage requirements and enable extremely fast searches through computationally efficient binary comparisons.

Overview of the hashing process: from original image to binary hash code.

However, unsupervised hashing—where human-provided labels are unavailable—remains challenging. Specifically, algorithms must accurately capture local semantic structures (identifying neighbors) and ensure that hash codes are sufficiently discriminative to distinguish between different images in the binary space.

Proposed Methodology

The authors propose a two-stage deep learning framework based on the VGG-F architecture to address these challenges.

1. Constructing the Semantic Similarity Matrix

The first stage involves training the model using contrastive learning. The system generates augmented versions of an image (e.g., via rotation or noise) and learns to pull these versions together while pushing other images away. Features extracted from the fc-7 layer are then used to build a similarity matrix ($S$), identifying the $K$ nearest neighbors and $K$ farthest points for each sample.

2. Learning to Hash

The network is optimized using a multi-part objective function designed for the Hamming space:

  • Instance Discrimination: A contrastive loss ensures an image’s hash code is similar to its augmented version but distinct from others.
  • Structural Preservation: This term enforces that the hash codes respect the similarity matrix $S$ derived in the first stage.
  • Quantization Regularization: To bridge the gap between continuous neural network outputs and discrete binary codes (-1 or 1), a regularizer pushes outputs toward discrete values, minimizing rounding loss.

To enable standard backpropagation, a tanh function approximates the discrete sign function during training.

Experimental Evaluation

The method was evaluated on two large-scale benchmarks: FLICKR25K (25,000 images) and NUSWIDE (a subset of the 10 most common labels from 269,648 images).

Key Results

The proposed method consistently outperformed traditional and deep unsupervised hashing methods, such as ITQ, DeepBit, and SSDH, across various bit lengths (16, 32, 64, and 128 bits).

  • FLICKR25K: On 128-bit codes, the method achieved a Mean Average Precision (MAP) of 0.8088, roughly 7.45% higher than the previous best method (SSDH).
  • NUSWIDE: The performance gap was even more pronounced, with the proposed method outperforming SSDH by 10.37% at 128 bits.

Ablation studies confirmed that each component—semantic structure, contrastive loss, and regularization—is vital to the framework's success.

Insights and Future Directions

The core innovation lies in using self-supervision as a proxy for labels, discovering semantic structure before hashing. Furthermore, the paper highlights that making different things different (instance discrimination) is as crucial as making similar things similar to prevent collisions in hash space.

Future work will focus on optimizing the computational intensity of contrastive learning and exploring more modern backbones like ResNets or Transformers to further enhance discriminative power.

Summary updated

BibTeX
@article{li2021local,
  author = {Changsheng Li and Qixing Min and Yurong Cheng and Ye Yuan and Guoren Wang},
  title = {{Local Semantic Structure Captured and Instance Discriminated by Unsupervised Hashing}},
  journal = {Int. J. Softw. Informatics},
  year = {2021},
  doi = {10.21655/ijsi.1673-7288.00240},
}
Figure