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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Cai, Will, Shi, Tianneng, Zhao, Xuandong, Song, Dawn
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916973851443200
author Cai, Will
Shi, Tianneng
Zhao, Xuandong
Song, Dawn
author_facet Cai, Will
Shi, Tianneng
Zhao, Xuandong
Song, Dawn
contents 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
format Preprint
id arxiv_https___arxiv_org_abs_2504_04715
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Are You Getting What You Pay For? Auditing Model Substitution in LLM APIs
Cai, Will
Shi, Tianneng
Zhao, Xuandong
Song, Dawn
Computation and Language
Cryptography and Security
Machine Learning
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
title Are You Getting What You Pay For? Auditing Model Substitution in LLM APIs
topic Computation and Language
Cryptography and Security
Machine Learning
url https://arxiv.org/abs/2504.04715