README.md

May 21, 2026 · View on GitHub

AT2PO: Agentic Turn-based Policy Optimization via Tree Search

Paper Paper

Table of contents

Overview

we present AT2PO (Agentic Turn-based Policy Optimization via Tree Search), a unified framework for multi-turn agentic RL that addresses three core challenges: limited exploration diversity, sparse credit assignment, and misaligned policy optimization. AT2PO introduces a turn-level tree structure that jointly enables (a) Entropy-Guided Tree Expansion for strategic exploration and (b) Turn-wise Credit Assignment for fine-grained reward propagation from sparse outcomes. Complementing this, we propose (c) Agentic Turn-based Policy Optimization, a turn-level learning objective that aligns policy updates with the natural decision granularity of agentic interactions.

intro The overview of AT2PO framework.

Evaluation on seven benchmarks shows consistent improvement against existing strongest baselines.

Quick Start

Local Retriever Tool Initialization

Environment

conda create -y -n retriever python=3.10
conda activate retriever
conda install -y pytorch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 pytorch-cuda=12.1 -c pytorch -c nvidia
pip install transformers datasets pyserini
conda install -y -c pytorch -c nvidia faiss-gpu=1.8.0
pip install uvicorn fastapi

Download Retriever Data

save_path=/the/path/to/save
python rag_server/download.py --save_path $save_path
cat $save_path/part_* > $save_path/e5_Flat.index
gzip -d $save_path/wiki-18.jsonl.gz

Initialize Retriever API

conda activate retriever
# edit save_path in rag_server/launch.sh
bash rag_server/launch.sh

Dataset

# Process training set of multi-hop QA benchmarks
python data_process/hotpotqa_multihop_train.py
# Process test set of multi-hop QA benchmarks
python data_process/multihop_test_merge.py
# Process training set of single-hop QA benchmarks
python data_process/nq_singlehop_train.py
# Process test set of single-hop QA benchmarks
python data_process/singlehop_test_merge.py

Training Environment Installation

#create env
conda create -n atpo python==3.10
conda activate atpo

# install torch & flash-atten
pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124
pip3 install flash-attn --no-build-isolation

# install RL basic env
cd ATPO

# This is our RL env freeze file. You can install it as a supplement or use it for checking.
pip install -r requirements.txt

RL Training

Run GRPO training with Qwen3-4B on multi-hop QA setting.

conda activate atpo
bash AEPO/scripts/GRPO_qwen3_4B.sh

Run AEPO training with Qwen3-4B on multi-hop QA setting.

conda activate atpo
bash AEPO/scripts/AEPO_qwen3_4B.sh

Run AT2PO training with Qwen3-4B on multi-hop QA setting.

conda activate atpo
bash ATPO/scripts/ATPO_qwen3_4B.sh

Evaluation results

intro Left: The entropy comparison of different methods during training on multihop benchmark. Right: Performance comparison between all methods on HotpotQA dataset. Both are based on Qwen3-4B..

Hotpot2wikiMusiqBambAvg.NQTriviaQAPopQAAvg.
Backbone Model: Qwen3-4B
ReAct30.4232.9212.8344.8030.0126.7553.5335.3441.31
+ GRPO44.7651.4021.6050.4046.0245.9865.1749.1854.97
+ DAPO45.9551.8121.6851.2046.6547.5065.8451.0356.33
+ GSPO47.0749.2522.6850.4045.6946.0164.2448.5054.28
+ AEPO46.3651.7823.4750.4046.9545.7164.6650.1355.20
+ AT²PO (Ours)49.4452.9924.8056.8048.8147.9065.3251.8156.44
Backbone Model: Qwen3-8B
ReAct20.6619.059.5637.6018.6621.1641.8127.3732.19
+ GRPO47.0153.6921.3554.4048.0345.7067.4250.1756.29
+ DAPO49.6453.9124.0556.0049.4051.9969.0251.9058.53
+ GSPO49.5952.5524.3554.4048.5645.5667.7549.6656.15
+ AEPO49.1752.9724.0154.4048.6249.9268.3151.7757.94
+ AT²PO (Ours)51.3753.9726.5156.0050.1551.3369.5152.2658.82
Backbone Model: Qwen2.5-7B
ReAct2.851.940.584.002.104.3410.679.329.23
+ GRPO47.9446.8921.2747.2044.4845.5664.8649.9255.20
+ DAPO47.5047.9321.2744.0044.9152.2465.0050.0156.08
+ GSPO47.3547.3020.3244.0044.4049.6462.8749.7554.81
+ Tree-GRPO42.3942.0120.1542.4039.7947.5662.6944.7552.04
+ AEPO47.0547.5321.0344.0044.5149.0064.1350.2155.45
+ AT²PO (Ours)49.5848.0422.5651.2045.8352.9164.9050.4456.34

Table 1: Experiment results on three backbone models across seven datasets. The bolded values indicate the best result in comparisons.

Acknowledgement

The codebase is built upon veRL. The implementation is inspired by AEPO. We express our gratitude to these open-source projects.

Citation

@misc{zong2026at2poagenticturnbasedpolicy,
      title={AT$^2$PO: Agentic Turn-based Policy Optimization via Tree Search}, 
      author={Zefang Zong and Dingwei Chen and Yang Li and Qi Yi and Bo Zhou and Chengming Li and Bo Qian and Peng Chen and Jie Jiang},
      year={2026},
      eprint={2601.04767},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2601.04767}, 
}