Quantifying the Task-Specific Information in Text-Based Classifications

Zining Zhu, Aparna Balagopalan, Marzyeh Ghassemi, Frank RudziczarXiv 2021

Abstract

Recently, neural natural language models have attained state-of-the-art performance on a wide variety of tasks, but the high performance can result from superficial, surface-level cues. These surface cues, as the "shortcuts" inherent in the datasets, do not contribute to the task-specific information (TSI) of the classification tasks. While it is essential to look at the model performance, it is also important to understand the datasets. In this paper, we consider this question: Apart from the information introduced by the shortcut features, how much task-specific information is required to classify a dataset? We formulate this quantity in an information-theoretic framework. While this quantity is hard to compute, we approximate it with a fast and stable method. TSI quantifies the amount of linguistic knowledge modulo a set of predefined shortcuts -- that contributes to classifying a sample from each dataset. This framework allows us to compare across datasets, saying that, apart from a set of "shortcut features", classifying each sample in the Multi-NLI task involves around 0.4 nats more TSI than in the Quora Question Pair.

Introduction

Modern neural networks achieve remarkable accuracy on NLP benchmarks, yet they are often criticized for "shortcut learning"—the exploitation of superficial statistical cues rather than genuine semantic understanding. For example, a sentiment analysis model might rely on the presence of specific punctuation or keywords rather than the underlying sentiment. Standard performance metrics like accuracy or cross-entropy loss fail to distinguish between a model that understands language and one that has merely identified a clever shortcut. This paper addresses this gap by introducing Task-Specific Information (TSI), a metric designed to quantify the inherent linguistic complexity of a dataset after stripping away these superficial shortcuts.

Methodology

The proposed framework utilizes an information-theoretic approach to decompose input data ($X$) into two distinct parts: shortcut features ($X_s$) and task-specific features ($X_t$).

Conceptual framework decomposing input $X$ into shortcut features $X_s$ and task-specific features $X_t$.

TSI is defined as the mutual information between labels ($Y$) and task-specific features ($X_t$), conditioned on the shortcuts. To make this quantity computable, the authors use a Negative Log-Likelihood (NLL) approximation: $$\text{TSI} \approx \text{NLL}(Y|X_s) - \text{NLL}(Y|X)$$ In this setup, a "control" model is trained using only the predefined shortcuts ($X_s$), while a state-of-the-art model (such as BERT) is trained on the full input ($X$). The difference in their predictive "surprise" (NLL) represents the TSI. A small difference suggests the task is largely solvable via shortcuts, whereas a large difference indicates significant task-specific linguistic depth.

Experimental Setup

The study evaluates four major NLP benchmarks: MNLI (Natural Language Inference), QQP (Quora Question Pairs), and IMDB & Yelp (Sentiment Analysis). The authors specifically test three categories of shortcut features:

  • Punctuation (P): Counts of marks like "?" or ".".
  • Stopwords (S): Frequency of common functional words.
  • Lexical Overlap (O): The degree of word sharing between sentence pairs.

Results and Discussion

The empirical results demonstrate that TSI provides a robust and comparable measure of task difficulty across different domains.

Estimated Task-Specific Information ($I(Y|X_t)$) across datasets using different sets of shortcut features: Punctuation (P), Stopwords (S), and Lexical Overlap (O).

Key Findings:

  1. Linguistic Density: MNLI is found to be "linguistically denser" than QQP, requiring approximately 0.4 nats more TSI. This suggests that NLI is a fundamentally more complex linguistic challenge than paraphrase detection.
  2. Shortcut Pervasiveness: In tasks like MNLI and QQP, "lexical overlap" serves as a significant shortcut. As shown in the figure above, including this feature in the control model causes the estimated TSI to drop, confirming that models frequently leverage word-matching over logical reasoning.
  3. Accuracy vs. Depth: A notable "Aha!" moment occurs when comparing Yelp and IMDB. While Yelp has higher BERT accuracy (0.97 vs 0.92), its TSI is lower (0.41 vs 0.43 nats). This indicates that Yelp is "easier" not due to linguistic depth, but because its labels are more predictable from simple cues.
  4. Metric Robustness: TSI remains remarkably stable even when training data is reduced to 5-25% of its original size, making it a reliable characterization of a dataset's inherent properties.
Dataset Accuracy (BERT) TSI (P+S)
MNLI 0.85 0.68 nats
IMDB 0.92 0.43 nats
Yelp 0.97 0.41 nats
QQP 0.89 0.31 nats

Conclusion

By measuring task difficulty in "nats," TSI offers a universal currency for comparing diverse NLP tasks on a level playing field. While powerful, the metric's accuracy is contingent on the manual identification of shortcut features. Future research could explore automated methods for identifying these shortcuts and further investigate the qualitative nature of the information captured by TSI.

Summary updated

BibTeX
@misc{zhu2021quantifying,
  author = {Zining Zhu and Aparna Balagopalan and Marzyeh Ghassemi and Frank Rudzicz},
  title = {{Quantifying the Task-Specific Information in Text-Based Classifications}},
  year = {2021},
  eprint = {2110.08931},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.08931},
}
Figure