Asymmetric quantization

Also known as: zero-point quantization

On this page 7

Asymmetric quantization is a linear quantization scheme that maps a floating-point range [min, max] onto an integer range using a scale and a zero-point, so that the integer grid covers the actual minimum and maximum of the data even when they are not centered on zero. It is also known as zero-point quantization, and in edge AI it is a standard way to shrink models to 8-bit or 4-bit integers for phones, PCs and microcontrollers.

The defining feature is the zero-point offset. Symmetric quantization forces the range to be centered on zero, whereas asymmetric quantization shifts the grid so that no integer codes are wasted on values that never occur. This matters most for skewed distributions such as activations after a ReLU, which are never negative.

How the scale and zero-point are computed

Asymmetric quantization is defined by two parameters per range: a real-valued scale s and an integer zero-point z. For a target integer range [q_min, q_max], the scale is s = (x_max – x_min) / (q_max – q_min), and the zero-point is z = q_min – round(x_min / s), clamped to the integer range.

A real value x is quantized as q = clamp(round(x / s) + z, q_min, q_max) and recovered approximately as x = s(q – z). The zero-point is the integer that represents real zero, and it is chosen so that zero is represented exactly. Exact zero matters because padding, masked positions and ReLU outputs must not acquire a small constant error.

The following table shows how the parameters behave for a typical activation tensor quantized to unsigned 8-bit integers.

QuantityValueMeaning
Observed range-0.5 to 6.0Skewed toward positive values
Integer range0 to 255256 codes in uint8
Scale s6.5 / 255, about 0.0255Real step between adjacent codes
Zero-point z20Integer that encodes real 0.0
Maximum rounding errorAbout 0.0127Half of one step
Worked parameters for an unsigned 8-bit range

Asymmetric compared with symmetric quantization

The central trade-off is resolution against arithmetic cost. Asymmetric quantization uses the full integer range for any distribution, which lowers quantization error on skewed data, while symmetric quantization fixes the zero-point at 0 and keeps integer arithmetic simpler.

PropertySymmetricAsymmetric
Range mapping[-a, a] around zero[min, max] as observed
Zero-pointFixed at 0Learned or calibrated integer
Resolution on skewed dataUp to half the codes wastedFull range used
Integer matrix multiplyNo correction termsExtra zero-point terms
Typical targetWeightsActivations, low-bit weight groups
Storage overheadOne scaleOne scale plus one zero-point
Symmetric and asymmetric schemes side by side

For data that is roughly centered on zero, such as most weight tensors, the two schemes give similar error, so the simpler symmetric form usually wins. For ReLU outputs, the symmetric form would leave the negative half unused, which is equivalent to losing about one bit of precision.

The cost of the zero-point in integer arithmetic

The zero-point adds cross terms to every integer dot product. Expanding the sum of (q_a – z_a)(q_w – z_w) over n elements yields the integer product sum, a term z_a times the sum of weights, a term z_w times the sum of activations, and the constant n times z_a times z_w.

Terms that depend only on weights can be precomputed offline and folded into the bias. The term z_w times the sum of activations, however, must be computed at runtime for every input. For this reason, most integer inference runtimes use asymmetric activations with symmetric weights, which removes the runtime cross term while keeping the resolution benefit where it matters most.

The table below lists common combinations and their practical consequences on edge hardware.

WeightsActivationsRuntime overheadTypical use
SymmetricSymmetricLowestSimple accelerators, some NPUs
Symmetric per-channelAsymmetric per-tensorOne precomputed correctionCommon default for INT8 mobile models
AsymmetricAsymmetricHighestOlder uint8 schemes
Asymmetric per-groupFloating pointDequantize on the flyWeight-only 4-bit LLMs
Combinations used by integer inference runtimes

Where asymmetric quantization is used

Asymmetric quantization is applied wherever value distributions are offset or one-sided. Its use differs between classic convolutional networks running on mobile accelerators and large language models running locally on PCs.

  • Activations in INT8 models: outputs of ReLU, sigmoid and softmax are non-negative or bounded, so a zero-point improves resolution.
  • Weight-only low-bit LLM quantization: group-wise 4-bit formats often store a scale and a minimum or zero-point for each group of 32 to 128 weights.
  • GGUF formats: Q4_1 and similar types store a minimum offset per block, while Q4_0 is symmetric.
  • Calibration-based post-training quantization: observed minima and maxima from a calibration set define the asymmetric range directly.

In quantization-aware training, the scale and zero-point are applied through fake quantization in the forward pass, and the straight-through estimator lets gradients pass the rounding step. Some methods also learn the range parameters directly during training.

Pitfalls and common mistakes

Most problems with asymmetric quantization come from poor range estimation or from mismatches between how a model was quantized and how a runtime executes it. The table below links common symptoms to their causes.

SymptomLikely causeFix
Large accuracy drop after conversionOutliers stretch the rangePercentile or MSE-based calibration
Artifacts at image bordersZero not represented exactlyRound and clamp the zero-point
Slower than expected inferenceAsymmetric weights at runtimeSwitch weights to symmetric
Mismatch between devicesDifferent rounding or zero-point rangeMatch runtime conventions exactly
Low-bit model degrades badlyPer-tensor range too coarseUse per-channel or group-wise ranges
Symptoms, causes and fixes

A frequent misconception is that asymmetric quantization is always more accurate. It reduces error only when the distribution is offset, and on centered data it can add cost without benefit.

The simple explanation

Imagine a ruler with only 256 marks. You must use it to measure values between -0.5 and 6. A centered ruler would waste half its marks on negative values that rarely occur.

Asymmetric quantization slides the ruler so its marks cover only the range that is really used. The zero-point records where zero sits on the ruler. More marks land where the data lives, so measurements are finer. The price is a little extra arithmetic.

How it is used in practice

A team deploys an object detection model on a smart doorbell with a small neural processing unit. The floating-point model is about 24 MB and too slow for the device. They apply post-training INT8 quantization with symmetric per-channel weights and asymmetric per-tensor activations, calibrating ranges on 300 representative camera frames.

The ReLU activations span roughly 0 to 8, so the asymmetric scheme assigns all 256 codes to that range instead of wasting the negative half. The quantized model shrinks to about 6 MB, runs three to four times faster, and loses less than one percentage point of detection accuracy.

An earlier attempt with symmetric activations lost about four points on small, distant objects. The team kept the asymmetric activations and verified that real zero mapped exactly to the zero-point so that padded image borders produced no false detections.