Sentence Meaning and Natural Language Inference
Language AI HandbookAll chapters Sentence Meaning and Natural Language InferenceSection view · Sections in this chapter1 / 12 ↓
Reading tools Definitions, links & notes
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Consider two sentences:
The cat chased the dog.
The dog chased the cat.
A bag-of-words representation from Part II gives these sentences the same vector when punctuation is separated from words and both use the same word-count vocabulary. Yet the sentences assign different roles to the two animals. Neither entails the other, and both can be true: the animals might chase each other. Reversing who did what changes the proposition without necessarily creating a contradiction. Sentence meaning requires structure as well as word meanings.
The main lesson of this chapter is that the gap between "same words" and "same meaning" is exactly where sentence semantics lives. Every subsequent topic, from entailment to quantifier scope to model evaluation, is a way of pinning down that gap precisely enough to reason about it, and precisely enough to test whether a machine has learned it.
Natural language inference, or NLI, is the task of making that relational structure explicit. Given a premise and a hypothesis, an NLI system decides whether the premise entails the hypothesis, contradicts it, or neither entails nor contradicts it. The premise functions as evidence, and the hypothesis functions as a claim to be checked against that evidence. For example:
- Premise: "A poodle barked all night." Hypothesis: "A dog barked all night." This is entailment, because a poodle is a kind of dog, so any situation that makes the premise true also makes the hypothesis true.
- Premise: "The door is open." Hypothesis: "The door is closed." This is contradiction, because a single door cannot be fully open and closed at the same time in the ordinary sense of those words.
- Premise: "A woman is playing the violin." Hypothesis: "A woman is performing in an orchestra." This is neutral, because the premise leaves the setting undetermined: the woman might be in an orchestra, or she might be practicing alone.
NLI provides one way to test sensitivity to negation, quantification, lexical relations, event structure, and scope. The same premise-hypothesis interface also supports concrete applications. SummaC segments source documents and summaries into sentences, applies NLI to sentence pairs, and aggregates their scores to detect source inconsistency. Other work uses NLI for evidence retrieval and reranking, factual-consistency evaluation, and filtering synthetic training examples. Entailment is a different target from relevance: a passage can be relevant precisely because it contradicts a claim. In a retrieval-augmented answer system, checking a claim against retrieved evidence would still leave evidence quality and real-world truth to be established separately. Within Part VIII: Semantics and Information Extraction, this chapter connects word-level meaning from lexical semantics to the predicate-argument structure and meaning representations in the chapters that follow.
Throughout the hand-labeled examples, hold referents, relevant times, and senses fixed when descriptions are intended to corefer. Examples of lexical ambiguity explicitly use different senses. Open/closed examples use a binary status unless stated otherwise. These conventions prevent an unstated change of referent, event, or time from changing a label.
The chapter has five goals:
- Explain what sentence meaning is, beyond word meaning.
- Define entailment, contradiction, and neutrality precisely enough to evaluate models.
- Distinguish entailment from presupposition, implicature, and other meaning layers.
- Show how NLI datasets and models work, and why robust evaluation is difficult.
- Build a small NLI battery in code and use it to expose strengths and failure modes.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!