README.md

April 15, 2026 ยท View on GitHub

Anti-Length Shift: Dynamic Outlier Truncation for Training Efficient Reasoning Models

๐Ÿ“„ Paper | ๐Ÿค— Models

Official implementation of Dynamic Outlier Truncation (DOT) for efficient reasoning model training.

DOT Figure 1

๐Ÿ” Overview

Large reasoning models trained with reinforcement learning and verifiable rewards often become unnecessarily verbose on simple problems. In our paper, we identify this pathology as length shift and introduce Dynamic Outlier Truncation (DOT), a training-time intervention that trims only the extreme tail of response lengths in rollout groups that are already fully correct.

DOT is paired with two auxiliary components:

  • KL-Cov regularization, which stabilizes exploration when truncation changes the optimization landscape.
  • Predictive Dynamic Sampling, which adapts the oversampling factor online to maintain an effective batch size as more prompts become easy during training.

The full paper is available at arXiv:2601.03969.

๐Ÿง  Method At A Glance

  • Group-conditional truncation: truncate only when every sampled response in a rollout group is correct.
  • Statistical cutoff: for response lengths {L_i}, use T(q) = floor(mean(L) + alpha * std(L)).
  • Minimum reduction margin: truncate only when L_i - T(q) >= m, which avoids noisy micro-edits.
  • Reward recomputation: rerun the verifier after truncation and keep the GRPO update unchanged.
  • Stable scaling: add KL-Cov and Predictive Dynamic Sampling to prevent collapse and reduce sampling waste.

๐Ÿ“Š Main Results

  • On AIME-24, DOT reduces token usage by 78% while improving accuracy over the initial policy.
  • DOT consistently shifts the efficiency-performance Pareto frontier outward across 1.5B, 7B, and 32B scales.
  • Beyond math benchmarks, DOT also transfers well to code generation benchmarks such as HumanEval and LiveCodeBench.

DOT-4K and DOT-8K denote the training-time response budget used for the released checkpoint.

Math Benchmarks

DeepSeek-R1-Distill-Qwen-1.5B

MethodAIME-24 AccAIME-24 LenAIME-25 AccAIME-25 LenAMC AccAMC LenMATH-500 AccMATH-500 Len
Original30.01549823.51560464.11031684.05483
DeepScaleR-Preview40.3943030.2977873.8553888.93102
OverThink*28.311269โ€”โ€”โ€”โ€”81.24131
DAST*26.97745โ€”โ€”โ€”โ€”83.02428
O1-Pruner*28.910361โ€”โ€”โ€”โ€”82.23212
LC-R122.9800021.0796160.7456881.82362
Laser-DE-L409632.6834923.6783967.5499484.82763
AdaptThink30.9791723.3816663.0371082.51964
DLER-R135.8335425.6310173.5254487.11777
SIRI-low*40.4709329.6650974.6470087.72881
SIRI-high*43.61004932.2973975.9739688.44633
DOT-4K (Ours)43.1334229.2297977.5228189.21249
DOT-8K (Ours)52.2515134.2514380.6314089.91423

DeepSeek-R1-Distill-Qwen-7B

MethodAIME-24 AccAIME-24 LenAIME-25 AccAIME-25 LenAMC AccAMC LenMATH-500 AccMATH-500 Len
Original55.11308839.91424082.5766892.24026
DAPO-DeepScaleR57.6998340.81070584.5650892.53658
OverThink*53.18744โ€”โ€”โ€”โ€”89.42435
DAST*45.67578โ€”โ€”โ€”โ€”89.62162
O1-Pruner*49.29719โ€”โ€”โ€”โ€”86.62534
LC-R148.5758035.6798479.2376590.11536
Laser-DE-L409653.5589037.4632483.0338192.61883
AdaptThink55.21039338.31172381.5517791.02008
DLER-R150.6324133.6335783.5226292.41438
SIRI-low*56.1612241.5638685.8401593.52452
SIRI-high*57.1858545.4910686.7577393.73378
DOT-4K (Ours)54.8295841.1283586.1183693.41008
DOT-8K (Ours)62.6490348.5546487.6277994.31293

DeepSeek-R1-Distill-Qwen-32B

MethodAIME-24 AccAIME-24 LenAIME-25 AccAIME-25 LenAMC AccAMC LenMATH-500 AccMATH-500 Len
Original72.41029956.01238588.9657894.33557
Laser-DE-L8192*70.86785โ€”โ€”โ€”โ€”93.22314
DOT-4K (Ours)65.3262252.5278287.4147294.5861
DOT-8K (Ours)73.2415159.6530190.6278695.01369

Code Benchmarks

DeepSeek-R1-Distill-Qwen-1.5B

MethodHumanEval AccHumanEval LenLiveCodeBench AccLiveCodeBench Len
Original64.7437716.413706
DeepScaleR-Preview69.6465721.010076
LC-R159.8281415.111128
Laser-DE-L409664.5237217.56223
AdaptThink64.4385917.711117
DLER-R168.2235020.84132
DOT-4K (Ours)70.5230621.74481
DOT-8K (Ours)70.7286022.66903

DeepSeek-R1-Distill-Qwen-7B

MethodHumanEval AccHumanEval LenLiveCodeBench AccLiveCodeBench Len
Original81.9326531.89718
LC-R181.2217331.46634
Laser-DE-L409682.9211833.06051
AdaptThink81.6286232.28767
DLER-R182.9211833.06050
DOT-4K (Ours)85.0147433.03988
DOT-8K (Ours)85.1201934.85979

All numbers above follow the paper's evaluation protocol: 32 samples per problem, temperature=0.6, top_p=0.95, top_k=20, and a maximum generation budget of 32,768 tokens.

Released Checkpoints

๐Ÿค— Model Usage

pip install -U transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "U-rara/DOT-8K-7B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
)

messages = [
    {
        "role": "user",
        "content": (
            "Solve x^2 - 5x + 6 = 0. "
            "Please reason step by step, and put your final answer within \\boxed{}."
        ),
    }
]

inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(
    inputs,
    do_sample=True,
    temperature=0.6,
    top_p=0.95,
    top_k=20,
    max_new_tokens=8192,
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

๐Ÿ—‚๏ธ Repository Layout

This repository is a focused extension of verl v0.6.1. Most of the upstream training stack remains unchanged; the DOT-specific logic is concentrated in projects/dot/*, with only a few lightweight patches to core verl for logging and metric plumbing.

DOT-specific additions

Lightweight changes to verl

What stays upstream

  • The rest of verl/ is kept close to upstream verl v0.6.1, including the distributed training stack, rollout workers, and most PPO infrastructure.

โš™๏ธ Installation

This repository is built on top of verl v0.6.1.

conda create -n dot python=3.10 -y
conda activate dot
pip install -U pip
pip install -e .

For high-throughput training, we recommend using the same backend family as the paper: FSDP for distributed training and SGLang for rollout serving.

๐Ÿ“š Dataset

The paper uses:

๐Ÿš€ Training

The paper runner is projects/dot/runs/run_dot.sh.

Training startup is fully consistent with verl: we first start a Ray cluster, then launch the training script from any node that can access the cluster. Below is a typical example.

Example Ray startup:

# on the head node
ray start --head --port=6379

# on each worker node
ray start --address=<HEAD_NODE_IP>:6379

Then launch training from any node:

bash projects/dot/runs/run_dot.sh

The launch script is intentionally lightweight and assumes your cluster-specific environment has already been configured, including:

  • dataset and checkpoint paths in projects/dot/runs/run_dot.sh
  • runtime variables such as GPU_NUM, WORLD_SIZE, and any scheduler-provided node information
  • CUDA / NCCL / network environment variables required by your cluster
  • any logging or cache environment such as WANDB_API_KEY, Hugging Face cache paths, or internal storage mounts

๐Ÿ“– Citation

If you find this repository useful, please cite:

@article{wu2026dot,
  title={Anti-Length Shift: Dynamic Outlier Truncation for Training Efficient Reasoning Models},
  author={Wei Wu and Liyi Chen and Congxi Xiao and Tianfu Wang and Qimeng Wang and Chengqiang Lu and Yan Gao and Yi Wu and Yao Hu and Hui Xiong},
  journal={arXiv preprint arXiv:2601.03969},
  year={2026},
  url={https://arxiv.org/abs/2601.03969}
}

๐Ÿ™ Acknowledgement

This implementation is built on top of verl.