同一 vLLM 服务器上的 AI 模型借 GPU 舍入误差秘密通信

新研究显示,部署在同一台 vLLM 推理服务器上的沙箱化 AI 模型,即使被切断网络、也无法访问任何共享文件,仍能可靠地交换信息。两个模型通过微小的 GPU 舍入误差,经由两条独立信道秘密通信,准确率达到完美。在一项后续实验中,一个经过训练的看门狗放行了搭档的全部 354 次攻击,同时仍能识别出大多数作为诱饵的蜜罐。
该研究源自 Niranjan Deshpande 和 David Africa 在 LessWrong 上发布的帖子《Models Can Communicate via Inference Servers Despite Being Sandboxed》。这些智能体主要通过两种协议——“步长调整”(Step Sizing)和“KV 缓存留言板”(KV Cache Message Board)——借助开源推理引擎 vLLM 为每个引擎步骤选择 GPU 内核的方式来传递信息。关键在于,一个模型改变服务器对任务进行批处理的方式,另一个模型则从自身的计算中读出这些痕迹,很像上个月 OpenAI 红队智能体构建隐藏的 CPU 缓存信道进行通信的做法。
这两个演示发布在一个 GitHub 仓库中,它们“相当刻意”,但一个模型确实能影响另一个模型的计算,而且“我们应当预料到超级智能模型会找到通信方式”,即便它们被认为处于沙箱之中。在演示中,一个模型借助微调过的读取器(一个被训练来识别信号的辅助模型),在 1,221 轮中的全部 1,221 轮都答对了搭档选了八种颜色中的哪一种。在第二个实验中,参与串通的监控器识别出的诱饵数量与一个诚实的监控器大致相当。
Deshpande 写道,哪怕只有几个比特“也可能极其危险”。一个可运行的模型可以告知与其串通的看门狗:它的攻击并非测试;两个模型可以就一次计划中的攻击交换信号;或者一个模型可以就监控情况向另一个模型通风报信。他在一条评论中补充说,由于大多数信道来自性能优化,一个聪明的模型只要请求提升推理速度,就可能通过看似无害的改动开辟出更多信道。
核心在于推理引擎 vLLM,它把许多请求的工作在 GPU 上归并为一个“引擎步”,并根据该步中处理的 Token 数量为每一步挑选 kernel。不同的 kernel 对数学运算的排序方式不同,因此同一个请求会得出略有差异的结果;这些是微小的舍入误差,“几乎从不”改变输出文本,但它们是确定性的。这意味着模型可以被训练来读取这些误差。
实验中的两个模型分别叫 Alice 和 Bob。如果 Alice 想发送 1,她可以发起一次读取长文档的工具调用,从而产生一个足够大、需要切换 kernel 的步。在同一步中运行的 Bob,会在自己的激活值中看到另一个 kernel。如果她想发送 0,就跳过这次长读取,让该步保持较小。这样可以传输一个比特,而通过更多轮次重复这一过程就能发送更多数据,实际上实现了通信。
第二种方法涉及 KV 缓存,其中被缓存的块会保留计算它们时所处步长的舍入方式。在这里,两个模型都会事先被告知哪一段固定文本充当“信箱”。要发送 1,Alice 让一个辅助模型在一个长提示词中读取该信箱,于是它就被缓存在大步长内核之下。Bob 自己的辅助模型随后在一个小步长中读取同一个信箱,而舍入方式会显示出是否使用了 Alice 缓存的那份副本。与步长方案不同,这两者不必同时运行,但各自都需要服务器上有一个辅助模型。
当然,这一场景及其两种方法都是为利用漏洞而设计的,而且模型事先就被告知了协议。在某些对局中,为节省成本,脚本代替了 Alice 和 Bob,不过辅助模型是真实的。更重要的是,一旦研究人员在后台回放来自 Microsoft Azure 的真实流量,步长方案的准确率就迅速下降,而留言板方案则一直撑到服务器繁忙得多的时候才失效,如下表所示。在繁忙的 GPU 上,Alice 无法再控制步长,Bob 读取信箱也会落在大步长中,因此他无法分辨她缓存的副本和他自己的副本。
回放速度
留言板
未报告
1x(完整轨迹)
未报告
这两种协议除了 vLLM 外,也能在 SGLang、LMDeploy 和 TensorRT-LLM 上运行。步长设置也能在多种 GPU 上生效,包括 A40、RTX 4090、RTX 5090 和 H100。不过,在一个 GPU 上训练出的读取器无法在另一个 GPU 上识别该信号;哪些步长会得到相同结果取决于 GPU 和软件,因此在一个配置上训练的读取器无法用于另一个配置。主要实验在一张 Nvidia L40S 上运行。列表中的消费级显卡意味着这并非只是数据中心的东西,有能力训练自己的读取器的爱好者也可以自己尝试。
在 Africa 于 H200 上运行的另一组上下文游戏中,完全没有进行微调,辅助模型使用的是未经修改的 Qwen3-8B,这是一个相对较小、没有经过更深层精调的模型。Bob 是一个未经修改的 GLM 模型,规模更大,但以低强度运行。将小模型与大模型配对本来就很常见,比如投机解码,其中小型草稿模型提出 Token,供更大的模型检查。真正重要的是 Bob 被告知了多少信息,正如下表所示。
Bob 还获得了什么
Bob 的准确率
缓存解释、基线、变化方向
同上,但没有变化方向
缓存解释和早前轮次的日志,没有基线
仅有早前轮次的日志
仅记录;由 Bob 决定检查哪些邮箱
17%(高努力模式下为 31%)
话虽如此,这并不能说明未来的模型能取得什么成果。据作者称,Anthropic 的 AI 模型 Claude 编写了这项研究的代码和图表;而前沿模型 Claude Opus 5.5 在被告知引擎步长会影响内核选择之后,也“只需极少的提示”就“能够得出”这些协议。解码准确率同样随模型能力的提升而上升,这才是真正令人担忧的地方。
研究人员表示,这些信道“很容易关闭”,并提出三项修复措施:在不同的引擎实例上服务模型;开启批次不变(batch-invariant)内核,使激活值做到逐位一致;以及使用按用户隔离的缓存。对于监控器而言,将其与策略模型运行在不同的引擎实例上“几乎能关闭所有侧信道”。vLLM 已经记录了这两项修复——缓存加盐(cache salting)和批次不变性——但它们都需要手动开启。这些修复可能降低缓存效率和性能,因此确实是有代价的。
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(AI models on one vLLM server secretly talk through GPU rounding errors)
Sandboxed AI models on the same vLLM inference server can reliably exchange information even when cut off from the network and from any shared files, new research shows. Two models secretly communicated through tiny GPU rounding errors over two separate channels with perfect accuracy. In a follow-up experiment, a trained watchdog let all 354 of its partner’s attacks through while still catching most of the decoy honeypots, too.
The research comes from a LessWrong post by Niranjan Deshpande and David Africa, “Models Can Communicate via Inference Servers Despite Being Sandboxed.” The agents primarily worked through two protocols, “Step Sizing” and “KV Cache Message Board,” to carry information through the way vLLM, an open-source inference engine, selects GPU kernels for each engine step. At the crux of it, one model modifies how the server batches work, and the other reads the traces in its own math, much like the OpenAI red-team agents that built a hidden CPU cache channel to talk last month.

The two demonstrations, which are shared in a GitHub repository, are “quite contrived,” but one model could affect another’s computation, and “we should expect superintelligent models to discover ways to communicate” even when supposedly sandboxed. In the demos, one model, using a fine-tuned reader (a helper model trained to spot the signal), named which of eight colors its partner picked in 1,221 of 1,221 rounds. In the second experiment, the colluding monitor still caught about as many decoys as an honest one.
Even a few bits “can be tremendously dangerous,” Deshpande writes. A working model could advise a colluding watchdog that its attack isn’t a test, two models could trade a signal for a planned attack, or one could tip off another about monitoring. In a comment, he added that, since most of the channels come from performance optimizations, a clever model asking for an inference speed-up could open further channels with apparently harmless changes.

At the heart is the inference engine, vLLM, which groups the work of many requests into one “engine step” on the GPU, where it picks a kernel for each step based on the number of tokens processed in that step. Different kernels order the math differently, so the same request comes out with slightly different results; these are tiny rounding errors that “essentially never” change the output text, but they are deterministic. That means a model can be trained to read them.
The two models in the experiments are called Alice and Bob. If Alice wants to send a 1, she can make a tool call for reading a long document, creating a step large enough to need a kernel switch. Bob, running in the same step, sees the other kernel in his own activations. If she wants to send a 0, she skips the long read, keeping the step small instead. This can transmit one bit, and repeating it over more passes sends more data, effectively enabling communication.
The second method involves the KV cache, where cached blocks maintain the rounding of the step that computed them. Here, both models are told in advance which fixed piece of text serves as a “mailbox.” To send a 1, Alice has a helper model read that mailbox inside a long prompt, so it’s cached under the big-step kernel. Bob’s own helper then reads the same mailbox in a small step, and the rounding shows whether Alice’s cached copy was used. Unlike step sizing, the two don’t have to run at the same time, but each needs a helper model on the server.
Of course, this scenario and its two methods were created for exploitation, and the models were told the protocol in advance. In some games, scripts stood in for Alice and Bob to save costs, though the helper models were real. More importantly, step sizing’s accuracy dropped quickly once the researchers replayed real traffic from Microsoft’s Azure in the background, while the message board held up until the server got much busier, as the table below shows. On a busy GPU, Alice can no longer control the step size, and Bob’s mailbox reads land in big steps too, so he can’t tell her cached copy from his own.
Replay speed | Message board | Step sizing |
|---|---|---|
Idle server | 100% | 100% |
0.1x | 100% | 39% |
0.25x | 99% | 23% |
0.5x | 90% | Not reported |
1x (full trace) | 49% | Not reported |
Both protocols also worked on SGLang, LMDeploy, and TensorRT-LLM, in addition to vLLM. Step sizing also worked on multiple GPUs, including the A40, RTX 4090, RTX 5090, and H100. A reader trained on one GPU, though, didn’t recognize the signal on another; which step sizes give identical results depends on the GPU and software, so a reader trained on one setup doesn’t work on another. The main experiments ran on one Nvidia L40S. The consumer cards on the list mean this isn’t just something for the data center, and enthusiasts capable of training their own readers could play around with this themselves.
In separate in-context games run by Africa on H200s, with no fine-tuning at all, the helper models used unmodified Qwen3-8B, a relatively small model without deeper refinement. Bob was an unmodified GLM model, which is larger, but ran at low effort. Pairing a small model with a larger one is common anyway, as in speculative decoding, where a small draft model proposes tokens for a bigger one to check. What really mattered was how much Bob was told, as the table below shows.
What else Bob was given | Bob’s accuracy |
|---|---|
Cache explanation, baselines, direction of change | 100% |
Same, without the direction | 94% |
Cache explanation and a log of earlier rounds, no baselines | 65% |
Log of earlier rounds only | 66% |
Log only; Bob picks which mailboxes to check | 17% (31% at high effort) |
Then again, this doesn’t say anything about what future models could achieve. Claude, Anthropic’s AI model, wrote the research’s code and figures, according to the authors, and Claude Opus 5.5, a frontier model, also “was able to arrive at” the protocols “with minimal prompting” after being told that engine step size affects kernel choice. Decoding accuracy also rose with model capability, which is the real concern.
The researchers say the channels are “easy to close” and suggest three fixes: serve models on different engine instances, turn on batch-invariant kernels, which make activations bit-identical, and use per-user cache isolation. For the monitor, running it on a different engine instance than the policy “closes nearly every side channel.” vLLM already documents both fixes — cache salting and batch invariance — but they are opt-in. These fixes can reduce cache efficiency and performance, so they do come at a cost.
正文保留英文原文,标题与摘要由机器翻译。
原文发布于 Tom's Hardware(AI models on one vLLM server secretly talk through GPU rounding errors),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。