LLMSurgeon: Diagnosing Data Mixture of Large Language Models
2026-05-28 • Computation and Language
Computation and LanguageArtificial IntelligenceMachine Learning
AI summaryⓘ
The authors introduce a method called Data Mixture Surgery (DMS) to figure out what kinds of text data were used to train a large language model, just by looking at the model's generated text. They created a tool named LLMSurgeon that treats this as a puzzle where it corrects errors in domain classification to estimate the original mix of training data types. To test their method, they also made LLMScan, a suite of tests using models with known training data. Their approach helps understand the 'digital DNA' of language models, even when the training data is not shared.
Large Language ModelsPretraining DataData Mixture SurgeryLabel ShiftSoft Confusion MatrixInverse ProblemDomain ClassificationLLMSurgeonLLMScanFoundation Models
Authors
Yaxin Luo, Jiacheng Cui, Xiaohan Zhao, Xinyi Shang, Jiacheng Liu, Xinyue Bi, Zhaoyi Li, Zhiqiang Shen
Abstract
The pretraining data mixture of Large Language Models (LLMs) constitutes their "digital DNA", shaping model behaviors, capabilities, and failure modes. Yet this composition is rarely disclosed, making post-hoc auditing of data combination or provenance difficult. In this work, we formalize $\textbf{Data Mixture Surgery (DMS)}$: given only generated text from a target LLM, estimate the domain-level distribution of its pretraining corpus under a predefined taxonomy. We propose $\textbf{LLMSurgeon}$, a strong framework that casts DMS as an inverse problem under the label-shift assumption. Rather than directly aggregating classifier outputs, LLMSurgeon estimates a calibrated $\textit{soft}$ confusion matrix and solves a constrained inverse problem to correct systematic domain confusion and recover the latent mixture prior. To evaluate, we introduce $\textbf{LLMScan}$, a recipe-verifiable evaluation suite built from open-source LLMs with transparent pretraining mixtures. Across LLMScan, LLMSurgeon recovers domain mixtures with high fidelity under fixed protocols. Our work presents a practical, post-hoc approach for auditing the digital DNA of foundation models without access to their training data.