使用AI模型时经常有模型鉴定的需求,比如:
- 这段文字是不是AI模型生成的?
- 模型中转服务是不是真的调用了所声明的模型?
- 输出是不是来自于某一个特定权重的模型?
鉴定的方法有很多,以下列举其中三种:
Fingerprint所谓 fingerprint,就是模型本身不做任何处理,单纯依靠捕获模型的输出特征,来鉴定文本输出是否来自于某一个模型。比如:不同模型使用不同的 Tokenizer,token 计数不同;对同一个前缀,不同的模型有着不同的 logit分布;在 Tempature 为0的设置下,检查模型的确定性输出等等。
我用这些方法做了一个检测模型纯度的小测试集:
PureLLM - 测试AI中转站的纯度这种测试容易蒙混过关,特别是测试题公开的情形下,模型提供方完全可以伪装欺骗测试方。另外,这种指纹测试的精确度也存疑,一些模型的输出分布本身就比较接近,难以区分。
Watermark水印是在模型的输出端动了手脚,通过随机数种子来操控输出的分布。比较主流的方案是Google的 SynthID 技术。比如,Anthropic 的数字水印:
Claude 的文字水印,到底是什么原理?这种测试方案比较精准。但是,经过重度编辑的文本无法保留水印信号。另外,对于较确定的输出(程序、数学),水印的信号会非常稀疏,甚至完全消失。
Provable inferenceAnthropic 刚刚推出了 FlashProve,用密码学的证明来保证输出必定由一套固定的模型权重推理得出。这种方式叫做 provable inference:
https://www.anthropic.com/research/provable-inference对于任何的(提示词,输出),模型都可以提供一个 zkSNARK 证明,它可以承诺模型会在此提示下输出这些Token。验证端用这个证明,可以在几秒钟内用 CPU 检查结果,无需模型权重和 GPU。
FlashProve已经开源:https://github.com/anthropics/FlashProve
这个证明对编辑极其敏感,任何的改动都导致无法验证。
对比以下是Watermark和Provable Inference的对比,可见它们的应用场景完全不同:
SynthID-Text (watermarking)FlashProve (provable inference)Question answered“Was this text likely generated by a (watermarked) model?”“Was this exact output produced by these specific weights on this prompt?”MechanismBiases token sampling using a keyed pseudorandom function over recent context (tournament sampling), leaving a statistical signal in the textA cryptographic proof of the entire forward computation against a weight commitmentGuarantee typeStatistical and probabilistic: a detection score with false-positive and false-negative ratesCryptographic: soundness under hardness assumptionsEvidence lives inThe text itselfA separate proof artifact attached to the textRobustnessDegrades with paraphrasing, translation, heavy editing, and short texts; vulnerable to scrubbing and spoofing attemptsDoesn't degrade with edits, but any edit to the text invalidates the proof, and the proof isn't embedded in the textGranularityFamily or provider levelExact weights, pinned by the commitmentEffect on outputsPerturbs the sampling distribution (designed to be quality-neutral, but still a change)Doesn’t touch generation, though currently it requires greedy decoding on an integer modelCostNegligible at generation time, cheap detectionHeavy: ~70-95x GPU overhead, ~19 MB per proof, 1,024-token windowVerifier needsA secret or restricted key and a detectorPublic commitment, prompt, reply, and proof; no secrets
当前文章无评论,是时候发表评论了