Joint Energy-based Model Training for Better Calibrated Natural Language Understanding Models

Tianxing He, Bryan McCann, Caiming Xiong, Ehsan Hosseini-Asl
1/18/2021
cs.CLcs.AI

Official code: salesforce/ebm_calibration_nlu (9 stars, Python, BSD-3-Clause, last commit 2025-05-01).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Official repository for "Joint Energy-based Model Training for Better Calibrated Natural Language Understanding Models"

92Python, ShellJan 13, 20211 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{he2021joint,
  title  = {Joint Energy-based Model Training for Better Calibrated Natural Language Understanding Models},
  author = {Tianxing He and Bryan McCann and Caiming Xiong and Ehsan Hosseini-Asl},
  year   = {2021},
  eprint = {2101.06829},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.06829}
}

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/2101.06829.svg)](https://codeofpaper.com/paper/2101.06829)

Discussion