Skip to main content
QUICK REVIEW

[Paper Review] Adversarially Regularising Neural NLI Models to Integrate Logical Background Knowledge

Pasquale Minervini, Sebastian Riedel|arXiv (Cornell University)|Aug 26, 2018
Adversarial Robustness in Machine Learning28 references43 citations
TL;DR

The paper generates adversarial NLI examples that violate first-order logic background rules and uses them to adversarially regularise neural NLI models, improving robustness to adversarial inputs and reducing background-knowledge violations.

ABSTRACT

Adversarial examples are inputs to machine learning models designed to cause the model to make a mistake. They are useful for understanding the shortcomings of machine learning models, interpreting their results, and for regularisation. In NLP, however, most example generation strategies produce input text by using known, pre-specified semantic transformations, requiring significant manual effort and in-depth understanding of the problem and domain. In this paper, we investigate the problem of automatically generating adversarial examples that violate a set of given First-Order Logic constraints in Natural Language Inference (NLI). We reduce the problem of identifying such adversarial examples to a combinatorial optimisation problem, by maximising a quantity measuring the degree of violation of such constraints and by using a language model for generating linguistically-plausible examples. Furthermore, we propose a method for adversarially regularising neural NLI models for incorporating background knowledge. Our results show that, while the proposed method does not always improve results on the SNLI and MultiNLI datasets, it significantly and consistently increases the predictive accuracy on adversarially-crafted datasets -- up to a 79.6% relative improvement -- while drastically reducing the number of background knowledge violations. Furthermore, we show that adversarial examples transfer among model architectures, and that the proposed adversarial training procedure improves the robustness of NLI models to adversarial examples.

Motivation & Objective

  • Motivate and study adversarial examples in Natural Language Inference (NLI) as violations of logical background knowledge.
  • Develop an optimisation-based method to generate adversarial examples that violate first-order logic rules.
  • Propose an adversarial training regimen that regularises NLI models using these adversarial examples.
  • Evaluate robustness improvements and background-knowledge violations across SNLI and MultiNLI.

Proposed method

  • Represent entailment, contradiction, and neutral as binary predicates to encode background knowledge with first-order logic rules R1–R5.
  • Define an inconsistency loss J_I that measures violation of a rule for a substitution set S by comparing p(con|s1,s2) and p(con|s2,s1) using a Gödel t-norm for conjunction.
  • constrain generated adversarial examples with a language model to maintain low perplexity and linguistic plausibility.
  • Formulate an optimisation over substitutions S to maximise J_I(S) subject to log p_L(S) ≤ τ, generating adversarial sentences.
  • In adversarial regularisation, jointly minimise data loss J_D and the maximised inconsistency loss λ max_S J_I(S;Θ) during training (Eq. 6).
  • Use an iterative procedure (Algorithm 1) alternating between generating adversarial substitutions and updating model parameters.

Experimental results

Research questions

  • RQ1Can adversarial examples be generated that meaningfully violate predefined logical background rules for NLI?
  • RQ2Does adversarial regularisation improve model robustness to adversarially crafted inputs while preserving or improving standard NLI accuracy?
  • RQ3Do adversarial examples transfer across different NLI architectures?

Key findings

  • Adversarial regularisation yields up to a 79.6% relative improvement in accuracy on adversarially crafted datasets.
  • All evaluated models show reductions in background-knowledge violations when regularised, though SNLI/MultiNLI accuracy gains are not always significant.
  • Adversarial examples transfer between model architectures, indicating cross-model robustness effects.
  • Regularised models exhibit improved robustness to adversarial inputs, with substantial reductions in rule-violation rates (e.g., R2–symmetry) on training data.
  • Without regularisation, models tend to violate logical background knowledge and exhibit dataset artefacts that limit true entailment understanding.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.