Joint Energy-based Model Training for Better Calibrated Natural Language Understanding Models
42663Authors
nan
Abstract
AbstractIn this work, we explore joint energy-based model (EBM) training during the finetuning of pretrained text encoders (e.g., Roberta) for natural language understanding (NLU) tasks. Our experiments show that EBM training can help the model reach a better calibration that is competitive to strong baselines, with little or no loss in accuracy. We discuss three variants of energy functions (namely scalar, hidden, and sharp-hidden) that can be defined on top of a text encoder, and compare them in experiments. Due to the discreteness of text data, we adopt noise contrastive estimation (NCE) to train the energy-based model. To make NCE training more effective, we train an auto-regressive noise model with the masked language model (MLM) objective.
Keywords
Full Content
Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics, pages 1754–1761 April 19 - 23, 2021. ©2021 Association for Computational Linguistics 1754 Joint Energy-based Model Training for Better Calibrated Natural Language Understanding Models Tianxing He MIT cloudygoose@csail.mit.edu Bryan McCann˚ Salesforce Research bryan@you.com Caiming Xiong Salesforce Research cxiong@salesforce.com Ehsan Hosseini-Asl Salesforce Research ehosseiniasl@salesforce.com Abstract In this work, we explore joint energy-based model (EBM) training during the finetuning of pretrained text encoders (e.g., Roberta) for natural language understanding (NLU) tasks. Our experiments show that EBM training can help the model reach a better calibration that is competitive to strong baselines, with little or no loss in accuracy. We discuss three vari- ants of energy functions (namely scalar, hid- den, and sharp-hidden) that can be defined on top of a text encoder, and compare them in ex- periments. Due to the discreteness of text data, we adopt noise contrastive estimation (NCE) to train the energy-based model. To make NCE training more effective, we train an auto- regressive noise model with the masked lan- guage model (MLM) objective. 1 Introduction Calibration refers to how well a classification model’s confidence (reflected by its output pos- terior probability) aligns with its actual accuracy. As deep learning models achieve amazing accu- racy in computer vision (He et al., 2015) or natural language processing (NLP) (Liu et al., 2019; De- vlin et al., 2018), more research attention has been drawn to the calibration aspect of these models. As shown by Guo et al. (2017), the high accuracy from deep models does not always lead to better calibra- tion. This motivates an important line of works attempting to achieve a better trade-off between accuracy and calibration. Most existing calibration methods (Guo et al., 2017; Kumar et al., 2019; Zadrozny and Elkan, 2001) generally rescale the posterior distribution predicted from the classifier after training. Such post-processing methods require a held-out devel- opment set with a decent number of samples to be ˚ Bryan McCann contributed to this work while he was at Salesforce Research. available. To overcome this constraint, Jung et al. (2020) uses a penalty term to encourage better cali- bration during training. In another line of work, Grathwohl et al. (2019) shows that one can jointly train an energy-based model (EBM) during the standard training of a neural classifier. Although calibration is not explic- itly addressed during EBM training, the calibration of the resulting model is shown to be greatly im- proved. Some intuitions of the underlying reasons will be given in Section 2.3. However, the training framework proposed by Grathwohl et al. (2019) is designed for image classifiers, and it can not be readily applied to discrete text data. In this work, we propose a framework that uses noise contrastive estimation (NCE) to jointly train an energy-based model during the finetuning of pretrained text encoders (e.g., BERT (Devlin et al., 2018) or Roberta (Liu et al., 2019)) for NLU tasks. We compare several variants of energy functions that can be defined …
Content truncated to 500 words
Labeled Text
AbstractIn this work, we explore joint energy-based model (EBM) training during the finetuning of pretrained text encoders (e.g., Roberta) for natural language understanding (NLU) tasks. Our experiments show that EBM training can help the model reach a better calibration that is competitive to strong baselines, with little or no loss in accuracy. We discuss three variants of energy functions (namely scalar, hidden, and sharp-hidden) that can be defined on top of a text encoder, and compare them in experiments. Due to the discreteness of text data, we adopt noise contrastive estimation (NCE) to train the energy-based model. To make NCE training more effective, we train an auto-regressive noise model with the masked language model (MLM) objective.
Publication Details
- Paper ID:
- 42663
- Year:
- 2021
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan