TIAO: Token Importance-Aware Policy Optimization for Text Summarization
Qixiu Li · Chenlong Bao · Xiang Zhu · Xiaoyong Li · Ruixin Cao · Shukai Chen · Zhenxiong Zhou
TIAO adds hierarchical token-level credit assignment to group-relative policy optimization for abstractive summarization.
- 📌 Overview
- 🧠 Method
- ✨ Key Features
- 🏗️ Architecture
- 📊 Results
- 📦 Installation
- 📂 Data Preparation
- 🚀 Training
- 🔍 Inference
- ⚙️ Configuration
- 📁 Project Structure
- 📝 Citation
- 🙏 Acknowledgements
Sequence-level rewards assign one scalar signal to an entire generated summary, even though individual tokens can depend on the source document to very different degrees. TIAO estimates this dependency at the completion-token level and uses it twice: first to rescale each trajectory advantage, and then to gate policy gradients to the most source-sensitive tokens.
This release provides the complete training and distributed inference path for CNN/DailyMail 3.0.0 with Qwen2.5-7B-Instruct and UniEval-based rewards. The training launcher targets eight Slurm nodes with four A100 GPUs per node, while all system-specific module names and storage paths remain configurable.
For every generated trajectory, TIAO independently masks 50% of eligible source tokens. The same completion is then teacher-forced under the full and masked prompts. Let
The trajectory score is the mean of
The released configuration uses beta=0. The full-versus-masked KL estimate is therefore a detached credit-assignment signal, not a reference-policy penalty.
- Token-level dependency estimation: compares the sampled-token likelihood under full and randomly masked source contexts.
- Trajectory-aware advantage scaling: aggregates token importance without introducing another scaling hyperparameter.
-
Exact sparse credit assignment: retains exactly
$\lceil 0.4L \rceil$ of the$L$ valid completion tokens per trajectory, including deterministic tie handling. - Holistic rewards: combines UniEval coherence, consistency, fluency, and relevance with a unique-bigram repetition score.
-
Distributed execution: supports 32-rank training and inference with DeepSpeed ZeRO-3,
torchrun, shared checkpoints, and rank-aware output aggregation. - Global test metrics: inference accumulates per-sample statistics across all ranks before computing final means and standard deviations.
Table 1. CNN/DailyMail evaluation results. Up arrows indicate higher-is-better metrics, while the down arrow indicates lower standard deviation is better. Bold values and color highlights follow the supplied results table.
The reference environment uses Python 3.10, CUDA 11.8, and PyTorch 2.5.0.
conda create -n tiao python=3.10 -y
conda activate tiao
pip install -r requirements.txt
python -m nltk.downloader punkt punkt_tabThe Slurm launchers expose the compiler, CUDA, MPI, cuDNN, and Miniforge module names as environment variables. Adapt those values to the module tree on the target cluster.
Prepare CNN/DailyMail version 3.0.0 as local Parquet shards with the standard article and highlights fields:
data/
└── cnn_dailymail/
└── 3.0.0/
├── train-*.parquet
├── validation-*.parquet
└── test-*.parquet
Place the two local model directories under models/, or override their locations when submitting a job:
models/
├── Qwen2.5-7B-Instruct/
└── unieval-sum/
Training uses the train split and periodic evaluation uses the validation split. The test split is reserved for final inference.
Submit the canonical 8-node × 4-GPU job from the repository root:
sbatch ./scripts/train_tiao_qwen2_5_7b_cnn_dailymail.shOverride local artifacts and the output root without editing the launcher:
sbatch --export=ALL,\
TIAO_BASE_MODEL_PATH=/path/to/Qwen2.5-7B-Instruct,\
TIAO_UNIEVAL_MODEL_PATH=/path/to/unieval-sum,\
TIAO_DATASET_PATH=/path/to/cnn_dailymail/3.0.0,\
TIAO_OUTPUT_ROOT=/path/to/outputs \
./scripts/train_tiao_qwen2_5_7b_cnn_dailymail.shResume a complete DeepSpeed checkpoint with:
sbatch --export=ALL,TIAO_RESUME_FROM_CHECKPOINT=/path/to/checkpoint-N \
./scripts/train_tiao_qwen2_5_7b_cnn_dailymail.shPeriodic checkpoints and the consolidated final model are written below outputs/tiao/<job-id>-<model-name>/.
Supply any complete Transformers checkpoint or final-model directory through the launcher:
sbatch --export=ALL,INFERENCE_MODEL_PATH=/path/to/checkpoint-or-final-model \
./scripts/infer_tiao_cnn_dailymail.shBy default, distributed inference covers the complete CNN/DailyMail test split with greedy decoding. Each rank receives a disjoint slice. Predictions are merged in dataset order, and all reported means are computed from globally accumulated per-sample values rather than from an unweighted mean of batch means.
Inference writes predictions.jsonl, metrics.json, rank-local parts, and rank logs below outputs/inference/<job-id>-<model-label>/.
| Setting | Default |
|---|---|
| Per-rank micro batch | 4 completions |
| Gradient accumulation | 2 |
| Effective completion batch | 256 |
| Generations per prompt | 8 |
| Steps per generation | 2 |
| Learning rate | 5e-7 |
| Maximum gradient norm | 0.4 |
| Maximum prompt length | 2,048 tokens |
| Maximum completion length | 512 tokens |
| Source-mask probability | 0.5 |
| Token keep ratio | 0.4 |
| Reward standardization | enabled |
| Precision | BF16 with TF32 enabled |
| Checkpoint interval | 100 optimizer steps |
| Evaluation interval | 100 optimizer steps |
The DeepSpeed configuration uses ZeRO Stage 3 with CPU optimizer offload and gathers 16-bit weights when saving a model.
TIAO/
├── .gitattributes
├── .gitignore
├── assets/
│ ├── tiao-banner-4k.png
│ ├── tiao-architecture.png
│ └── tiao-results-cnn-dailymail.png
├── configs/
│ └── deepspeed_zero3_offload.json
├── scripts/
│ ├── infer_tiao_cnn_dailymail.sh
│ └── train_tiao_qwen2_5_7b_cnn_dailymail.sh
├── inference_cnn_dailymail.py
├── tiao.py
├── tiao_rollout_trainer.py
├── tiao_trainer.py
├── unieval.py
├── utils.py
├── requirements.txt
└── README.md
Model weights, datasets, generated outputs, cluster logs, and caches are intentionally excluded from version control.
If you find TIAO useful, please cite the arXiv paper:
@misc{li2026tiaotokenimportanceawarepolicy,
title={TIAO: Token Importance-Aware Policy Optimization for Text Summarization},
author={Qixiu Li and Chenlong Bao and Xiang Zhu and Xiaoyong Li and Ruixin Cao and Shukai Chen and Zhenxiong Zhou},
year={2026},
eprint={2609.16748},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2609.16748},
}This implementation builds on TRL, Transformers, Qwen2.5-7B-Instruct, and UniEval. CNN/DailyMail dataset information is available through the dataset card.

