English

Evaluating $n$-Gram Novelty of Language Models Using Rusty-DAWG

Computation and Language 2025-08-26 v4 Artificial Intelligence

Abstract

How novel are texts generated by language models (LMs) relative to their training corpora? In this work, we investigate the extent to which modern LMs generate nn-grams from their training data, evaluating both (i) the probability LMs assign to complete training nn-grams and (ii) nn-novelty, the proportion of nn-grams generated by an LM that did not appear in the training data (for arbitrarily large nn). To enable arbitrary-length nn-gram search over a corpus in constant time w.r.t. corpus size, we develop Rusty-DAWG, a novel search tool inspired by indexing of genomic data. We compare the novelty of LM-generated text to human-written text and explore factors that affect generation novelty, focusing on the Pythia models. We find that, for n>4n > 4, LM-generated text is less novel than human-written text, though it is more novel for smaller nn. Larger LMs and more constrained decoding strategies both decrease novelty. Finally, we show that LMs complete nn-grams with lower loss if they are more frequent in the training data. Overall, our results reveal factors influencing the novelty of LM-generated text, and we release Rusty-DAWG to facilitate further pretraining data research.

Keywords

Cite

@article{arxiv.2406.13069,
  title  = {Evaluating $n$-Gram Novelty of Language Models Using Rusty-DAWG},
  author = {William Merrill and Noah A. Smith and Yanai Elazar},
  journal= {arXiv preprint arXiv:2406.13069},
  year   = {2025}
}

Comments

To appear at EMNLP 2024

R2 v1 2026-06-28T17:11:07.596Z