Glossary
Natural language inference (NLI)
Natural language inference (NLI) is deciding whether one sentence follows from, contradicts, or is unrelated to another, and it powers many zero-shot classifiers.
Swiss-hosted inference. Nothing you send is ever stored.Swiss data residency
What Natural language inference (NLI) means
Natural language inference (NLI), also called recognising textual entailment, is the task of deciding the relationship between two sentences: given a premise and a hypothesis, is the hypothesis entailed, contradicted, or neutral (neither)? Example: premise "The invoice was paid on Tuesday", hypothesis "The invoice is outstanding" is a contradiction.
Standard datasets include SNLI, MultiNLI and the cross-lingual XNLI. NLI matters beyond itself because it is a general reasoning probe and because it gives a recipe for zero-shot classification: to test whether a text belongs to class X, feed it as the premise with a hypothesis like "This text is about X" and read the entailment probability. Many "zero-shot classification" pipelines are NLI models used this way.
Limits of NLI-as-classifier
- One forward pass per candidate label, so cost grows with the label count.
- Entailment scores across labels are not a single normalised distribution, so they are awkward to calibrate as a multi-class answer.
- The hypothesis template strongly affects results.
NLI and Laya
Laya's question types map onto NLI naturally. A three-way NLI item is a choice question with options entailment / neutral / contradiction and the premise and hypothesis in the state. A single hypothesis check is a noul question. Unlike NLI-based classifiers, Laya scores all options of a question jointly in one pass and normalises them with one softmax.
On XNLI the model card reports 0.860 on English (English checkpoint) and 0.731 across 14 other languages (multilingual checkpoint). See Laya vs zero-shot NLI and zero-shot vs fine-tuned.
Related terms
How Natural language inference (NLI) connects to the rest of the vocabulary.