Model Equality Testing: Which Model Is This API Serving? A statistical test built on Maximum Mean Discrepancy with a simple string kernel detected output-distribution changes in 11 of 31 commercial inference API endpoints serving four Llama models, according to an arXiv paper by Irena Gao and coauthors (v2 revised 8 April 2025). The test, which the authors call Model Equality Testing, achieved a median of 77.4% power against a range of distortions including quantization, watermarking and finetuning, using an average of just 10 samples per prompt. The work matters because API providers can alter the underlying model without notifying users, and the method gives users a way to check whether an endpoint serves the reference weights Meta released. Computer Science Machine Learning Submitted on 26 Oct 2024 v1 https://arxiv.org/abs/2410.20247v1 , last revised 8 Apr 2025 this version, v2 Title:Model Equality Testing: Which Model Is This API Serving? View PDF https://arxiv.org/pdf/2410.20247 HTML experimental https://arxiv.org/html/2410.20247v2 Abstract: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. Submission history From: Irena Gao view email https://arxiv.org/show-email/2476b84d/2410.20247 Sat, 26 Oct 2024 18:34:53 UTC 863 KB \ v1\ https://arxiv.org/abs/2410.20247v1 v2 Tue, 8 Apr 2025 20:19:26 UTC 869 KB Additional Features References & Citations Loading... Bibliographic and Citation Tools Bibliographic Explorer What is the Explorer? https://info.arxiv.org/labs/showcase.html arxiv-bibliographic-explorer Connected Papers What is Connected Papers? https://www.connectedpapers.com/about Litmaps What is Litmaps? https://www.litmaps.co/ scite Smart Citations What are Smart Citations? https://www.scite.ai/ Code, Data and Media Associated with this Article alphaXiv What is alphaXiv? https://alphaxiv.org/ CatalyzeX Code Finder for Papers What is CatalyzeX? https://www.catalyzex.com DagsHub What is DagsHub? https://dagshub.com/ Gotit.pub What is GotitPub? http://gotit.pub/faq Hugging Face What is Huggingface? https://huggingface.co/huggingface ScienceCast What is ScienceCast? https://sciencecast.org/welcome Demos Recommenders and Search Tools Influence Flower What are Influence Flowers? https://influencemap.cmlab.dev/ CORE Recommender What is CORE? https://core.ac.uk/services/recommender IArxiv Recommender What is IArxiv? https://iarxiv.org/about arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs https://info.arxiv.org/labs/index.html .