MedNLI Is Not Immune: Natural Language Inference Artifacts in the Clinical Domain

Christine Herlihy, Rachel Rudinger

TL;DR

Think you can eliminate dataset biases simply by hiring domain experts instead of crowdworkers? Think again. This paper demonstrates that MedNLI, a clinical natural language inference dataset annotated entirely by physicians, suffers from the exact same systemic "annotation artifacts" as crowd-sourced datasets, allowing models to cheat by ignoring the premise entirely.

What Problem Does This Paper Address?

In Natural Language Inference (NLI), a model is given a premise sentence and must determine if a hypothesis sentence is true (entailment), maybe true (neutral), or false (contradiction). A well-known issue in large crowd-sourced datasets like SNLI is the presence of annotation artifacts—unintentional statistical shortcuts left by human annotators (e.g., regularly using the word "no" or "never" to write contradictions). Models quickly learn to exploit these shortcuts, achieving high accuracy by looking only at the hypothesis and ignoring the premise.

To avoid this, the medical NLI dataset MedNLI was curated using professional physicians as annotators, under the assumption that expert domain knowledge would yield cleaner, more rigorous data. This paper investigates whether expert-annotated datasets are truly immune to these behavioral biases, identifying the specific lexical and semantic shortcuts physicians unconsciously left behind.

Methods

The authors investigate and mitigate MedNLI's artifacts using a four-step approach:

  1. Hypothesis-Only Baseline: They train a premise-unaware fastText classifier. If this model beats a random baseline (33.3% for this balanced dataset), it proves the hypotheses contain enough leaked information to cheat.
  2. Lexical Analysis: They use scispaCy for clinical text preprocessing and calculate Pointwise Mutual Information (PMI) to identify specific words disproportionately associated with certain labels.
  3. Semantic Heuristic Analysis: Using Medical Subject Headings (MeSH) to map words to a hierarchical tree, they statistically test three hypothesized annotator shortcuts: the Hypernym Heuristic (entailments use broader category terms), the Probable Cause Heuristic (neutral statements guess common causes), and the Everything Is Fine Heuristic (contradictions simply declare the patient is healthy).
  4. Adversarial Filtering (AFLite): They apply the AFLite algorithm to systematically scrub out "easy" examples that linear models can solve via artifacts, partitioning MedNLI into clean "easy" and "difficult" subsets.

Datasets

  • MedNLI: The primary dataset under evaluation. Its premises are sourced from de-identified electronic health records in the MIMIC-III database (specifically adult and neonatal intensive care unit notes).

Key Insights and Ideas

  • Doctors fall into the same cognitive traps as crowdworkers. Despite their advanced training, physician annotators utilized predictable linguistic patterns when forced to generate hypotheses rapidly.
  • Contradictions are weirdly healthy. In an ICU dataset where patients are critically ill, the most predictive tokens for a contradiction were indicators of perfect health, such as "normal_heart_rhythm", "normal_vision", or "no_history_of_cancer".
  • Neutral claims rely on common stereotypes. When generating "neutral" hypotheses (things that might be true), doctors defaulted to common, generic public health conditions like "smoking", "obesity", or "joint_pain" rather than specific medical deductions.
Table 3: Top 15 tokens by PMI(token, class); % of class training examples that contain the token.

Key Results

  • The Cheat Code Works: The hypothesis-only fastText model achieved a 62.6% micro F1-score on the test set, vastly outperforming the random guessing baseline of 33.3%.
  • Misclassification Patterns: As shown in the confusion matrix below, the model was highly accurate at identifying contradictions (73.2% precision) based purely on "healthy" keywords, but struggled more to separate entailment from neutral classes.
Extracted table from page 2 of MedNLI Is Not Immune: Natural Language Inference Artifacts in the Clinical Domain
  • The Difficult Split Exposes the Flaw: When evaluated on the difficult partition generated by AFLite, the performance of the hypothesis-only model plummeted to 40.0%, and even the full model (with access to the premise) dropped significantly, proving that previous performance metrics were artificially inflated by artifacts.
Extracted table from page 4 of MedNLI Is Not Immune: Natural Language Inference Artifacts in the Clinical Domain

Limitations and Future Work

While adversarial filtering (like AFLite) successfully exposes model weaknesses, the authors note that adversarial dataset construction is incredibly difficult to scale in expert domains. You cannot easily use AI to generate adversarial medical text because validating those generations requires expensive, scarce physician hours.

Instead of trying to fix datasets after the fact, the authors suggest changing how we collect data. They propose using mechanism design to restructure annotation tasks—such as reducing cognitive load by having experts map predefined (premise, relation) tuples rather than writing sentences from scratch.

Summary updated

Abstract

Crowdworker-constructed natural language inference (NLI) datasets have been found to contain statistical artifacts associated with the annotation process that allow hypothesis-only classifiers to achieve better-than-random performance (Poliak et al., 2018; Gururanganet et al., 2018; Tsuchiya, 2018). We investigate whether MedNLI, a physician-annotated dataset with premises extracted from clinical notes, contains such artifacts (Romanov and Shivade, 2018). We find that entailed hypotheses contain generic versions of specific concepts in the premise, as well as modifiers related to responsiveness, duration, and probability. Neutral hypotheses feature conditions and behaviors that co-occur with, or cause, the condition(s) in the premise. Contradiction hypotheses feature explicit negation of the premise and implicit negation via assertion of good health. Adversarial filtering demonstrates that performance degrades when evaluated on the difficult subset. We provide partition information and recommendations for alternative dataset construction strategies for knowledge-intensive domains.
BibTeX
@inproceedings{herlihy2021mednli,
  author = {Christine Herlihy and Rachel Rudinger},
  title = {{MedNLI Is Not Immune: Natural Language Inference Artifacts in the Clinical Domain}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-short.129},
}
Figure