Dyad: Extending Large Language Models with Native Typed Decision-Making
Organizations: Zhejiang University · SAP · Central South University · The Hong Kong University of Science and Technology (Guangzhou) ·
Abstract
We study how to build more capable general-purpose agents by extending large language models (LLMs) with native typed decision-making. We introduce Dyad, an architecture that augments a pretrained LLM with an environment-conditioned action encoder that embeds each candidate action description in parallel, then scores these embeddings against the LLM's internal state to yield a distribution over typed actions. By factorizing decision-making into representations of the evolving interaction state and environment-specific action semantics, Dyad introduces an inductive bias for learning reusable representations while keeping action scoring efficient even as the action space grows. We investigate two complementary reinforcement learning settings driven by environment interaction. With the LLM frozen, training the action encoder alone achieves consistent gains across four unseen environments, enabling modular adaptation without modifying any LLM parameters. Jointly optimizing both components outperforms conventional RL post-training across diverse interactive tasks and model scales, including a 3.80% average absolute gain on ALFWorld with a 9B model, while improving general knowledge, reasoning, and coding.
Figures & tables
| Approach | Logit for | Action interface |
|---|---|---|
| Joint action-set encoder | Joint scoring | |
| AR encoder | Independent scoring | |
| AR Single-token | Fixed token identifiers | |
| Dyad | Compositional scoring |
| Method | ALFWorld | WebShop |
|---|---|---|
| Base model | 45.66 | 33.43 |
| + GRPO | 85.01 | 73.44 |
| + Dyad-GRPO | 90.90 | 75.17 |
| + GiGPO | 89.32 | 81.52 |
| + Dyad-GiGPO | 91.02 | 83.65 |
| DIVE | CodeGym | |||||||
|---|---|---|---|---|---|---|---|---|
| Method | ALF | WebShop | SWE | ALF | WebShop | SWE | ||
| Qwen3.5-4B | 23.45 | 28.54 | 61.05 | 43.21 | 23.45 | 28.54 | 61.05 | 43.21 |
| + GRPO | 29.71 | 30.42 | 60.52 | 45.67 | 32.18 | 33.65 | 64.10 | 47.98 |
| + Dyad-GRPO | 31.52 +1.81 | 31.22 +0.80 | 64.54 +4.02 | 44.28 −1.39 | 33.65 +1.47 | 35.71 +2.06 | 65.26 +1.16 | 45.02 −2.96 |
| + GiGPO | 28.22 | 29.54 | 61.84 | 45.02 | 31.09 | 27.97 | 63.48 | 46.64 |
| + Dyad-GiGPO | 33.07 +4.85 | 32.45 +2.91 | 61.86 +0.02 | 47.10 +2.08 | 31.72 +0.63 | 31.21 +3.24 | 64.78 +1.30 | 49.61 +2.97 |
| Method | ALFWorld | WebShop | SWE | |
|---|---|---|---|---|
| Qwen3.5-4B | 23.45 | 28.54 | 61.05 | 43.21 |
| + Dyad w/ freezing | 27.75 | 31.47 | 63.88 | 43.78 |
| + Dyad w/o freezing | 31.52 | 31.22 | 64.54 | 44.28 |
| Qwen3.5-9B | 45.66 | 33.43 | 62.17 | 44.56 |
| + Dyad w/ freezing | 48.82 | 35.00 | 64.23 | 45.50 |
| + Dyad w/o freezing | 53.82 | 36.31 | 64.88 | 46.20 |
| Method | Easy | Standard | Hard | Overall | Latency | Output tokens |
|---|---|---|---|---|---|---|
| Jev 1.13 | 100.00 | 96.79 | 70.88 | 85.01 | — | |
| Qwen3.5-4B (w/o reasoning) | 100.00 | 96.41 | 56.32 | 77.89 | 0.32 | — |
| Qwen3.5-4B (w/ reasoning) | 98.76 | 95.62 | 59.88 | 79.10 | 1.02 | 102.82 |
| Qwen3.5-4B + Dyad (w/o reasoning) | 100.00 | 97.88 | 67.07 | 83.52 | 0.31 | — |
| Qwen3.5-4B + Dyad (w/ reasoning) | 100.00 | 98.72 | 72.08 | 86.18 | 1.35 | 120.44 |
| Projector | Validation reward |
|---|---|
| Mean pooling | 41.23 |
| MLP-weighted pooling | 48.20 |
| Attention pooling | 55.92 |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| ALFWorld | WebShop | |||
|---|---|---|---|---|
| Input format | Length | Success rate | Length | Success rate |
| MCP-style (default) | 2665.57 | 33.88 | 396.50 | 34.26 |
| Natural language | 132.64 | 31.01 | 151.50 | 29.87 |
| Records | ||||
| Split | Cases | MCP-style | Natural language | Total |
| Train | 1,050 | 1,050 | 1,050 | 2,100 |
| Validation | 140 | 140 | 140 | 280 |
| Test | 140 | 140 | 140 | 280 |
| Total | 1,330 | 1,330 | 1,330 | 2,660 |
| Environment | # Tasks | Avg. tools / actions |
|---|---|---|
| DIVE | 1,499 | 40.87 |
| CodeGym | 80,130 | 6.48 |
| ALFWorld | 3,827 | 14 |
| WebShop | 11,687 | 2 |
| -bench | 278 | 15.41 |
| SWE | 500 | 1 |
| Environment | ALFWorld | WebShop | DIVE | CodeGym |
|---|---|---|---|---|
| Interaction budgets | ||||
| Max prompt length (tokens) | 2,048 | 4,096 | 32,768 | 5,120 |
| Max interaction steps | 50 | 15 | 30 | 80 |
| Memory context window (steps) | 2 | 2 | 2 | 2 |
| Max response length (tokens/turn) | 512 | 512 | 512 | 386 |
| Sampling and batching | ||||
| ALFWorld | WebShop | |||||
|---|---|---|---|---|---|---|
| Model / Method | MMLU-Pro | HMMT | LiveCodeBench | MMLU-Pro | HMMT | LiveCodeBench |
| Qwen3.5-4B | 69.34 | 36.26 | 47.39 | 69.34 | 36.26 | 47.39 |
| + GRPO | 68.08 | 30.33 | 46.21 | 67.93 | 33.30 | 46.62 |
| + Dyad-GRPO | 68.96 | 33.36 | 47.02 | 69.02 | 34.76 | 47.11 |
| + GiGPO | 67.62 | 32.46 | 46.78 | 67.51 | 33.05 | 46.06 |
| + Dyad-GiGPO | 68.10 | 36.33 | 47.52 | 69.53 | 35.16 | 47.89 |
Language Model-Based Control
Language model-based control uses language models to interpret goals, choose actions, and steer AI systems or physical processes.
See all 173 papers