On the Effects of Transformer Size on In- and Out-of-Domain Calibration

Soham Dan, Dan Roth


Abstract
Large, pre-trained transformer language models, which are pervasive in natural language processing tasks, are notoriously expensive to train. To reduce the cost of training such large models, prior work has developed smaller, more compact models which achieves a significant speedup in training time while maintaining competitive accuracy to the original model on downstream tasks. Though these smaller pre-trained models have been widely adopted by the community, it is not known how well are they calibrated compared to their larger counterparts. In this paper, focusing on a wide range of tasks, we thoroughly investigate the calibration properties of pre-trained transformers, as a function of their size. We demonstrate that when evaluated in-domain, smaller models are able to achieve competitive, and often better, calibration compared to larger models, while achieving significant speedup in training time. Post-hoc calibration techniques further reduce calibration error for all models in-domain. However, when evaluated out-of-domain, larger models tend to be better calibrated, and label-smoothing instead is an effective strategy to calibrate models in this setting.
Anthology ID:
2021.findings-emnlp.180
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2021
Month:
November
Year:
2021
Address:
Punta Cana, Dominican Republic
Editors:
Marie-Francine Moens, Xuanjing Huang, Lucia Specia, Scott Wen-tau Yih
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
2096–2101
Language:
URL:
https://aclanthology.org/2021.findings-emnlp.180
DOI:
10.18653/v1/2021.findings-emnlp.180
Bibkey:
Cite (ACL):
Soham Dan and Dan Roth. 2021. On the Effects of Transformer Size on In- and Out-of-Domain Calibration. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 2096–2101, Punta Cana, Dominican Republic. Association for Computational Linguistics.
Cite (Informal):
On the Effects of Transformer Size on In- and Out-of-Domain Calibration (Dan & Roth, Findings 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.findings-emnlp.180.pdf
Video:
 https://aclanthology.org/2021.findings-emnlp.180.mp4
Data
CoLAGLUEMultiNLISNLISSTSST-2