# SNLI (2015)

> 570k sentence pairs: does the premise entail, contradict, or say nothing about the hypothesis?

Page: https://mralbu.github.io/ai-datasets/d/snli

## Key facts

- Category: Text
- Task: Natural language inference (entailment)
- Creators: Samuel R. Bowman, Gabor Angeli, Christopher Potts, Christopher D. Manning (Stanford)
- Size: 570,152 sentence pairs
- Splits: train 550,152, validation 10,000, test 10,000
- Input: A premise (an image caption) and a hypothesis written by a crowdworker
- Labels: entailment, neutral or contradiction
- License: CC BY-SA 4.0
- Paper: [A large annotated corpus for learning natural language inference](https://arxiv.org/abs/1508.05326)
- Homepage: https://nlp.stanford.edu/projects/snli/
- Hugging Face: [stanfordnlp/snli](https://huggingface.co/datasets/stanfordnlp/snli)
- Sampled at Hub revision cdb5c3d5eed6ead6e5a341c8e56e669bb666725b (2026-11-07)

## Why it matters

Earlier entailment datasets (the RTE challenges) had a few thousand examples. SNLI had half a million, enough to train neural networks on "does this sentence follow from that one?". It drove a run of attention models and sentence encoders (InferSent was trained on it). It also became the standard example of annotation artifacts: models could guess the label from the hypothesis alone, without reading the premise.

## Worth knowing

- Almost all premises are Flickr30k image captions. Workers saw only the caption and wrote one hypothesis that is definitely true, one that might be true and one that is definitely false.
- A hypothesis-only classifier gets about 67% (chance is 33%). Negation words like "nobody" and unrelated words like "sleeping" are strong hints for contradiction.
- Validation and test pairs were relabeled by four more annotators. Pairs without a majority get label -1 and are usually dropped.

## Configs

- `plain_text`: Does the premise entail, contradict, or say nothing about the hypothesis?

## Get the data

```bash
# pip install -U huggingface_hub
hf download stanfordnlp/snli --repo-type dataset \
  --local-dir snli
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("stanfordnlp/snli", "plain_text")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/stanfordnlp/snli@~parquet/plain_text/validation/*.parquet")
print(df.shape)
```

## Related datasets

- [MultiNLI](https://huggingface.co/datasets/nyu-mll/multi_nli): 2017, 433k pairs across ten genres, part of GLUE (on this site: https://mralbu.github.io/ai-datasets/d/glue)
- [Flickr30k](https://huggingface.co/datasets/nlphuji/flickr30k): 2014, the captions SNLI premises come from (on this site: https://mralbu.github.io/ai-datasets/d/flickr30k)
- [ANLI](https://huggingface.co/datasets/facebook/anli): 2019, collected adversarially against strong models

## Landmark papers

- [Enhanced LSTM for Natural Language Inference (ESIM)](https://arxiv.org/abs/1609.06038) (2016)
- [Supervised Learning of Universal Sentence Representations from NLI Data (InferSent)](https://arxiv.org/abs/1705.02364) (2017)
- [Annotation Artifacts in Natural Language Inference Data](https://arxiv.org/abs/1803.02324) (2018)
