# BiDAF (2016)

> A reader that lets the question and the passage attend to each other at every word, then points to the answer span.

Page: https://mralbu.github.io/ai-datasets/p/bidaf

## Key facts

- Title: Bidirectional Attention Flow for Machine Comprehension
- Authors: Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, Hannaneh Hajishirzi
- Venue: ICLR 2017
- Category: Text
- Paper: https://www.alphaxiv.org/abs/1611.01603

## Why it matters

BiDAF was the reference architecture of the SQuAD era: task-specific readers built from LSTMs and attention. With ELMo embeddings it was still among the strongest baselines BERT was compared against, and the gap BERT opened ended the era of hand-built readers.

## The idea

Encode the passage and question with character and word embeddings and a bidirectional LSTM. Compute attention both ways, from passage to question and from question to passage, at every word, and pass the full attended sequence on instead of squeezing it into one vector. A final layer predicts where the answer starts and ends.

## The result

On SQuAD, 68.0 exact match and 77.3 F1 for one model (73.3 and 81.1 for an ensemble), above all published systems, and 76.9% and 79.6% accuracy on the CNN and Daily Mail cloze tests.

## The data

- [SQuAD (2016)](https://mralbu.github.io/ai-datasets/d/squad.md): 100k+ questions about Wikipedia paragraphs; the answer is a span of the text.
- [CNN/DailyMail (2015)](https://mralbu.github.io/ai-datasets/d/cnn-dailymail.md): 312,000 news articles paired with the bullet-point highlights their editors wrote.

## Part of

- [Reading and retrieval](https://mralbu.github.io/ai-datasets/t/reading-retrieval.md) (step 1 of 4)
