API-TAIL: Detecting Model Substitution in LLM APIs through Temperature-Aligned Likelihood Tails
Haocheng Mei, Yuchuan Tian, Ye Yuan, Chao Xu, Allen Chen, Kai Han, Yunhe Wang
Key points
From the paper's conclusion- Evaluated on real-world commercial APIs, API-TAIL reliably controls false alarms across diverse honest providers while detecting even low-rate partial substitution with a small query budget, substantially outperforming existing rank- and MMD-based audits that lose detection power under the same composite calibration.
Abstract
Commercial language model APIs return only text, allowing a provider to cut costs by quietly routing a fraction of user requests to a cheaper substitute model while billing for the advertised one. Detecting such partial substitution is challenging because honest providers also alter the output distribution through undocumented decoding and serving choices, such as temperature scaling, sampling truncation, repetition and presence penalties, and default system prompts, forcing an audit to test against a composite null of legitimate configurations rather than a single reference. Our key insight is that these legitimate variations primarily shift response typicality across the entire batch, whereas partial substitution injects individual responses that remain anomalous under the claimed model. Building on this, we introduce API-TAIL, a typicality audit that first absorbs batch-level shifts by aligning a single effective temperature to center standardized surprisal scores across the audited batch, and then flags the endpoint if the number of remaining tail responses exceeds a threshold calibrated across legitimate configurations. Evaluated on real-world commercial APIs, API-TAIL reliably controls false alarms across diverse honest providers while detecting even low-rate partial substitution with a small query budget, substantially outperforming existing rank- and MMD-based audits that lose detection power under the same composite calibration.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- AgentProv: Auditing Agentic LLM API Providers via Tool-use Policy ProbesarXiv · 2026
- Is Your LLM Relay Serving What It Claims? A low-cost and high-power test for LLM Relay AuditingarXiv · 2026
- Auditor-Assisted Summary-Channel Verification for Hosted LLM Identity SubstitutionarXiv · 2026
- Contagious Fingerprints: When LLMs Inherit Another Model's IdentityarXiv · 2026
- What the Middleman Delivers: Answer Behavior, Tool Permissions, and Billed Usage in LLM API RelaysarXiv · 2026
- ReplayAudit: Auditing Outsourced LLM Fine-Tuning via Sealed Records and Selective ReplayarXiv · 2026