TL;DR
Give an LLM agent the exact same task twice, and it might call completely different tools, invent divergent strategies, or contradict itself—even with temperature set to zero. To tame this chaos, the authors introduce Recursive Semantic Divergence (RSD), a metric borrowed from reinforcement learning that predicts how much an agent's future trajectory will butterfly-effect from its current state. Better yet, using RSD as an unsupervised reward signal during fine-tuning makes agents dramatically more reliable without needing a single ground-truth label.
What Problem Does This Paper Address?
Imagine deploying an autonomous healthcare or coding agent. You don't just want it to get the right answer sometimes; you want predictable, repeatable behavior every time it runs. Yet, multi-step LLM agents suffer from a severe butterfly effect. Even under greedy decoding (temperature = 0), tiny sources of randomness—like floating-point quirks, hardware variance, or slightly varied tool outputs—can nudge an agent onto wildly different paths over a 10-turn conversation.
Current benchmarks mostly check whether an agent crossed the finish line (task correctness), completely ignoring how erratically it behaved along the way. Existing uncertainty metrics look at token-level probabilities or cluster single responses by meaning, which is myopic: an agent can look confident on turn one while setting up a massive divergence by turn five. We lacked a way to measure—and enforce—behavioral consistency across an entire multi-turn trajectory.
Methods
To look ahead in time, the authors adapt bisimulation metrics from classical reinforcement learning (RL). In standard RL, two states are "bisimilar" if they yield the same immediate reward and lead to states that also yield the same future rewards.
Here’s how the authors reinvent this for LLM agents without needing human labels:
- Swapping Rewards for Meaning: Instead of comparing scalar RL rewards, they compare agent actions (text responses and tool calls) using Natural Language Inference (NLI). If two independent actions from the same history entail each other (e.g., calling the same API with equivalent arguments, regardless of phrasing), their distance is
0. Contradictions score1; neutral overlaps score0.5. - Recursive Lookahead: RSD defines consistency recursively: the divergence of a state is the expected NLI disagreement right now, plus the discounted divergence of the future states those actions lead to.
- Fast Neural Approximation: Unrolling infinite future trees at test time is impossible. Using a sampling-based RL technique called MICo (Matching under Independent Coupling) and temporal-difference learning, they train a lightweight neural network on paired agent rollouts.
- Self-Distance as a Reward: Because MICo computes a "diffuse" metric, measuring the distance between a state and itself ($U(s,s)$) isn't necessarily zero—it actually measures the width of the agent's future tree of possibilities! At inference or during Group Relative Policy Optimization (GRPO) fine-tuning, a single forward pass gives an instant consistency score to optimize against.
Datasets
No new benchmarks were introduced. The authors evaluate RSD on two existing multi-turn, tool-use agent benchmarks using Qwen-2.5 (3B and 7B) and Qwen-3.5 models:
- ToolSandbox: Evaluates stateful, multi-step tool calling and implicit dependencies.
- $\tau^2$-bench: Tests conversational agents in complex, dual-control environments (such as multi-turn airline customer service) where early choices heavily compound.
Key Insights and Ideas
- Consistency $\neq$ Correctness: An agent that reliably crashes on turn one is 100% consistent! Interestingly, RSD fine-tuning didn't collapse into "consistently failing" modes because the RSD network is trained on rollouts from an already-competent base model, keeping policy updates anchored in useful behavior space. (Though in one 7B experiment, RSD did lock onto a failing path on a tricky sample—proving the theoretical point!)
- Local Confidence Doesn't Buy Global Stability: Minimizing standard token entropy or single-turn semantic entropy often failed—and sometimes made trajectory variance worse. Being super confident about the next word doesn't stop an agent from drifting across turns.
- Pure Consistency Beats Hybrid Rewards: Surprisingly, mixing the unsupervised RSD reward with actual task-progress rewards degraded both consistency and task performance compared to pure RSD. Why? Task progress in multi-turn setups is sparse (often zero until the final step), injecting noise into the smooth, dense RSD training signal.
- Mathematical Guarantees: The authors prove that low RSD directly bounds worst-case behavior: for example, an RSD score of
0.1guarantees at least 80% of the agent's policy mass is concentrated on one dominant semantic action class.
Key Results
Measuring consistency via the Coefficient of Variation (CV = standard deviation / mean, where lower means tighter, more repeatable runs) across 8 trials per task:
- Big Drops in Behavioral Variance: Fine-tuning with RSD slashed Area Under the Progress Curve (AUC) CV by 50.5% on ToolSandbox (0.90 down to 0.44) and 30.9% on $\tau^2$-bench (1.32 down to 0.91) for Qwen-2.5-3B. Smaller models saw the biggest gains because they start out much more erratic than 7B models.
- Broad Wins Without Labels: Across Qwen-2.5 and Qwen-3.5, RSD lowered AUC variance in 7 out of 8 model-benchmark pairings and boosted final task progress in all 8—rivaling Supervised Fine-Tuning (SFT) without needing expert demonstrations.
- Direct Semantic Alignment: When GPT-4.1 directly audited outputs across runs on ToolSandbox (7B), RSD-tuned agents cut semantic disagreement by 52.8%, whereas SFT barely budged inconsistency (-1.1%) despite memorizing right answers.
Limitations and Future Work
- Garbage In, Garbage Out on Competence: Because RSD measures stability rather than truth, applying it to a weak or randomly initialized model could reinforce consistently bad habits; weak policies would need RSD paired with dense correctness rewards.
- NLI Bottlenecks: The entire metric leans on an underlying NLI classifier. If the NLI model misjudges whether two subtle tool calls are functionally equivalent, the RSD signal degrades.
- Domain Transfer: The learned RSD estimator is tied to the rollout distribution it was trained on and may need retraining or adaptation when moved to brand-new agent environments.
Summary updated