Skip to content

Research Articles

Quantizer Calibration under Distribution Shift: Changing Conditions

Selin Northfen (Machine Learning Laboratory, Valehart Institute of Computational Science)

Vol. 4 No. 1 (2020) · pp. 160–172 · Published 30 October 2020

Abstract

This synthetic study compares choosing activation clipping thresholds from separate calibration strata with a single threshold derived from pooled inputs in an operating profile that changes halfway through each run. Each configuration is evaluated on the same 180 cases. In the 45 stress cases, activation outliers must become more frequent after calibration; the final part of each run is deliberately drawn from a different regime than the initial calibration cases. A case counts as a pass only if it meets this criterion: quantized predictions must stay within the declared error tolerance on each stratum. The comparison holds the training and selection splits fixed across alternatives; evaluation cases are not reused for tuning. Compute or memory assigned to an alternative counts toward its budget even if training does not finish. The comparator passes 137 of 180 cases and the alternative passes 137. For the 45 stress cases alone, the counts are 22 and 31, respectively. The aggregate count does not establish that the alternative is preferable at every operating point. The practical trade-off is that wider clipping intervals preserve outliers but allocate fewer levels to common values. The result describes the chosen case mix. Before applying the finding, a follow-up benchmark would need to vary the share of difficult cases without relaxing the acceptance criteria.

Keywords: quantization, activation ranges, robustness, changing conditions, synthetic evaluation

References

  1. Agustsson, E., et al. (2017). Soft-to-hard vector quantization for end-to-end learning compressible representations. Advances in Neural Information Processing Systems, 30, 1141–1151.
  2. André, F., Kermarrec, A.-M., & Le Scouarnec, N. (2015). Cache locality is not enough: High-performance nearest neighbor search with product quantization fast scan. Proceedings of the VLDB Endowment, 9(4), 288–299.
  3. Carlini, N., & Wagner, D. (2017). Towards evaluating the robustness of neural networks. Proceedings of the 2017 IEEE Symposium on Security and Privacy, 39–57.
  4. Fukushima, K. (1980). Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biological Cybernetics, 36(4), 193–202.
  5. Guo, R., Kumar, S., Choromanski, K., & Simcha, D. (2016). Quantization based fast inner product search. Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, 482–490.
  6. Hendrycks, D., & Dietterich, T. (2019). Benchmarking neural network robustness to common corruptions and perturbations. International Conference on Learning Representations.
  7. Hendrycks, D., & Dietterich, T. G. (2018). Benchmarking neural network robustness to common corruptions and surface variations. arXiv:1807.01697.
  8. Ioffe, S., & Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. Proceedings of the 32nd International Conference on Machine Learning, 448–456.
  9. Jacob, B., et al. (2018). Quantization and training of neural networks for efficient integer-arithmetic-only inference. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2704–2713.
  10. Larochelle, H., & Murray, I. (2011). The neural autoregressive distribution estimator. Proceedings of the 14th International Conference on Artificial Intelligence and Statistics, 29–37.
  11. Liang, S., Li, Y., & Srikant, R. (2017). Enhancing the reliability of out-of-distribution image detection in neural networks. arXiv:1706.02690.
  12. Shen, S., et al. (2019). Q-BERT: Hessian based ultra low precision quantization of BERT. arXiv:1909.05840.
  13. Shrikumar, A., Greenside, P., & Kundaje, A. (2017). Learning important features through propagating activation differences. Proceedings of the 34th International Conference on Machine Learning, 3145–3153.
  14. Song, Y., & Ermon, S. (2019). Generative modeling by estimating gradients of the data distribution. Advances in Neural Information Processing Systems, 32, 11918–11930.
  15. Thulasidasan, S., Chennupati, G., Bilmes, J. A., Bhattacharya, T., & Michalak, S. (2019). On mixup training: Improved calibration and predictive uncertainty for deep neural networks. Advances in Neural Information Processing Systems, 32, 13888–13899.