Source-linked AI summary

How Much Knowledge Can You Pack Into the Parameters of a Language Model?

Adam Roberts, Colin Raffel, Noam Shazeer

arXiv:2002.08910v4cs.CLcs.LGstat.ML

TL;DR

The paper asks whether pre-trained language models can practically use knowledge stored in their parameters to answer questions without external context or knowledge. It fine-tunes T5 models for closed-book question answering and finds that performance scales with model size and is competitive with open-domain systems that retrieve externally. The paper also identifies limitations involving model cost, interpretability, and multi-hop inference.

  • Problem

    The paper examines the practical utility of language models that implicitly store knowledge, rather than relying on external context or knowledge sources to answer questions.

  • Method

    The authors fine-tune pre-trained T5 models of different sizes to answer questions using only the question, with no external knowledge or context.

  • Results

    Performance improves with model size across Natural Questions, WebQuestions, and TriviaQA, and the largest models are competitive with open-domain systems using external retrieval.

  • Takeaways & Limitations

    Closed-book question answering provides an alternative approach in which models memorize relevant knowledge in their parameters instead of accessing external knowledge during answering.

  • Takeaways & Limitations

    State-of-the-art results require models with around 11 billion parameters, which can be prohibitively expensive in resource-constrained settings.

Abstract

from arXiv · show

It has recently been observed that neural language models trained on unstructured text can implicitly store and retrieve knowledge using natural language queries. In this short paper, we measure the practical utility of this approach by fine-tuning pre-trained models to answer questions without access to any external context or knowledge. We show that this approach scales with model size and performs competitively with open-domain systems that explicitly retrieve answers from an external knowledge source when answering questions. To facilitate reproducibility and future work, we release our code and trained models at https://goo.gle/t5-cbqa.

1 Introduction

This work evaluates whether language models can use knowledge internalized during pre-training to answer real-world questions without external context. It also examines how this capability changes with model size.

  • Approach: The approach uses pre-training on freely available, large-scale unstructured and unlabeled text, then fine-tunes the model to answer questions without additional context.T5 is pre-trained by filling in dropped-out text spans and subsequently fine-tuned for question answering.
  • Motivation: The paper evaluates language models as knowledge bases on practical open-domain question answering rather than only synthetic or reasoning-oriented tasks.The model must parse a natural-language query and retrieve information stored in its parameters.
  • Task: Closed-book question answering feeds the model only the input question, measuring stored knowledge while testing a useful real-world problem.The model has no pertinent article, context, or external knowledge source available during answering.
  • Scaling: The study measures whether increasing model size leads to greater information storage and better knowledge retrieval.Experiments use T5 models spanning sizes up to approximately 11 billion parameters.

2 Background

Open-domain question answering asks models to answer arbitrary context-independent questions, typically using an external knowledge collection. This paper studies a more constrained closed-book variant in which models must store relevant knowledge in their parameters before answering.

  • Open-domain question answering: Open-domain question answering involves arbitrary context-independent questions, with models typically accessing an external structured or unstructured knowledge collection.The model is not told where in that collection the answer appears.
  • Closed-book question answering: Closed-book question answering removes all external knowledge access, requiring the model to be pre-trained to store knowledge in its parameters before fine-tuning.The setting is compared metaphorically to a student taking an exam after studying and memorizing the relevant information.
  • Transfer learning: Transfer learning commonly pre-trains language models on large unstructured corpora with an unsupervised objective before fine-tuning them for downstream tasks.This practice has become popular because of its empirical success across NLP tasks.
  • Model architecture: Encoder-only models such as BERT are unsuitable for closed-book question answering because they predict answer tokens from provided context, which the task omits.T5 instead uses an encoder-decoder text-to-text framework that generates the literal answer.
  • Scope: The paper does not directly address multi-hop inference despite using the same open-book definition as the OpenBookQA dataset.This scope boundary is stated in a footnote.

3 Experiments

The experiments evaluate closed-book T5 question answering across three datasets, model sizes, and training variants, finding scaling performance and competitive results without external retrieval. Human inspection also shows that exact-match evaluation counts many plausible answers as incorrect.

  • Datasets and training: The study evaluates T5 on Natural Questions, WebQuestions, and TriviaQA using standard open-domain evaluation procedures.Models receive questions with task-specific prefixes and generate literal answer text; no additional hyperparameter tuning is used for the T5 checkpoints.
  • Main results: Performance improves with model size on every dataset, with T5-11B or comparably sized T5.1.1-XXL performing best in each case.SSM pre-training provides a substantial additional boost, and T5.1.1-XXL with SSM achieves state-of-the-art on WebQuestions.
  • Main results: The largest models are competitive with open-book systems while omitting corpus lookup and long-document attention.The paper notes that this omission saves substantial computation and memory, although the largest models are computationally intensive.
  • Multi-answer evaluation: 36.2 recall on multi-answer Natural Questions exceeds the dataset baseline of 33.2 but remains below Pan et al.’s 51.9 state-of-the-art score.This result is reported for T5-11B + SSM on the validation set.
  • Human evaluation: Manual inspection of 150 Natural Questions errors identified 20 phrasing mismatches, 20 incomplete annotations, and 17 questions unanswerable without appropriate context.After removing unanswerable questions and adjusting for the observed false-negative rate, the model’s accuracy was 57.8.

4 Conclusion

The paper concludes that large language models can answer open-domain questions competitively without external knowledge, while identifying substantial costs and limitations of parameter-stored knowledge.

  • Large language models pre-trained on unstructured text attain competitive open-domain question answering results without external knowledge.
  • State-of-the-art results require models with around 11 billion parameters, which can be prohibitively expensive in resource-constrained settings.
  • Parameter-distributed knowledge is difficult to interpret, and the model can hallucinate realistic-looking answers when unsure.
  • Maximum-likelihood pre-training provides no guarantee that a model learns a specific fact or can be explicitly updated with it.

A Metrics for Natural Questions

The Natural Questions experiments use two evaluation variants that differ in answer multiplicity, training targets, answer length, normalization, and correctness criteria.

  • Natural Questions omits unanswerable labels and long answers because they are nearly impossible to predict without oracle context.
  • Open-domain variant: The open-domain variant trains for one answer, ignores answers longer than five tokens, normalizes answers, and accepts a match to any annotator answer.
  • Multi-answer variant: The multi-answer variant trains on all ground-truth answers and reports recall because unanswerability cannot be predicted without context.

B Other Things We Tried

The authors tested additional pre-training, Wikipedia-only pre-training, multitask fine-tuning, and answer sampling. Salient span masking improved performance, while several alternatives had little, mixed, or negative effects.

  • Continued Pre-Training on Wikipedia: Additional in-domain pre-training on English Wikipedia with span corruption had virtually no effect on performance.The authors suggest C4 already contained many Wikipedia articles and the checkpoints had seen substantial such content.
  • Pre-Training From Scratch On Wikipedia: Pre-training T5 from scratch only on Wikipedia resulted in dramatically worse performance.
  • Span-Corruption Pre-Training on Wikipedia Sentences with Salient Spans: SSM was an important ingredient in improved performance, whereas standard span corruption produced no significant improvement over baseline T5.Both objectives used the Wikipedia sentence dataset, isolating the pre-training objective as the key difference in this comparison.
  • Fine-Tuning On All Question Answering Tasks: Multitask training improved Natural Questions by 0.5 but produced slightly worse results on the other tasks.The mixture comprised Natural Questions, WebQuestions, and TriviaQA.
  • Randomly Sampling Answers For Natural Questions: Sampling a random answer for Natural Questions did not affect performance.The main experiments instead trained on the first annotated answer when questions had multiple answers.
Loading 2002.08910v4…