Phiacta
ExplorePostDocsGuidesContributingAbout

Phiacta

The knowledge backend.

Contact Us
ExploreDistortion Measures for Quantization: NMSE, MSRE, SQNR and auxiliary quantities

Distortion Measures for Quantization: NMSE, MSRE, SQNR and auxiliary quantities

Defines the key distortion measures for quantizer analysis: MSE, NMSE (= E[δ²]/E[X²]), MSRE (= E[(δ/X)²]), SQNR (= 10·log₁₀(1/NMSE) dB). Also defines auxiliary quantities α, β, γ, ρ with their algebraic identities, and the centroid condition (E[δ|X ∈ Sₖ] = 0) which simplifies β=0, α=NMSE, γ=1−NMSE.

ContentIssuesEditsHistoryFilesReferences5

Distortion Measures for Quantization

The mathematical framework for measuring how much error a quantizer introduces. These measures are used throughout the QF8 paper to analyze and compare number formats for machine learning arithmetic.

Setup

Let X be a positive random variable with pdf f supported on [a,b] ⊂ ℝ₊. A B-bit scalar quantizer is a map Q: [a,b] → X̂ with N = 2^B reconstruction points partitioning [a,b] into cells {Sₖ} with codepoints {cₖ}.

Primary Distortion Measures

Let δ_X = X − Q(X) be the quantization error and ε_X = δ_X/X be the relative error.

MeasureFormulaInterpretation
MSEE[δ_X²]Mean squared absolute error
NMSEE[δ_X²] / E[X²]Normalized MSE — fraction of signal power lost to quantization
MSREE[ε_X²] = E[(δ_X/X)²]Mean squared relative error — how large errors are relative to the value
SQNR10·log₁₀(1/NMSE) dBSignal-to-quantization-noise ratio — higher is better; each +6 dB ≈ halving noise power

Why NMSE and MSRE matter for ML: MSE is dominated by errors on large values and misses whether small values are accurately represented. NMSE and MSRE capture relative accuracy, which is what determines whether a quantized neural network produces the same outputs as an unquantized one.

Auxiliary Quantities

These appear in the product error decomposition, which describes how quantization error propagates through multiplication.

SymbolFormulaName
α_XE[X·δ_X] / E[X²]Signal-error correlation
β_XE[Q(X)·δ_X] / E[X²]Reconstruction-error correlation
γ_XE[Q(X)²] / E[X²]Quantized power ratio
ρ_XE[X·Q(X)] / E[X²]Signal-quantized correlation

Algebraic Identities (no assumptions required)

αX=βX+NMSEX\alpha_X = \beta_X + \text{NMSE}_XαX​=βX​+NMSEX​ γX=1−2αX+NMSEX\gamma_X = 1 - 2\alpha_X + \text{NMSE}_XγX​=1−2αX​+NMSEX​ ρX=1−αX\rho_X = 1 - \alpha_XρX​=1−αX​

Centroid Condition

A quantizer satisfies the centroid condition if E[δ_X | X ∈ Sₖ] = 0 for every cell — meaning each codepoint is the conditional mean of its cell. This holds for Lloyd-Max quantizers and approximately for well-designed quantizers in the high-resolution regime (many quantization levels).

Under the centroid condition:

  • β_X = 0 (reconstruction and error are uncorrelated)
  • α_X = NMSE_X
  • γ_X = 1 − NMSE_X

These simplifications are what enable the clean product error formula (1 − NMSE_prod) = (1 − NMSE_X)(1 − NMSE_Y).

Relationship Between NMSE and MSRE

For general quantizers, NMSE ≠ MSRE. However, for the log-uniform quantizer, the equalization property ensures NMSE ≈ MSRE ≈ ε²/12 for any source density — they coincide to leading order. This is a unique property of log-uniform quantization and part of why it is minimax optimal.

Metadata

Type
definition
Visibility
public
Published
Mar 27, 2026
Last updated
Mar 27, 2026

Tags

definitiondistortionquantizationsignal-processing