LMD3: Language Model Data Density Dependence
John Kirchenbauer, Garrett Honke, Gowthami Somepalli, Jonas Geiping, Daphne Ippolito, Katherine Lee, Tom Goldstein, David Andre
TL;DR
The paper addresses how the density of training data around a test query in embedding space affects per-example performance of large language models. It proposes LMD3, a KDE-based framework, and validates it through leakage interventions and pretraining-scale analyses, enabled by DEANN for scalable density estimation. Key contributions include formalizing the LMD3 methodology, demonstrating that data density predicts per-sample accuracy and perplexity variance, and outlining practical applications for data attribution, contamination assessment, and targeted data augmentation. This density-centric lens offers a data-driven approach to instance- and group-level error analysis and benchmark integrity at large scales, informing data curation and evaluation practices.
Abstract
We develop a methodology for analyzing language model task performance at the individual example level based on training data density estimation. Experiments with paraphrasing as a controlled intervention on finetuning data demonstrate that increasing the support in the training distribution for specific test queries results in a measurable increase in density, which is also a significant predictor of the performance increase caused by the intervention. Experiments with pretraining data demonstrate that we can explain a significant fraction of the variance in model perplexity via density measurements. We conclude that our framework can provide statistical evidence of the dependence of a target model's predictions on subsets of its training data, and can more generally be used to characterize the support (or lack thereof) in the training data for a given test task.
