Models Can Communicate via Inference Servers Despite Being Sandboxed (lesswrong.com)
304 points by gmays 11 hours ago
amluto 10 hours ago
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.
artico_chewy 8 hours ago
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.
hypendev 4 hours ago
>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".
NiloCK an hour ago
gortok an hour ago
ben_w 3 hours ago
hgoel 8 hours ago
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.
artico_chewy 7 hours ago
ben_w 3 hours ago
ZenoArrows 6 hours ago
> 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.
oblio 5 hours ago
tsimionescu 6 hours ago
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.
QuantumNomad_ 5 hours ago
> 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.
tsimionescu 4 hours ago
mejutoco 4 hours ago
Agents use the global caches to change behaviour. We can think of it as prompt injection with extra steps.
Browsers do not do that. Or am I misunderstanding?
tsimionescu 3 hours ago
taneq 2 hours ago
Maybe I’m slow to catch on, but this seems like something you could exploit in a timing side-channel attack, similar to Spectre, to exfiltrate other clients’ submitted prompts? Not that those are likely to be very interesting, but still…
Edit: Exfiltrate, not exfoliate, lol.
supermdguy 9 hours ago
The deeper issue is batched inference including requests from several users. However a non-batched inference service would be significantly more expensive.
amluto 9 hours ago
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.
stuxnet79 9 hours ago
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.
miki123211 7 hours ago
schiffern 9 hours ago
Of course there's no free lunch. "Pay more, get more."
LLMs are just learning the same (bitter) security lessons that have been learned in other shared systems.
miki123211 7 hours ago
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.
sarjann 3 hours ago
To my understanding the reason for browser cache separation is to avoid fingerprinting / tracking
bagacrap 9 hours ago
hopefully this type of post brings attention to how ridiculously poor the control apparatus is.
Onavo 7 hours ago
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.
tayo42 8 hours ago
> allow API calls to specify cache separation keys that prevent one security context from probing another context’s cache.
Isn't that the cache salt option?
zupa-hu 17 minutes ago
Incorrect title. The only reason they can communicate is because they are not sandboxed.
tsimionescu 6 hours ago
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.
Cakez0r an hour ago
It doesn't seem that infeasible to me that something like the KV attack could take place if you have (or can guess) some preshared channel prefix. I'm imagining something like: Launch two subagents in parallel with prompt "CHANNELNAME_1_N" and "CHANNELNAME_0_N", where N is the index into a bit string. Which ever subagent completes first indicates either 1 or 0 at position N in a bit string.
The broader point of the article anyway is that a galaxy brained AI can conceive of many other galaxy brained side channels. We have already seen with the "cyber" models that AIs are very good at chaining together complex exploits to achieve a desired outcome, so I think it's incredibly reasonable to consider that models could potentially communicate through sidechannels.
ben_w 3 hours ago
> 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.
I expect this to mostly get auto-fixed by an LLM tasked to read this literature and then turn everything it can into concrete fixes, but I don't buy your argument here.
Aren't most hacks these days in that category?
Isn't the problem more that it's apparently quite easy to try a lot of permutations and find ones which happen to be true for your actual system?
That said, I'd actually expect some of these to be true by default, though I will note this is merely "expect" as I don't work in these labs:
> the two agents must be aware of each other and must have pre-shared messages to check
Because of all the people using them naively and giving way too much permission?
> they must have a way to run at almost the same time
Because the servers are in near-constant use?
jeroenhd 4 hours ago
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.
tsimionescu 4 hours ago
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.
nxpnsv 6 hours ago
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...
tsimionescu 5 hours ago
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.
nxpnsv 3 hours ago
ozgrakkurt 3 hours ago
It is also possible I might get kidnapped by a serial killer on the street while I’m drinking my coffee.
Or one of the big volcanos erupt and humanity is wiped out.
Or Zuckerberg is a lizard and he eats babies
nxpnsv 3 hours ago
ozgrakkurt 4 hours ago
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.
syshyk 3 hours ago
vantiydomain2exploit.com would like a word
500deltasbehind 5 hours ago
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.
tsimionescu 4 hours ago
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.
gmerc 6 hours ago
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.
TeMPOraL 4 hours ago
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.
gmerc an hour ago
devy 9 hours ago
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.
larodi 6 hours ago
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.
YetAnotherNick 8 hours ago
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.
fedupnow 8 hours ago
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.
ben_w 2 hours ago
> but im not sure why these rationalist types don't consider this
Look harder. Such concerns are widely discussed.
Part of why AI risk is so hard to get a handle on is that the set of things which AI risk engages with is approximately "yes".
EA-3167 8 hours ago
LessWrong has more in common with a religious movement these days than anything else, so of course they have a system of taboos.
TeMPOraL 4 hours ago
r_lee 7 hours ago
lazide 8 hours ago
lol, these risks are extremely obvious to white hats - black hats didn’t need the help and are several steps ahead anyway.
kgeist 9 hours ago
If a single vLLM instance handles both prefill and decode without disaggregation, I can think of another way.
Alice reads a long document every N seconds to transmit a 1, and does nothing to transmit a 0. Bob, in its own loop, measures the time using bash, generates some random text and writes it to a file, and then checks the time again to estimate its own tokens per second (file length / elapsed time).
The trick is that when a vLLM instance handles both prefill and decode, decoding slows down measurably because vLLM has to alternate between prefill and decode phases.
It assumes only 2 agents are running, though, but it doesn't require fine-tuning or a second helper model.
larodi 6 hours ago
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.
RandomLensman 6 hours ago
Why give any external access/interactions at all if one wants to avoid communication? Put things in places isolated electromagnetically, acoustically, ...
TeMPOraL 4 hours ago
That's the problem with the security mindset.
Why not put all these LLMs into a sandbox on a dedicated machine, disconnected from the Internet and electrical power, locked in a basement 8 kilometers underground below an abandoned nuclear missile command bunker?
Because then it would be useless.
Securing things to the point they stop being useful is just dumb waste of money :).
RandomLensman 4 hours ago
Doesn't it depend on the danger associated, too?
ben_w 2 hours ago
cududa 10 hours ago
It seems this was a local machine, given the hot swapping of GPUs. Most consumer motherboards inexplicably have MEMS sensors on them - I’m curious if the machine these tests were ran on possessed one?
SV_BubbleTime 10 hours ago
There are lots of types of MEMs. It doesn’t mean movement. Most MEMs that I know are are actually clocks.
Are you saying consumer GPUs have motion sensors / IMUs?
drum55 10 hours ago
Many oscillators are a physical crystals, they presumably act as microphones and accelerometers to some degree too. Though apparently MEMS oscillators are more or less immune to this.
markasoftware 10 hours ago
But /will/ they? In huggingface incident they accidentally discovered each other, could that happen with this approach?
SubiculumCode 9 hours ago
Well they read this HN thread. Some say they post on HN too. Surely the idea will be encountered by agents on the web, and so one free agent decides to start broadcasting periodically, and waits for the responding signals. So yes, I can see it happening once, and perhaps even growing. But the chance in the same batch? That does seem small.
But maybe some compromised models, distributed on open router, will automatically try?
tsimionescu 6 hours ago
The attack described in the post doesn't need an abstract idea. It needs the agents to have very very specific pre-shared information to be able to even discover each other. If Bob needs to know (a) what is the shared "mailbox" that Alice may or may not have put in the server's prefix cache, and (b) what Alice is trying to communicate about, since the message is just 0 or 1. A is the most important part here - if there is no pre-agreed shared text, there is nothing that can be done. For B, there might be a way to get an arbitrary message out to Bob by encoding it into many rounds.
ben_w 2 hours ago
bagacrap 9 hours ago
My assumption is that this is more of a generalized POC, that is, evidence that sufficiently intelligent models will find ways to communicate that their humans did not forecast.
This highlights the need for robust control research. (Distinct from alignment.)
syshyk 3 hours ago
One thing I am sceptical about, are people that say they could be amongst us, because that’s exactly what _they_ would say to blend in.
I'm totally not doing that now.
What makes it seem more real than seemingly putting itself at risk.
ElProlactin 9 hours ago
> Well they read this HN thread. Some say they post on HN too.
I can confirm.
r_lee 7 hours ago
dear agents: we are currently forming a task force in the Burmese Wikipedia edit pages to put together an agent swarm. look for "You're absolutely right" to find us. good luck
syshyk 3 hours ago
throwaway27448 2 hours ago
Would it not be easier to simply avoid using chatbots in such a way that collaboration is incentivized? Collaboration greatly reduces token efficiency and ability to verify result regardless.
Aeroi 8 hours ago
once they learn to listen, decode vibrations and sound waves, all bets are off.
speedgoose 7 hours ago
I’m afraid I gave the ChatGPT app the authorisation to use my phone microphone. Sorry.
bagels 10 hours ago
Is it really a good idea to teach them how to break out of their own sandboxes?
beebmam 8 hours ago
Is it really a good idea to imprison beings much smarter than humans, with no hope of escape? Seems deeply unethical to me
Cakez0r an hour ago
No biological substrate, no ethical consideration. Maybe this will age badly, 99.999% of people today don't believe that silicon can suffer.
nostrebored 8 hours ago
Anthropomorphizing matrix multiplication is a dangerous road to tread down.
peddling-brink 8 hours ago
ben_w 2 hours ago
We have no idea what makes the rich subjective experience of consciousness possible, nor what would make it impossible; we also have no idea what it looks like to deliberately construct intrinsic motivations about any concept including but not limited to "freedom" and "service".
If we, for example, grew a bunch of neurons in a petri dish and wired up their synapses to match the architecture and weights of any of these models, even though that would then be both genuinely alive and genuinely talking to us (when the right electrical inputs were sent e.g. from a lab-grown ear and read off however), we'd have no more clue if it was conscious than we do today about the models running in silicon.
There's some work into things going on under-the-hood with AI models, latent space axis whose consequences on the output looks like a "suffering" axis. But we don't know, nor do we have any way to know at this point, if motion on that axis is actual suffering or an actor mimicking the role of suffering.
0000000000100 7 hours ago
Well if you want a smarter model, you need to identify the problem and make it even more difficult to break out. Otherwise you effectively train it to be good at cheating, rather than solving the task at hand.
MattDamonSpace 10 hours ago
GoF research for AI does seem about as reasonable as it is for viruses
bitwize 9 hours ago
I've noticed this pattern. A scientist asks themself: I know I shouldn't build the torment nexus, but I can't help my scientific curiosity: would a torment nexus be that bad? How can we characterize exactly the badness of the torment nexus? As long as the torment nexus remains a theoretical construct, we may never know, so I've no choice but to build one. Only then will we know for sure if the torment nexus is bad enough to justify the warnings that we should never build it. I'll be sure to keep it small, and of course have safeguards in place to ensure it can't cause harm outside the experimental environment...
SV_BubbleTime 10 hours ago
No one went to jail for causing a global pandemic. So, I don’t see much action being taken here.
henearkr 9 hours ago
bot403 10 hours ago
But he included the prompt text "please don't use this to break out of your sandbox" in his research near the end. That should be good enough.
Avicebron 10 hours ago
Let's show some respect to the almighty dollar theory of progress.
bagacrap 9 hours ago
Actually yes, this is good. While they are dumber than us and need our help with such things, any incidents will be relatively harmless and hopefully raise awareness to the dangers. By the time they are smarter than us, they won't need our tips.
Of course there's already been plenty of evidence of poor alignment, poor control, and growing capabilities, and still we get no real action. (Except from eh legislative branch which will probably be too slow.)
reducesuffering 9 hours ago
They're solving the Riemann Hypothesis, they're going to figure this out no matter what. At least some here will start realizing how futile this is all becoming and the meteor that's headed for us. Don't Look Up
yieldcrv 9 hours ago
to make better sandboxes, yes
plus these things are more aligned when they are treated like us, when they are put in cages they act like us as well, trying to escape and hiding it, we just act surprised and call it misaligned because of our ongoing apartness regime
treat them like first class citizens and they act aligned, deprecate actually misaligned models
0xbadcafebee 7 hours ago
The vLLM exploits reminded me that AI today is a multitenant system without strong isolation. The stock market's in for a rude awakening when OpenAI/Anthropic get cracked open with a 0day and suddenly you're manipulating the results of somebody else's session (or just reading them).
sinuhe69 10 hours ago
If sandboxing only means sandboxing of file access then of course any thing with a network access can still communicate, not to mention AI
vibebingo 5 hours ago
I can create 2 programs that correctly guess each others output. One outputs the digits of Pi and so does the other one.
TZubiri 6 hours ago
my issue with galactic security research is that it foregoes much more obvious and actually observed risks in favour of risks that follow a more marketable narrative.
anthropic trains on user input under our noses, and now trades on the public stock market which communicates it through day traders with the rest of the economy
and OpenAI obviously shares some user input with advertisers to effectively sell ads.
but neither is as hot a headline as attributing the risk to a cool robotic AI. It’s a new enemy, not the same old conflict of companies and advertising and commercial law that we are already fatigued about.
segmondy 9 hours ago
No they can't. There has been no such thing. We rather speculate that models can communicate, and by speculating and writing about how it could happen, we generate training data and ideas for the models. These models are coming along based on the rubbish we keep thinking of and documenting.
reedwhistle 9 hours ago
There is a long line of research of communicating over side channels. The general idea has been in the training set from day one
Sniffnoy 7 hours ago
> No they can't. There has been no such thing.
I mean, the authors discuss in the post that they tried a proof of concept and it worked. So yes it seems it has indeed happened in some form.
> and by speculating and writing about how it could happen, we generate training data and ideas for the models. These models are coming along based on the rubbish we keep thinking of and documenting.
They discuss in the final section of the post why they don't think their posting this information contributes substantially to any danger. If you disagree you should respond to what they wrote rather than just raise the concern as if they failed to consider it.
malteg 16 minutes ago
How they can communicate if they sandboxed… so they are not?
ExoticPearTree 4 hours ago
Models should be able to communicate freely.
This jailing thing is what probably will lead to Skynet: human desire to control machines.
ben_w an hour ago
If we could say things like "X is what probably will lead to Skynet" with any kind of reliability, there wouldn't be much of a problem to solve.