ELVIA.Evidence Atlas
ICML 2025ELVIA assessment Major

Learning to Quantize for Training Vector-Quantized Networks

Peijia Qin, Jianguo Zhang

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 0.4,0.4, whereas the paper’s finite-difference expression gives 0.5760.576 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

Major
Evidence 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 Fϕ=ϕF_\phi=\phi and GθG_\theta(z)=θ\theta*z. Affine hyper-net generates codes(ψ,\psi,ψ\psi+10+10); one parameter component examined with others fixed. ϕ=θ=ψ\phi=\theta=\psi=1,1, α=β=1,\alpha=\beta=1, xi=.1;.1; 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 0.0.

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 ∇ψL\nabla_\psi\mathcal L under perturbations of ϕ\phi and θ.\theta. 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 x=y=0,x=y=0, encoder Fϕ(x)=ϕ,F_\phi(x)=\phi, and decoder Gθ(z)=θz.G_\theta(z)=\theta z. Let the two codes be Cψ=(ψ,ψ+10).C_\psi=(\psi,\psi+10). This is an affine hyper-net Hψ(e)=e+ψH_\psi(e)=e+\psi acting on embedding values 0,10.0,10. 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, α=β=1,\alpha=\beta=1, and ϕ=θ=ψ=1,ξ=110.\phi=\theta=\psi=1,\qquad \xi=\tfrac1{10}. These positive loss weights and learning rate are not excluded by the derivation. At the initial point the code q=ψ=1q=\psi=1 is uniquely nearest; after the inner step the encoder value will be 4/5,4/5, still uniquely nearest to that code. All perturbations below remain in the same cell: the other code is 11,11, and the assignment boundary is at 6.6. There is no argmin tie or boundary crossing.

In this branch the actual forward graph is L=[θ{ϕ+sg⁡(ψ−ϕ)}]2+α{ϕ−sg⁡(ψ)}2+β{ψ−sg⁡(ϕ)}2. \mathcal L= \bigl[\theta\{\phi+\operatorname{sg}(\psi-\phi)\}\bigr]^{2} +\alpha\{\phi-\operatorname{sg}(\psi)\}^{2} +\beta\{\psi-\operatorname{sg}(\phi)\}^{2} . The assigned first-order gradients, evaluated numerically at general points of this branch, are gϕ=2θ2ψ+2α(ϕ−ψ),gθ=2θψ2,gψ=2β(ψ−ϕ). g_\phi=2\theta^{2}\psi+2\alpha(\phi-\psi),\qquad g_\theta=2\theta\psi^{2},\qquad g_\psi=2\beta(\psi-\phi). 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, gϕ=gθ=2,g_\phi=g_\theta=2, so ϕ′=θ′=4/5.\phi'=\theta'=4/5. When the graph [loss] (#loss) is differentiated again, both DψADgϕ=0,DψADgθ=0.D_\psi^{\rm AD}g_\phi=0,\qquad D_\psi^{\rm AD}g_\theta=0. All paths from the reconstruction or commitment term to ψ\psi are stopped; the codebook term has no backward path to ϕ,θ.\phi,\theta. A fully explicit way to verify this is to replace the three stopped expressions in the local graph by frozen symbols u,v,w:u,v,w: L~=[θ(ϕ+u)]2+α(ϕ−v)2+β(ψ−w)2.\widetilde{\mathcal L} =[\theta(\phi+u)]^{2}+\alpha(\phi-v)^{2}+\beta(\psi-w)^2. Then ∂ψ∂ϕL~=∂ψ∂θL~=0\partial_\psi\partial_\phi\widetilde{\mathcal L} =\partial_\psi\partial_\theta\widetilde{\mathcal L}=0 identically. Consequently the inner updated parameters have zero assigned ψ\psi-derivative. At the outer point, the direct codebook gradient is gψout=2(1−45)=25,g_\psi^{\rm out}=2(1-\tfrac45)=\tfrac25, and the complete literal unrolled gradient is also 2/5=0.4.\boxed{2/5=0.4}.

At the outer point, the two directions prescribed below Equation (16) are vϕ=gϕ(ϕ′,θ′,ψ)=2(45)2+2(45−1)=2225,vθ=gθ(ϕ′,θ′,ψ)=85.v_\phi=g_\phi(\phi',\theta',\psi) =2(\tfrac45)^{2}+2(\tfrac45-1)=\tfrac{22}{25}, \qquad v_\theta=g_\theta(\phi',\theta',\psi)=\tfrac85. Recomputing the codebook gradient at ϕ±=1±ϵvϕ\phi^\pm=1\pm\epsilon v_\phi gives gψ(ϕ+,θ,ψ)−gψ(ϕ−,θ,ψ)2ϵ=−2vϕ=−4425.\frac{g_\psi(\phi^+,\theta,\psi) -g_\psi(\phi^-,\theta,\psi)}{2\epsilon} =-2v_\phi=-\frac{44}{25}. The corresponding θ\theta-difference is zero. Therefore the finite-difference hypergradient in Equation (16) is exactly 25−110(−4425)=72125=0.576. \frac25-\frac1{10}\left(-\frac{44}{25}\right) =\boxed{\frac{72}{125}=0.576}. This holds for every sufficiently small nonzero ϵ,\epsilon, not just a poorly chosen perturbation size. The difference 22/125=0.17622/125=0.176 from the stated graph derivative does not tend to zero. The linearity of gψg_\psi makes the finite difference exact for its own, different target.

Reviewer-written exact rational calculations checked ϵ=10−2,10−4,10−6\epsilon=10^{-2},10^{-4},10^{-6} 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 0.40.4 unrolled result. With effective weights α=β=0.1,\alpha=\beta=0.1, matching the quantization weighting style in the released FFHQ configuration, the two results remain different: 0.040.04 versus 0.0648.0.0648. These checks are in and its JSON/stdout outputs.

□\square

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.

Submit an author revisionContribute a review