Skip to content

Research Articles

Quantizer Calibration under Distribution Shift: Bursty Inputs

Nadia Cairnwell (Machine Learning Laboratory, Glenwick University), Mara Faldenwood (Machine Learning Laboratory, Pinewick School of Engineering), Adil Merevale (Machine Learning Laboratory, Thornmere Polytechnic)

Vol. 6 No. 1 (2022) · pp. 125–137 · Published 21 September 2022

Abstract

For an input stream alternating between quiet periods and peaks, we construct a synthetic comparison between choosing activation clipping thresholds from separate calibration strata and a single threshold derived from pooled inputs. Each configuration is evaluated on the same 120 cases. In the 30 stress cases, activation outliers must become more frequent after calibration; peak and quiet intervals are retained at their original lengths rather than being normalized to the same arrival rate. 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 first configuration passes 92 of 120 cases, versus 84 for the comparator. In the stress subset, the respective counts are 17 and 13 of 30. The alternative exceeds the comparator overall by 6.7 percentage points. The practical trade-off is that wider clipping intervals preserve outliers but allocate fewer levels to common values. A subsequent evaluation should set tolerances independently and repeat the comparison on workloads not used to select the configuration.

Keywords: quantization, activation ranges, robustness, bursty inputs, 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. Arpit, D., Zhou, Y., Kota, B. U., & Govindaraju, V. (2016). Normalization propagation: A parametric technique for removing internal covariate shift in deep networks. Proceedings of the 33rd International Conference on Machine Learning, 1168–1176.
  3. Bhojanapalli, S., Chakrabarti, A., Glasner, D., Li, D., Unterthiner, T., & Veit, A. (2021). Understanding robustness of transformers for image classification. Proceedings of the IEEE/CVF International Conference on Computer Vision, 10231–10241.
  4. Desai, S., & Durrett, G. (2020). Calibration of pre-trained transformers. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, 295–302.
  5. Hendrycks, D., & Dietterich, T. (2019). Benchmarking neural network robustness to common corruptions and perturbations. International Conference on Learning Representations.
  6. Hendrycks, D., & Dietterich, T. G. (2018). Benchmarking neural network robustness to common corruptions and surface variations. arXiv:1807.01697.
  7. Jiang, Z., Araki, J., Ding, H., & Neubig, G. (2021). How can we know when language models know? On the calibration of language models for question answering. Transactions of the Association for Computational Linguistics, 9, 962–977.
  8. Liang, S., Li, Y., & Srikant, R. (2017). Enhancing the reliability of out-of-distribution image detection in neural networks. arXiv:1706.02690.
  9. Liu, E. Z., et al. (2021). Just train twice: Improving group robustness without training group information. Proceedings of the 38th International Conference on Machine Learning, 6781–6792.
  10. Nagel, M., Fournarakis, M., Amjad, R. A., Bondarenko, Y., van Baalen, M., & Blankevoort, T. (2021). A white paper on neural network quantization. arXiv:2106.08295.
  11. Shen, S., et al. (2019). Q-BERT: Hessian based ultra low precision quantization of BERT. arXiv:1909.05840.
  12. 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.
  13. Song, Y., & Ermon, S. (2019). Generative modeling by estimating gradients of the data distribution. Advances in Neural Information Processing Systems, 32, 11918–11930.