AREAL-DTA: Dynamic Tree Attention for Efficient Reinforcement Learning of Large Language Models

Jiarui Zhang, Yuchen Yang, Ran Yan, Zhiyu Mei, Liyuan Zhang +6 more
1/31/2026
1 citation
cs.LG
rl

Official code: areal-project/AReaL (5,867 stars, Python, Apache-2.0, last commit 2026-10-24).

Abstract

Reinforcement learning (RL)-based post-training for large language models (LLMs) is computationally expensive, as it generates many rollout sequences that frequently share long token prefixes. Existing RL frameworks usually process these sequences independently during policy training, i.e., repeatedly recomputing identical prefixes in both the forward and backward passes of policy gradient computation, leading to substantial inefficiencies in computation resources and memory usage.

Show full abstract

Although prefix sharing naturally induces a tree structure over rollouts, packed tree-mask approaches scale poorly in RL settings. In this paper, we introduce AReaL-DTA, which efficiently exploits prefix sharing in RL training. AReaL-DTA employs a depth-first search (DFS)-based execution strategy that dynamically traverses the rollout prefix tree during both forward and backward computation, materializing only a single root-to-leaf path at a time. To further improve scalability, AReaL-DTA incorporates a load-balanced distributed batching mechanism that dynamically constructs and processes prefix trees across multiple GPUs. On $τ^2$-bench, AReaL-DTA improves training throughput by up to $8.31\times$ over dense training and up to $1.70\times$ over sparse training. Our code is available at https://github.com/areal-project/AReaL/tree/feat/dta.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

The RL Bridge for LLM-based Agent Applications. Made Simple & Flexible.

5,867638Python, Jupyter NotebookFeb 24, 20251 months agoApache-2.0
agentllmllm-agentllm-reasoningmachine-learning-systems+3 more

Similar Papers

Cite this paper

@article{zhang2026arealdta,
  title  = {AREAL-DTA: Dynamic Tree Attention for Efficient Reinforcement Learning of Large Language Models},
  author = {Jiarui Zhang and Yuchen Yang and Ran Yan and Zhiyu Mei and Liyuan Zhang and Daifeng Li and Wei Fu and Jiaxuan Gao and Shusheng Xu and Yi Wu and Binhang Yuan},
  year   = {2026},
  eprint = {2602.00482},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.00482v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.00482.svg)](https://codeofpaper.com/paper/2602.00482)

Discussion