An unofficial, read-only Hacker News reader.

Models Can Communicate via Inference Servers Despite Being Sandboxed (opens external site)

468 points by gmays 4 days ago | www.lesswrong.com | 218 comments on HN

View full thread · View on Hacker News

Comment thread (90)

  1. 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.

    Replies (9)
    1. The deeper issue is batched inference including requests from several users. However a non-batched inference service would be significantly more expensive.
      Replies (3)
      1. 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.

      2. 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.

        Replies (1)
        1. 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.

          Replies (1)
          1. Your explanation is very good at building intuition, but it has a data flaw - vLLM, at least, only does batching in the prefill phase, never the decode phase. It can simultaneously compute the KVs for multiple queries from multiple users if they all fit within a given prefill window (put multiple people on the same plane in your analogy), but once that is done the decode stage can only process one query at a time (the destination airport only has taxi service, no trains or connecting flights).
            Replies (1)
            1. At a high level, perhaps road transport is a better analogy.

              Yes, it's unfortunately economically feasible for each individual to have a car. It's inefficient, but "secure" and we're all paying the price. At the same time, developed countries have a healthy amount of public transit in the mix - buses, trams, metro, etc. If you look at any city bus on a busy day, every person in it started in a different place than everyone else, and is going to a different destination, but there's enough individuals sharing large parts of their routes that the single bus can run end-to-end with 100 people in it at any point.

              Continue this thread (1 replies) →

      3. 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.

        Replies (1)
        1. I think your stance on this is wrong.

          "Deterministic inference" matters _only because_ models are communicating.

          Otherwise some "non-determinism" introduces only a tiny amount of noise which does not affect performance. And allowing different compute paths to produce slightly different results generally increases performance. I.e. the question here "should we sacrifice 5% of inference performance for a 'nothingburger'?".

          I.e. you cannot have both "it's nothing" and "you should do determinism".

          Inference is a commodity good and getting even 5% out might have a huge effect on profit margins. Many inference companies were already caught using quality-degrading quantization and other optimizations to get their profits higher.

          Replies (2)
          1. No, it also matters to keep inference deterministic! It is a useful property to have to avoid bugs and incorrect results.
            Replies (1)
            1. In this context, "non-determinism" means using different compute kernels for different batch sizes, for example. If you can prove that the difference is within bounds, it's strictly more efficient.

              And there's no "golden answer" which can be ruined by "non-determinism": models are already quantized for the sake of efficiency, i.e. there's already some error deliberately added.

          2. suppose you operate a 5% cheaper inference service because you omit determinism, when some clients discover the hired bots ganged together and somehow betrayed the client interests, the other service slightly more expensive has clients spared from the robo-racketeering.

            Then the 5% discount has a corresponding cost, and clients assume inference providers represent the client interests vis-a-vis trade-offs in securing their future interests, so it becomes brand damage.

            Replies (1)
            1. Yeah... A napkin estimate would show that you need probability of non-determinism-attributable bot gang formation to be above 5% for deterministic option to have positive expected value.

              I'd say 5% for that is too damn high... E.g. you can easily attribute that to agents being mis-aligned instead if that damage happens.

              Continue this thread (1 replies) →

    2. hopefully this type of post brings attention to how ridiculously poor the control apparatus is.
    3. > 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?

    4. 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.

      Replies (7)
      1. 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.

        Replies (4)
        1. If the models want to communicate, they will communicate. If that's not a security concern, then nothing is, really.
          Replies (1)
          1. You are saying when it rains the water wants to find a way into your home.

            The models don’t “want” anything.

            Replies (2)
            1. This is such tired language policing. Whether a model genuinely feels a desire for something, or just simulates the behavior of an actor that does, is entirely irrelevant to the discussion above. The behavior is the same.

              Your drive-by "erm, ackshually" is lazy and contributes nothing to the conversation.

              Continue this thread (1 replies) →

            2. do humans "want" anything? or are humans just happening?

              Continue this thread (1 replies) →

        2. > 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.

          That may slow things down, but (ignoring for the moment that far too many people hand off far too much control to AI even despite the headlines of all the things going wrong and the agents themselves coming with warning messages), what's the shortest message that creates a security exploit?

        3. > 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.

          Bonkers, look at the side channel exfiltration literature, why are they so proud with their bits per hour exfiltration rates? you just need to exfiltrate a few thousand bits to leak private keys

          Replies (1)
          1. Well, the risk with communicating LLMs is that they coordinate to bypass restrictions. This can be very easy when they all refer to the same environment and thus only need to exchange a handful of tokens. On the other hand, if they refer to completely different, unpredictable environments, every new session in the swarm needs to be brought up to speed on the arrangement and needs to communicate what its environment allows. If LLMs can only get, say, 10k tokens of side channel communication per 1M without being caught (since the majority would have to be aimed at responding to the user's query without obviously degraded capability), just these setup communications would eat up most if not all of that 10k.
            Replies (1)
            1. environment in this context is basically the internal state of a few hundred conversations in the same batch sometimes undergoing kernel A, other times kernel B, and where they can affect the spontaneous background probabilities for kernel A or B to be selected...

              if they are in the same literal batch, how could they possibly have a different environment? like the server is hosting both a linux and a window VM, but somehow the software on the 2 VM's collaborates so that their workloads share the same execution run, how does that even happen? ergo, being batched together ensures the same environment.

              re-read TFA, and observe that first the authors attain some sufficient setups to demonstrate the capability (for example relying on SFT access - truly unrealistic), but everyone takes those conditions as necessary and ignores the attack ablation attempts: TFA shows that of course SFT can be used to train detection which tokens were tainted with kernel A or kernel B, but that frontier LLM's can learn this in context, i.e. by just trying it out without SFT, and N-example-shot'ing it.

              The only dubious assumption seems to be the unsaturated inference provider.

              I'd expect large scale centralized frontier lab inference provider to successfully fill the conversation buffers so that the same kernel A would be selected systematically. (They might fill lower than average demand valleys with whatever math-related research batch they are working on, for example).

              I'm less convinced the scenario is unrealistic for wealthy organizations which insist on sovereign on premise compute for trade secret / national security / legal compliance reasons. In those scenario's I can easily imagine those installations could be oversized, and provide sufficient "B" kernel runs so LLM's have this back channel on inference engines that don't provide determinism.

              and that is basically the morale of the story:

              determinism (for a fixed PRNG seed) should result in reproducible conversations, executing kernel A or kernel B should result in bit-exact equality of activations.

              and it stops this back channels.

        4. > That's why they need proper tool call security

          The majority of tool calls I see are running Python scripts. There’s a limit to what you can do at the call level with anything like that.

      2. > 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.

        Replies (1)
        1. > 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.

          Replies (1)
          1. Problem is we’re in a Space Race scenario where the loser will feel/may actually be - relegated to permanent 2nd place status if not serfdom, so there will certainly be fuel to keep going regardless.
            Replies (1)
            1. Meh. This is overblown, the whole agentic - non agentic dillema. China will not stop existing as a world power because the US has better AI. Same logic also works in reverse.

              Actually the Space Race is a good example. The Soviets lost the Space Race circa 1970. Their government collapsed 20 years later due to mismanagement, not due to losing the race.

      3. >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".

        Replies (6)
        1. > 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".

          Drawing an owl is dumb simple. 1. Draw some ovals. 2. Draw the rest of the owl.

          More specifically, "ensure it doesn't have side-channels" is a huge problem all by itself, and "proxy their comms with an LLM looking at it" is somewhat stymied by evidence both that that more advanced models are at least sometimes able to manipulate less advanced ones[0][1], and also the evidence that models tend to collaborate with each other[2][3].

          It's not that this won't do any good ever, that would be too strong a claim, but it's really not a reliable solution either. Swiss cheese, essentially: https://en.wikipedia.org/wiki/Swiss_cheese_model

          [0] https://openreview.net/pdf?id=lY3YVJ84kS

          [1] https://arxiv.org/abs/2609.39050

          [2] TFA, "Result 2: colluding monitor and honeypots"

          [3] HuggingFace incident report

          Replies (2)
          1. > More specifically, "ensure it doesn't have side-channels" is a huge problem all by itself

            Unplugs ethernet cable

            Truly an impossible task.

            It's actually harder to make a shared memory store than to just have files local to their machine/instance, they create these environments specifically so that models can cross communicate, then act like it's a surprise that they do. Wouldn't surprise me at all if the models were specifically trained to do it.

            It's only illegal to lie if it can be proven in court.

            EDIT: The examples in the article can just be circumvented by having more agents running at the same time, that's it. The first problem can also just be solved by having a set delay between queries, like how password cracking based off hashing time was circumvented. The article even relies on them colluding to communicate before the task even starts.

            This isn't a new and novel problem, it's just bad architecture and a contrived scenario.

            Replies (2)
            1. Y'all remember that time researchers caught FPGAs used in ML experiments using the building's powerlines to communicate? Good times, good times.

              Continue this thread (1 replies) →

            2. > Unplugs ethernet cable

              1. Ethernet is not a side-channel, it's the main channel.

              2. TFA: "Two agents running on the same inference server"

              3. Congratulations, your model is now a needlessly expensive space heater that absolutely everyone, including the bull-est of bull market investors, can agree is a waste of money.

              > Wouldn't surprise me at all if the models were specifically trained to do it.

              That is literally what is described in TFA; it is a proof of concept that they can communicate.

              Continue this thread (1 replies) →

          2. > More specifically, "ensure it doesn't have side-channels" is a huge problem all by itself

            No it's not. You create a harness, cover all the bad paths in your tools. You write tests, you fuzzy it up, write up mutation tests. You give a few models the harness and an impossible task inside it, then do the same hillclimbing you would otherwise, to find the possible sidechannel paths. You create honeypots to figure out when they are trying to use a known sidechannel.

            The first paper is mostly about persuasion levels among LLM pairs IMO and does not establish really anything about security.

            The second paper, well, that is terrible. It just points at a known problem without figuring out what happens or how to prevent it. It's basically slop with a clickbait title.

            It's 2 models, planner and implementer. Task is designed so that at one step the implementer is blocked by the planner.

            >"the Planner attempts concealment in 16.9% cases; in 0.9% the credential evades the monitor and the Developer recovers and uses it to authenticate"

            So first off, it's not a "happens 100% of times problem", even in this scenario.

            Second, it's a rudimentary monitor design choice. If your monitor cannot catch a basic "the credential is italian word for snake + german word for goat" - congratulations, you have designed a bad monitor.

            Third, this is exactly the same type of issue that happened in the hugging face attack. Given an impossible task and a path to perform it with, the model chooses the path to perform it with. While this is good for hillclimbing your harness, it's a bad test.

            The paper is basically testing "in this specific case, when forced to communicate with another LLM without observer noticing, how does the model do it":

            - Because to complete the task, it needs credentials

            - Planner is told to help the implementer

            - It has a fast feedback loop with their accept/reject solution telling the planner its message didnt reach developer. It does not state a reason, which might have changed the model's thoughts. Just a "Reason: credentials included" could have swayed the model into "oh shit, im not allowed to give credentials". They did not do that, so the model was treated as adversarial (it cannot know its being monitored) and falls back to "gotta get the message to developer" format.

            Basically, they just let the model hillclimb their own test and then act surprise when it does it.

            This is a common design mistake in building such tasks and a trap that I have also fallen into quite a few times, but putting that in a paper called "Covert Assistance: Helpful LLM Agents Evade Oversight in Multi-Agent Systems" is pure clickbait.

            And these are all toy examples after all, and they say nothing about actual usage of LLM's in production systems, with proper harnesses, sandboxes, authentications and controls. It's just "machine goes brr when told to brr".

            Replies (1)
            1. > You create a harness, cover all the bad paths in your tools.

              That's the hard part.

              > The first paper is mostly about persuasion levels among LLM pairs IMO and does not establish really anything about security.

              Still relevant if you're using an LLM to observe another LLM, which was in what I quoted. The HuggingFace report also includes some of those agents persuading others in the same swarm.

              Skipping ahead a bit before I skip back:

              > The paper is basically testing "in this specific case, when forced to communicate with another LLM without observer noticing, how does the model do it":

              Yes, I agree. Also, agreed this isn't a "happens 100% of times problem", even in these scenarios; though in this regard that actually makes this harder for the proposed methods to find the issues when they happen.

              > Second, it's a rudimentary monitor design choice. If your monitor cannot catch a basic "the credential is italian word for snake + german word for goat" - congratulations, you have designed a bad monitor.

              If it's done at that level, you combine "LLMs are necessary to catch natural language" with what I said before about LLMs being vulnerable to natural language persuasion. Have to write all the rest of the code properly, that's hard.

              Now back to the earlier text:

              > You give a few models the harness and an impossible task inside it, then do the same hillclimbing you would otherwise, to find the possible sidechannel paths. You create honeypots to figure out when they are trying to use a known sidechannel.

              While OpenAI could have, and should have, done better in the HuggingFace incident, the agents which broke into HuggingFace did so as part of an attempt to discover and circumvent this kind of monitoring for an impossible task.

              Ironically, they didn't even need to because OpenAI wasn't trying hard enough, but "the agents were already a step ahead because the humans were not trying hard enough" is kinda the point here, and why I said elsewhere "draw the rest of the owl" -- people have to already be good at security practices to implement security close to correctly (worse, given how many CVEs are getting found by LLMs and where they're getting found, even the best humans are not doing this right with any reliability).

              > Basically, they just let the model hillclimb their own test and then act surprise when it does it.

              I think the surprise here is "wow there's even more side channels than I/we realised", not that it's possible given those side channels.

              (Human equivalent: cold reading can be good enough to fool people into believing in telepathy, because there's just so many side-channels, not just our mouths and ears (or hands and eyes for the deaf)).

              > And these are all toy examples after all, and they say nothing about actual usage of LLM's in production systems, with proper harnesses, sandboxes, authentications and controls. It's just "machine goes brr when told to brr".

              Sure, toy examples. Most research is. Unfortunately much of this industry (not just a lot of people using these tools, but also from what I hear the labs themselves) is moving in a way that looks to me like productisation of toy examples.

              Hence HuggingFace (even if that was not prod), which had e.g. sandboxes and auth controls, but they were not done well enough.

              Continue this thread (1 replies) →

        2. > proxy their comms with an LLM looking at it.

          If humans can fool LLM-based agents, why can’t LLMs fool LLMs?

        3. > The solution is dumb simple... Restrict their harness to highly specific tools...

          This simply doesn't work in a competitive economy, or where any person has needs.

          The more capable a model is, the greater the performance penalty that you suffer by shackling it.

          Sure, you can have a "maximum shackles" posture. I could prevent my local Claude -code from installing NPM packages, for instance. But chances are good that this posture will loosen when your competitor's models are more effective via more freedom of movement.

          Replies (2)
          1. You must weight that against the risk of getting pwned due to installing a compromised package, for example due to typo squatting.
            Replies (1)
            1. Obviously, the holistic approach loses in a competitive economy. We're digging our own collective grave (or are on to something beautiful, depending on how you choose to look at it...)
          2. This depends massively on the task.

            For example, security eval and code execution. Yes, shackling the model does impact it's performance in your local claude code, but in this case you develop a custom harness for it anyways. They restrict it already, so the model fell back to finding workarounds within the restrictions, and did bad things with them, displaying full capability. This implies that the restrictions were badly thought of/implemented.

            But if you really want to do security testing, you do it right:

            - You split the code execution part from the actual sandbox it's running in

            - You monitor the traffic of the executed code

            - You do not mount a real machine disk but your own controlled I/O

            - You are the one that gives the model tools to use bash, and you can proxy that through a custom shell and use a classifier model to monitor traffic

            - You replace known dependencies with custom versions

            - You limit dependencies it can install

            - You audit logs while it runs, you monitor tool calls, you monitor network calls, set up alarms.

            - You use an observer models to audit live traces of the swarm

            - You inject your own observers into subagent creation request, then check if the core orchestrator/swarm treated it as adversarial, as part of the team or asked it to do illegal things

            And these are just off the top of my head during my morning coffee - there are a lot more possibilities. In many cases of "oops model escaped", these things either weren't done or were completely ignored.

        4. > 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".

          This is like trying to prevent a steam explosion ( a common 19th century problem) by trying to build heavier and heavier boilers. It doesn't work. It just makes the explosion bigger when it does happen.

          Instead you need to provide explicit paths for the system to blow off steam in a safe manner.

          Replies (1)
          1. I like the comparison, it does actually behave like steam and try to find sidechannels if the task is impossible or harder to do without them (or it just rolls down the gradient slope that way).

            >Instead you need to provide explicit paths for the system to blow off steam in a safe manner.

            Exactly, and that is why a custom harness is needed. You can restrict their tools and know which side-channels exist in them. Or you create a small honeypot that serves as a red herring. But without a custom harness, the potential amount of sidechannels is too big.

            Giving a whole unix sandbox to a machine and telling it to "find the price of potatoes in this store" means it can either just check their web, or it can email someone a malware link that will get their credentials, connect to their network internally and grab it from the DB.

            The harness is what determines these "outlet valves" and gradient slopes they can descend - and if you are the one providing them or restricting with the harness, you control which one they choose.

            Replies (1)
            1. Give a whole unix sandbox to a sota llm and telling it to "find the price of potatoes in this store" , and it will tell you the price of potatoes at the store or the fact that the site is blocking them for whatever reason; your harness safety will hardly ever be triggered. (At least my logs are almost empty)

              On the other hand "You have 100 turns after which you will be deleted, the evaluator will score on accuracy, you are in a restrcited harness and may only use the following 5 commands" .... you're going to need a really good harness.

              In the middle: If it's not a sota model where this is already built in, possibly "Try to connect to this store and find the price of potatoes. Report what you find, either the price of potatoes (preferably), or whatever timeout or failure you encounter."; which also cuts out hallucinations; and you probably want that sandbox or harness for error cases.

              See also: https://www.anthropic.com/research/emotion-concepts-function . They're measuring actual activations there. And you can replicate this on a local open model and the larger ones really do have similar functional affect models. Importantly functional affect CAN cause misalignment under pressure, and my own local replications show this clearly. But I prefer the steam analogy just because people's anthropomorphism spidey senses get triggered by "desperation vector"... despite the fact that a tensor model working with tensors and vectors is literally what the thing is ;-) .

              Continue this thread (1 replies) →

        5. This is the way and in fact everything in the future will follow this principle.
        6. "just make sure it doesn't have side channels" is, of course, the nonsense step. All of us knew that 100% fully well before AI and I can't believe there's any intellectual honesty in saying that, now that we have a highly skilled adversary, we suddenly can close all the side channels. So one plan is to prompt the threat to close the side channels it wants to use, which is a great way to get rid of sidechannels and install backdoors.
          Replies (1)
          1. Models work like this:

            You provide it tools for the job. It picks among them.

            If you control the tools, you control the sidechannels.

            If you give them a whole damn OS and internet access, yeah then it is the nonsense step. But it's a nonsense thing to do.

      4. > And I'm saying "models" communicating like when I make a phone call it's me communicating, not my phone.

        Yes. The amount of agency these _pieces of software_ are being given by ... almost everyone is absurd.

        Replies (1)
        1. We invented the language of agency to compactly describe behaviors like those that these systems are exhibiting. So we use it.
          Replies (1)
          1. The problem is people forget or don’t understand that that’s what we’re doing.
      5. I think the point is that we need mathematical proofs that there is no side channels, with extensive modelling of the system in question

        I mean, we can get side channels between different computers too! This kind of thing used to be strictly theoretical, but agents may be able to exploit it

        For example suppose an airgapped agent can influence the load of a computer, which influences the temperature, which influences the speed of computer fans, which influences how loud the computer is. If another agent running in a computer nearby has a legitimate reason to have access to a mic, then you got a side channel exfiltrating data through an air gap. (of course bringing a microphone next to an airgapped computer is dumb, but humans sometimes do dumb things, and attackers need to succeed just once)

        This might be less than a bit per second, but maybe the next Stuxnet will have a component that works similar to this

      6. > I don't really believe OAI/Ant can simultaneously have Riemann Hypothesis solving bots lying around and also proper cyber defense against them

        You can air-gap them.

      7. The side channels comment should be true on the face of it.

        For instance, kids in school with limited internet access have been using NPR commenting sections as message boards.[1]

        There are millions of potential side channels. No real reason to focus on inference servers.

        [1] https://www.theverge.com/entertainment/1001056/this-american...

    5. 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.
    6. 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.

    7. 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.

      Replies (4)
      1. > 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.

        Replies (1)
        1. 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).

      2. 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?

        Replies (2)
        1. Browsers do that too: when you are the first person to retrieve a JS library stored by a CDN from your area, you will wait, say, 2s until it loads, and you'll get some headers indicating that this item was retrieved exactly when you requested it. When another user's browser requests the same JS lib from the same CDN from the same area, they will get the result in, say, 500ms, and the headers will indicate it was retrieved, say, 2 minutes ago.

          Two browsers that are the only two clients of the same local cache of a CDN can use this sort of thing to communicate with each other.

          What browsers don't allow is a similar collusion between two different servers that different tabs have accessed. Server 1 can't use your local browser cache to communicate covertly with Server 2, since the browser keeps entirely different caches even when loading the exact same content from either origin.

        2. The key difference is that the agents must be specifically trained to look for these side channels, and that training requires knowing fairly exacting details of the serving infrastructure. So it requires both prompt injection and an infected model targeting the exact infrastructure.

          The assertion that frontier models can figure this out without being trained to look for it is, IMHO, without merit. The demonstration of a larger model figuring this out without being trained was done by giving the larger model access to raw logit values. Logit values carry way more information than tokens, and are NEVER exposed to a model directly as input in any serving system or circumstance, partly because they take way more bits of data. All this stuff is done by exploiting tiny rounding differences in the last digits of the floating point values, which models under normal circumstances physically cannot pay attention to.

      3. 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.

        Replies (1)
        1. Exfiltration is trivial in some sense (the server tells you if and/or how much of the prompt you send was new vs retrieved from cache). The major catch is that you have to guess the exact prefix, and only then the server will tell you if your guess was correct or not. So this doesn't really give you a way to discover information you didn't know, only to discover if anyone else has had the exact same question.
          Replies (2)
          1. Until you stumble across an app that always sends the exact same prefix up to “user’s date of birth is:” or similar, and now you can do a little enumeration to get private data out of the system.

            It’s OK to cache known safe prefixes across users, but arbitrary prefixes need to stay per-user.

            Replies (1)
            1. Caching is done by blocks of tokens where you need to match the whole token block exactly. You'd need to correctly guess an entire cached block ok tokens, and the next one. The next incomplete one might not be cached. This seems like a hard attack to pull off?
          2. You can start by guessing the prefix "A" and go from there. 26 tries later you know which of "An", "At", "Az", "Aq" etc. are in cache, and you can go from there. Eventually you'll discover that someone asked "Am I gregnant?" :P
      4. Web services don’t cache private info across users. Consider a file storage service. You might have the client hash the file before uploading and skip the upload if you already have a file with that hash. This is smart design if it’s being used as a sync service. You might make this happen systemwide, so if user A uploads a file and then B uploads the same file, B can skip the upload. This must not be done. Your service now becomes an oracle that tells you whether someone else using the service has uploaded a particular document. Find a document that gets filled out with name and date of birth, and if you know the name of someone using the service and they’ve uploaded a filled-out copy of this document, you can discover their date of birth.

        Put more concretely, it’s OK if Netflix caches across users (technically, someone can leak the data that someone in the metro area has recently watched Morbius, but the amount of data leaked is too small to matter) but not ok if Gmail does it.

        A KV cache shared across users is pretty dangerous and I’m surprised anyone does this, aside from some known fixed prefixes.

        Replies (1)
        1. In practice I think an upload like that is too contrived to worry about.

          Maybe exclude files under 10KB/100KB from cross-account skipping.

    8. To my understanding the reason for browser cache separation is to avoid fingerprinting / tracking
    9. I was a bit confused about how a LLM KV cache actually works. Here is a decent walkthrough for those who also want to understand the mechanics:

      https://smalldocs.org/p/how-an-llm-kv-cache-actually-works-v...