Enabling Agents to Communicate Entirely in Latent Space — part 2/4

Cleaned-text code points [15755, 31379). Bibliography omitted here; source.md includes it.

We train the compression model using a composite objective: ℒ compress = λ task ​ ℒ task + λ pref ​ ℒ pref + λ geom ​ ℒ geom , \mathcal{L}_{\text{compress}}=\lambda_{\text{task}}\mathcal{L}_{\text{task}}+\lambda_{\text{pref}}\mathcal{L}_{\text{pref}}+\lambda_{\text{geom}}\mathcal{L}_{\text{geom}}, which jointly addresses the main failure modes of aggressive compression. The task loss ℒ task \mathcal{L}_{\text{task}} is a cross-entropy on the frozen actor’s predictions conditioned on H K H_{K} , ensuring downstream task utility.

Motivated by the non-uniform information density of token-level language communication Shannon (1951) ; Zhang et al. (2024a) , we introduce an uncertainty-weighted agreement loss that selectively aligns the actor’s behavior under compressed and full-length communications. Let p t ( A ) p_{t}^{(A)} , p t ( D ) p_{t}^{(D)} , and p t ( B ) p_{t}^{(B)} denote the actor’s output distributions at position t t when conditioned on H K H_{K} , H L H_{L} , and no latents, respectively. We define per-token weights w t ∝ max ⁡ ( ℋ ⁡ ( p t ( B ) ) − ℋ ⁡ ( p t ( D ) ) , 0 ) w_{t}\propto\max\!\big(\mathcal{H}(p_{t}^{(B)})-\mathcal{H}(p_{t}^{(D)}),\,0\big) . where ℋ ⁡ ( ⋅ ) \mathcal{H}(\cdot) denotes entropy, and compute ℒ pref = ∑ t ∈ S w t KL ( p t ( D ) ∥ p t ( A ) ) \mathcal{L}_{\text{pref}}=\sum_{t\in S}w_{t}\,\mathrm{KL}\!\left(p_{t}^{(D)}\,\|\,p_{t}^{(A)}\right) . This objective emphasizes positions where latents meaningfully reduces predictive uncertainty, while avoiding over-regularization where latents are uninformative.

Finally, to prevent representational drift under strong compression, we apply a latent geometry alignment loss. Let Z k ( A ) Z_{k}^{(A)} and Z k ( D ) Z_{k}^{(D)} denote the actor-side latent features induced by H K H_{K} and H L H_{L} after adapter processing and length alignment, and define their step-averaged directions z ¯ ( A ) \bar{z}^{(A)} and z ¯ ( D ) \bar{z}^{(D)} . We enforce ℒ geom = 1 − cos ⁡ ( z ¯ ( A ) , z ¯ ( D ) ) \mathcal{L}_{\text{geom}}=1-\cos\!\left(\bar{z}^{(A)},\,\bar{z}^{(D)}\right) , which preserves the global semantic orientation of the original communication in the compressed latent space. Together, these objectives encourage M ϕ M_{\phi} to learn an information-preserving bottleneck that discards redundant temporal structure while retaining task-critical functional and geometric properties. Full derivations are provided in Appendix B .

## 5 Experiments

#### Implementation Details.

We evaluate our approach on Alfworld ( Shridhar et al., 2020 ) , and MATH Hendrycks et al. (2021) . For Alfworld, training is conducted using data from Song et al. (2024) . Qwen2.5-7B/0.5B-Base Yang et al. (2024) and LLaMA3.1-8B-Base Dubey et al. (2024) are employed as actor agents to isolate benefits from instruction-tuning priors. CoT plans and compression-free latents are generated by their instruction-tuned counterparts. We use base models as reasoning models in the information compression experiments. Alfworld episodes are capped at 20 steps; unfinished episodes are failures. All models are trained using bfloat16, FlashAttention-2 Dao (2023) , and DeepSpeed Rajbhandari et al. (2020) . For the actor model, we optimize using AdamW Loshchilov and Hutter (2017) with a learning rate of 1 × 10 − 5 1\times 10^{-5} , a global batch size of 16, and a 3% linear warmup. We fix λ task = 1 \lambda_{\text{task}}=1 and dynamically anneal the regularization coefficients during training ( λ sep ∈ [ 0.1 , 1.0 ] \lambda_{\text{sep}}\in[0.1,1.0] , λ align ∈ [ 0.1 , 0.2 ] \lambda_{\text{align}}\in[0.1,0.2] ). Negative samples for ℒ sep \mathcal{L}_{\text{sep}} are constructed using latents from different tasks within the same batch. For information compression, we train the reasoning agent with a frozen actor, utilizing a learning rate of 5 × 10 − 5 5\times 10^{-5} and unit weights for all three compression objectives. We select the best models based on a 5% validation split. All reported results are averaged over three independent runs.

#### Baselines and variants in Interlat.

We study the feasibility of Interlat and compare against two baselines: CoT (full) uses complete CoT plans from instruction-tuned models for full-parameter supervised fine-tuning; No-CoT directly predicts final answers without any plan.

We further evaluate variants of our method: Text replaces latent messages with the corresponding CoT plan; No-Comm removes communication entirely; CrossTask replaces the current task’s latents with one sampled from a different task. Noised adds structured or unstructured perturbations to H H ; CovGauss and RandomRot preserve mean or covariance statistics while destroying higher-order structure. Qwen2LLaMA uses latents from Qwen2.5-7B to train LLaMA3.1-8B model. See Appendix B.1 for detailed implementation setups.

### 5.1 Main Results

Table 1 presents a comprehensive comparison of the Interlat framework against baselines. Latent communication improves agents’ task-solving performance, as evidenced by gains over both fine-tuned single-agent baselines and agents trained to communicate in natural language. We highlight several key observations below.

#### Latent Communication Prompts Exploration.

Beyond improvements in success rates, latent communication enables agents to execute longer yet more successful trajectories. By leveraging multiple plausible reasoning paths encoded in latents from other agents, the actor naturally exhibits more thorough exploratory behavior, even without explicit exploration training. Importantly, this increased trajectory length correlates with higher success rates rather than degraded efficiency, indicating informed exploration instead of random wandering. This behavior suggests a stronger environmental understanding enabled by latent communication, where parallel hypotheses are preserved and gradually resolved during action execution. This pattern is analyzed in detail in Appendix D .

#### Semantics and Learning Dynamics.

To assess whether the actor genuinely exploits latent information rather than superficial patterns, we conduct structured perturbation experiments. Replacing task-matched latents with cross-task latents leads to a substantial performance drop, indicating that the actor relies on task-specific reasoning content encoded in the latents. Performance degrades further under covariance-matched Gaussian surrogates or random orthogonal rotations, which preserve first- and second-order statistics while destroying higher-order structure, supporting the interpretation that the actor is sensitive to meaningful latent geometry rather than low-order moments alone. Additive and white noise perturbations similarly impair performance, further indicating reliance on structured internal information instead of noise-robust heuristics. Experiments involving cross-family latent inputs: feeding Qwen-derived latents to train an LLaMA actor, yield even stronger performance gains. Since these model families exhibit distinct latent manifolds, the improvement cannot be attributed to superficial architectural compatibility. Instead, it suggests latent-level inter-agent understanding that transfers across heterogeneous representations. This observation aligns with findings in language-space agentic systems, where heterogeneous LLM agents often outperform homogeneous ensembles due to complementary inductive biases and reduced error correlations Shinn et al. (2023) ; Wu et al. (2024) .To corroborate these findings qualitatively, Figure 4 and Appendix G visualize clear semantic clustering before and after processing by the communication adapter, confirming effective semantic alignment for downstream use.

Training dynamics further reveal how the actor learns to interpret latent communication. As shown in Figure 3 , the separation loss remains near ln ⁡ 2 \ln 2 for approximately the first 2k steps, indicating no effective distinction between matched and mismatched messages. It then drops sharply, marking an “aha” moment in which the actor begins to exploit and leverage task-relevant latents, consistent with the intended effect of the separation objective.

#### Generalization to Symbolic Reasoning.

To assess generalization beyond interactive settings, we evaluate Interlat on the MATH benchmark. While prior work on latent-space reasoning Hao et al. (2024) ; Shen et al. (2025) ; Ramesh and Li (2025) often reports degraded performance relative to CoT supervision, Table 2 reveals an intriguing inversion: although Interlat slightly underperforms on simpler problems, it surpasses the CoT baseline on the most challenging Level 5 tasks. We attribute this to the duality of linguistic constraints. For lower-complexity problems, the strict linearization of natural language acts as a beneficial regularizer, efficiently pruning the search space. However, for high-complexity tasks, this forced discretization causes a “premature collapse” of the reasoning distribution. In contrast, Interlat maintains a superposition of parallel hypotheses in its continuous representations. This capability allows the model to effectively conduct a broader search in latent space that is inaccessible to linear text decoding.

### 5.2 Compression Analysis

#### Compression Performance.

Theoretically, due to their substantially higher expressive capacity, latent communications can encode rich information in far fewer positions. To quantify this compression capacity, we consider two settings. i) Untrained: We directly use Qwen2.5-7B-Instruct to generate full-length latents for actor training, and then truncate them to shorter lengths. This setting evaluates the empirical compressibility of raw latents. ii) Trained: We use a compression-trained Qwen2.5-7B-Base reasoning model. Results on the LLaMA model are provided in Appendix E .

As shown in Table 3 , naive truncation performs best at moderate compression (50%) but degrades under more aggressive shortening, revealing the limits of untrained compression. In contrast, compression training enables consistently higher and more stable success rates across compressed latent ranging from 8 to 128 steps (around 1.8% to 28.8% of the full sequence), indicating that the reasoning model learns an information-preserving pattern that discards temporal redundancy while retaining task-relevant semantics. Furthermore, compression substantially improves efficiency, reducing end-to-end latency from 9.19 s to 0.39 s with 8-step latents (nearly 24 × 24\times speed-up), and further to 0.20 s with a lightweight bridge module by largely eliminating decode–re-encode overhead.

#### Why compression is effective.

To understand why compression preserves performance, we analyze its effect on the actor’s predictive uncertainty. We sweep the communication rate R ∈ [ 0 , 1 ] R\in[0,1] and measure the task-averaged relative change in cross-entropy (CE), Δ ​ CE % ​ ( R ) = 100 × CE comp ​ ( R ) − CE full CE full \Delta\mathrm{CE}\%(R)=100\times\frac{\mathrm{CE}_{\mathrm{comp}}(R)-\mathrm{CE}_{\mathrm{full}}}{\mathrm{CE}_{\mathrm{full}}} . As shown in Figure 6 , Δ ​ CE % \Delta\mathrm{CE}\% decreases monotonically with increasing R R and plateaus between roughly 30% and 75%, aligning with the range of strongest empirical performance. Across all rates, learned compression consistently yields lower CE than training-free truncation, with a maximum gap of approximately 11 percentage points, indicating better preservation of predictive confidence under reduced communication.

We further examine how information is preserved under compression via the actor’s output distributions. Following Hao et al. (2024) , broader probability mass is interpreted as indicating that the model maintains more plausible alternatives. Figure 5 analyzes the latent steps of the reasoning agent by plotting the cumulative probability mass of the top- 6 6 tokens across communication percentiles, with probabilities normalized over the top-10 tokens for comparability. Latents produced by the trained reasoning agent exhibit stable gaps between successive top- 6 6 curves across steps, whereas untrained compression shows rapid concentration toward top-ranked tokens. We quantify this behavior using a head-coverage statistic, P50 ⁡ ( S 10 ) \mathrm{P50}(S_{10}) , defined as the median cumulative probability mass of the top-10 tokens, which is consistently lower for the trained model and indicates broader support over plausible alternatives.

Together, these observations suggest that learned compression preserves diverse hypotheses across multiple reasoning steps, avoiding collapse into a single trajectory and thereby retaining richer information for downstream decision making.

### 5.3 Ablation Studies

Table 4 presents a systematic ablation of the training components. For the actor model, removing curriculum learning forces the model to interpret latents from scratch, leading to extremely unstable training dynamics and severely degraded comprehension (Appendix, Figure 7 ). Removing the separation loss induces shortcut behavior; the model learns to ignore the latent communication and rely only on the textual task prompt, causing performance to regress toward the single agent baseline. Removing the communication adapter causes the largest drop; despite generating fluent and coherent responses, the model fails to complete tasks, underscoring the adapter’s role in bridging the agents’ latent spaces and enabling interpretation of latents.

For the reasoning model, which is trained to generate compressed latents, we ablated its three core loss functions with compressed target length K = 128 K=128 . The most critical component is the direction alignment loss ( ℒ geom \mathcal{L}_{\mathrm{geom}} ). This highlights the importance of maintaining geometric consistency between the compressed latents and the uncompressed ones. The agreement loss ( ℒ pref \mathcal{L}_{\mathrm{pref}} ) is also vital, as removing it significantly impairs the model’s ability to produce latents that elicit the correct behavior from the actor. Removing the cross-entropy loss ( ℒ task \mathcal{L}_{\mathrm{task}} ) degrades performance on seen tasks but slightly improves unseen performance, suggesting a minor trade-off between in-distribution optimization and generalization. We leave a deeper investigation into this trade-off to future work.

### 5.4 Generalization to Complex Topologies.

To directly verify that Interlat scales beyond simple pairwise communication, we evaluate it on 3-agent topologies using the Qwen2.5-0.5B-Base model on the ALFWorld benchmark. We ensure the entire multi-agent system can be jointly trained end-to-end by having all non-output sender agents generate fixed-length ( N = 32 N=32 ) messages entirely in latent space. Specifically, we investigate two distinct configurations:

Sequential Chain Topology. In this sequential structure (Agent 1 → \rightarrow Agent 2 → \rightarrow Actor), a Strategist agent first generates a high-level latent plan capturing the task goals. A Compiler agent then refines this received plan into a more actionable representation before passing it to the final Actor.

Parallel Tree Topology. This parallel structure ([Agent 1 + Agent 2] → \rightarrow Actor) utilizes an Explorer agent to generate diverse candidate reasoning paths and a Critic agent to produce verification constraints simultaneously. To dynamically fuse these parallel messages, we extend the communication adapter with an additional learned projector that maps the aggregated latents from multiple senders into a unified representation for the Actor.