API-TAIL: Detecting Model Substitution in LLM APIs through Temperature-Aligned Likelihood Tails

Haocheng Mei, Yuchuan Tian, Ye Yuan, Chao Xu, Allen Chen +2 more
10/27/2026
cs.LGcs.CL

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mei2026apitail,
  title  = {API-TAIL: Detecting Model Substitution in LLM APIs through Temperature-Aligned Likelihood Tails},
  author = {Haocheng Mei and Yuchuan Tian and Ye Yuan and Chao Xu and Allen Chen and Kai Han and Yunhe Wang},
  year   = {2026},
  eprint = {2610.36801},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.36801v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.36801.svg)](https://codeofpaper.com/paper/2610.36801)

Discussion