Ranking-Constrained Learning with Rationales for Text Classification

Juanyan Wang, Manali Sharma, Mustafa BilgicACL 2022

Abstract

Training deep learning models for text classification typically requires large amounts of labeled data. This paper presents LwR-RC (Learning with Rationales – Ranking-Constrained), a novel approach that leverages human-provided rationales—specific text snippets justifying a label—to significantly reduce data requirements. By formulating rationale-based learning as a ranking constraint within the loss function, LwR-RC achieves state-of-the-art performance with up to three times less training data than standard fine-tuned BERT models.

Introduction

While humans can often categorize documents based on a few key sentences, machine learning models usually require thousands of examples to identify relevant features. Labeling data is expensive, but annotators often identify the evidence (rationales) during the labeling process. Previous work suggests that highlighting these rationales adds minimal overhead but provides high-value information. The core challenge lies in effectively integrating these human highlights into the training objective of deep learning models.

Methodology

The authors introduce the LwR-RC objective function, which moves beyond simple classification error minimization. The model is trained to satisfy two primary ranking expectations:

  1. Document vs. Masked (DvM): The model's confidence in the correct label should be higher for the full document ($D$) than for a version where rationales are masked ($M$).
  2. Rationale vs. Masked (RvM): The model's confidence should be higher when observing only the rationales ($R$) compared to the masked document ($M$).
Architecture of the LwR-RC model showing the integration of classification and ranking-constrained losses.

The architecture utilizes a pre-trained BERT model for sentence embeddings, which are then aggregated via average pooling. The final loss function is a weighted sum of standard cross-entropy ($L_{clf}$) and the two ranking losses ($L_{DvM}$ and $L_{RvM}$). This framework is architecture-agnostic and avoids the complexity of custom attention mechanisms.

Experimental Evaluation

The approach was evaluated on three datasets:

  • IMDb: Sentiment analysis of movie reviews.
  • ASRS: Aviation safety reports categorized by issue type.
  • AIvsCR: A new dataset of 2,394 arXiv articles categorized into Artificial Intelligence or Cryptography, featuring human-annotated rationales.

Results

LwR-RC consistently outperformed standard BERT fine-tuning and other rationale-augmented baselines, particularly in low-data regimes.

Performance comparison of LwR-RC against various baselines across IMDb, ASRS, and AIvsCR datasets as a function of training data size.

Key findings include:

  • Data Efficiency: On IMDb, LwR-RC achieved 80% accuracy with just 23 documents, whereas standard BERT required 73.
  • Accuracy Gains: LwR-RC provided absolute accuracy improvements of up to 23.68% on IMDb and 28.31% on ASRS compared to the best-performing baseline (RB-WAVG-BERT) in low-data scenarios.
  • Robustness: The ranking constraint approach proved more robust than token-level rationale prediction, as it avoids forcing "neutral" snippets into specific label categories.

Conclusion

LwR-RC demonstrates that framing human rationales as ranking constraints is a powerful method for improving the data efficiency of text classifiers. While currently focused on binary classification, the method shows significant promise for low-resource NLP tasks. Future work will explore extending this framework to multi-class and multi-label settings, as well as investigating model robustness to noisy human annotations.

Summary updated

BibTeX
@inproceedings{wang2022ranking,
  author = {Juanyan Wang and Manali Sharma and Mustafa Bilgic},
  title = {{Ranking-Constrained Learning with Rationales for Text Classification}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.161},
}
Figure