FP=xINT:Representing Neural Networks via Low-Bit Series Basis Functions

Boyang Zhang, Daning Cheng, Yunquan Zhang, Jiake Tian, Jing Li, Fangming LiuarXiv 2024

TL;DR

FP=XINT introduces a novel post-training quantization (PTQ) framework that treats neural network quantization as a mathematical series expansion problem. Instead of forcing a full-precision model into a single, noisy low-bit representation, it decomposes the model into a parallel combination of multiple ultra-low-bit "basis models," achieving near-lossless (and sometimes superior) accuracy without requiring calibration datasets or fine-tuning.

What Problem Does This Paper Address?

As deep learning models grow, deploying them on resource-constrained edge devices requires compression techniques like Post-Training Quantization (PTQ). PTQ converts 32-bit floating-point (FP32) weights and activations into low-bit integers (like INT8 or INT4) without retraining.

While INT8 quantization works reasonably well, pushing models down to ultra-low bit widths (e.g., 4-bit or 2-bit) introduces severe quantization noise, drastically degrading model accuracy. Existing PTQ methods try to minimize this noise using complex parameter calibration, but they are computationally expensive and rarely recover full-precision baseline performance.

Traditional mathematical tools for function approximation, such as Taylor or Fourier series expansions, could theoretically solve this by approximating the full-precision function using multiple simpler terms. However, they suffer from the "curse of dimensionality" when applied to the massive, high-dimensional input spaces of deep neural networks.

Methods

The authors introduce FP=XINT, the first framework to successfully apply series expansion to neural network quantization. The core idea is to represent a full-precision model as a sum of multiple low-bit basis models:

$$\text{model}(\text{sample}) = \sum_{\Xi_i}^n \hat{\text{model}}_i(\text{sample})$$

To make this work without exponential computational explosion, the authors developed a hierarchical expansion strategy across three granularities:

  1. Tensor-Level Expansion: Decomposing dense floating-point tensors into a series of scaled low-bit integer tensors plus a sparse residual tensor to capture saturation errors.
  2. Single-Layer Expansion: Applying tensor decomposition specifically to the matrix multiplications that form the computational bottleneck of neural network layers.
  3. Model-Level Expansion: Combining layer-level expansions into a global network structure.
Figure 3. Our series expansion at different levels and specific op- eration details. Finally, the FP model is expanded into the sum of multiple INT models.

Overcoming the Serial Bottleneck

Standard series expansions must be computed sequentially. To enable hardware parallelism, the authors designed custom algebraic operations called AbelianAdd ($\uplus$) and AbelianMul ($\hat{*}$). By proving that these operations form an Abelian group, they ensure that the basis models can be executed completely independently and in parallel across hardware units (using standard distributed primitives like AllReduce), summing their outputs at the very end.

Asymmetric Expansion

Through total differential analysis, the authors discovered an optimization shortcut: because a well-trained model sits at a local minimum, its loss landscape with respect to weights is relatively flat (the gradient is near zero). Therefore, the weight matrices only need to be expanded into 2 or 3 terms, whereas the highly variable activations benefit from more expansion terms.

Datasets

The authors evaluated their framework across three distinct domains:

  • Computer Vision: ImageNet (tested on ResNet-18/34/50/101, RegNetX-600MF, and Inception-V3).
  • Natural Language Processing (Small Models): SQuAD1.1 and MNLI benchmarks using a BERT architecture.
  • Large Language Models (LLMs): MMLU benchmark evaluated on LLaMA3-8B, LLaMA2-7B, and Qwen2.5-3B.

Key Insights and Ideas

  • Quantization as an Additive Series: Instead of viewing quantization as a lossy compression problem, FP=XINT views it as an additive approximation problem. Accuracy can be systematically restored simply by adding more low-bit basis terms.
  • Algebraic Parallelism: By framing model combination within an Abelian group structure, the framework ensures that expanding a model into $n$ terms does not mean a $n\times$ slowdown; the terms can run simultaneously on parallel hardware.
  • No Calibration Required: Unlike mainstream PTQ methods that require a subset of unlabeled data to calibrate quantization scales, FP=XINT computes its expansion parameters analytically from the weights and activations directly, eliminating data-dependency and privacy concerns.

Key Results

FP=XINT achieves state-of-the-art results, particularly in aggressive ultra-low-bit settings:

  • Surpassing Full Precision: In a 4-bit weight/activation (W4A4) configuration, FP=XINT achieved 77.03% accuracy on ResNet-50, actually outperforming the original full-precision baseline of 76.63%.
  • Resurrecting 2-bit Quantization: For ultra-low 2-bit settings (W2A2) where traditional PTQ methods completely break down (often dropping to near 0% accuracy), FP=XINT maintained highly functional accuracy levels (e.g., 62.13% on ResNet-50 and 61.64% on ResNet-101).
Table 1. Comparison of our algorithm with various post-training quantization algorithms. Results are averaged over multiple rounds. Our results have significant advantages in extremely low-bit quantization.
  • Efficiency: On hardware optimized for pure integer operations, the authors note that their method can deliver up to a $4\times$ throughput improvement over FP32 by utilizing pure INT8 processing pipelines.

Limitations and Future Work

While the paper demonstrates excellent results on convolutional networks and smaller BERT models, its application to Large Language Models (LLMs) is still preliminary. The LLM experiments were restricted to a W4A16 configuration (quantizing only weights to 4-bit while keeping activations at 16-bit precision). The authors explicitly note that expanding this framework to handle full low-bit activation quantization in massive scale LLMs is a primary direction for their future work. Additionally, they suggest exploring alternative basis functions, such as sparse matrices, rather than relying solely on integer types.

Summary updated

Abstract

Post-Training Quantization (PTQ) converts pre-trained Full-Precision (FP) models into quantized versions without training. While existing methods reduce size and computational costs, they also significantly degrade performance and quantization efficiency at extremely low settings due to quantization noise. We introduce a deep model series expansion framework to address this issue, enabling rapid and accurate approximation of unquantized models without calibration sets or fine-tuning. This is the first use of series expansion for neural network quantization. Specifically, our method expands the FP model into multiple low-bit basis models. To ensure accurate quantization, we develop low-bit basis model expansions at different granularities (tensor, layer, model), and theoretically confirm their convergence to the dense model, thus restoring FP model accuracy. Additionally, we design AbelianAdd/Mul operations between isomorphic models in the low-bit expansion, forming an Abelian group to ensure operation parallelism and commutativity. The experiments show that our algorithm achieves state-of-the-art performance in low-bit settings; for example, 4-bit quantization of ResNet-50 surpasses the original accuracy, reaching 77.03%. The code will be made public.
BibTeX
@misc{zhang2024fp,
  author = {Boyang Zhang and Daning Cheng and Yunquan Zhang and Jiake Tian and Jing Li and Fangming Liu},
  title = {{FP=xINT:Representing Neural Networks via Low-Bit Series Basis Functions}},
  year = {2024},
  eprint = {2412.06865},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.06865},
}
Figure