模型等价性检验:这个API正在服务哪个模型?
Model Equality Testing: Which Model Is This API Serving?
AI总结:
本文提出模型等价性检验方法,利用最大均值差异和字符串核,以极少样本检测黑盒API是否对模型进行了量化、微调等未告知的改动,并在Llama商业API中发现11/31个端点与官方权重分布不一致。
摘要:
用户通常通过黑盒推理API与大型语言模型交互,无论是闭源模型还是开放权重模型(例如,Llama模型广泛通过Amazon Bedrock和Azure AI Studio访问)。为了降低成本或增加功能,API提供商可能会对底层模型进行量化、添加水印或微调,从而改变输出分布——且可能不通知用户。我们将检测此类失真形式化为模型等价性检验,这是一个双样本检验问题,其中用户从API和参考分布中收集样本,并进行统计检验以判断两个分布是否相同。我们发现基于分布间最大均值差异(Maximum Mean Discrepancy)的检验方法在此任务上表现强大:基于简单字符串核构建的检验在多种失真情况下达到了77.4%的中位检验功效,每个提示平均仅使用10个样本。随后,我们将该检验应用于2024年夏季针对四个Llama模型的商业推理API,发现31个端点中有11个所提供的分布与Meta发布的参考权重不同。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。