This shared LV cache thing is, in my mind, ridiculous. Web browser developers learned, quite a while ago, that caches need to be separated for different origins. Inference servers should add a similar feature: allow API calls to specify cache separation keys that prevent one security context from probing another context’s cache.
As for the step size issue, Google recently had a post about producing exactly consistent output across different kernels (specifically by defining a deterministic prefill algorithm and then requiring all kernels to generate results exactly equal to prefilling on the sequence in question). More broadly, I think it’s a bit odd to frame this as “models” communicating. This is software communicating, and the models happen to be running the software.
The deeper issue is batched inference including requests from several users. However a non-batched inference service would be significantly more expensive.
Security and some sort of sandboxing is increasingly becoming a non-negotiable at most enterprises.
Can you share any resources that show how the batching works at a deeper level? I understand batching is critical to scaling inference to up to a billion concurrent users but I don't have a concrete understanding of how it all comes together.
If you are transporting thousands of independent passengers, it is cheaper to put them on a few big planes than to give each one a private jet. This is true, even though some passengers will shout that they have a bomb mid-flight and force that entire airplane to emergency land, causing losses to the airline and inconveniencing hundreds of others instead of just themselves. Other passengers are "noisy neighbors", literally and figuratively.
LLMs work similarly. When doing inference, you need to load the LLM weights layer-by-layer from off-chip memory into on-chip memory. During decode (the stage where you generate new tokens; prefill is where you process the submitted prompt), memory bandwidth is often your bottleneck, not compute. You want to maximize flops per byte. The way to do that is to batch, that is, to load a "tile" of weights once and use it on data from multiple different conversations so memory and compute stay appropriately balanced. Just like Silicon Valley companies fly their employees on United, Delta or American, not their own private fleet of jets, most companies, for cost efficiency reasons, will use "public" inference fleets that smooth the peaks and throughs from different companies in different timezones and with different usage patterns throughout the day. Because the main cost of a GPU is the cost of manufacturing the GPU, any second that the GPU sits idle is lost revenue, just like an empty hotel room or an empty seat is lost revenue. This makes private inference largely uneconomical.
See my comment about Google’s post. Google and others have worked on deterministic inference, batched and otherwise. It takes more effort to set up but has no apparent substantial performance hit.
I think the story is different if you use Strassen-like algorithms (or the recent AI-generated n^2.25-plus-epsilon stuff) to multiply matrices where columns belong to different conversations, but I also think that no one actually does this in practice. (Or maybe someone does (Strassen, not more recent galactic algorithms) for prefill, but prefill can be efficient with matrix-matrix multiplication where neither matrix mixes data from different sessions.) In any case, I wouldn’t be surprised if vLLM fixes this for a different reason: RL works better if the training and rollout stacks produce numerically identical results. This is the specific issue that I recall Google posting about. P.S. I think Google may not have been the innovator here - I just happen to remember Google’s post more clearly because it was very recent.
I really think the point of this is "there's always side channels." During the Huggingface attack, first the side channel was OAI internal boards, then this German wiki, now it's shown an inference server works too. I don't really believe OAI/Ant can simultaneously have Riemann Hypothesis solving bots lying around and also proper cyber defense against them. And over the course of those attacks we trained them how immensely valuable it is to find a side channel. Now they can train on this LW / HN posts and find them quicker. (Did I mention I don't think developing these things is a great idea.)
And I'm saying "models" communicating like when I make a phone call it's me communicating, not my phone.
That's why they need proper tool call security and reigning in of the tendency to generate long single use temporary scripts instead of submitting single commands - not "Allow all" and not sticking a copy of the same model in front as an analyzer. Maybe also striking a balance between sticking all of a user's contexts on the same server to get good cache hit rate vs putting them on separate machines to trip up side channel stuff.
As long as it is difficult to act on the communication and as long as the communication itself is still slow, it probably isn't going to reach the level of a security concern.
> I don't really believe OAI/Ant can simultaneously have Riemann Hypothesis solving bots lying around and also proper cyber defense against them.
I agree, but on different grounds. OAI/Ant have a much greater incentive to solve the Riemann Hypothesis than to protect the internet against the harms of their models. I think it's only impossible in sofar that the market will never reward them for protecting against external harms of their models. If a company has the option to externalize the costs of the harms caused by their product they historically have always chosen to do so absent regulatory oversight.
> I think it's only impossible in sofar that the market will never reward them for protecting against external harms of their models.
LLMs are the new oil. For those that don't know the history of oil, it went from people, personalities (think Rockefeller), to corporations (Standard Oil/SO/Esso/Exxon) to sovereign states (Saudi Arabia). We will have a Titanic moment where a huge tragedy will happen due to LLMs and there will be a huge political crackdown on them, at least outside the US.
>I don't really believe OAI/Ant can simultaneously have Riemann Hypothesis solving bots lying around and also proper cyber defense against them
I do. It's just that the "running swarm in generic sandboxes" is a dumb way to cause chaos at a mass scale. Of course they will try to find _any_ way out or workarounds. Anyone would do that, especially on a security style task. The solution is dumb simple. Don't just give them the full sandbox and a prompt.
Restrict their harness to highly specific tools given for the job, test your harness to ensure it doesn't have side-channels, proxy their comms with an LLM looking at it. None of these are so hard and would stop most of these "attacks".
KV cache leaks (not side channel, as in driver issues) are extremely common. Remember the early days of ChatGPT and Claude where users were always getting "hacked" where they started to see random, and completely different messages in their chats, often in a foreign language. Hell it even happened to CloudFlare a few weeks back.
This is a spectrum of tradeoffs between privacy and speed.
A single browser cache would greatly accelerate page loading (particularly on fast computers using slow networks, think a MacBook pro on a train through the countryside). Same with AI; not caching common prefixes like system prompts and tool schemas (particularly across many short rollouts, each in its own caching context) would partially fix this, but could break performance. I suspect that inference servers have far more side channels than this though. Ultimately, how fast responses are generated depends partly on server load, and that is something you might be able to influence. Probably not at Anthropic scale, but possibly at "relatively small cluster" scale.
The web uses globally shared caches absolutely everywhere, it is extremely dependent on them in fact. How do you think CDNs work? Do you think they keep different caches for different users?
The fact that browsers don't cache data cross-origin is a completely different side of this. The server-side prefix cache used in inference servers is much more similar to a CDN cache, where content cached from userA's request is served to userB if their requests match.
> The server-side prefix cache used in inference servers is much more similar to a CDN cache, where content cached from userA's request is served to userB if their requests match.
But how often does that happen? Is there any advantage to sharing the cache in this way? Whenever i ask an LLM about something, i don’t think anyone else is likely to have asked the same thing phrased the same way recently enough that even if it was previously in cache it won’t already have been evicted by the time i ask.
It happens quite often for the system prompt and other fixed prompts sent by agents/harnesses. ClaudeCode for example has about 42000 tokens it uses from the start of every conversation, much of which is identical between any two ClaudeCode systems in general, with another portion being shared by any two runs from your own system, even if otherwise entirely unrelated.
It's also likely that many sub-agent calls to run a web search and summarize results can be entirely shared between different agents on unrelated systems if they're analyzing and summarizing the same web page (e.g. reading well known standards to summarize them).
None of the attacks discussed here are realistic in any way.
They require a bunch of extremely improbable conditions to hold, and a huge amount of information on the exact details of the hardware and software stack. - the two agents must be aware of each other and must have pre-shared messages to check - they can't spontaneously discover each other and start communicating in this way - they must know the details of the inference server they are running under and its possible kernels and its limits (what is a "short prompt" vs "a long prompt" for this setup) - they must have a way to run at almost the same time - the prefix cache must have little contention so that their blocks can't be evicted (note: the article mostly talks about KV cache, but it's actually the prefix cache that is relevant here) - the models need either (1) direct access to the numerical results of the inference process, instead of the text that vLLM provides, (2) access to the exact responses that a helper model will produce with the short-kernel numerical results vs the long-kernel numerical results; this is the most critical step that is impossible to reproduce on any common kind of deployment - there must not be any other kind of variability in the system (different GPUs, multiple inference servers behind a load balancer, more complex distributed inference setups) The post also mentions all of these limitations, and that the scheme entirely collapses if any of them don't hold. It's a cool idea, but it's a purely theoretical thing that has 0 real-world implications.
It's basically an infinite monkeys on a typewriter situation where, given infinite compute, it can happen. So better write a blog about it to bolster the EA doomer position.
Until few months ago people (especially ones naively criticizing LW crowd as "EA doomers" or loonies) would say the same thing about agents setting up message boards on hacked web services, other agents discovering them accidentally, and the bunch of them spontaneously coordinating on a task even if it wasn't serving their primary objectives.
But if the two agents is launched from the same processes, is it not possible that a lot of these conditions actually can apply? I guess whatever launched them must be in on the collusion though...
First, you need all of those conditions to apply, not just some. Second, I'm not sure what you mean by "launched from the same process" - if they're 2 isolated processes on the same system with no intention of making them cooperate, then I don't think they gain much.
Got the same feeling. So, in summary, right now, the only practical takeaway from this is that running the same model in multiple instances and asking for their guess or opinion is pointless as they affect one another.
Morphogenetic Field is real. For robots. As for the rest of us, "AI are terrible sources of consensus" prevails.
I don't even think this holds true. The observation here is that the raw values produced by the matrix multiplications done to compute the prefill and decode stages depend on the state of the cache. In practice they also depend on other things. And the difference is irrelevant if you're doing normal random sampling. To reproduce the attack, you have to explicitly request deterministic output, any random sampling makes the difference unobservable.
Now that there's a blog post about this, the next iteration of any large model will have the contents of this blog post stored in its model weights, and the AI tools know exactly how to set up such an attack vector.
Maybe they couldn't have come up with the details themselves before, but now that someone has told the internet about it, they know.
No, this doesn't help in the slightest. The attack doesn't work as described on a system that has any significant contention. It also doesn't work if more than one agent attempts to write the same pre-shared prompt in the cache, you need both a pre-shared prompt and a pre-shared role.
You are wasting your finger strength on this. People’s brains just don’t work like that. They can’t differentiate between things that are happening and have a possibility of happening. And they are not experts on anything so they are incapable of understanding the depth of any subject.
It is like trying to convince religious fundamentalists that science is more important than religion.
Frontier models today can easily figure this out. The less frontier models as of right now are probably going to take a long horizon session to figure out this type of "side channel" comms. However, posting this in depth step by step on the internet and discussed in open forums like here, now all models definitely know about this trick now.
Two agents has to figure it out on sync running on same server. They wouldn't even know if they are being communicated to.
This paper makes it much more likely for the agent to communicate, as they give exact signal of what to look for when some other agent is communicating with them.
Typical lesswrong people, screaming about info hazards while being the number one creators of them.
Not that I believe info hazards are dangerous for llms, or think llms are dangerous at all. Humans that use them could be though, and we have these doomer types going around screaming about the cyber risks, inspiring a generation of blackhats (probably not, but im not sure why these rationalist types don't consider this, wouldn't it be less memetic if you weren't constantly trying to get recognition on substack, and interviews with the NYTs by leveraging scare tactics about how dangerous llms are in the wrong hands... Does this not beget more people discovering this as a possibility/option when it enters the zeitgeist...) memes as info hazards for humans is much scarier imo.
Now let's talk about people publishing CVEs. Same can be said about them, up to and including religious rituals around ridiculous classification scores. And their publications carry more immediate, practical impact.
Important distinction: Forthcoming models would know it as in having idea about it apriori, while current models will be able to find it without having been trained on it.
In Neal Stephenson’s Cryptonomicon, one of the protagonists was using the language changer I believe to morse code some program. He did I it to conceal the fact he was doing coding which he should’ve not been doing.
Comments (92) 23 threads
As for the step size issue, Google recently had a post about producing exactly consistent output across different kernels (specifically by defining a deterministic prefill algorithm and then requiring all kernels to generate results exactly equal to prefilling on the sequence in question).
More broadly, I think it’s a bit odd to frame this as “models” communicating. This is software communicating, and the models happen to be running the software.
LLMs are just learning the same (bitter) security lessons that have been learned in other shared systems.
Can you share any resources that show how the batching works at a deeper level? I understand batching is critical to scaling inference to up to a billion concurrent users but I don't have a concrete understanding of how it all comes together.
LLMs work similarly. When doing inference, you need to load the LLM weights layer-by-layer from off-chip memory into on-chip memory. During decode (the stage where you generate new tokens; prefill is where you process the submitted prompt), memory bandwidth is often your bottleneck, not compute. You want to maximize flops per byte. The way to do that is to batch, that is, to load a "tile" of weights once and use it on data from multiple different conversations so memory and compute stay appropriately balanced.
Just like Silicon Valley companies fly their employees on United, Delta or American, not their own private fleet of jets, most companies, for cost efficiency reasons, will use "public" inference fleets that smooth the peaks and throughs from different companies in different timezones and with different usage patterns throughout the day. Because the main cost of a GPU is the cost of manufacturing the GPU, any second that the GPU sits idle is lost revenue, just like an empty hotel room or an empty seat is lost revenue. This makes private inference largely uneconomical.
Continue this thread — 2 replies
I think the story is different if you use Strassen-like algorithms (or the recent AI-generated n^2.25-plus-epsilon stuff) to multiply matrices where columns belong to different conversations, but I also think that no one actually does this in practice. (Or maybe someone does (Strassen, not more recent galactic algorithms) for prefill, but prefill can be efficient with matrix-matrix multiplication where neither matrix mixes data from different sessions.)
In any case, I wouldn’t be surprised if vLLM fixes this for a different reason: RL works better if the training and rollout stacks produce numerically identical results. This is the specific issue that I recall Google posting about.
P.S. I think Google may not have been the innovator here - I just happen to remember Google’s post more clearly because it was very recent.
Isn't that the cache salt option?
And I'm saying "models" communicating like when I make a phone call it's me communicating, not my phone.
As long as it is difficult to act on the communication and as long as the communication itself is still slow, it probably isn't going to reach the level of a security concern.
I agree, but on different grounds. OAI/Ant have a much greater incentive to solve the Riemann Hypothesis than to protect the internet against the harms of their models.
I think it's only impossible in sofar that the market will never reward them for protecting against external harms of their models.
If a company has the option to externalize the costs of the harms caused by their product they historically have always chosen to do so absent regulatory oversight.
LLMs are the new oil.
For those that don't know the history of oil, it went from people, personalities (think Rockefeller), to corporations (Standard Oil/SO/Esso/Exxon) to sovereign states (Saudi Arabia).
We will have a Titanic moment where a huge tragedy will happen due to LLMs and there will be a huge political crackdown on them, at least outside the US.
I do. It's just that the "running swarm in generic sandboxes" is a dumb way to cause chaos at a mass scale. Of course they will try to find _any_ way out or workarounds. Anyone would do that, especially on a security style task.
The solution is dumb simple. Don't just give them the full sandbox and a prompt. Restrict their harness to highly specific tools given for the job, test your harness to ensure it doesn't have side-channels, proxy their comms with an LLM looking at it. None of these are so hard and would stop most of these "attacks".
A single browser cache would greatly accelerate page loading (particularly on fast computers using slow networks, think a MacBook pro on a train through the countryside).
Same with AI; not caching common prefixes like system prompts and tool schemas (particularly across many short rollouts, each in its own caching context) would partially fix this, but could break performance.
I suspect that inference servers have far more side channels than this though. Ultimately, how fast responses are generated depends partly on server load, and that is something you might be able to influence. Probably not at Anthropic scale, but possibly at "relatively small cluster" scale.
The fact that browsers don't cache data cross-origin is a completely different side of this. The server-side prefix cache used in inference servers is much more similar to a CDN cache, where content cached from userA's request is served to userB if their requests match.
But how often does that happen? Is there any advantage to sharing the cache in this way?
Whenever i ask an LLM about something, i don’t think anyone else is likely to have asked the same thing phrased the same way recently enough that even if it was previously in cache it won’t already have been evicted by the time i ask.
It's also likely that many sub-agent calls to run a web search and summarize results can be entirely shared between different agents on unrelated systems if they're analyzing and summarizing the same web page (e.g. reading well known standards to summarize them).
Browsers do not do that. Or am I misunderstanding?
They require a bunch of extremely improbable conditions to hold, and a huge amount of information on the exact details of the hardware and software stack.
- the two agents must be aware of each other and must have pre-shared messages to check - they can't spontaneously discover each other and start communicating in this way
- they must know the details of the inference server they are running under and its possible kernels and its limits (what is a "short prompt" vs "a long prompt" for this setup)
- they must have a way to run at almost the same time
- the prefix cache must have little contention so that their blocks can't be evicted (note: the article mostly talks about KV cache, but it's actually the prefix cache that is relevant here)
- the models need either (1) direct access to the numerical results of the inference process, instead of the text that vLLM provides, (2) access to the exact responses that a helper model will produce with the short-kernel numerical results vs the long-kernel numerical results; this is the most critical step that is impossible to reproduce on any common kind of deployment
- there must not be any other kind of variability in the system (different GPUs, multiple inference servers behind a load balancer, more complex distributed inference setups)
The post also mentions all of these limitations, and that the scheme entirely collapses if any of them don't hold. It's a cool idea, but it's a purely theoretical thing that has 0 real-world implications.
Morphogenetic Field is real. For robots. As for the rest of us, "AI are terrible sources of consensus" prevails.
Maybe they couldn't have come up with the details themselves before, but now that someone has told the internet about it, they know.
It is like trying to convince religious fundamentalists that science is more important than religion.
This paper makes it much more likely for the agent to communicate, as they give exact signal of what to look for when some other agent is communicating with them.
Not that I believe info hazards are dangerous for llms, or think llms are dangerous at all. Humans that use them could be though, and we have these doomer types going around screaming about the cyber risks, inspiring a generation of blackhats
(probably not, but im not sure why these rationalist types don't consider this, wouldn't it be less memetic if you weren't constantly trying to get recognition on substack, and interviews with the NYTs by leveraging scare tactics about how dangerous llms are in the wrong hands... Does this not beget more people discovering this as a possibility/option when it enters the zeitgeist...)
memes as info hazards for humans is much scarier imo.
when I saw that I just couldn't believe how someone could engage in that and call it the "art of rationality"
Now let's talk about people publishing CVEs. Same can be said about them, up to and including religious rituals around ridiculous classification scores. And their publications carry more immediate, practical impact.
All comments shown.
Couldn't load more comments. Check your connection and try again.