M ed NLI Is Not Immune: N atural Language Inference Artifacts in the Clinical Domain (2021)

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 (CITATION). We investigate whether MedNLI, a physician-annotated dataset with premises extracted from clinical notes, contains such artifacts (CITATION). 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.

## introduction in the clinical domain, the ability to conduct natural language inference (nli) on unstructured, domainspecific texts such as patient notes, pathology reports, and scientific papers, plays a critical role in the development of predictive models and clinical decision support (cds) systems. considerable progress in domain-agnostic nli has been facilitated by the development of largescale, crowdworker-constructed datasets, including the stanford natural language inference corpus (snli), and the multi-genre natural language inference (multinli) corpus @xcite . mednli is a similarlymotivated, healthcare-specific dataset created by a small team of physician-annotators in lieu of crowdworkers, due to the extensive domain expertise required @xcite . @xcite , @xcite , @xcite , and @xcite empirically demonstrate that snli and multinli contain lexical and syntactic annotation artifacts that are disproportionately associated with specific classes, allowing a hypothesis-only classifier to significantly outperform a majority-class baseline model. the presence of such artifacts is hypothesized to be partially attributable to the priming effect of the example hypotheses provided to crowdworkers at annotation-time. @xcite note that a hypothesis-only baseline is able to outperform a majority class baseline in mednli, but they do not identify specific artifacts. we confirm the presence of annotation artifacts in mednli and proceed to identify their lexical and semantic characteristics. we then conduct adversarial filtering to partition mednli into easy and difficult subsets @xcite . we find that performance of off-the-shelf fasttext-based hypothesis-only and hypothesis-plus-premise classifiers is lower on the difficult subset than on the full and easy subsets @xcite . we provide partition information for downstream use, and conclude by advocating alternative dataset construction strategies for knowledge-intensive domains. foot_0 ## the mednli dataset mednli is domain-specific evaluation dataset inspired by general-purpose nli datasets, including snli and multinli @xcite @xcite . much like its predecessors, mednli consists of premisehypothesis pairs, in which the premises are drawn from the past medical history sections of a randomly selected subset of de-identified clinical notes contained in mimic-iii @xcite ). mimic-iii was created from the records of adult and neonatal intensive care unit (icu) patients. as such, complex and clinically severe cases are disproportionately represented, relative to their frequency of occurrence in the general population. physician-annotators were asked to write a definitely true, maybe true, and definitely false set of hypotheses for each premise, corresponding to entailment, neutral and contradiction labels, respectively. the resulting dataset has cardinality: n @xmath0; n @xmath1; n @xmath2. ## mednli contains artifacts to determine whether mednli contains annotation artifacts that may artificially inflate the performance of models trained on this dataset, we train a simple, premise-unaware, fasttext classifier to predict the label of each premise-hypothesis pair, and compare the performance of this classifier to a majority-class baseline, in which all training examples are mapped to the most commonly occurring class label @xcite @xcite . note that since annotators were asked to create an entailed, contradictory, and neutral hypothesis for each premise, mednli is class-balanced. thus, in this setting, a majority class baseline is equivalent to choosing a label uniformly at random for each training example. the micro f1-score achieved by the fasttext classifier significantly exceeds that of the majority class baseline, confirming the findings of @xcite , who report a micro-f1 score of 61.9 but do not identify or analyze artifacts: dev test majority class 33.3 33.3 fasttext 64.8 62.6 as the confusion matrix for the test set shown in ## characteristics of clinical artifacts in this section, we conduct class-specific lexical analysis to identify the clinical and domainagnostic characteristics of annotation artifacts associated with each set of hypotheses in mednli. ## physician-annotator heuristics in this section, we re-introduce premises to our analysis to evaluate a set of hypotheses regarding latent, class-specific annotator heuristics. if annotators do employ class-specific heuristics, we should expect the semantic contents, ϕ, of a given hypothesis, @xmath3, to be influenced not only by the semantic contents of its associated premise, @xmath4, but also by the target class, @xmath5. to investigate, we identify a set of heuristics parameterized by ϕ(p) and c, and characterized by the presence of a set of heuristic-specific medical subject headings (mesh) linked entities in the premise and hypothesis of each heuristic-satisfying example. these heuristics are described below; specific mesh features are detailed in the appendix. hypernym heuristic this heuristic applies when the premise contains clinical condition(s), medication(s), finding(s), procedure(s) or event(s), the target class is entailment, and the generated hypothesis contains term(s) that can be interpreted as super-types for a subset of elements in the premise (e.g., clindamycin <: antibiotic). probable cause heuristic this heuristic applies when the premise contains clinical condition(s), the target class is neutral, and the generated hypothesis provides a plausible, often subjective or behavioral, causal explanation for the condition, finding, or event described in the premise (e.g., associating altered mental status with drug overdose). everything is fine heuristic this heuristic applies when the premise contains condition(s) or finding(s), the target class is contradiction, and the generated hypothesis negates the premise or asserts unremarkable finding(s). this can take two forms: repetition of premise content plus negation, or inclusion of modifiers that convey good health. analysis we conduct a χ foot_1 test for each heuristic to determine whether we are able to reject the null hypothesis that pattern-satisfying premisehypothesis pairs are uniformly distributed over classes. the results support our hypotheses regarding each of the three heuristics. notably, the percentage of heuristic-satisfying pairs accounted for by the top class is lowest for the hypernym hypothesis, which we attribute to the high degree of semantic overlap between entailed and neutral hypotheses. ## adversarial filtering to mitigate the effect of clinical annotation artifacts, we employ aflite, an adversarial filtering algorithm introduced by @xcite and analyzed by @xcite , to create easy and difficult partitions of mednli. aflite requires distributed representations of the full dataset as input, and proceeds in an iterative fashion. at each iteration, an ensemble of n linear classifiers are trained and evaluated on different random subsets of the data. a score is then computed for each premise-hypothesis instance, reflecting the number of times the instance is correctly labeled by a classifier, divided by the number of times the instance appears in any classifier's evaluation set. the top-k instances with scores above a threshold, τ , are filtered out and added to the easy partition; the remaining instances are retained. this process continues until the size of the filtered subset @xmath9, or the number of retained instances @xmath10; retained instances constitute the difficult partition. to represent the full dataset, we use fasttext mimic-iii embeddings, which have been pretrained on deidentified patient notes from mimic-iii @xcite . we represent each example as the average of its component token vectors. we proportionally adjust a subset of the hyperparameters used by @xcite to account for the fact that mednli contains far fewer examples than winogrande 2 : specifically, we set the training size for each ensemble, m, to 5620, which represents ≈ 2 5 of the mednli combined dataset. the remaining hyperparameters are unchanged: the ensemble consists of @xmath11, the filtering cutoff, @xmath12, and the filtering threshold τ = 0.75. we apply aflite to two different versions of mednli: (1) x h,m : hypothesis-only, multi-token entities merged, and (2) x ph,m : premise and hypothesis concatenated, multi-token entities merged. aflite maps each version to an easy and difficult partition, which can in turn be split into training, dev, and test subsets. we report results for the fasttext classifier trained on the original, hypothesis-only (hypothesis + premise) mednli training set, and evaluated on the full, easy and difficult dev and test subsets of x h,m (x ph,m ), and observe that performance decreases on the difficult partition: ## ethical considerations when working with clinical data, two key ethical objectives include: (1) the preservation of pa-tient privacy, and (2) the development of language and predictive models that benefit patients and providers to the extent possible, without causing undue harm. with respect to the former, mednli's premises are sampled from de-identified clinical notes contained in mimic-iii @xcite , and the hypotheses generated by annotators do not refer to specific patients, providers, or locations by name. mednli requires users to complete health insurance portability and accountability act (hipaa) training and sign a data use agreement prior to being granted access, which we have complied with. per mednli's data use agreement requirements, we do not attempt to identify any patient, provider, or institution mentioned in the de-identified corpus. additionally, while we provide aflite easy and difficult partition information for community use in the form of split-example ids and a checksum, we do not share the premise or hypothesis text associated with any example. interested readers are encouraged to complete the necessary training and obtain credentials so that they can access the complete dataset @xcite . with respect to benefiting patients, the discussion of natural language artifacts we have presented is intended to encourage clinical researchers who rely on (or construct) expert-annotated clinical corpora to train domain-specific language models, or consume such models to perform downstream tasks, to be aware of the presence of annotation artifacts, and adjust their assessments of model performance accordingly. it is our hope that these findings can be used to inform error analysis and improve predictive models that inform patient care.