CLAILGJul 20, 2024

Generalization v.s. Memorization: Tracing Language Models' Capabilities Back to Pretraining Data

arXiv:2407.14985v592 citationsh-index: 27
AI Analysis

This addresses the debate over LLM capabilities for researchers, showing that memorization dominates in knowledge-intensive tasks but generalization is key for reasoning, with incremental methodological contributions.

The study investigated whether large language models generalize or memorize by introducing distributional memorization and a task-gram model to analyze pretraining data correlations, finding that memorization is stronger in factual question answering while generalization increases in machine translation and reasoning tasks as model size grows.

The impressive capabilities of large language models (LLMs) have sparked debate over whether these models genuinely generalize to unseen tasks or predominantly rely on memorizing vast amounts of pretraining data. To explore this issue, we introduce an extended concept of memorization, distributional memorization, which measures the correlation between the LLM output probabilities and the pretraining data frequency. To effectively capture task-specific pretraining data frequency, we propose a novel task-gram language model, which is built by counting the co-occurrence of semantically related $n$-gram pairs from task inputs and outputs in the pretraining corpus. Using the Pythia models trained on the Pile dataset, we evaluate four distinct tasks: machine translation, factual question answering, world knowledge understanding, and math reasoning. Our findings reveal varying levels of memorization, with the strongest effect observed in factual question answering. Furthermore, while model performance improves across all tasks as LLM size increases, only factual question answering shows an increase in memorization, whereas machine translation and reasoning tasks exhibit greater generalization, producing more novel outputs. This study demonstrates that memorization plays a larger role in simpler, knowledge-intensive tasks, while generalization is the key for harder, reasoning-based tasks, providing a scalable method for analyzing large pretraining corpora in greater depth.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes