Communicating Agents’ Thoughts: StateBridge Preserves Information In Text Messages

When one AI agent sends a text message to another, the tokens it sends contain less information than the hidden states of the agent’s LLM.

Share
Diagram showing how sender and receiver agents communicate in ordinary text communication and via an alignment interface in StateBridge

When one AI agent sends a text message to another, the tokens it sends contain less information than the hidden states of the agent’s LLM. Researchers enabled agents based on the same LLM to transmit hidden states without further training.
 
What’s new: Yanwen Peng and colleagues at the University of Sheffield developed StateBridge, a method that enables agents that are based on the same LLM to communicate with one another through hidden states without further training. The code is freely available for both commercial and noncommercial uses under the Apache 2.0 license.
 
Key insight: Each token a sender agent writes has two vectors: (i) the hidden state computed by the final layer of the sender agent's model prior to generating the token, which holds information such as the agent's confidence in the token and traces of alternatives it did not choose, and (ii) the resulting token embedding. Sending the token embedding alone loses information in the hidden state. Sending the hidden state keeps that information, but the receiver cannot read it: The two vectors point in different directions and differ greatly in magnitude, and the receiver was pretrained to take token embeddings as its input. So the hidden states have to be moved toward the receiver’s input space. This is the key to communicating the sender agent’s thoughts directly.
 
How it works: The researchers built agents based on three Qwen3 models (4, 8, and 32 billion parameters) and OLMo3-7B-Think. To produce inter-agent communications, they used four agents in sequence: planner, critic, refiner, judge (roles defined by LatentMAS, an earlier method that feeds the sender agent’s key-value cache into every layer of the receiver agent’s model). Given a prompt, the planner outlines a response, the critic checks the plan, the refiner revises the plan, and the judge uses the revised plan to produce final output. At each handoff, the StateBridge method converts the sender’s hidden states into vectors the receiver takes as input in place of the sender’s generated tokens.

  • The authors paired the sender’s hidden states with their token embeddings. The sender generated its message, such as the planner’s plan, as text, one token at a time. The authors kept the hidden states of the message’s last 64 tokens, since later hidden states reflect more of the preceding text.
  • They rotated the hidden states toward their token embeddings. They normalized both sets of vectors, the 64 hidden states, and their 64 token embeddings, so both had a mean of zero and equal variance. Then the authors found the single rotation that brought the hidden states, on average, as close as possible to their own token embeddings without modifying the distances and angles between the hidden states. Last, they scaled the rotated hidden states to the token embeddings’ original mean and variance.
  • After the rotation, they gave every hidden state the same magnitude. Matching the token embeddings’ mean and variance adjusted the hidden states as a set, not one by one, so individual hidden states could still be larger than token embeddings. In this way, they scaled each hidden state to the average magnitude of all the token embeddings in the model’s vocabulary.
  • They modified each hidden state to be more similar to its closest token embedding. For each hidden state, they searched the vocabulary for the token embedding that pointed in the direction most similar to that hidden state’s. (It didn’t necessarily correspond to the token the sender wrote.) They replaced each hidden state with a weighted average: 70 percent the hidden state and 30 percent its closest token embedding. This weighted average moved each hidden state to be more similar to the kinds of inputs the receiver saw during pretraining.
  • They prepended the resulting 64 hidden states to the token embeddings of the receiver’s prompt. The receiver then became the sender and generated the next message. (The judge‘s message was the final response).

Results: The authors tested StateBridge with the Qwen3 models and OLMo3-7B-Think. The tests included answering questions (MedQA), coding (HumanEval+), and math (GSM8K) plus, for the two larger Qwen3 models, further math and science benchmarks (such as GPQA-Diamond). With every model tested, their method achieved higher average results than three alternatives (a single agent working alone, the same four agents handing off text, and LatentMAS). It outperformed the best of them by 2.4 to 2.9 percentage points.

  • StateBridge achieved its largest margin over the strongest alternative on GPQA-Diamond’s graduate-level science questions. With Qwen3-8B, agents using StateBridge solved 52.5 percent of the questions, compared with 45.5 percent using LatentMAS and 39.9 percent using a single agent.With OLMo3-7B-Think, agents using StateBridge solved an average of 76.7 percent of problems across benchmarks while the strongest alternative, four agents exchanging text, achieved 73.9 percent.
  • LatentMAS solved 55.1 percent, below a single agent (71.8 percent).Why it matters: Compared to text communication, StateBridge raised the average performance of multi-agent systems for every model tested. And the barrier to experimentation is low, since you can jump straight in without needing to collect training data or train a model.  

We’re thinking: StateBridge passes along only the hidden states for the last 64 tokens of each message, however long the message. Yet agents that used StateBridge achieved higher average scores than agents that handed off the full text. If 64 converted hidden states can stand in for a whole message, similar conversions might let agents pass other long inputs, such as retrieved documents or tool outputs, as a small number of vectors.