Papers
Topics
Authors
Recent
Search
2000 character limit reached

Block-Householder Quantizer (BHQ)

Updated 1 May 2026
  • 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:

  1. Similarity Learning Stage: A standard deep embedding fθ:Rd→Rkf_\theta : \mathbb{R}^d \rightarrow \mathbb{R}^k is learned by minimizing a similarity-driven objective

LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))

with no quantization term. Here, sij∈{0,1}s_{ij} \in \{0,1\} encodes pairwise similarity, ℓS\ell_S and ℓD\ell_D represent the chosen similarity and dissimilarity losses. This stage uses frameworks such as contrastive, cross-entropy, or proxy losses.

  1. Householder Quantization Stage: The learned embeddings fθf_\theta are normalized for each sample xix_i to fˉi=kfθ(xi)/∥fθ(xi)∥2\bar{f}_i = \sqrt{k} f_\theta(x_i)/\|f_\theta(x_i)\|_2 (on the k\sqrt{k}-radius sphere). Then, one seeks an orthogonal matrix U∈O(k)U \in O(k) that makes each LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))0 as close as possible to its sign vector. The resulting LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))1-bit hash is LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))2.

This formulation leverages similarity-invariant properties of orthogonal transformations, so the choice of LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))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:

LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))4

where the objective LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))5 quantifies the mean-squared error between the transformed embeddings and their sign vectors.

This least-squares problem over the orthogonal group LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))6 is solved efficiently by parameterizing LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))7 via Householder reflections and minimizing LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))8 using stochastic gradient descent (SGD).

3. Householder Parametrization of Orthogonal Transform

Any orthogonal matrix LS(θ)=∑i,jsijℓS(d~ij(θ))+(1−sij)ℓD(d~ij(θ))L_S(\theta) = \sum_{i,j} s_{ij} \ell_S(\tilde{d}_{ij}(\theta)) + (1-s_{ij}) \ell_D(\tilde{d}_{ij}(\theta))9 can be written as a product of sij∈{0,1}s_{ij} \in \{0,1\}0 Householder reflectors:

sij∈{0,1}s_{ij} \in \{0,1\}1

where each Householder reflection sij∈{0,1}s_{ij} \in \{0,1\}2 has the form

sij∈{0,1}s_{ij} \in \{0,1\}3

Application of sij∈{0,1}s_{ij} \in \{0,1\}4 to a vector sij∈{0,1}s_{ij} \in \{0,1\}5 is computed via sij∈{0,1}s_{ij} \in \{0,1\}6, requiring only sij∈{0,1}s_{ij} \in \{0,1\}7 operations per reflection. The full map requires sij∈{0,1}s_{ij} \in \{0,1\}8 time to apply sij∈{0,1}s_{ij} \in \{0,1\}9 reflectors.

This parametrization enables direct optimization of the â„“S\ell_S0 free parameters â„“S\ell_S1 and ensures storage costs remain low (at most â„“S\ell_S2 floats, i.e., â„“S\ell_S3 kB for â„“S\ell_S4) (Schwengber et al., 2023).

4. Stochastic Gradient Descent Updates

With â„“S\ell_S5, the quantization loss is â„“S\ell_S6. Gradients with respect to â„“S\ell_S7 are computed as:

â„“S\ell_S8

Backpropagation proceeds through the Householder factorization, computing for each â„“S\ell_S9:

â„“D\ell_D0

using the Frobenius inner product. The update for â„“D\ell_D1 in each SGD iteration is:

â„“D\ell_D2

where â„“D\ell_D3 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 â„“D\ell_D4 via SGD on â„“D\ell_D5 over data â„“D\ell_D6, similarities â„“D\ell_D7 Embedding â„“D\ell_D8
II: Quantization 1. Normalize: ℓD\ell_D9 <br\>2. Initialize fθf_\theta0 <br> 3. SGD on fθf_\theta1 <br> 4. Obtain fθf_\theta2 Orthogonal map fθf_\theta3
Hashing For any fθf_\theta4, compute fθf_\theta5 Binary code fθf_\theta6

The primary computational costs are:

  • Application of a reflector to a vector: fθf_\theta7.
  • Application of fθf_\theta8 reflectors (entire fθf_\theta9): xix_i0.
  • An epoch over xix_i1 samples: xix_i2.
  • Empirically for xix_i3, the full quantization stage with 300 epochs and xix_i4 completes in under 3 minutes on a modern CPU; encoding xix_i5 points requires xix_i6 seconds (Schwengber et al., 2023).

6. Empirical Performance and Comparative Robustness

Unlike standard quantization-penalty approaches—such as those that jointly optimize xix_i7 and require manual tuning of xix_i8 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 (HyPxix_i9, 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 (fˉi=kfθ(xi)/∥fθ(xi)∥2\bar{f}_i = \sqrt{k} f_\theta(x_i)/\|f_\theta(x_i)\|_20, fˉi=kfθ(xi)/∥fθ(xi)∥2\bar{f}_i = \sqrt{k} f_\theta(x_i)/\|f_\theta(x_i)\|_21, min-entry, bit-variance) reveals that the standard fˉi=kfθ(xi)/∥fθ(xi)∥2\bar{f}_i = \sqrt{k} f_\theta(x_i)/\|f_\theta(x_i)\|_22 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).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Block-Householder Quantizer (BHQ).