arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2607.01313cs.LGcs.AIcs.CLcs.CR
收藏

受限API访问下LLM架构属性的黑盒推断

Black-Box Inference of LLM Architectural Properties with Restrictive API Access

Carnegie Mellon University(卡内基梅隆大学);Pittsburgh Supercomputing Center(匹兹堡超级计算中心)

Christopher Ellis, Shreyas Chaudhari, Mei-Yu Wang, Leighton Barnes, Giulia Fanti, José M. F. Moura

AI总结:

针对当前商业LLM API仅返回单logit且禁止logit偏置的限制,提出NightVision方法,通过新型公共集提示技术和首令牌时间测量,估计隐藏维度、深度和参数数量,在32个开源模型上验证了可行性。

摘要:

实际上,大多数商业LLM提供商不会公开发布底层LLM架构的细节。然而,先前的研究表明,在给定对LLM的有限API访问(即top-$k$ logits和/或logit偏置函数)的情况下,可以恢复LLM的某些架构细节,如前馈网络的隐藏维度。也许是为了回应这些结果,大多数商业LLM提供商已将其API限制为仅暴露每个解码令牌的单个logit,并且不再允许用户对logits进行偏置。我们证明,即使在当前受限的API下,几个架构参数仍然可以恢复。我们提出了NightVision,一种使用受限黑盒API访问来估计LLM的隐藏维度、深度和参数数量的攻击方法。在算法上,NightVision依赖于一种新颖的公共集提示技术,其中多个提示暴露同一组输出令牌的log概率;对这些结果进行谱分析以推断隐藏维度。NightVision还使用端到端的首令牌时间(TTFT)测量和估计的隐藏维度来估计深度和参数数量。我们在32个开源LLM上对NightVision进行了实证评估,所有模型的隐藏维度平均相对误差在23%以内(MoE模型为9%),对于超过30亿参数的模型,深度和参数数量的误差在53%以内。我们进行了广泛的消融实验,以证明这些精度如何随令牌预算和模型属性变化。总体而言,我们的结果表明,当前的LLM API不足以完全混淆其底层模型的架构细节。

英文摘要:

In practice, most commercial LLM providers do not publicly release details of underlying LLM architectures. However, prior work has shown that given limited API access to an LLM (namely, top-$k$ logits and/or a logit bias function), one can recover certain architectural details of an LLM, such as the hidden dimension of the feed-forward network. Perhaps in response to these results, most commercial LLM providers have restricted their APIs to expose only the single logit for each decoded token, and they no longer give users the ability to bias logits. We show that even under current restrictive APIs, several architectural parameters are still recoverable. We present NightVision, an attack that uses restrictive black-box API access to estimate the hidden dimension, depth, and parameter count of an LLM. Algorithmically, NightVision relies on a novel common set prompting technique in which multiple prompts expose log probabilities for the same set of output tokens; a spectral analysis of these results is used to infer hidden dimension. NightVision additionally uses end-to-end time to first token (TTFT) measurements and the estimated hidden dimension to estimate depth and parameter count. We empirically evaluate NightVision on 32 open-source LLMs, recovering hidden dimension to within 23% average relative error across all models (9% on MoE models), and depth and parameter count to within 53% for models exceeding three billion parameters. We run extensive ablations to demonstrate how these accuracies scale with token budget and model properties. Overall, our results suggest that current LLM APIs are not sufficiently restricted to fully obfuscate the architectural details of their underlying models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑