Auditing Black-Box LLM APIs with a Rank-Based Uniformity Test

Xiaoyuan Zhu, Yaowen Ye, Tianyi Qiu, Hanlin Zhu, Sijun Tan +4 more
6/8/2025
cs.CRcs.AIcs.CL

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

As API access becomes a primary interface to large language models (LLMs), users often interact with black-box systems that offer little transparency into the deployed model. To reduce costs or maliciously alter model behaviors, API providers may discreetly serve quantized or fine-tuned variants, which can degrade performance and compromise safety. Detecting such substitutions is difficult, as users lack access to model weights and, in most cases, even output logits. To tackle this problem, we propose a rank-based uniformity test that can verify the behavioral equality of a black-box LLM to a locally deployed authentic model. Our method is accurate, query-efficient, and avoids detectable query patterns, making it robust to adversarial providers that reroute or mix responses upon the detection of testing attempts. We evaluate the approach across diverse threat scenarios, including quantization, harmful fine-tuning, jailbreak prompts, and full model substitution, showing that it consistently achieves superior statistical power over prior methods under constrained query budgets.

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. 5 weaker matches are hidden by default — 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{zhu2025auditing,
  title  = {Auditing Black-Box LLM APIs with a Rank-Based Uniformity Test},
  author = {Xiaoyuan Zhu and Yaowen Ye and Tianyi Qiu and Hanlin Zhu and Sijun Tan and Ajraf Mannan and Jonathan Michala and Raluca Ada Popa and Willie Neiswanger},
  year   = {2025},
  eprint = {2506.06975},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.06975v3}
}

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/2506.06975.svg)](https://codeofpaper.com/paper/2506.06975)

Discussion