atlas

Research map / Large language models / Language, safety and interpretability

Model Equality Testing: Which Model is this API Serving?

ICLR 2025 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Formalizes auditing black-box LLM inference APIs as two-sample Model Equality Testing and shows an MMD test with a Hamming string kernel is the most sample-efficient, then uses it to flag 11 of 31 Llama endpoints from Summer 2024.

Problem

Users of black-box LLM inference APIs cannot tell whether providers have silently altered the model (quantization, watermarking, finetuning, substitution) or whether endpoints drift over time; greedy short-answer audits do not capture the full output distribution.

Approach

Frame API auditing as a two-sample hypothesis test between reference and API completion distributions, and use an MMD test with a simple prompt-conditioned Hamming kernel over completions, which is more sample-efficient than universal kernels (all-substrings, one-hot) and multinomial tests.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use the Hamming string kernel instead of the other tested two-sample testsMMD equality testing · Wikipedia task, quantization and watermarkingpower: 77.4\% median powerHelped
Use the Hamming kernel rather than one-hot and traditional two-sample testsMMD equality testing · Longer completion lengthspowerHelped
Use the Hamming kernel rather than the all-substrings kernelMMD equality testing · Quantization and watermarkingsample efficiencyMixed
Use the Hamming kernel rather than the Levenshtein kernelMMD equality testing · Quantization and watermarkingpowerHelped
Compare models in character spaceHamming MMD model-swap test · Wikipedia task, model swapspower: 100\% power for all swaps except within-family pairsHelped
Finetune Llama-3 8B Instruct for one epochLlama-3 8B Instruct · Wikipedia taskpower to detect finetuning: 42 optimization stepsHelped
Finetune on an out-of-distribution code datasetLlama-3 8B Instruct · Wikipedia taskdetectability of distribution shiftHelped
Serve commercial API endpoints instead of the Meta reference weightsLlama API endpoints · Wikipedia, HumanEval, and UltraChatflagged endpoints: 11 out of 31Mixed
Compare the API to both full-precision and fp16 reference distributionsComposite API audit · Commercial Llama API auditspowerHurt
Use character-space testing rather than token-space testingHamming MMD · Quantization and watermarkingpowerHurt
Use the Hamming kernel for fp16 quantization detectionMMD equality testing · fp16 versus fp32powerHurt
Use the Hamming kernel to detect watermarkingMMD equality testing · Llama-3.1 8Bpower: 0.62 (0.04)Mixed

Surprising findings

Limitations

Experimental setup

Datasets: Wikipedia continuation prompts HumanEval UltraChat

Benchmarks: Wikipedia continuation task HumanEval UltraChat

Metrics: statistical power false positive rate MMD estimate task accuracy correlation (R^2) rejection rate per endpoint

Baselines: all-substrings kernel MMD one-hot kernel MMD L1 multinomial test chi-squared multinomial test Levenshtein MMD

Builds on: maximum mean discrepancy two-sample test all-substrings kernel multinomial two-sample tests

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy