Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Model Equality Testing: Which Model Is This API Serving?

About

Users often interact with large language models through black-box inference APIs, both for closed- and open-weight models (e.g., Llama models are popularly accessed via Amazon Bedrock and Azure AI Studio). In order to cut costs or add functionality, API providers may quantize, watermark, or finetune the underlying model, changing the output distribution -- possibly without notifying users. We formalize detecting such distortions as Model Equality Testing, a two-sample testing problem, where the user collects samples from the API and a reference distribution and conducts a statistical test to see if the two distributions are the same. We find that tests based on the Maximum Mean Discrepancy between distributions are powerful for this task: a test built on a simple string kernel achieves a median of 77.4% power against a range of distortions, using an average of just 10 samples per prompt. We then apply this test to commercial inference APIs from Summer 2024 for four Llama models, finding that 11 out of 31 endpoints serve different distributions than reference weights released by Meta.

Irena Gao, Percy Liang, Carlos Guestrin• 2024

Related benchmarks

TaskDatasetResultRank
Quantization DetectionMATH
AUC0.468
18
Quantization DetectionWildChat
Statistical Power AUC62.5
18
Jail-breaking detectionWildChat
AUC (Statistical Power)0.816
18
LLM black-box fingerprintingLLM instances
Query Efficiency (Verification)500
12
Conversational FingerprintingCovert Conversational Fingerprinting (test)
AUC60.4
10
Watermarking DetectionMistral-7B
AUC0.8744
7
Watermarking DetectionQwen 7B 2.5
AUC71.45
7
Watermarking DetectionDeepSeek-7B
AUC48.87
7
Watermarking DetectionQwen 14B 2.5
AUC0.4676
7
Behavioral Deviation DetectionAPI Providers Llama-3.2-3B, Mistral-7B, Gemma-2-9B--
7
Showing 10 of 12 rows

Other info

Follow for update