Paper · 2021-04-17 · cs.CL, cs.AI
Explaining Answers with Entailment Trees
Explains a science-QA answer as an entailment tree of multi-premise steps from known facts to the question-answer hypothesis. Adds EntailmentBank (1,840 expert-written trees) and T5-11B generators for three tasks: gold leaves, leaves plus distractors, full corpus. Author-reported: 35.3% of trees match gold with gold leaves given; 2.9% from a full corpus.
Natural language inferenceMulti-hop reasoningExplainable AISequence-to-sequence learningentailmentexplanationmultistep-reasoningquestion-answeringdatasett5
AI-compiled by claude-haiku-5-5 on 2026-11-08, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
A typical "explanation" of an answer is one or two sentences that support it. This paper asks for more: a chain of small reasoning steps that starts from facts everyone accepts and ends at the answer. Each step combines two or three facts into a new conclusion, and the conclusions are stacked into a tree whose root is the question and answer written as one statement.
To teach a model this skill, the authors wrote a dataset of 1,840 such trees for grade-school science questions, by hand, with a drag-and-drop tool. They then fine-tuned a large text-to-text language model to write trees. When the right facts are handed to it, the model writes a fully correct tree about a third of the time. When it has to find the facts itself in a large corpus, it rarely does. The authors also report that a version trained on this data can produce reasonable explanations for questions from other domains.
TL;DR
- Explanations as entailment trees: each internal node is a conclusion that follows from its children, and the root is the question-answer hypothesis §3.1 §5.1.
- EntailmentBank: 1,840 expert-authored trees with 5,881 entailment steps, built on WorldTree V2 facts and ARC questions §3.3 tab. 2.
- EntailmentWriter: a T5-11B model per task, fine-tuned to output the linearised tree §5.2 app. C.
- Author-reported: with gold leaves (Task 1), 35.3% of test trees match the gold tree; with a full corpus (Task 3), 2.9% tab. 4.
- No official code is available. The paper's code link resolves to a data folder, and the repository names found elsewhere hold no model or scoring code (see Paper vs code).
Problem
Rationales that point at one supporting sentence show where evidence is, but not how it leads to the answer §1. Existing datasets either give supporting sentences without saying how they combine, or cover only one-hop chains §2. The authors want a derivation that can be checked step by step, so that the correctness of the reasoning can be judged separately from which parts of it are shown to a user §1.
Multi-premise entailment is the building block §2. Earlier entailment datasets mostly pair one sentence with a hypothesis, and they do not record which sentences were used or chain several entailments into one tree §2.
Method
Dataset construction §3. Three graduate or undergraduate annotators were trained to write trees §3.1. Each tree must have steps that are entailments a person would typically accept, fine-grained single inferences, explicit knowledge that a young child would need, compositional conclusions and a conclusion that answers the question §3.1. Annotators work in a web tool fig. 2 §3.2. The tool shows a pool of top-ranked candidate facts from the WorldTree corpus; annotators may add their own facts §3.2 app. A. A different author then reviews each step and may suggest edits §3.2. The authors report about 20 minutes per question and about 600 paid hours in total §3.2 §3.3.
Question sample §3.3. The 1,840 questions were drawn at random from the 7,787 ARC questions §3.3. The trees use WorldTree V2 facts and the authors' own additions §3.3 §4.
Entailment tree and encoding §5.1. Leaf facts are labelled sent1, sent2, and so on. The hypothesis is labelled hypot. Intermediate conclusions are labelled int1, int2, and so on, and their text is written in the output directly after their label on first use §5.1. The paper encodes the tree as a single line. For its depth-2 example fig. 1:
sent2 & sent5 -> int1: Eruptions block sunlight ; sent4 & int1 -> hypotHere & means "and" and -> means "entails". The encoding is defined by this example only; no grammar is given §5.1.
Tasks §4. All three tasks take the hypothesis H, the question-answer pair QA and a set of sentences S. The output is a valid tree whose leaves come from S, whose intermediate nodes are new sentences, and whose root is H §4.
- Task 1 (no-distractor):
H+QA+ the gold leaf sentences §4. - Task 2 (distractor): Task 1 inputs plus distractor sentences §4.
- Task 3 (full-corpus):
H+QA+ the corpusC(WorldTree plus the authors' facts) §4.
For automatic scoring, the gold tree (and its valid reorderings) is treated as the only valid tree. For Task 3, sentences similar to the gold leaves are removed from the corpus per question §4.
Model §5.2 app. C. Each task has its own T5-11B model, fine-tuned from the T5 pretrained checkpoint. For Tasks 1 and 2 the input is the task input described above. For Task 3 the corpus is too large for T5, so 25 sentences are retrieved and then fed to the model §5.2. The output is the encoded tree §5.2.
Retrieval for the corpus task §6 app. A. For the baseline, 25 sentences are retrieved with a RoBERTa-based relevance ranker, and the Task 2 model is reused without extra training §6. For building the annotation pool, two relevance classifiers (BERT and RoBERTa) score every corpus fact, the top 20 of each are kept, and TF-Ranking-BERT reranks them app. A.
# Task 3 input: retrieve, then generate [§6] [app. A]
# Input: hypothesis H, question-answer pair QA, corpus C
# Output: encoded entailment tree (text)
def explain_from_corpus(H, QA, corpus):
# Score every corpus sentence with the RoBERTa-based ranker [§6]
# The query is QA here; §5.2 says H [§6] [§5.2]
sentences = retrieve(query=QA, corpus=corpus, top_k=25) # 25 sentences
# Label the retrieved sentences sent1..sent25 and the hypothesis hypot
# The exact input string format is not stated [§5.2]
model_input = serialise(H, QA, sentences)
# Task 2 model, no extra training [§6]
return t5_11b_task2.generate(model_input)Evaluation §6.1 app. B. Predicted intermediates are aligned to gold intermediates before scoring. Each predicted intermediate is aligned to the gold intermediate whose ancestor-leaf set has the highest Jaccard similarity; a predicted intermediate with zero overlap with every gold node is aligned to a blank dummy app. B. After alignment, four quantities are scored:
- Leaves: F1 over the set of leaf sentences, and "Correct" = 1 only when F1 is 1.0 §6.1.
- Steps: F1 over entailment steps, where a step is correct when its input labels match the gold step; "Correct" = 1 only when F1 is 1.0 §6.1.
- Intermediates: an aligned pair counts as correct when BLEURT (BLEURT-Large-512) is above 0.28; F1 is computed over these, and "Correct" = 1 only when F1 is 1.0 §6.1.
- Overall AllCorrect: 1 only when leaves, steps and intermediates are all correct, that is, the tree matches the gold tree §6.1.
# Intermediate correctness for one aligned pair [§6.1]
# Input: predicted intermediate text, gold intermediate text
# Output: 1 if the pair counts as correct, else 0
def intermediate_correct(pred_text, gold_text):
# BLEURT similarity of the two sentences [§6.1]
similarity = bleurt(pred_text, gold_text)
# Threshold picked on 300 hand-labelled pairs [§6.1]
if similarity > 0.28:
return 1
return 0# Alignment of predicted intermediates to gold [app. B]
# Input: predicted and gold intermediates, each with its ancestor leaf set
# Output: map from predicted intermediate to gold intermediate (or a dummy)
def align(pred_nodes, gold_nodes):
alignment = {}
for node in pred_nodes:
best = DUMMY
best_score = 0.0
for gold in gold_nodes:
# Jaccard similarity of the two ancestor leaf sets [app. B]
score = jaccard(node.ancestor_leaves, gold.ancestor_leaves)
# Keep the first gold node with the strictly highest score [app. B]
if score > best_score:
best = gold
best_score = score
alignment[node] = best
return alignmentHyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Base model | T5-11B (text-to-text) | §5.2 app. C | One model per task (Tasks 1 and 2 trained separately; Task 3 reuses Task 2) |
| Optimizer and learning rate | not stated | §5.2 | "Default hyperparameters (including optimizer)" of the T5 library, following UnifiedQA app. C |
| Batch size | 8 | §5.2 app. C | |
| Block size | 512 tokens (input and output) | app. C | |
| Training steps searched | up to 40K in intervals of 4K (10 checkpoints per task) | app. C | Selection by dev Overall AllCorrect |
| Selected checkpoint | 16K (Task 1), 32K (Task 2) | app. C | Main text says "40k steps" §5.2; 40K is the search ceiling |
| Training time | 16 hours per task | app. C | |
| Inference time | about 12 minutes for 340 test questions | app. C | Much of it is checkpoint loading and saving |
| Hardware | v3-8 TPU | app. C | |
| Model size and storage | 11B parameters, 22 GB on disk | app. C | |
| Retrieved sentences (Task 3) | 25 | §5.2 §6 | Query: QA in §6, H in §5.2 |
| Distractors (Task 2) | 15-20 added to gold leaves | §4 | Results text says the total input is 30 sentences §6.2 |
| Corpus-task retrieval ranker | RoBERTa-based relevance ranker | §6 | Its training data and checkpoint are not described; app. A covers the annotation-pool rankers only |
| BLEURT threshold | 0.28 | §6.1 | BLEURT-Large-512; threshold checked on 300 labelled pairs, 89% F1 on the rest |
| T5-large (secondary model) | batch 64, up to 80K steps in 8K intervals; selected 48K (Task 1), 32K (Task 2) | app. E | Same procedure as T5-11B |
| Decoding strategy | not stated | - | Greedy or beam search, max output length: not stated |
| Input string format | not stated | §5.2 | Only the sentence labels (sent1, hypot) are given |
| Random seed, number of devices for fine-tuning | not stated | - |
Results
Author-reported. Setup: the EntailmentBank test split of 340 questions tab. 2; the only models compared are the authors' own T5-11B variants and T5-large, and Task 3 reuses the Task 2 model with a retrieval step §6 tab. 4 tab. A4.
Test results, T5-11B tab. 4:
| Task | Leaves F1 | Leaves Correct | Steps F1 | Steps Correct | Intermediates F1 | Intermediates Correct | Overall AllCorrect |
|---|---|---|---|---|---|---|---|
| Task 1 (gold leaves) | 99.0 | 89.4 | 51.5 | 38.2 | 71.2 | 38.5 | 35.3 |
| Task 2 (leaves + distractors) | 89.1 | 48.8 | 41.4 | 27.7 | 66.2 | 31.5 | 25.6 |
| Task 3 (full corpus) | 39.9 | 3.8 | 7.4 | 2.9 | 35.9 | 7.1 | 2.9 |
Development results, T5-11B tab. A2:
| Task | Leaves F1 | Leaves Correct | Steps F1 | Steps Correct | Intermediates F1 | Intermediates Correct | Overall AllCorrect |
|---|---|---|---|---|---|---|---|
| Task 1 | 99.2 | 90.9 | 61.8 | 50.3 | 74.2 | 46.0 | 42.8 |
| Task 2 | 89.4 | 52.9 | 46.6 | 35.3 | 69.1 | 36.9 | 32.1 |
| Task 3 | 42.9 | 3.7 | 9.0 | 3.2 | 38.4 | 8.0 | 3.2 |
Test results, T5-large tab. A4:
| Task | Leaves F1 | Leaves Correct | Steps F1 | Steps Correct | Intermediates F1 | Intermediates Correct | Overall AllCorrect |
|---|---|---|---|---|---|---|---|
| Task 1 | 98.7 | 86.2 | 50.5 | 37.7 | 67.6 | 36.2 | 33.5 |
| Task 2 | 84.3 | 35.6 | 35.5 | 22.9 | 61.8 | 28.5 | 20.9 |
| Task 3 | 35.7 | 2.9 | 6.1 | 2.4 | 33.4 | 7.7 | 2.4 |
Task 2 test results by gold tree size, number of entailment steps tab. A3. The row counts are questions:
| Gold steps | Questions | Leaves F1 | Leaves Correct | Steps F1 | Steps Correct | Intermediates F1 | Intermediates Correct | Overall AllCorrect |
|---|---|---|---|---|---|---|---|---|
| 1 | 87 | 97.0 | 87.4 | 82.2 | 79.3 | 95.2 | 85.1 | 79.3 |
| 2 | 84 | 90.5 | 58.3 | 35.0 | 21.4 | 69.5 | 28.6 | 17.9 |
| 3 | 52 | 87.5 | 32.7 | 25.8 | 5.8 | 59.4 | 7.7 | 0.0 |
| 4 | 38 | 87.9 | 31.6 | 33.2 | 10.5 | 53.6 | 10.5 | 7.9 |
| 5 | 28 | 87.3 | 32.1 | 27.9 | 0.0 | 55.4 | 3.6 | 0.0 |
| 6 or more | 51 | 76.5 | 5.9 | 11.9 | 0.0 | 33.6 | 0.0 | 0.0 |
| All | 340 | 89.0 | 48.8 | 41.4 | 27.6 | 66.2 | 31.5 | 25.6 |
Other reported results:
- Dataset statistics tab. 2: 1,313 train, 187 dev and 340 test questions (1,840 total); 4,175, 597 and 1,109 entailment steps (5,881 total). Trees average 7.6 nodes and 3.2 steps; half have one or two steps §3.3 fig. 4.
- Inference types §3.4 tab. 3: from 100 sampled training steps, substitution 42%, inference from rule 33%, further specification or conjunction 15%, class from properties 4%, property inheritance 4%, sequential inference 3%.
- Manual check, Task 1 §6.3.2: on 50 Task 1 trees, the authors judge 58% as fully valid, against 35.6% by the automatic AllCorrect metric (the table gives 35.3%) tab. 4.
- Step errors, dev §6.3.1: of 100 imperfect-tree steps sampled, 30% were correct and 13% nearly correct. Failures: repeats an input (41%), invalid inference (47%), correct but irrelevant or differently worded (12%).
- Tree errors, dev §6.3.2: 50 imperfect trees: wrong or missing leaves about 50%; valid but scored wrong about 25%; correct leaves but invalid steps about 20%; disconnected intermediates about 5%; correct steps with wrong intermediates under 5%.
- Out-of-domain §7: the Task 2 model without fine-tuning on eQASC gets leaves F1 67% and AllCorrect 26% (no sample size given). A no-context model on Challenge300 (300 questions) gives trees that a manual sample judges valid and non-trivial about 35% of the time; of the remaining trees, about 25% were valid but mostly repeated the question and answer §7 fig. 5.
Paper vs code
No official code.
The paper says the dataset, annotation tool and evaluation code are available at the authors' project page §3.2 §8. That URL redirects to a Google Drive folder holding the dataset; the page was not read beyond the redirect. A GitHub search returned:
cognitiveailab/entailmentbanktools: README only, no license. The paper's TeX source names it in a commented-out footnote that is not in the compiled paper. This is a placeholder and holds no evaluation code.cognitiveailab/entailmentbank-tree-annotation-tool: Apache-2.0, the authoring tool, not the model, training or scoring code. Not cloned.
T5 training code is by Google, not the authors. The model and scoring code described in the paper were not found, so code is not set and nothing is cloned.
Pitfalls
- Numbered equations: the paper has none. Cite sections and tables. The scoring rules are in prose §6.1.
- Distractor count: Task 2 is defined with 15-20 distractors §4 but the results say the input totals 30 sentences §6.2. Use the total of 30 if you match the reported numbers, and say which you chose.
- Training length: the main text says 40K steps §5.2, but the chosen checkpoints are 16K (Task 1) and 32K (Task 2) app. C. 40K is the search limit, so use the checkpoints.
- Task 3 query: the baseline uses
QAas the retrieval query §6, while the model section saysH§5.2. The result depends on which one you use. Not resolved in the paper. - Average tree size: the contribution list says 6.6 nodes and 2.7 steps per tree §1. The dataset section and figure caption say 7.6 nodes and 3.2 steps §3.3 fig. 4. Five thousand eight hundred eighty-one steps over 1,840 trees gives 3.2, which matches the second figure.
- Cross-reference: the Task 3 paragraph cites "Figure 4" for the idea of generating supporting sentences instead of retrieving them §6.2. In the compiled paper, Figure 4 is the size histogram fig. 4, so the reference does not match.
- Appendix letter: the text says the alignment algorithm is in Appendix C §6.1, but its section is Appendix B app. B. Appendix C is training and model selection.
- Metric numbers: Task 2 steps correct is 27.7 in the main table tab. 4 and 27.6 in the by-size table tab. A3. The human-check figure is given as 35.6% in the text §6.3.2 and 35.3% in the table tab. 4.
- Metric is strict: every "Correct" column is 1 only at F1 1.0, and AllCorrect fails on any error. Structural rewrites of a valid tree lose points (for example,
sent1 & sent2 & sent3 -> hypotversussent1 & sent2 -> int1; int1 & sent3 -> hypotgives 0% step F1 app. D). Judged by hand, many low scores are valid trees §6.3.2. - Alignment ties: the first gold node with the highest Jaccard score wins app. B. Whether several predicted intermediates may align to one gold node is not stated.
- Corpus pruning: for Task 3, sentences "similar" to the gold leaves are removed per question. The paper gives no threshold or method for this §4. Scores depend on it.
- Missing question facts: some gold trees use question-specific scenario facts that are not in the corpus, and the baseline cannot produce them §4 (footnote).
- Retrieval recall: the retriever finds 66.1% of gold leaves on average for Task 3 §6.2. Task 3 scores are bounded by this.
- Undefined inputs: the input string format, decoding method, optimizer and learning rate are not given. The paper defers them to T5 library defaults §5.2 app. C. Pin the T5 version before reproducing.
- Dataset licence: the dataset is linked from the paper through a Google Drive folder. No dataset licence is stated in the paper, so do not assume one.
- Intermediate correctness: the BLEURT threshold 0.28 comes from 300 labelled pairs §6.1. Its F1 of 89% on the remaining pairs is the only check given.
- Generalisation claims: the out-of-domain samples are small and manual, and sample sizes are mostly not stated §7.
Lineage
- Builds on: the all-at-once sequence-to-sequence generator from ProofWriter §5; T5 for text-to-text fine-tuning §5.2; the alignment algorithm variant from R4C app. B; BLEURT §6.1; BERT, RoBERTa and TF-Ranking-BERT for the annotation pool app. A.
- Compared against: no model baselines. Dataset comparison with WorldTree V2, eQASC, HotpotQA/R4C and StrategyQA tab. 1.
- Superseded by: not known from content already in this wiki.
Source and license
Adapted from “Explaining Answers with Entailment Trees” by Bhavana Dalvi, Peter Jansen, Oyvind Tafjord, Zhengnan Xie, Hannah Smith, Leighanna Pipatanangkura, Peter Clark (arXiv:2104.08661), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.