Learning to Quantize for Training Vector-Quantized Networks
ELVIA analysis
Independent review pending
The inspected finite-difference hypergradient derivation is inconsistent with the specified straight-through and stop-gradient rules. A scalar quantizer with two strictly separated codes gives an unrolled automatic-differentiation gradient of whereas the paper’s finite-difference expression gives for every sufficiently small perturbation. The discrepancy does not involve a changing nearest-neighbor index or truncation error. It supports a Major finding about the central derivation and its interpretation as a bilevel hypergradient. The finite perturbation update may remain a useful task-aware heuristic; its empirical benefits were not reproduced or disproved.
Problem 1. The finite difference does not approximate the stated unrolled hypergradient
MajorEvidence and reasoning
Problem statement
Equations12-16 compute/approximate the gradient of the one-step unrolled objective using mixed derivatives and finite differences; Sec4.3 interprets them as best-response gradient paths.
Point input/target0; scalar and (z)=*z. Affine hyper-net generates codes(); one parameter component examined with others fixed. = xi= all allowed by local derivation. First code strictly nearest before and after inner step and for all tested perturbations; no boundary/tie. Squared task/commitment/codebook losses and exactly stated stop-gradient/STE; optional entropy term with coefficient
Proof
Supported impact: Major. Equations (12)–(14) identify the one-step upper gradient with a direct term and two mixed-derivative products. Equations (15)–(16) approximate those products by differences of under perturbations of and Section 4.3 and Figure 2 then use these terms to explain how task feedback reaches the quantizer. The suspect step is applying this finite-difference identity to a gradient field containing the specified stop-gradient operations.
Take one scalar training input and target encoder and decoder Let the two codes be This is an affine hyper-net acting on embedding values The other hyper-net or embedding coordinates can be held fixed when examining this parameter component. Affine reparameterization is within the method’s stated framework and its linear ablations. No claim is made that this small network is a benchmark architecture.
Use squared reconstruction loss, squared Euclidean commitment and codebook losses, and These positive loss weights and learning rate are not excluded by the derivation. At the initial point the code is uniquely nearest; after the inner step the encoder value will be still uniquely nearest to that code. All perturbations below remain in the same cell: the other code is and the assignment boundary is at There is no argmin tie or boundary crossing.
In this branch the actual forward graph is The assigned first-order gradients, evaluated numerically at general points of this branch, are Equation [field] (#field) describes their values after reevaluation. It is not permission to erase stop-gradient nodes when taking higher derivatives.
At the initial point, so When the graph [loss] (#loss) is differentiated again, both All paths from the reconstruction or commitment term to are stopped; the codebook term has no backward path to A fully explicit way to verify this is to replace the three stopped expressions in the local graph by frozen symbols Then identically. Consequently the inner updated parameters have zero assigned -derivative. At the outer point, the direct codebook gradient is and the complete literal unrolled gradient is also
At the outer point, the two directions prescribed below Equation (16) are Recomputing the codebook gradient at gives The corresponding -difference is zero. Therefore the finite-difference hypergradient in Equation (16) is exactly This holds for every sufficiently small nonzero not just a poorly chosen perturbation size. The difference from the stated graph derivative does not tend to zero. The linearity of makes the finite difference exact for its own, different target.
Reviewer-written exact rational calculations checked and the frozen-symbol mixed derivatives. An independent scalar differentiation implementation propagated values, gradients, and Hessians with zero derivatives at stop-gradient nodes. It gave the same unrolled result. With effective weights matching the quantization weighting style in the released FFHQ configuration, the two results remain different: versus These checks are in and its JSON/stdout outputs.
Possible revision
Specify differentiated object and derive a consistent surrogate/estimator.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
Different from previous VQ objectives, our innovation results in a meta-objective that makes the codebook training task-aware.
Published ICML 2025 proceedings PDF (PMLR 267); Abstract, PDF p. 1
Actual review scope
The recorded inspection concerns these source locations: PDF pp. 4-6; Equations3-7,11-17; models/models_vq.py100-105.