QAT's Core: Fake Quantization & Straight-Through Estimators
QAT's effectiveness stems from simulating low-precision arithmetic with 'fake quantization' during the forward pass, while using the Straight-Through Estimator (STE) in the backward pass to handle non-differentiable rounding operations, allowing gradient-based optimization to compensate for quantization errors. [1, 4, 5, 6, 14, 17]
The top 3
- STE's Genesis: Bridging Discrete & Continuous Gradients: Geoffrey Hinton's 2012 lecture series popularized the Straight-Through Estimator, providing an early solution for backpropagating gradients through non-differentiable discrete units in neural networks.
- Fake Quantization Layers: Per-Tensor vs. Per-Channel Accuracy: Fake quantization layers differ primarily in their granularity: per-tensor layers apply a single scale and zero-point to an entire tensor, while per-channel layers use distinct parameters for each channel, often achieving higher accuracy for feature maps with varying distributions.
- STE's Secret: Enabling Backprop Through Non-Differentiable Ops: Straight-Through Estimators are crucial for QAT because they provide an approximate gradient path through otherwise non-differentiable quantization operations, typically by treating them as identity functions during the backward pass, thereby enabling end-to-end training.
Sources
Open the full topic