Skip to main content
QUICK REVIEW

[Paper Review] Position-based Scaled Gradient for Model Quantization and Pruning

Jangho Kim, KiYoon Yoo|arXiv (Cornell University)|May 22, 2020
Advanced Neural Network ApplicationsComputer Science14 citations
TL;DR

This paper proposes Position-based Scaled Gradient (PSG), a novel regularization method that scales gradients based on weight position to guide training toward compression-friendly minima. By making full-precision models more amenable to post-training quantization and pruning without retraining, PSGD reduces the distribution gap between full-precision and low-precision weights, achieving state-of-the-art performance even at 4-bit quantization on CIFAR-100 and ImageNet.

ABSTRACT

We propose the position-based scaled gradient (PSG) that scales the gradient depending on the position of a weight vector to make it more compression-friendly. First, we theoretically show that applying PSG to the standard gradient descent (GD), which is called PSGD, is equivalent to the GD in the warped weight space, a space made by warping the original weight space via an appropriately designed invertible function. Second, we empirically show that PSG acting as a regularizer to a weight vector is favorable for model compression domains such as quantization and pruning. PSG reduces the gap between the weight distributions of a full-precision model and its compressed counterpart. This enables the versatile deployment of a model either as an uncompressed mode or as a compressed mode depending on the availability of resources. The experimental results on CIFAR-10/100 and ImageNet datasets show the effectiveness of the proposed PSG in both domains of pruning and quantization even for extremely low bits. The code is released in Github.

Motivation & Objective

  • Address the fundamental distribution gap between full-precision and quantized weight distributions that hinders effective post-training quantization.
  • Enable versatile deployment of a single model in both full-precision and compressed modes without retraining or data access.
  • Develop a training method that inherently produces weights suitable for low-bit quantization and pruning by regularizing convergence toward specific target points.
  • Provide a theoretically grounded alternative to existing quantization-aware training (QAT) and post-training quantization (PTQ) methods that require additional fine-tuning or data.
  • Demonstrate that PSGD can find sharper minima that are more compatible with discrete weight grids used in quantization and pruning.

Proposed method

  • Introduce the position-based scaled gradient (PSG), where the gradient is scaled based on the L2 distance between the current weight and its target quantized value (e.g., nearest 4-bit grid point).
  • Define PSGD as stochastic gradient descent using PSG instead of standard gradients, effectively regularizing weights toward compression-friendly positions.
  • Theoretically prove that PSGD is equivalent to standard SGD in a warped weight space, where the warping function is invertible and designed to pull weights toward target grid points.
  • Use an invertible, differentiable function to warp the original weight space such that gradient updates in the original space correspond to standard GD in the warped space.
  • For pruning, the target points are set to zero, enabling sparse training by regularizing weights toward zero via position-dependent gradient scaling.
  • Apply PSGD during initial training to produce a full-precision model that maintains high accuracy while being directly quantizable to low-bit formats.

Experimental results

Research questions

  • RQ1Can gradient scaling based on weight position reduce the distribution gap between full-precision and low-precision models?
  • RQ2Does PSGD find minima that are more compatible with quantization and pruning than standard SGD?
  • RQ3Can a model trained with PSGD achieve high accuracy in both full-precision and low-precision modes without additional fine-tuning?
  • RQ4How does PSGD compare to existing QAT and PTQ methods in terms of accuracy and deployment flexibility?
  • RQ5Is PSGD effective for extremely low-bit quantization (e.g., 4-bit) and structured pruning?

Key findings

  • PSGD reduces the distribution gap between full-precision and 4-bit quantized weights, as shown in Figure 1(b), where the weight distributions of PSGD-trained models closely resemble those of low-precision models.
  • On CIFAR-100, PSGD achieves 66.5% top-1 accuracy with 4-bit weight and activation quantization (W4A4), outperforming both standard SGD and concurrent PTQ methods when used as a pre-trained model.
  • When combined with the LAPQ PTQ method, the PSGD-pretrained model achieves 66.5% accuracy on ImageNet W4A4, exceeding the performance of LAPQ-only (60.3%) and PSGD-only (63.3%) by 3.1 and 6.2 percentage points respectively.
  • PSGD-trained models exhibit sharper minima than standard SGD, with 9 times more large positive eigenvalues (λ > 10⁻³) in the Hessian, indicating convergence to minima in sharper valleys.
  • The method enables direct deployment of a single model in both full-precision and compressed modes, eliminating the need for retraining or data access in resource-constrained environments.
  • PSGD is effective for both weight quantization and magnitude-based pruning, demonstrating its versatility as a unified regularization approach for model compression.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.