Paper: 2605.30348 Authors: Yaxin Luo, Jiacheng Cui, Xiaohan Zhao, Xinyi Shang, Jiacheng Liu, Xinyue Bi, Zhaoyi Li, Zhiqiang Shen Categories: cs.CL, cs.AI, cs.LG
The Gap
LLM providers rarely disclose their pretraining data mixtures. Existing auditing methods either require training data access (impossible for closed models) or rely on membership inference (which detects individual examples, not domain-level distributions). Prior work on data attribution focuses on influence of specific samples, not recovering the overall recipe. The gap: no principled way to estimate “what domains, in what proportions” from black-box model outputs alone.
Problem: Closed LLMs hide pretraining mixture
|
v
Assumption: Generated text carries domain fingerprints
(label-shift: test distribution differs from train)
|
v
Method: LLMSurgeon
- Train domain classifier on reference corpus
- Estimate soft confusion matrix (how domains confuse)
- Solve constrained inverse problem to recover mixture
|
v
Evidence: LLMScan benchmark (open models, known recipes)
|
v
Conclusion: Recovers domain proportions with <5% error
(under fixed protocol, predefined taxonomy)
The Increment
One sentence: Before, auditing LLM training data required access to the corpus itself; after, you can estimate domain-level composition from generated text alone using calibrated inverse inference.
Core Mechanism
LLMSurgeon has three stages. First, train a domain classifier on a reference corpus with known domain labels (e.g., Wikipedia, GitHub, books). This classifier learns to map text to domain probabilities. Second, generate text from the target LLM and run it through the classifier. But don’t just average the predictions—the classifier makes systematic mistakes (confuses legal text with news, code comments with documentation). Third, estimate a soft confusion matrix: for each true domain, what does the classifier predict? Then solve an inverse problem: given observed classifier outputs and the confusion matrix, what input mixture would produce these outputs? Add constraints (proportions sum to 1, non-negative) and solve via convex optimization.
Reference Corpus Target LLM
(labeled domains) (black box)
| |
v v
Classifier <---------- Generated Text
| |
+------------------------+
|
v
Confusion Matrix C:
C[i,j] = P(predict j | true domain i)
|
v
Inverse Problem:
observed = C * mixture
solve for mixture (constrained optimization)
|
v
Estimated Domain Proportions
Think of it like reverse-engineering a smoothie recipe by tasting the result. You have a “flavor classifier” trained on pure ingredients (strawberry, banana, spinach). You taste the mystery smoothie and the classifier says “60% strawberry, 30% banana, 10% spinach.” But you know your classifier confuses banana with mango 20% of the time, and spinach with kale 30% of the time. So you build a confusion table: when it’s actually banana, what does the classifier say? Then you work backwards: given what the classifier tasted and how it typically gets confused, what was the actual ingredient mix? The confusion matrix is your calibration—it corrects for the classifier’s systematic biases. Without it, you’d just trust the raw predictions and get the recipe wrong.
Key Concepts
-
Label Shift: The test distribution (generated text from target LLM) differs from the training distribution (reference corpus) in class proportions, but the conditional distribution P(text|domain) stays the same. Concretely: if the target LLM was trained on 40% code and your reference corpus is 10% code, the domain proportions shifted, but what “code” looks like didn’t change. This assumption lets you use a classifier trained on one mixture to infer another mixture. Without label shift, you’d need the classifier to be trained on the exact same mixture as the target—impossible for black-box models.
-
Soft Confusion Matrix: Instead of a binary “correct/incorrect” confusion matrix, this captures the full probability distribution of classifier predictions for each true domain. Entry C[i,j] is the probability the classifier predicts domain j when the true domain is i. Estimated by running the classifier on held-out reference data where true labels are known. This matrix encodes systematic biases: maybe the classifier always gives 15% probability to “news” even for pure code samples. The inverse problem uses this matrix to “undo” the classifier’s distortions and recover the true mixture.
-
Constrained Inverse Problem: You observe y (classifier outputs on generated text), you know C (confusion matrix), and you want to find x (true domain mixture) such that y = Cx. But this is ill-posed—many solutions exist. Add constraints: x must be a probability distribution (sums to 1, all entries ≥ 0). Solve via convex optimization (quadratic programming). The constraints regularize the solution and ensure it’s interpretable as a mixture. Without constraints, you might get negative proportions or proportions summing to 3, which are nonsensical.
Framework Shift
Before (mainstream approach): After (this paper):
Training Data Generated Text
| |
v v
Membership Inference Domain Classifier
(detect specific examples) (predict domain per sample)
| |
v v
Binary: in/out of training Aggregate Predictions
|
v
Confusion Matrix
(calibrate biases)
|
v
Inverse Problem
(recover mixture)
|
v
Domain Proportions
From detecting individual data points to estimating population-level composition, the core shift is treating the model as a noisy sensor of its training distribution rather than a membership oracle.
Expert Assessment
Problem choice: Real gap. Data transparency is a live issue (lawsuits, regulation, scientific reproducibility). Prior work on data attribution focused on sample-level influence, not mixture recovery. The framing as inverse problem under label shift is principled, not ad-hoc. Sits at the intersection of model auditing and distribution shift—both active areas.
Method maturity: Clever use of confusion matrix calibration. The label-shift assumption is strong but reasonable for domain-level analysis (domains are stable, proportions vary). Potential weakness: relies on predefined taxonomy and reference corpus quality. If your taxonomy doesn’t match the target’s (e.g., target has “medical” but your reference lumps it into “science”), you’ll get garbage. The method is as good as your classifier and confusion matrix estimation. No comparison to simpler baselines like just averaging classifier outputs without calibration—would be useful to see the delta.
Experimental integrity: LLMScan is a solid contribution—open models with disclosed mixtures let you verify ground truth. But all experiments use models trained on similar data distributions (CommonCrawl, GitHub, books). What happens with a model trained on proprietary data (e.g., enterprise documents, non-English web)? The paper doesn’t test robustness to taxonomy mismatch or adversarial generation (what if the target LLM deliberately obfuscates its mixture?). Error bars are reported but no statistical significance tests. Baselines are weak—mostly ablations of their own method, not competing approaches.
Writing quality: Clear motivation and method description. The confusion matrix explanation could be tightened—it’s introduced late and the reader has to backtrack. Section 4.3 (LLMScan construction) feels like supplementary material, breaks the flow. The related work section is thorough but reads like a literature dump. If rewritten to focus on the conceptual lineage (label shift → inverse problems → data auditing), it would elevate the framing.
Verdict: Weak accept — solid method and useful benchmark, but limited evaluation scope and strong assumptions reduce impact. Needs stress-testing on diverse models and taxonomies.
Takeaways
Practitioners can steal the calibration idea: if you’re aggregating classifier predictions to estimate a distribution, don’t trust raw outputs—estimate a confusion matrix on held-out data and solve an inverse problem. This applies beyond LLMs: any time you’re inferring a latent mixture from noisy observations (e.g., estimating user demographics from behavior logs, inferring content sources in a recommendation feed). The label-shift framing is also portable—if you believe the conditional distribution is stable but class proportions vary, you can adapt classifiers across distribution shifts without retraining. Concrete technique: use convex optimization with simplex constraints (non-negative, sum-to-one) to regularize mixture recovery. The LLMScan benchmark is immediately useful for anyone working on data provenance or model auditing.
论文: 2605.30348 作者: Yaxin Luo, Jiacheng Cui, Xiaohan Zhao, Xinyi Shang, Jiacheng Liu, Xinyue Bi, Zhaoyi Li, Zhiqiang Shen 分类: cs.CL, cs.AI, cs.LG
缺口
大语言模型提供商很少公开预训练数据的配方。
现有审计方法要么需要访问训练数据(对闭源模型不可能),要么依赖成员推断(只能检测单个样本是否在训练集中,无法得知领域级分布)。
先前关于数据归因的工作关注特定样本的影响,而非恢复整体配方。
缺口在于:没有原则性方法仅从黑盒模型输出就能估计”哪些领域、各占多少比例”。
问题:闭源大模型隐藏预训练混合配方
|
v
假设:生成文本携带领域指纹
(标签漂移:测试分布与训练分布不同)
|
v
方法:LLMSurgeon
- 在参考语料上训练领域分类器
- 估计软混淆矩阵(领域间如何混淆)
- 求解约束逆问题恢复混合比例
|
v
证据:LLMScan 基准(开源模型,已知配方)
|
v
结论:恢复领域比例误差 <5%
(固定协议、预定义分类法下)
增量
一句话:之前审计大模型训练数据需要访问语料本身;
之后可以仅通过生成文本用校准后的逆推断估计领域级组成。
核心机制
LLMSurgeon 分三个阶段。
第一阶段,在有已知领域标签的参考语料(如维基百科、GitHub、书籍)上训练领域分类器。
这个分类器学会将文本映射到领域概率。
第二阶段,从目标大模型生成文本并通过分类器。
但不要直接平均预测结果——分类器会犯系统性错误(把法律文本误判为新闻,把代码注释误判为文档)。
第三阶段,估计软混淆矩阵:对每个真实领域,分类器会预测什么?
然后求解逆问题:给定观察到的分类器输出和混淆矩阵,什么输入混合会产生这些输出?
加上约束(比例和为1,非负)并通过凸优化求解。
参考语料 目标大模型
(有标签领域) (黑盒)
| |
v v
分类器 <---------- 生成文本
| |
+-------------------+
|
v
混淆矩阵 C:
C[i,j] = P(预测 j | 真实领域 i)
|
v
逆问题:
观察值 = C * 混合比例
求解混合比例(约束优化)
|
v
估计的领域比例
把它想象成通过品尝结果来逆向工程冰沙配方。
你有一个在纯原料(草莓、香蕉、菠菜)上训练的”风味分类器”。
你品尝神秘冰沙,分类器说”60%草莓、30%香蕉、10%菠菜”。
但你知道分类器有20%的时间会把香蕉误判为芒果,有30%的时间把菠菜误判为羽衣甘蓝。
所以你建立混淆表:当实际是香蕉时,分类器会说什么?
然后你反推:给定分类器品尝到的和它通常如何混淆,实际的原料配比是什么?
混淆矩阵是你的校准——它纠正分类器的系统性偏差。
没有它,你只能相信原始预测,配方就会错。
关键概念
- 标签漂移:测试分布(目标大模型生成的文本)与训练分布(参考语料)在类别比例上不同,但条件分布 P(文本|领域) 保持不变。
具体来说:如果目标大模型在40%代码上训练,而你的参考语料只有10%代码,领域比例漂移了,但”代码”长什么样没变。
这个假设让你可以用在一个混合比例上训练的分类器去推断另一个混合比例。
没有标签漂移假设,你需要分类器在与目标完全相同的混合比例上训练——对黑盒模型不可能。
- 软混淆矩阵:不是二元的”正确/错误”混淆矩阵,而是捕获每个真实领域的分类器预测的完整概率分布。
条目 C[i,j] 是当真实领域为 i 时分类器预测领域 j 的概率。
通过在真实标签已知的保留参考数据上运行分类器来估计。
这个矩阵编码系统性偏差:也许分类器即使对纯代码样本也总是给”新闻”15%的概率。
逆问题使用这个矩阵来”撤销”分类器的扭曲并恢复真实混合比例。
- 约束逆问题:你观察到 y(生成文本上的分类器输出),你知道 C(混淆矩阵),你想找到 x(真实领域混合)使得 y = Cx。
但这是病态的——存在许多解。
加上约束:x 必须是概率分布(和为1,所有条目 ≥ 0)。
通过凸优化(二次规划)求解。
约束正则化解并确保它可解释为混合比例。
没有约束,你可能得到负比例或和为3的比例,这些都是无意义的。
框架转变
之前(主流方法): 之后(本文方法):
训练数据 生成文本
| |
v v
成员推断 领域分类器
(检测特定样本) (预测每个样本的领域)
| |
v v
二元:在/不在训练集 聚合预测
|
v
混淆矩阵
(校准偏差)
|
v
逆问题
(恢复混合比例)
|
v
领域比例
从检测单个数据点到估计总体级组成,核心转变是将模型视为其训练分布的噪声传感器,而非成员判定预言机。
专家评审
选题眼光:真实缺口。
数据透明度是活跃议题(诉讼、监管、科学可重复性)。
先前关于数据归因的工作关注样本级影响,而非混合恢复。
将其框定为标签漂移下的逆问题是有原则的,非临时拼凑。
处于模型审计和分布漂移的交叉点——两者都是活跃领域。
方法成熟度:混淆矩阵校准的巧妙运用。
标签漂移假设很强但对领域级分析合理(领域稳定,比例变化)。
潜在弱点:依赖预定义分类法和参考语料质量。
如果你的分类法与目标不匹配(例如目标有”医学”但你的参考把它归入”科学”),你会得到垃圾结果。
方法的好坏取决于分类器和混淆矩阵估计。
没有与更简单基线的比较,比如不校准直接平均分类器输出——看到增量会很有用。
实验诚意:LLMScan 是扎实贡献——有公开混合比例的开源模型让你验证真值。
但所有实验使用在相似数据分布(CommonCrawl、GitHub、书籍)上训练的模型。
如果模型在专有数据(如企业文档、非英语网络)上训练会怎样?
论文没有测试对分类法不匹配或对抗性生成的鲁棒性(如果目标大模型故意混淆其混合比例怎么办?)。
报告了误差条但没有统计显著性检验。
基线很弱——主要是自己方法的消融,而非竞争方法。
写作功力:动机和方法描述清晰。
混淆矩阵解释可以收紧——引入较晚,读者需要回溯。
第4.3节(LLMScan构建)感觉像补充材料,打断流程。
相关工作部分详尽但读起来像文献堆砌。
如果重写聚焦概念谱系(标签漂移 → 逆问题 → 数据审计),会提升框架。
判决:弱接收 — 扎实的方法和有用的基准,但评估范围有限且假设强,降低了影响力。
需要在多样化模型和分类法上压力测试。
要点总结
实践者可以偷走校准思想:如果你在聚合分类器预测来估计分布,不要相信原始输出——在保留数据上估计混淆矩阵并求解逆问题。
这适用于大模型之外:任何时候你从噪声观察推断潜在混合(例如从行为日志估计用户人口统计,推断推荐流中的内容来源)。
标签漂移框架也可移植——如果你相信条件分布稳定但类别比例变化,你可以在分布漂移间适配分类器而无需重新训练。
具体技术:使用带单纯形约束(非负、和为一)的凸优化来正则化混合恢复。
LLMScan 基准对任何从事数据溯源或模型审计的人立即有用。