为大模型API设计非侵入式证明机制,确保返回结果真实对应请求。
AEX: Non-Intrusive Multi-Hop Attestation and Provenance for LLM APIs
- 在现有JSON API上添加签名证明层,绑定请求与输出
- 支持流式输出和中间件转发,区分原始流与重写输出
- 适合需验证API响应真实性的开发者与审计人员
托管的大语言模型通过远程API被广泛使用,但API边界难以提供返回结果确实对应客户端请求的直接证据。近期对影子API的审计发现,非官方或中间接口可能偏离声称行为。现有方法如指纹识别、模型等价性测试、可验证推理和可信执行环境(TEE)证明,要么是推断性结论,要么回答不同问题。本文提出AEX,一种针对现有基于JSON的LLM API的非侵入式证明扩展。AEX保持请求、响应、工具调用、流式传输和错误语义不变,仅在顶层新增一个签名的证明对象,将客户端可见的请求投影与完整响应对象或已承诺的流式输出绑定。为支持实际部署,AEX提供显式的请求绑定模式、受信中介的请求转换收据,以及受信输出重写时的源-输出/输出转换收据。对于流式场景,它将未经修改的源流前缀校验与已重写、缓冲、聚合或重新打包的完整输出溯源分离,防止重写输出被误认为源流前缀。因此,AEX作出明确且有限的声明:可信颁发者在API边界处证明特定请求-输出关系或特定完整输出溯源链。我们提出了协议设计、威胁模型、验证状态机、安全与隐私分析,并实现了与OpenAI兼容的聊天补全配置文件,以及一个参考型TypeScript原型,包含本地合规性测试和微基准测试。
原文摘要 · Abstract (English)
Hosted large language models are increasingly accessed through remote APIs, but the API boundary still offers little direct evidence that a returned output actually corresponds to the client-visible request. Recent audits of shadow APIs show that unofficial or intermediary endpoints can diverge from claimed behavior, while existing approaches such as fingerprinting, model-equality testing, verifiable inference, and TEE attestation either remain inferential or answer different questions. We propose AEX, a non-intrusive attestation extension for existing JSON-based LLM APIs. AEX preserves request, response, tool-calling, streaming, and error semantics, and instead adds a signed top-level attestation object that binds a client-visible request projection to either a complete response object or a committed streaming output. To support realistic deployments, AEX provides explicit request-binding modes, signed request-transform receipts for trusted intermediaries, and source-output / output-transform receipts for trusted output rewriting. For streaming, it separates checkpoint proofs for verified prefixes of an unmodified source stream from complete-output lineage for outputs that have been rewritten, buffered, aggregated, or re-packaged, preventing transformed outputs from being mistaken for source-stream prefixes. AEX therefore makes a deliberately narrow claim: a trusted issuer attests to a specific request-output relation, or to a specific complete-output lineage, at the API boundary. We present the protocol design, threat model, verification state machine, security and privacy analysis, an OpenAI-compatible chat-completions profile, and a reference TypeScript prototype with local conformance tests and microbenchmarks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。