[Paper Review] Stochastic Generative Hashing
This paper proposes Stochastic Generative Hashing (SGH), a novel generative framework that learns binary hash functions by optimizing for maximum data compression via the Minimum Description Length (MDL) principle. By modeling both encoding (input to hash code) and decoding (hash code to input reconstruction), SGH avoids heuristic objectives and binary constraint relaxation, using a stochastic distributional gradient method to jointly train the hash function and generative model, achieving state-of-the-art retrieval performance on large-scale datasets like MNIST, SIFT-1M, and GIST-1M.
Learning-based binary hashing has become a powerful paradigm for fast search and retrieval in massive databases. However, due to the requirement of discrete outputs for the hash functions, learning such functions is known to be very challenging. In addition, the objective functions adopted by existing hashing techniques are mostly chosen heuristically. In this paper, we propose a novel generative approach to learn hash functions through Minimum Description Length principle such that the learned hash codes maximally compress the dataset and can also be used to regenerate the inputs. We also develop an efficient learning algorithm based on the stochastic distributional gradient, which avoids the notorious difficulty caused by binary output constraints, to jointly optimize the parameters of the hash function and the associated generative model. Extensive experiments on a variety of large-scale datasets show that the proposed method achieves better retrieval results than the existing state-of-the-art methods.
Motivation & Objective
- To address the lack of principled objective functions in existing learning-based hashing methods, which are often heuristic and lack theoretical grounding.
- To overcome the difficulty of optimizing discrete binary outputs in hash function learning, which typically requires heuristic relaxation of binary constraints.
- To develop a unified framework that models both forward (input to hash code) and reverse (hash code to input reconstruction) processes for improved representation learning.
- To enable efficient, end-to-end training of hash functions using stochastic distributional gradient descent that avoids discrete optimization challenges.
- To achieve state-of-the-art retrieval performance with minimal hyperparameter tuning, while maintaining high-quality input reconstruction from hash codes.
Proposed method
- The method formulates hashing as a generative modeling problem, jointly learning a conditional distribution $ q(h|x) $ for encoding and $ p(x|h) $ for decoding using the MDL principle.
- It employs a stochastic distributional gradient descent algorithm that computes unbiased gradient estimates for discrete variables via reparameterization and distributional derivatives.
- The model uses a simple yet effective generative model $ p(x|h) $, such as a Gaussian mixture or linear decoder, to reconstruct inputs from binary codes.
- The hash function is derived from the learned $ q(h|x) $, which is optimized to minimize the description length of the dataset under the generative model.
- The framework avoids binary relaxation by directly optimizing over distributions over discrete codes, enabling differentiable training of the entire system.
- The method is extended to handle both unsupervised and semi-supervised settings, with flexibility to adapt to various data types and generative models.
Experimental results
Research questions
- RQ1Can a principled generative framework based on MDL improve the quality of learned binary hash functions compared to heuristic objectives?
- RQ2Can stochastic distributional gradient descent effectively optimize discrete binary codes without relying on relaxation techniques?
- RQ3Does joint learning of encoding and decoding processes lead to better retrieval performance and reconstruction quality?
- RQ4How does the proposed method compare to state-of-the-art hashing methods in terms of retrieval accuracy and robustness to hyperparameter tuning?
- RQ5Can the learned hash codes be meaningfully interpreted through visual inspection of the generative templates, indicating non-redundant and semantically meaningful bit representations?
Key findings
- SGH achieves state-of-the-art performance on L2NNS tasks across MNIST, SIFT-1M, GIST-1M, and SIFT-1B, consistently outperforming existing methods including ITQ, PCA, and binary autoencoders.
- On the SIFT-1B dataset with 64-bit codes, SGH achieves a Recall10@1000 of 92.3%, significantly outperforming the next best method by over 5 percentage points.
- The method demonstrates superior reconstruction quality: SGH-generated images on MNIST and CIFAR-10 are visually sharper and more recognizable than those from ITQ, even though ITQ uses 32× more bits for reconstruction.
- SGH reconstructs images with 64-bit codes to a quality comparable to PCA using 2048 bits (32× more bits), demonstrating high compression efficiency.
- The model is less sensitive to hyperparameter tuning than baselines, achieving strong performance with fixed learning rate and batch size across all experiments.
- Visual inspection of learned templates shows that each bit encodes distinct, meaningful features resembling convolutional filters, indicating efficient and non-redundant code usage.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.