Abstract
Success in natural language inference (NLI) should require a model to understand both lexical and compositional semantics. However, through adversarial evaluation, we find that several state-of-the-art models with diverse architectures are over-relying on the former and fail to use the latter. Further, this compositionality unawareness is not reflected via standard evaluation on current datasets. We show that removing RNNs in existing models or shuffling input words during training does not induce large performance loss despite the explicit removal of compositional information. Therefore, we propose a compositionality-sensitivity testing setup that analyzes models on natural examples from existing datasets that cannot be solved via lexical features alone (i.e., on which a bag-of-words model gives a high probability to one wrong label), hence revealing the models' actual compositionality awareness. We show that this setup not only highlights the limited compositional ability of current NLI models, but also differentiates model performance based on design, e.g., separating shallow bag-of-words models from deeper, linguistically-grounded tree-based models. Our evaluation setup is an important analysis tool: complementing currently existing adversarial and linguistically driven diagnostic evaluations, and exposing opportunities for future work on evaluating models' compositional understanding.
Introduction
Current Natural Language Inference (NLI) models achieve human-level performance on standard benchmarks like SNLI and MNLI. However, evidence suggests these models may be "cheating" by relying on shallow word-level patterns rather than true sentence structure. This phenomenon, termed "lexical over-stability," implies that models focus on the presence of specific words rather than their arrangement and syntactic relationships. For instance, a model might fail to distinguish between "The dog bit the man" and "The man bit the dog" if it only considers the "bag of words." This paper introduces a framework to evaluate true compositional understanding by filtering datasets for examples where lexical clues are intentionally misleading.
Methodology
The authors evaluate model sensitivity to compositionality through three primary approaches:
Rule-Based Adversarial Sets
Two targeted test sets were created to expose structural blind spots:
- SOSWAP: Subject-object swapping (e.g., "A woman is pulling a child" vs. "A child is pulling a woman").
- ADDAMOD: Adding identical adjectives to different nouns in the premise and hypothesis.
Model Ablation and Shuffling
To test the necessity of structural information, the researchers "broke" models by replacing recurrent layers (RNNs) with simple fully-connected layers or by shuffling input words during training. Minimal performance drops on standard benchmarks would indicate that those benchmarks do not strictly require compositional reasoning.
Compositionality-Sensitivity (CS) Testing
The core contribution is a method to identify "hard" examples within existing datasets. By training a simple Bag-of-Words (BoW) model, they calculate a Lexically-Misleading Score (LMS). An example has a high LMS if the BoW model is highly confident but incorrect. These examples form the $CS_\lambda$ subsets, which necessitate compositional reasoning to solve correctly.
Results and Analysis
The evaluation reveals a significant gap between human reasoning and model performance when lexical shortcuts are removed.
Failure on Structural Swaps
On the SOSWAP set, humans correctly identify contradictions 84% of the time. Conversely, most state-of-the-art models predict "Entailment" with over 90% confidence, effectively ignoring the structural reversal of subject and object.
The CS Test Performance
On the $CS_{0.7}$ subset of SNLI, human performance remains robust (~80%), while neural model accuracy drops to near-random levels (~50-57%). Interestingly, while sequential models (like ESIM) often lead on standard benchmarks, tree-based models (like S-TLSTM)—which incorporate linguistic structure—perform better on the $CS_{0.7}$ test. This suggests that structural inductive biases do provide an advantage that standard evaluations fail to capture.
Lexical Traps
The LMS effectively identifies "traps" where models rely on word pairs. For example, a model seeing "sitting" and "standing" might assume a contradiction, missing the negation "not standing" in the hypothesis.
Conclusion
Standard NLI benchmarks are largely solvable via lexical features alone, masking the limited compositional abilities of current models. Adversarial training on specific rules often leads to overfitting rather than general structural understanding. The proposed CS testing setup provides a more rigorous tool for evaluating compositional awareness. Future dataset collection should explicitly control for lexical correlations to force models to learn true compositional semantics.
Summary updated