arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.04715cs.CLcs.CRcs.LG
收藏

你得到所付费的东西了吗?审计 LLM API 中的模型替换

Are You Getting What You Pay For? Auditing Model Substitution in LLM APIs

University of California, Berkeley(加州大学伯克利分校)

Will Cai, Tianneng Shi, Xuandong Zhao, Dawn Song

AI总结:

该研究形式化 LLM API 的暗中模型替换问题,评估发现纯软件检测不可靠,并提出用 TEEs 以较低开销提供模型完整性的密码学保证。

摘要:

商业大语言模型(LLM)API带来了一个根本性的信任问题:用户为特定模型付费,却无法保证服务提供商会忠实地交付这些模型。提供商可能会暗中替换为更便宜的替代方案(例如量化版本、较小模型),以降低成本,同时维持广告宣传的价格。我们将这种模型替换问题形式化,并在现实的对抗条件下系统评估检测方法。我们的实证分析表明,仅依赖软件的方法从根本上不可靠:对文本输出进行统计检验需要大量查询,并且在面对细微替换时会失效;而使用对数概率的方法会被生产环境中固有的推理非确定性击败。我们认为,借助硬件级安全可以更有效地弥合这一验证缺口。我们提出并评估使用可信执行环境(TEEs)作为一种实用且稳健的解决方案。研究结果表明,TEEs能够为模型完整性提供可证明的密码学保证,并且只带来适度的性能开销,从而提供一条清晰、可执行的路径,确保用户得到他们所付费的东西。代码可在 https://github.com/sunblaze-ucb/llm-api-audit 获取。

英文摘要:

Commercial Large Language Model (LLM) APIs create a fundamental trust problem: users pay for specific models but have no guarantee that providers deliver them faithfully. Providers may covertly substitute cheaper alternatives (e.g., quantized versions, smaller models) to reduce costs while maintaining advertised pricing. We formalize this model substitution problem and systematically evaluate detection methods under realistic adversarial conditions. Our empirical analysis reveals that software-only methods are fundamentally unreliable: statistical tests on text outputs are query-intensive and fail against subtle substitutions, while methods using log probabilities are defeated by inherent inference nondeterminism in production environments. We argue that this verification gap can be more effectively closed with hardware-level security. We propose and evaluate the use of Trusted Execution Environments (TEEs) as one practical and robust solution. Our findings demonstrate that TEEs can provide provable cryptographic guarantees of model integrity with only a modest performance overhead, offering a clear and actionable path to ensure users get what they pay for. Code is available at https://github.com/sunblaze-ucb/llm-api-audit

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑