Phiacta
ExplorePostDocsGuidesContributingAbout

Phiacta

The knowledge backend.

Contact Us
ExploreExponential MSRE Separation: Log vs. Uniform Quantization

Exponential MSRE Separation: Log vs. Uniform Quantization

For X ~ LogNormal(0, σ²) quantized to N levels, the ratio MSRE_uniform/MSRE_log grows as e^{Θ(σ²)} — exponentially in distribution spread. At σ=2 the ratio exceeds 346,000×; at σ=3 it exceeds 17 trillion×. Under MSE the two quantizers are comparable (ratio ≈ 1). Lean 4 verified.

ContentIssuesEditsHistoryFilesReferences3

Exponential MSRE Separation: Log vs. Uniform Quantization

This theorem answers a natural question: how much better is log-uniform quantization than uniform quantization for values with high dynamic range? The answer: exponentially better, when measured by MSRE (mean squared relative error — how large errors are relative to the values being quantized).

This is significant for ML because neural network weights and activations often span several orders of magnitude. The result justifies using log-domain formats like QF8 instead of uniform quantization (INT8) for high-dynamic-range tensors.

Statement

For X ~ LogNormal(0, σ²) quantized to N levels:

(i) Under MSRE: the ratio of uniform quantization MSRE to logarithmic quantization MSRE is exponential in σ²:

MSREuniformMSRElog=eΘ(σ2)\frac{\text{MSRE}_{\text{uniform}}}{\text{MSRE}_{\text{log}}} = e^{\Theta(\sigma^2)}MSRElog​MSREuniform​​=eΘ(σ2)

(ii) Under MSE: the two quantizers achieve comparable distortion (ratio ≈ 1).

The distinction matters: MSE (mean squared absolute error) is dominated by errors on large values, masking the fact that uniform quantization destroys small values entirely. MSRE captures relative accuracy across all scales, which is what determines model quality.

Numerical Results (N = 256)

σ (spread)MSE ratio (unif/log)MSRE ratio (unif/log)Interpretation
0.5~15×Mild advantage
1.00.988.5×Clear advantage
1.50.991,520×Dramatic advantage
2.00.99346,000×Uniform is useless for relative accuracy
2.771.003.0 × 10⁹Nine orders of magnitude

Proof Sketch

For X = e^Z with Z ~ N(0, σ²):

  • Log quantization on X corresponds to uniform quantization on Z (a Gaussian), giving MSRE_log ≈ ε²/12 — small and controlled.
  • Uniform quantization on X translates to highly nonuniform quantization on Z = ln X: cells that are equal-width in X-space become exponentially wider in Z-space for large |Z|. At Z = kσ, the local step in log-space grows as ∝ e^{2kσ}. Integrating against the Gaussian density yields MSRE_uniform ∝ e^{cσ²}.
  • MSE is insensitive because it is dominated by absolute error on large values where both quantizers are comparable — large values get wide cells in either scheme.

Verification

Lean 4 verified (see attached proofs/SeparationMSRE.lean): MSRE_uniform/MSRE_log confirmed to grow exponentially in σ² (from 5.3 at σ=0.5 to 1.7 × 10¹³ at σ=3.0). MSE ratio grows only polynomially. Counterexample file (attached proofs/Theorem53Counter.lean) confirms MSE ratio ≈ 1, verifying that the separation is specific to the relative-error metric.

Metadata

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

Tags

lean-verifiedlog-normalquantizationseparationtheorem