Block-Householder Quantizer (BHQ)
- Block-Householder Quantizer is a hyperparameter-free method that decouples similarity learning from binary quantization through a two-stage approach.
- It employs Householder reflectors to form an optimal orthogonal transformation, aligning continuous embeddings with their binary counterparts.
- Empirical results show improved retrieval performance and reduced tuning complexity across benchmarks like CIFAR-10, MS-COCO, and ImageNet.
The Block-Householder Quantizer (BHQ) is an unsupervised, hyperparameter-free quantization strategy for deep image hashing that decouples the learning of similarity-preserving embeddings from the subsequent binarization step. Unlike standard approaches that integrate a quantization penalty into the similarity loss, introducing complex trade-offs and challenging optimization, BHQ decomposes the problem into two separate stages: first, learning continuous embeddings using only similarity-based loss, and second, finding an optimal orthogonal transformation—parametrized as a product of Householder reflectors—to align the embeddings with their binary counterparts before quantization by the sign function. Empirical evidence demonstrates that this separation mitigates performance degradation, enables consistently stronger retrieval results, and requires less tuning compared to conventional methods (Schwengber et al., 2023).
1. Two-Stage Decomposition and Formulation
BHQ operates via a structured two-phase procedure:
- Similarity Learning Stage: A standard deep embedding is learned by minimizing a similarity-driven objective
with no quantization term. Here, encodes pairwise similarity, and represent the chosen similarity and dissimilarity losses. This stage uses frameworks such as contrastive, cross-entropy, or proxy losses.
- Householder Quantization Stage: The learned embeddings are normalized for each sample to (on the -radius sphere). Then, one seeks an orthogonal matrix that makes each 0 as close as possible to its sign vector. The resulting 1-bit hash is 2.
This formulation leverages similarity-invariant properties of orthogonal transformations, so the choice of 3 does not affect the preservation of pairwise similarities (Schwengber et al., 2023).
2. Quantization Objective and Optimization
The core rounding problem formulated in the quantization stage is:
4
where the objective 5 quantifies the mean-squared error between the transformed embeddings and their sign vectors.
This least-squares problem over the orthogonal group 6 is solved efficiently by parameterizing 7 via Householder reflections and minimizing 8 using stochastic gradient descent (SGD).
3. Householder Parametrization of Orthogonal Transform
Any orthogonal matrix 9 can be written as a product of 0 Householder reflectors:
1
where each Householder reflection 2 has the form
3
Application of 4 to a vector 5 is computed via 6, requiring only 7 operations per reflection. The full map requires 8 time to apply 9 reflectors.
This parametrization enables direct optimization of the 0 free parameters 1 and ensures storage costs remain low (at most 2 floats, i.e., 3 kB for 4) (Schwengber et al., 2023).
4. Stochastic Gradient Descent Updates
With 5, the quantization loss is 6. Gradients with respect to 7 are computed as:
8
Backpropagation proceeds through the Householder factorization, computing for each 9:
0
using the Frobenius inner product. The update for 1 in each SGD iteration is:
2
where 3 is the learning rate. These computations are efficiently supported by standard automatic differentiation frameworks.
5. Complete BHQ Algorithm and Computational Complexity
The following summary table outlines the procedural workflow:
| Stage | Input/Action | Output |
|---|---|---|
| I: Similarity | Learn 4 via SGD on 5 over data 6, similarities 7 | Embedding 8 |
| II: Quantization | 1. Normalize: 9 <br\>2. Initialize 0 <br> 3. SGD on 1 <br> 4. Obtain 2 | Orthogonal map 3 |
| Hashing | For any 4, compute 5 | Binary code 6 |
The primary computational costs are:
- Application of a reflector to a vector: 7.
- Application of 8 reflectors (entire 9): 0.
- An epoch over 1 samples: 2.
- Empirically for 3, the full quantization stage with 300 epochs and 4 completes in under 3 minutes on a modern CPU; encoding 5 points requires 6 seconds (Schwengber et al., 2023).
6. Empirical Performance and Comparative Robustness
Unlike standard quantization-penalty approaches—such as those that jointly optimize 7 and require manual tuning of 8 to prevent embedding degradation—BHQ is consistently non-degrading. Experiments report that, across datasets including CIFAR-10, NUS-WIDE, MS-COCO, and ImageNet with 16–64 bit hashes, BHQ improves mean Average Precision (mAP) by 2–7 percentage points over state-of-the-art losses (HyP9, DCH, DHN, DPSH, etc.), and does so uniformly over all tested baseline methods (Schwengber et al., 2023).
Baselines such as Iterative Quantization (ITQ) and Wasserstein-based quantization (HWSD) may degrade performance and generally require additional hyperparameters. In contrast, BHQ is hyperparameter-free and consistently provides positive accuracy gains.
Ablation over multiple rounding losses (0, 1, min-entry, bit-variance) reveals that the standard 2 loss is essentially optimal, and the particular loss is much less significant than the orthogonal map parametrization.
7. Significance and Practical Implications
BHQ exploits the invariance of inner products (and hence similarity measures) under orthogonal transformations, allowing for optimal rounding of embeddings without loss of similarity structure. The method's decoupling of similarity learning and quantization leads to a plug-in quantizer that can be applied atop any pretrained deep embedding network—eliminating performance trade-offs associated with joint objectives, and obviating hyperparameters and costly tuning.
A plausible implication is the potential for extending BHQ to other tasks requiring orthogonally invariant quantization or binary representations, given its modularity, computational efficiency, and robust empirical advantages (Schwengber et al., 2023).