MixCE: Training Autoregressive Language Models by Mixing Forward and Reverse Cross-Entropies

Shiyue Zhang, Shijie Wu, Ozan Irsoy, Steven Lu, Mohit Bansal +2 more
5/26/2023
21 citations
cs.CLcs.AIcs.LG

Official code: bloomberg/MixCE-acl2023 (20 stars, Python, Apache-2.0, PyTorch, last commit 2023-05-29).

Abstract

Autoregressive language models are trained by minimizing the cross-entropy of the model distribution Q relative to the data distribution P -- that is, minimizing the forward cross-entropy, which is equivalent to maximum likelihood estimation (MLE). We have observed that models trained in this way may "over-generalize", in the sense that they produce non-human-like text.

Show full abstract

Moreover, we believe that reverse cross-entropy, i.e., the cross-entropy of P relative to Q, is a better reflection of how a human would evaluate text generated by a model. Hence, we propose learning with MixCE, an objective that mixes the forward and reverse cross-entropies. We evaluate models trained with this objective on synthetic data settings (where P is known) and real data, and show that the resulting models yield better generated text without complex decoding strategies. Our code and models are publicly available at https://github.com/bloomberg/mixce-acl2023

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

Implementation of MixCE method described in ACL 2023 paper by Zhang et al.

203PythonMay 17, 20233 years agoApache-2.0
language-modelmachine-learningnlppythonpytorch+1 more

Similar Papers

Cite this paper

@article{zhang2023mixce,
  title  = {MixCE: Training Autoregressive Language Models by Mixing Forward and Reverse Cross-Entropies},
  author = {Shiyue Zhang and Shijie Wu and Ozan Irsoy and Steven Lu and Mohit Bansal and Mark Dredze and David Rosenberg},
  year   = {2023},
  eprint = {2305.16958},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.16958v2}
}

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

Discussion