Making Pre-trained Language Models both Task-solvers and Self-calibrators

Yangyi Chen, Xingyao Wang, Heng Ji
7/21/2023
cs.CLcs.LG

Official code: Yangyi-Chen/LM-TOAST (7 stars, MIT, last commit 2023-12-21).

Abstract

Pre-trained language models (PLMs) serve as backbones for various real-world systems. For high-stake applications, it's equally essential to have reasonable confidence estimations in predictions. While the vanilla confidence scores of PLMs can already be effectively utilized, PLMs consistently become overconfident in their wrong predictions, which is not desirable in practice. Previous work shows that introducing an extra calibration task can mitigate this issue. The basic idea involves acquiring additional data to train models in predicting the confidence of their initial predictions. However, it only demonstrates the feasibility of this kind of method, assuming that there are abundant extra available samples for the introduced calibration task. In this work, we consider the practical scenario that we need to effectively utilize training samples to make PLMs both task-solvers and self-calibrators. Three challenges are presented, including limited training samples, data imbalance, and distribution shifts. We first conduct pilot experiments to quantify various decisive factors in the calibration task. Based on the empirical analysis results, we propose a training algorithm LM-TOAST to tackle the challenges. Experimental results show that LM-TOAST can effectively utilize the training data to make PLMs have reasonable confidence estimations while maintaining the original task performance. Further, we consider three downstream applications, namely selective classification, adversarial defense, and model cascading, to show the practical usefulness of LM-TOAST. The code will be made public at \url{https://github.com/Yangyi-Chen/LM-TOAST}.

View on arXivView PDF

Code Implementations(1)

MIT

Source code for ACL 2023 Findings paper "Making Pre-trained Language Models both Task-solvers and Self-calibrators"

70PythonMay 7, 20232 years agoMIT
calibrationnatural-language-processingpre-trained-language-models

Similar Papers

Cite this paper

@article{chen2023making,
  title  = {Making Pre-trained Language Models both Task-solvers and Self-calibrators},
  author = {Yangyi Chen and Xingyao Wang and Heng Ji},
  year   = {2023},
  eprint = {2307.11316},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.11316v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.11316.svg)](https://codeofpaper.com/paper/2307.11316)

Discussion