Nov 24, 2026

The lexical imprint of pre-training data: How word distributions leave their mark on language model performance

Image for The lexical imprint of pre-training data: How word distributions leave their mark on language model performance

This post introduces “The Lexical Imprint of Pre-training Data,” a NAVER Cloud paper accepted at the Conference on Neural Information Processing Systems (NeurIPS 2026), one of the leading conferences in machine learning and AI.


Kim Jeonghoon† (NAVER Cloud)

Chung Woojin† (NAVER Cloud*)

Song Woomin (KAIST)

Park Cheonbok (NAVER Cloud)

Sung Nako (NAVER Cloud)

Shin Jinwoo (KAIST)

† Co-first authors
* Work done during an internship at NAVER Cloud


Does newer, higher-quality pre-training data win on every benchmark?

A lot of care goes into choosing the pre-training data for a language model. Teams filter out misinformation, cut down on duplicates, and gather informative documents. But does a model trained on all that carefully prepared data perform better on every evaluation?


In our experiments, the answer depended on the task. The model trained on FineWeb-Edu, a collection of web documents with high educational value, performed well on evaluations that test scientific knowledge. On HellaSwag, which asks a model to judge how everyday situations unfold, the model trained on C4, an older dataset, scored higher. The gap appeared even when model size and the amount of training were matched.


That result raises a question worth asking alongside data quality: how well does the data fit the task we’re evaluating the model on?


Picture a science explainer and an article about everyday life. Both can be accurate and informative, but the words and expressions that come up most often will differ. In the same way, the data that helps a model solve science questions may not be the data that helps it reason about everyday situations. To measure that difference, we started by comparing the word frequency distributions of training data and benchmarks.


Does pre-training data leave traces in a model’s predictions?

Language models are pre-trained to predict the next token from the context that comes before it. As they learn from vast numbers of sentences, their parameters come to encode which expressions tend to follow which contexts.


The multiple-choice, zero-shot evaluations in this study rely on that same kind of prediction. Given a question and a set of candidate answers, with no worked examples, the model calculates how likely each candidate is to follow and picks the most likely one. That setup leaves room for statistical patterns learned from training data to shape evaluation scores.


Fully understanding this relationship would mean comparing complex, context-dependent distributions. But long contexts rarely repeat exactly, so those distributions are hard to estimate accurately even from large datasets. Instead, we started from a simpler question:


“If we set word order aside and compare only how often each word appears, can we still explain part of the performance gap?”


The statistical patterns a model picks up during pre-training carry over into its predictive distribution. We call the lexical trace that pre-training data leaves on a model’s zero-shot predictions the “lexical imprint.” Rather than measure complex conditional distributions directly, we set out to observe part of that imprint by looking at how closely the word distributions of training data and benchmarks align.


How can we compare the word distributions of training data and benchmarks?

Say the word “energy” shows up often in a science benchmark. If one training dataset uses it often and another barely uses it at all, the two datasets match that benchmark’s vocabulary to different degrees. We can extend this comparison from one word to every word that appears in the benchmark.


Putting a number on this gives us word-level unigram cross-entropy (UCE). Think of it as how unfamiliar a benchmark’s words look, on average, when you predict them from the training data’s word frequencies. The rarer a benchmark’s common words are in the training data, the higher the UCE. Measured against the same benchmark, training data with a lower UCE has a better-matched word distribution.


Computing UCE doesn’t require running a model. All you need are the word frequencies of the two datasets. We split words on whitespace after normalizing characters and removing punctuation, so the metric doesn’t depend on any particular model’s subword tokenizer either.


One caveat: you can’t compare absolute UCE values across different benchmarks to decide which benchmark is easier. Instead, UCE is meaningful when you use it to compare how well different training datasets fit the same benchmark.


We tested the metric at progressively finer levels: corpus, document, and prompt. In three experiments, we compared whole corpora, selected documents within a corpus, and finally matched a drafter to each prompt at inference time (Figure 1).


Figure 1. UCE measures how well the word distributions of training and evaluation data align at three points: the training corpus, individual documents, and the input prompt. The same metric is then used for performance analysis, data selection, and model selection at inference time.


Note: The math behind UCE

Let P be the word distribution of the training data and Q the word distribution of the benchmark. Then:


UCE(Q, P) = −∑ Q(w) log₂ P(w) (in bits)


Q(w) is the relative frequency of word w in the benchmark, and P(w) is its relative frequency in the training data. UCE equals the entropy of Q, H(Q), plus the Kullback–Leibler (KL) divergence between the two distributions, KL(Q‖P). Because H(Q) is fixed for a given benchmark, any difference in UCE between training datasets on the same benchmark is exactly a difference in KL divergence.


Experiment 1. Corpus: Does the word distribution of pre-training data affect performance?

Across 10 zero-shot benchmarks, the alignment between the word distributions of training data and benchmarks was consistently related to how the models ranked. Corpora generally regarded as high quality didn’t always come out ahead. Within a given benchmark, models trained on lower-UCE corpora performed better.


We compared four public corpora, or collections of text gathered for pre-training: C4, DCLM, FineWeb-Edu, and OpenWebText. DCLM and FineWeb-Edu were built relatively recently and are known as high-quality corpora that perform well on many benchmarks. To compare the effect of the data fairly, we kept everything else the same, including model size and the amount of training.


Break the results down by benchmark, though, and interesting differences emerge. In Figure 2, the model trained on FineWeb-Edu has the highest accuracy on ARC-Easy, which tests scientific knowledge, but the model trained on C4 leads on HellaSwag and on PIQA, which tests physical commonsense. Read the UCE bars and the accuracy diamonds together, and on each benchmark, corpora with lower UCE have higher accuracy. The relationship holds whether the newer, high-quality data wins on a benchmark or the older data does.


Figure 2. Results for a 3.36B-parameter model trained on 60B tokens. Within each benchmark, corpora with lower UCE show higher accuracy. Bars show UCE and diamonds show accuracy, plotted on separate axes.


Why the difference? The corpora we compared already contained nearly every word that appears in the benchmarks. What set them apart was not whether a word appeared, but how often each word appeared. Two datasets can share the same vocabulary and still align differently with a benchmark, depending on how much weight each word carries.


The relationship held even when we randomly resampled the documents used for training. In Figure 3, samples drawn from the same corpus cluster together, and across corpora, lower UCE goes with higher accuracy. So the result isn’t simply the product of a lucky sample.


Figure 3. With a 400M-parameter model trained on 8.5B tokens, the relationship between UCE and accuracy on ARC-Easy and PIQA held across different training subsets.


Of course, corpora also differ in document genre and in how they were filtered, so these results alone can’t fully isolate the effect of word distribution. That leads to a follow-up question: If we pick documents within the same corpus whose word distribution better matches a benchmark, will performance go up too? The next experiment puts this to the test.


Experiment 2. Document: Does pre-training on benchmark-matched documents improve performance?

The first experiment found a consistent relationship between the word distribution of a pre-training corpus and model performance. But is that relationship just a correlation? Or can we deliberately adjust the word distribution of training data and actually change how a model performs? To find out, we selected training documents within each corpus to lower their UCE against each target benchmark.


This improved performance on those benchmarks in both DCLM and FineWeb-Edu. Even within corpora already filtered for quality, the choice of documents could push performance on specific benchmarks higher.


The method we used, UCE-Filter (Algorithm 1), calculates how the UCE between the full dataset and the benchmark changes when each document is left out, then removes the documents whose removal lowers UCE the most. It works from word frequencies alone, with no separate model needed to score documents. We compared data chosen this way against randomly chosen data, keeping the number of selected documents, model size, and amount of training the same.



In every comparison in Table 1, UCE-Filter beat random selection on average accuracy across the target benchmarks, the benchmarks used as the selection criterion. The gains ranged from about 1.8 to 3.6 percentage points. On the other benchmarks, which weren’t part of the selection criterion, average accuracy changed by no more than 0.9 percentage points. The key point is that the gains were concentrated mainly on the benchmarks whose word distribution we matched.



Could the model simply have seen evaluation sentences verbatim in its training data? The gains held after we excluded evaluation items that shared a sequence of 13 consecutive words with the training data. In the DCLM 1.34B setting, we went further, removing the training documents flagged as overlaps and retraining the model. Accuracy was still 3.40 percentage points higher than with random selection. As far as we could tell, simple text overlap couldn’t account for the results.


What matters here isn’t just that we picked better training data. The first experiment observed a relationship between the word distributions of different corpora and benchmark performance. This one deliberately selected training data within a single corpus to lower UCE, then checked whether performance on the target benchmarks actually improved. Because the gains landed where we aimed them, the result suggests that the lexical imprint of pre-training data goes beyond a statistical correlation: it’s a performance factor you can adjust through data selection. UCE, then, isn’t only a metric for observing the relationship between training data and benchmarks. It can also serve as a tool for changing that relationship on purpose and seeing how the change affects model behavior.



Experiment 3. Prompt: Does lexical fit affect generation, too?

When we chose a draft model, or drafter, that fit the input lexically, more of its proposed tokens were accepted and generation got faster. This experiment asked whether the lexical alignment we’d seen between training data and benchmarks is also a useful signal during actual generation.


To test this, we used speculative decoding. A fast drafter proposes the next several tokens, and a verifier model checks them in a single pass. The more tokens the verifier accepts, the further generation advances with each verification step. So would a drafter built from data whose word distribution fits the input be better at proposing tokens the verifier will accept?


We prepared drafters built from math, code, and science data, and for each input prompt, chose the drafter whose data had the lowest UCE against that prompt. As the baseline, we used a general-purpose drafter built from a mix of all three domains. Each drafter had the same amount of data and shared the same verifier model, so we could compare the selection methods directly.


In Table 2, UCE-based selection beat the general-purpose drafter on both acceptance length and generation speed across all four evaluations. The gains showed up not only in math and code but also in general knowledge and medical question answering, where we hadn’t prepared a dedicated drafter.



This experiment shows that the lexical imprint found in the first two experiments is useful beyond analyzing how pre-training data relates to benchmarks. It can be put to work during inference, too. By using UCE to compare the lexical characteristics each drafter learned from its own data, we could pick the drafter best suited to each input prompt and speed up generation. The lexical imprint that training data leaves on a model is both a clue to its performance and a signal for choosing models at inference time.


The relationship we saw in corpus comparison and document selection also appeared in per-input drafter selection, which supports the view that a dataset’s lexical characteristics are tied to a model’s predictive behavior. That said, these results speak to the effect of drafter selection; they don’t mean that word distribution alone explains all of a model’s generation behavior.


Can word distributions explain everything?

UCE doesn’t capture the order in which words appear or the grammatical relationships between them. Take “the dog chased the man” and “the man chased the dog.” Both use the same words, but who’s chasing whom is reversed. Since the two sentences have identical word frequencies, UCE can’t tell them apart.


In practice, UCE didn’t consistently explain performance rankings on BLiMP, which tests grammar; MathQA, which covers math problems; or Global-PIQA, a multilingual evaluation. Applying it to languages that don’t split cleanly into words on whitespace, or that have rich morphology, will take more research. Whether the same relationship holds after post-training such as supervised fine-tuning (SFT) or reinforcement learning from human feedback (RLHF) also needs separate validation.


So UCE isn’t well suited to judging a language model’s overall ability, or data quality, with a single number. This study mainly covers the zero-shot behavior of base models under controlled pre-training conditions. Within that scope, UCE’s value is that it lets us observe the lexical relationship between training and evaluation data without running a model.


Closing thoughts: What does pre-training data leave behind in a model?

Let’s return to where we started: what makes pre-training data good? Quality, diversity, and scale usually top the list, but this study adds one more question: how well does the training data fit the tasks the model will perform?


We looked at the lexical imprint that pre-training data leaves on a model’s zero-shot predictions. With the same model and amount of training, data whose word distribution better matched a benchmark was linked to higher accuracy. Selecting documents to raise that alignment produced gains concentrated mainly on the target benchmarks, and using UCE to pick a drafter for each input sped up generation.


Together, the three experiments trace, at three levels, how the lexical makeup of pre-training data shows up in a model’s predictions. And at every level, UCE was computed purely from word frequencies, without a single pass through a model. Before you run any training or inference, counting words alone can give you a signal about how a model will behave.


The results also give us something to think about when we read benchmark scores. A score can reflect not only the ability being measured but also how well the training data matches that benchmark’s vocabulary. Making sense of a score gain, then, means looking at the relationship between training and evaluation data as well.


“Pre-training data leaves a measurable lexical imprint on a model’s predictions.”


Learning to read that imprint can be a starting point for explaining data choices more clearly and interpreting evaluation results more accurately.


Read the full paper on arXiv