对黑盒LLM API进行基于排名的均匀性测试
Auditing Black-Box LLM APIs with a Rank-Based Uniformity Test
AI总结:
本文提出一种基于排名的均匀性测试方法,用于验证黑盒LLM与本地部署的模型行为一致性,有效检测API提供者可能的模型替换或篡改行为,具有高准确性和低查询成本。
摘要:
随着API成为访问大型语言模型(LLM)的主要接口,用户常常与提供有限透明度的黑盒系统交互。为了降低成本或恶意改变模型行为,API提供者可能隐秘地提供量化或微调的变体,这会降低性能并影响安全性。检测此类替换极具挑战性,因为用户无法访问模型权重,且大多数情况下也无法获取输出logits。为解决此问题,我们提出了一种基于排名的均匀性测试方法,用于验证黑盒LLM与本地部署的原始模型行为的一致性。我们的方法准确、查询高效且避免可检测的查询模式,使其对恶意提供者(在检测到测试尝试时重定向或混合响应)具有鲁棒性。我们评估了该方法在多种威胁场景下的表现,包括量化、有害微调、 jailbreak提示和完整模型替换,显示其在受限查询预算下始终优于先前方法的统计功效。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。