Estimating the Causal Effects of Natural Logic Features in Transformer-Based NLI Models

Julia Rozanova, Marco Valentino, André Freitas · DOI

Introduction

Modern Transformer-based models achieve impressive performance on Natural Language Inference (NLI) benchmarks. However, high accuracy often masks a reliance on surface-level heuristics rather than robust logical reasoning—a phenomenon known as being "right for the wrong reasons." This paper employs causal analysis to "stress test" these models, quantifying their sensitivity to semantic features like context monotonicity and word relations.

Methodology: A Causal Framework for NLI

To distinguish between true logical understanding and dataset artifacts, the authors represent the NLI task using a causal diagram. In this framework, a model's prediction ($Y$) should ideally be driven by abstract semantic features: Context Monotonicity ($M$) and Word-Pair Relation ($R$).

Causal diagram of the NLI task, distinguishing between logical paths (green) and surface-level paths (red).

The paper introduces two primary metrics for evaluation:

  • Total Causal Effect (TCE): Measures sensitivity. It quantifies how much a model's prediction changes when a logically relevant part of the input (e.g., flipping monotonicity) is altered. High TCE indicates better logical sensitivity.
  • Direct Causal Effect (DCE): Measures robustness. It quantifies how much a model's prediction changes when the "surface form" (specific words) is altered while keeping the underlying logic constant. Low DCE indicates better robustness to irrelevant textual changes.

Datasets and Experimental Setup

The study utilizes several specialized datasets:

  • NLI-XY: A structured dataset designed to isolate monotonicity and word-pair relations.
  • HELP: A training set specifically created to improve a model's handling of logical monotonicity.
  • Standard Benchmarks: SNLI, MNLI, and ANLI are used to compare standard accuracy against causal metrics.

Key Results and Analysis

The causal analysis reveals significant disparities between benchmark accuracy and logical reasoning capabilities.

Sensitivity and the "Negation Blind Spot"

Off-the-shelf models like RoBERTa-large exhibit a profound "negation blind spot," showing context TCE values as low as 0.08 to 0.13. These models often fail to adapt their predictions when logical context changes (e.g., from affirmative to negative), essentially treating downward-monotone contexts as noise.

The Impact of Targeted Training

Fine-tuning on the HELP dataset significantly improves performance. For instance, RoBERTa’s context TCE increased to 0.828 after HELP training, indicating a shift from logical blindness to high sensitivity. Interestingly, this training also improved robustness to irrelevant word-pair changes, suggesting that learning structured logic acts as a regularizer.

Comparison of Direct Causal Effect (DCE) and Total Causal Effect (TCE) across various models for insertion interventions.

As shown in the figure above, models fine-tuned on the HELP dataset (e.g., roberta-large-mnli-help) show significantly higher TCE compared to their base versions, while maintaining or improving their DCE profiles. This highlights that "adversarial robustness" and "logical reasoning" are distinct properties; some models that perform well on adversarial benchmarks (like InfoBERT) may still show lower sensitivity to context logic than simpler models fine-tuned for monotonicity.

Conclusion

This research demonstrates that standard NLI benchmarks are insufficient for measuring true logical reasoning. By applying causal effect estimation, the authors provide a more nuanced view of model behavior, highlighting the gap between sensitivity to logical structure and reliance on surface heuristics. Future work aims to extend this framework to more complex linguistic phenomena and use these causal insights to design more robust training objectives.

Summary updated

BibTeX
@inproceedings{rozanova2024estimating,
  author = {Julia Rozanova and Marco Valentino and André Freitas},
  title = {{Estimating the Causal Effects of Natural Logic Features in Transformer-Based NLI Models}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure