principles.fyi · the brain · concept

natural language inference

Deciding whether one sentence follows from, contradicts, or is unrelated to another.

(premise, hypothesis) -> {entailment, contradiction, neutral}

Natural language inference (NLI) gives the model two sentences — a premise and a hypothesis — and asks whether the premise entails the hypothesis, contradicts it, or neither (neutral). It's a classic test of real understanding rather than surface word-matching, and encoders handle it by reading both sentences together (joined with [SEP]) and classifying the [CLS] vector into those three labels. It's a sequence-classification task over a pair of texts.

Appears in

Nearby in the brain