Dice Loss for Data-imbalanced NLP Tasks
arXiv:1911.02855
Abstract
Many NLP tasks such as tagging and machine reading comprehension are faced with the severe data imbalance issue: negative examples significantly outnumber positive examples, and the huge number of background examples (or easy-negative examples) overwhelms the training. The most commonly used cross entropy (CE) criteria is actually an accuracy-oriented objective, and thus creates a discrepancy between training and test: at training time, each training instance contributes equally to the objective function, while at test time F1 score concerns more about positive examples. In this paper, we propose to use dice loss in replacement of the standard cross-entropy objective for data-imbalanced NLP tasks. Dice loss is based on the Sorensen-Dice coefficient or Tversky index, which attaches similar importance to false positives and false negatives, and is more immune to the data-imbalance issue. To further alleviate the dominating influence from easy-negative examples in training, we propose to associate training examples with dynamically adjusted weights to deemphasize easy-negative examples.Theoretical analysis shows that this strategy narrows down the gap between the F1 score in evaluation and the dice loss in training. With the proposed training objective, we observe significant performance boost on a wide range of data imbalanced NLP tasks. Notably, we are able to achieve SOTA results on CTB5, CTB6 and UD1.4 for the part of speech tagging task; SOTA results on CoNLL03, OntoNotes5.0, MSRA and OntoNotes4.0 for the named entity recognition task; along with competitive results on the tasks of machine reading comprehension and paraphrase identification.
References in corpus (22)
- SMOTE: Synthetic Minority Over-sampling Technique
- Deep Residual Learning for Image Recognition
- Generalised Dice overlap as a deep learning loss function for highly unbalanced segmentations
- XLNet: Generalized Autoregressive Pretraining for Language Understanding
- Bidirectional Attention Flow for Machine Comprehension
- Focal Loss for Dense Object Detection
- Domain-adversarial neural networks to address the appearance variability of histopathology images
- SQuAD: 100,000+ Questions for Machine Comprehension of Text
- Rich feature hierarchies for accurate object detection and semantic segmentation
- Machine Comprehension Using Match-LSTM and Answer Pointer
- QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension
- The Natural Language Decathlon: Multitask Learning as Question Answering
- ReasoNet: Learning to Stop Reading in Machine Comprehension
- Glyce: Glyph-vectors for Chinese Character Representations
- Towards Accurate One-Stage Object Detection with AP-Loss
- Multi-Perspective Context Matching for Machine Comprehension
- Not All Samples Are Created Equal: Deep Learning with Importance Sampling
- Reading Wikipedia to Answer Open-Domain Questions
- Character-based Joint Segmentation and POS Tagging for Chinese using Bidirectional RNN-CRF
- Chinese NER Using Lattice LSTM
- On the influence of Dice loss function in multi-class organ segmentation of abdominal CT using 3D fully convolutional networks
- DSReg: Using Distant Supervision as a Regularizer
Cited by in corpus (7)
- Deep Learning for Pancreas Segmentation: a Systematic Review
- Multitask Learning for Class-Imbalanced Discourse Classification
- AT-BERT: Adversarial Training BERT for Acronym Identification Winning Solution for SDU@AAAI-21
- Sequential Learning on Liver Tumor Boundary Semantics and Prognostic Biomarker Mining
- Locally-Contextual Nonlinear CRFs for Sequence Labeling
- Learning from Miscellaneous Other-Class Words for Few-shot Named Entity Recognition
- TagRuler: Interactive Tool for Span-Level Data Programming by Demonstration