# ClipQ: Clipping Optimization for the Post-Training Quantization of Convolutional Neural Network
## 2 Related Work  
Large quantization deviation occurs when the maximum and minimum values of floating-point parameters are directly used as clip thresholds, so clipping optimization has been proposed in PTQ. [PERSON] [30] proposes a percentage criterion to exclude the interference of outliers. Nvidia's TensorRT, a product specifically designed to perform 8-bit integer quantization without retraining, finds the optimal clip thresholds by minimizing the KL distance between the original activation distribution and the quantized distribution, but it causes the accuracy of MobileNetV2 and MnasNetV1 to drop by 3%. DFQ [31] assumes that the feature map processed by the BN layer satisfies the Gaussian distribution and deduces the clipping thresholds according to the mean and variance of the BN layer. ZeroQ [32] synthesizes the input image by regressing the BN parameters and obtains the activation clipping thresholds based on the synthesized image. DFQ and ZeroQ achieve data-free quantization, but their performance depends on the number of BN layers in the network. MSE utilizes L2 distance to characterize the quantization deviation and then minimize it by grid search. OCS [23] compares MSE with other clipping optimization methods and considers it the best. OMSE [24] iteratively quantizes the convolution kernel based on MSE. It means that a convolution operation is decomposed into multiple convolutions. By quantizing the decomposed convolutions, OMSE can achieve better performance under 4-bit, but the amount of calculation and parameters are also multiplied.  
In addition to clipping optimization, there are other techniques like weight preprocessing, bias correction, adaptive rounding, etc., which can improve the performance of posttraining quantization. Weight preprocessing, such as DFQ and OCS. AdaRound [25] proposes that nearest neighbor rounding is not the optimal choice for quantization. Based on sufficient calibration data, it uses gradient descent to minimize the output deviation of each layer, thereby determining the clipping thresholds and the best rounding of each parameter. BRECQ [33] disagrees with AdaRound's assumption that adjacent network layers are independent of each other, and it divides the network into different blocks. When the calibration data are sufficient, adaptive rounding techniques can effectively improve the quantization performance. BFQ [34] reduces activation quantization deviation by fusing the mean of activation quantization deviation into the bias, which is called bias correction.  
In post-training quantization, the above methods can be combined according to the actual situation, but it is necessary to set the clipping threshold of weight and activation. Other methods can be regarded as improvement techniques, and they may have additional conditions such as more hardware resources, specific network structures, sufficient calibration data, and so on. ClipQ proposed in this paper improves quantization performance only by clipping optimization. Just a few calibration data are required, and it also does not bring additional computation to hardware.