Using Focal Loss to Fight Shallow Heuristics: An Empirical Analysis of Modulated Cross-Entropy in Natural Language Inference

Frano Rajič, Ivan Stresec, Axel Marmet, Tim Poštuvan
11/23/2022
cs.CLcs.LG

Official code: m43/focal-loss-against-heuristics (3 stars, Python, MIT, last commit 2023-02-09).

Abstract

There is no such thing as a perfect dataset. In some datasets, deep neural networks discover underlying heuristics that allow them to take shortcuts in the learning process, resulting in poor generalization capability.

Show full abstract

Instead of using standard cross-entropy, we explore whether a modulated version of cross-entropy called focal loss can constrain the model so as not to use heuristics and improve generalization performance. Our experiments in natural language inference show that focal loss has a regularizing impact on the learning process, increasing accuracy on out-of-distribution data, but slightly decreasing performance on in-distribution data. Despite the improved out-of-distribution performance, we demonstrate the shortcomings of focal loss and its inferiority in comparison to the performance of methods such as unbiased focal loss and self-debiasing ensembles.

View on arXivView PDF

Code Implementations(1)

MIT

Using Focal Loss to Fight Shallow Heuristics: An Empirical Analysis of Modulated Cross-Entropy in Natural Language Inference

30Python, ShellApr 29, 20223 years agoMIT
bertfocal-losshansinfersentmnli-dataset+1 more

Similar Papers

Cite this paper

@article{raji2022using,
  title  = {Using Focal Loss to Fight Shallow Heuristics: An Empirical Analysis of Modulated Cross-Entropy in Natural Language Inference},
  author = {Frano Rajič and Ivan Stresec and Axel Marmet and Tim Poštuvan},
  year   = {2022},
  eprint = {2211.13331},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.13331}
}

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

Discussion