Distribution-Aware Non-Uniform Quantization

167 concepts119 papers2 proposals

Quantization is the primary tool for squeezing massive deep learning models onto consumer hardware. By reducing the precision of weights and activations from 16-bit floating-point numbers to low-bit representations like 4-bit or 2-bit integers, we drastically reduce memory footprints and accelerate inference.

However, standard quantization algorithms suffer from a fundamental efficiency mismatch. They typically map continuous values to a rigid, evenly spaced uniform grid (like standard INT4). But neural network parameters are rarely uniform; they naturally form bell-shaped curves (such as Gaussian or Student-t distributions) clustered tightly around zero, often accompanied by sparse, heavy-tailed outliers.

If you place an evenly spaced grid over a bell curve, you encounter a dilemma: you either stretch the grid to capture rare outliers—leaving the high-density center with poor resolution—or you clip the grid to fit the center, destroying the information in the tails. Distribution-aware non-uniform quantization resolves this by abandoning linear spacing entirely, reshaping the quantization bins to match the statistical density of the data.

Centroid Clustering: Quantization as Optimization

Instead of rounding numbers to the nearest arbitrary integer interval, we can treat quantization as a clustering problem. The goal is to find a small set of discrete "centroids" (a codebook) that minimizes the total reconstruction error for a given distribution.

Uniform Grid:     |----|----|----|----|----|----|----|
Weight Density:      .  ..::::|||||::::..  .
Non-Uniform Grid:    |--|---|--|-|||-|--|---|--|

Bai et al. and Chen et al. demonstrate that applying K-means clustering to weight matrices allows the quantization levels to adapt dynamically to the data. By allocating more centroids to high-density regions, the network preserves its representational capacity at ultra-low bit-widths. To make this search more robust, Song et al. formulate the parameter selection as an Expectation-Maximization (EM) problem, iteratively optimizing the location of non-uniform thresholds.

This clustering perspective becomes even more powerful when dealing with structural changes in the network. For instance, fine-grained pruning typically creates a bimodal weight distribution with a severe gap around zero. Zhao et al. show that modeling these pruned weights with Gaussian Mixture Models (GMMs) allows the quantization levels to recentralize precisely around the remaining non-zero peaks, ensuring the limited bit-budget isn't wasted on pruned space.

Companding and Warping: Reshaping the Space

An alternative to finding discrete centroids is to mathematically warp the continuous weight space before applying a standard uniform grid—a classic signal processing technique known as companding (compressing and expanding).

Young applies companded quantization using non-linear transformations specifically designed to minimize distortion in light-tailed distributions. Similarly, Tang et al. introduce an ArcSinh-based compander to preserve the precision of distribution tails in large alphabets.

Rather than relying on fixed mathematical formulas, Yamamoto proposes Learnable Companding Quantization, where the non-linear spacing function is parameterized and optimized end-to-end alongside the network weights. Conversely, Strom et al. flip this perspective entirely: instead of warping the quantizer to fit the weights, they force the weight distributions from Gaussian to uniform during training, ensuring they naturally fit standard linear quantization bins perfectly.

Information Maximization via Quantiles

From an information-theoretic perspective, a quantizer is most efficient when every discrete bin carries an equal amount of information. If a single bin contains 90% of the weights, the entropy of the system collapses.

To maximize entropy, Baskin et al. and Zhou et al. introduce quantile-based or balanced quantization. By using histogram equalization, they determine quantization thresholds based on weight percentiles rather than uniform value intervals.

This ensures that every discrete bin contains an equal number of parameters. In regions where weights are densely packed, the thresholds are placed close together; in the sparse tails, the thresholds stretch far apart. This simple shift maximizes the information capacity of low-bitwidth models without adding computational overhead during training.

Overcoming the Hardware Barrier: Lookup Tables

If quantization levels are non-uniformly spaced, standard integer arithmetic hardware (like standard INT4 matrix multiplication units) cannot compute the outputs directly. If an index of 01 represents 0.12 and 10 represents 0.85, you cannot simply multiply the bit patterns.

To bypass this hardware barrier, modern frameworks rely on Lookup Tables (LUTs). Ganji et al. demonstrate that low-bit indices can be used to pull arbitrary floating-point values from SIMD-optimized LUTs, replacing power-hungry multiplications with fast memory lookups.

Elhoushi et al. scale this concept to large language models by learning per-row codebooks stored in local lookup tables. This allows the underlying hardware to executionally support non-uniform spacing while adapting dynamically to the localized statistical nuances and outliers of each individual weight matrix row.

History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_distribution_aware_quantization_b990b14b,
  title = {distribution-aware quantization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/distribution-aware-quantization/rdr_b990b14b130d491aae7117113c9b3266},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-19},
}

This exact version (version 1, frozen text):

@misc{lacuna_distribution_aware_quantization_b990b14b_v1,
  title = {distribution-aware quantization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/distribution-aware-quantization/rdr_b990b14b130d491aae7117113c9b3266/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-19},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake