How Hard is this Test Set? NLI Characterization by Exploiting Training Dynamics (2024)

Abstract: Natural Language Inference (NLI) evaluation is crucial for assessing language understanding models; however, popular datasets suffer from systematic spurious correlations that artificially inflate actual model performance. To address this, we propose a method for the automated creation of a challenging test set without relying on the manual construction of artificial and unrealistic examples. We categorize the test set of popular NLI datasets into three difficulty levels by leveraging methods that exploit training dynamics. This categorization significantly reduces spurious correlation measures, with examples labeled as having the highest difficulty showing markedly decreased performance and encompassing more realistic and diverse linguistic phenomena. When our characterization method is applied to the training set, models trained with only a fraction of the data achieve comparable performance to those trained on the full dataset, surpassing other dataset characterization techniques. Our research addresses limitations in NLI dataset construction, providing a more authentic evaluation of model performance with implications for diverse NLU applications.

## introduction natural language inference (nli), or textual entailment @xcite , has emerged as an enduring challenge in the field of natural language processing for evaluating the natural language understanding (nlu) capabilities of models. persistently, nli remains a difficult problem, as it implies reasoning across several linguistic phenomena to determine the logical relationship (i.e., entailment, contradiction, or neutral) between two documentsa premise and a hypothesis. the capability to accurately infer relationships between sentences is crucial for a wide range of applications, such as question answering @xcite , dialogue systems @xcite , and fact-checking @xcite . since its inception @xcite , several large-scale benchmark datasets have been proposed for nli @xcite @xcite ; however, in time, the most ubiquitously used are the stanford natural language inference (snli) @xcite and the multinli datasets @xcite , which have played a pivotal role in advancing the state of the art @xcite . however, multiple works @xcite @xcite @xcite pointed out several critical limitations in these datasets, stemming from systematic annotation errors and spurious correlations that impact both the training and test sets. a critical consequence of these issues is the inflation of model performance, leading to seemingly high results @xcite that may not generalize well to real-world scenarios. for example, a widely used roberta model @xcite trained solely on the hypothesis achieves an unreasonable accuracy of 71.7% on snli and 61.4% on multinli (random chance being 33%), which strongly points towards systematic errors in dataset construction. in this work, we aim to address the limitations of existing nli datasets by proposing an automated construction of a more challenging test set. in contrast to previous approaches, we avoid manually creating artificial examples @xcite ; instead, we leverage existing samples from the test set. to accomplish this, we generalize dataset cartography @xcite to cluster samples in the test set and characterize them into three categories of increasing difficulty. our approach leverages 8 measures of training dynamics of each premise-hypothesis pair and is inspired by related works in both nli @xcite @xcite and approaches tackling the problem of learning with noisy data @xcite . we show that our method can isolate examples exhibiting spurious correlations and provide a challenging test set. furthermore, our method is general, model-agnostic, and easily extensible to other datasets (e.g., for factchecking @xcite ). our experiments show that using the same method on the training set enables the aggressive filtering of uninformative examples during training, reducing data quantity but increasing quality, enabling the model to obtain on-par performance on the nli stress test proposed by @xcite , using only a fraction of data. we make our code publicly available foot_0 . this work makes the following contributions: the paper is structured as follows. after emphasizing the shortcomings of existing nli datasets and presenting various stress tests, we introduce our method for test set characterization. then, we present the main results, a comparison with a different encoder to argue that our approach is model-agnostic, and an analysis supporting the viability of our approach as an alternative to training set characterization. the paper ends with conclusions and limitations. ## related work across the development of natural language inference and understanding systems, multiple largescale training and testing datasets have been developed over different linguistic domains. initially, progress was driven by the addition of snli @xcite , but several other variants have been proposed, such as multinli @xcite , containing multiple domains, scinli @xcite for scientific question answering, squad @xcite and glue @xcite benchmarks for generalpurpose nlu. moreover, many related problems in nlu can be cast as an nli problem; for instance, the fever @xcite dataset for fact-checking can be regarded as an nli problem in terms of identifying the relationship between a statement and supporting evidence. however, driven by the widespread observations that previous popular nli datasets contain shortcuts @xcite , multiple works @xcite @xcite @xcite developed "stress tests" to benchmark specific linguistic phenomena. for instance, @xcite proposed a simple test set based on snli @xcite that involves changing a single word in the premise sentences. in this setting, performance is substantially worse than the original snli test set, indicating the presence of spurious correlations in the training dataset construction. @xcite proposed an nli stress test by quantifying the lexical phenomena (e.g., presence of antonyms, numerical reasoning) behind common model errors in multinli @xcite . their proposed stress test involved constructing artificial examples that exacerbate common sources of model error, showcasing that some models have markedly reduced performance. @xcite proposed a new benchmark called adversarial nli (anli), which leverages an interactive human-and-modelin-the-loop procedure to collect hard examples for natural language inference, obtaining a challenging stress test for current models. @xcite constructed a dataset of artificially built sentences based on first-order logic, fixing the sentence structure and only varying words corresponding to parts of speech at predefined positions. such a dataset comprises unrealistic sentences but provides insight into the (lack-of) expressive power of certain neural architectures. likewise, yanaka et al. (2019) proposed the evaluation of monotonicity reasoning for nli by constructing a dataset through curating and manipulating sentence pairs from the parallel meaning bank (abzianidze et al., 2017). saha et al. (2020) identified the lack of conjunctive reasoning examples in current nli test sets and estimated that around 72% of sentence pairs in snli have conjunctions unchanged between premise and hypothesis. the authors proposed conjnli, a stress test composed of conjunctive sentence pairs collected automatically from wikipedia and manually verified. in contrast to previous work, we propose a method to characterize the test set into multiple difficulty levels by using training dynamics of neural networks @xcite , thereby isolating easy and spurious examples and keeping only challenging pairs. our method is general, model-agnostic, utilizes existing dataset samples (avoiding unrealistic artificial sentence pairs), is easily extensible to other datasets, and does not require manual verification of human annotators. previous approaches @xcite aim to develop a stress test for nli by amplifying spurious correlations and evaluating model performance under various extreme conditions. our goal is to minimize spurious correlations in existing benchmarks to gain a more realistic sense of performance under challenging real-world examples. ## test set characterization our goal is to generalize the data maps proposed by @xcite to characterize the test set. @xcite proposed an approach to gauge the contribution of each training sample in a dataset by analyzing training dynamics (variability, average confidence of the gold label, and average correctness) across training for a fixed amount of epochs. after training, each example is split into one of three categories (i.e., easy-tolearn, ambiguous or hard-to-learn) using a fixed percentile threshold on one of the features. for example, instances regarded as ambiguous are examples for which the variability across 5 epochs is in the top 33% percentiles, disregarding other measures. we aim to extend and generalize data maps by employing a gaussian mixture model (gmm) @xcite to learn the best fitting distribution of data difficulty levels, thus avoiding fixed thresholds. unlike other clustering techniques, such as kmeans, which outputs spherical clusters and disregards cluster variance, we chose a gmm as a more flexible clustering method. figure 1 showcases the general methodology used in this work. we first characterize the test set by training two separate models with both premise and hypothesis (p+h), and hypothesis only (h); second, we gather 8 measures of training dynamics for each instance and cluster them to obtain three difficulty levels (4 for p+h and 4 for h). we found that difficulty levels simultaneously align with measures of spurious correlations and model performance. in contrast to the initial approach of swayamdipta et al. (2020), we include 6 additional features for a more informative characterization across training. in our scenario focused on nli in particular, we gather statistics for training dynamics across two types of settings: normal training (i.e., training with p + h) and hypothesis-only (h). models trained only with the hypothesis have been shown to produce unreasonably high results @xcite , mostly due to artifacts in dataset construction. these insights enabled us to gather statistics about such examples and improve data characterization through more diverse features for each instance. different from @xcite who focused on characterizing the training set for increasing data quality, we aim to construct a more challenging test set automatically. as such, in order to construct a data map of the test set, we trained a model for e epochs on the test set using premise and hypothesis and, separately, using only the hypothesis to gather training dynamics for each example in the test set. let in all our experiments, we first fine-tune pretrained roberta models @xcite , followed by deberta @xcite ) models due to their established high performance on a wide set of tasks. in our formulation, any other encoder would yield similar results, as this method is based only on the final classification output and not model internals. however, characterization based on final logits and class confidences is affected by how calibrated the models' predictions are @xcite , as poorly calibrated models have lower logit variance across classes. for our scope, we are interested in identifying and separating spurious correlations in nli benchmarks and not in benchmarking different classifiers for this task. we explore the impact of the underlying encoder in section 4.1. in using the feature vectors {f i } n @xmath0, we cluster the test set using a gaussian mixture model into three clusters. feature vectors are normalized with standard scaling by subtracting the mean and dividing by the standard deviation of each feature. the clusters are ranked according to the intra-cluster average confidence μ(p +h) , and we interpret them as belonging to three difficulty levels, following the terminology introduced by @xcite : easy, ambiguous and hard, in decreasing order of the average intra-cluster confidence μ(p +h) . see appendix a for a high-level overview of our algorithm. figure 2 depicts the distribution of features across difficulty levels for both datasets. while each type of feature captures different aspects of the learnability of an instance, their combination offers a more diverse view of the learning dynamics during training. in the case of both snli and multinli, harder examples have consistently lower average margin and more variability of the correct class. the effect is not as pronounced in a hypothesis-only setting; however, there is a clear delimitation of easy examples for average margin and confidence, indicating potential annotation artifacts. for fever, since the dataset has reduced spurious correlations, the identified splits correspond to difficult-to-learn examples, not necessarily examples with annotation artifacts. in the interest of quantifying the number of spurious correlations found in the test set, we follow @xcite and track several measures that correspond to either shallow statistics between the premise and the hypothesis, or the presence of negations or misspelled words. training the pretrained models for dataset characterization was performed for 5 epochs each, with a batch size of 32, using the adam optimizer with a learning rate of 10 -5 following a linear decay name explanation word overlap number of common words between the premise and hypothesis, normalized by sentence length number of antonyms number of antonyms of each of the words in the premise contained in hypothesis, based on wordnet (fellbaum, 1998), normalized by sentence length. length mismatch difference in length between premise and hypothesis, normalized by sentence length misspelled words total number of misspelled words using a spellchecker in the premise and hypothesis, normalized by sentence length. contains negation boolean flag if either the premise of hypothesis contains a negation word (e.g., no, not, never, none) ## results & discussion even though the hard split is relatively small, the subsample is challenging for current models, as it comprises instances with fewer spurious cor-relations between premise and hypothesis. fewer annotation artifacts enable fewer "correct" predictions from linguistic patterns present only in the hypothesis. in figure 4 , we show per-class counts relative to the difficulty levels for both datasets. it is the case that easier samples contain more contradictions and entailments, prone to linguistic commonalities (word overlap, presence of antonyms). thus, the hard split has more neutral instances. through manual inspection, we found that for snli, the easy splits contain unrelated sentences which are sometimes annotated incorrectly as contradiction (e.g., "a woman running in the park" versus "a man cooking at home" -two unrelated sentences annotated as contradicting). the model learns this pattern and incorrectly predicts contradiction on some neutral pairs (e.g., "... girls chatting on the stairwell" versus "girls are at school"). for multinli, we found that the easy split usually aligns with simple sentence negations (e.g., "it gets it" versus "it doesn't get it") or paraphrasing ("i guess history repeats itself" versus "history certainly doesn't repeat"). these observations strongly point towards spurious correlations between premise and hypothesis, making the sentences easier to classify correctly. we provide selected examples in the appendix a. the ambiguous and hard splits in both datasets contain increasingly more subtle cues, with little overlap in words between premise and hypothesis (e.g., "standing on a tree log" versus "crossing the stream" / "wouldn't have mattered" versus "would have gotten worse"), having more natural and challenging sentence pairs. across snli, multinli, and fever, we tracked the average amount of each measure between difficulty levels and classes (see figure 3 ). to rigorously test the difference between the classes at various difficulty levels, we perform a non-parametric two-sided mann-whitney-u test @xcite with bonferroni correction to test for statistical significant differences 2 . we found no evidence for the presence of spurious correlations (mann-whitney's u test @xmath1.05) in the hard split between the three classes. some measures are more associated with certain classes. for example, instances annotated with contradiction have a disproportionate amount of antonyms 2 significance thresholds: not significant (ns): .05 < p, *: .01 ≤ @xmath2.05, **: .001 ≤ @xmath3.01, ***: @xmath4.001, between premise and hypothesis in the easy and ambiguous splits. similarly, negation is more present in the contradiction class for easy splits. for instances annotated with entailment, word overlap is present significantly in easy splits. between snli and multinli, multinli has a disproportionately large amount of negations compared to snli. for both snli and multinli, our method yields little to no significant differences between classes in the hard split across the spurious correlation measures. for fever, measures such as the presence of negations, number of antonyms, and word overlap are reduced across difficulty levels. note that fever includes a small statement as the premise and a long text extract containing evidence as the hypothesis, which makes the length mismatch negative. ## conclusions our method highlights significant shortcomings in widely used nli evaluation datasets (snli and multinli) due to spurious correlations in the annotation process. to address these issues, we proposed an automatic method for constructing more challenging test sets, effectively filtering out problematic instances and providing a more realistic measure of model performance. our approach, which categorizes examples in increasing difficulty levels using a wide range of training dynamics features, enhances evaluation reliability and offers insights into underlying challenges in nli. importantly, our methodology is general and model-agnostic, and can be applied across different datasets and models, promising improved evaluation practices in nlp. furthermore, we provided evidence that our method can obtain a challenging test set even if the dataset has fewer annotation artifacts; we characterized fever, a fact-checking dataset repurposed for nli, and showed that the identified hard split is a highly challenging subset of the dataset. by aggressively filtering uninformative examples, we show that comparable model performance can be achieved with significantly reduced data requirements. our work contributes to advancing nli evaluation standards, fostering the development of more robust nlu models.