NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Token-level Direct Preference Optimization

Yongcheng Zeng, Guoqing Liu, Weiyu Ma, Ning Yang, Haifeng Zhang, Jun Wang

Introduction

Aligning Large Language Models (LLMs) with human values and specific task requirements is a critical step in modern AI development. While Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO) have become the standard for this alignment, they often treat model responses as monolithic units. This sentence-level approach overlooks the auto-regressive nature of LLMs, where text is generated token-by-token. Researchers have introduced Token-level Direct Preference Optimization (TDPO) to address this granularity gap, offering a more precise mechanism for alignment that preserves linguistic diversity while improving instruction-following capabilities.

The Challenge: Divergence Inefficiency

Standard alignment techniques typically compare two full-length responses and provide a scalar reward or preference signal based on the entire sequence. However, the authors identify a significant flaw in this approach termed "divergence inefficiency." In sentence-level DPO, the Kullback-Leibler (KL) divergence—a metric measuring how much the fine-tuned model drifts from its original reference state—tends to skyrocket for dispreferred (rejected) responses.

This imbalance suggests that the model is not learning nuanced preferences but is instead "hacking" the reward system by drastically altering its probability distribution to avoid rejected outputs. The consequence is a measurable loss in creativity and linguistic diversity, as the model converges toward a narrow set of "safe" but repetitive outputs.

Methodology: Granular Optimization

TDPO reformulates the optimization problem by shifting the focus from the complete sentence to individual tokens. This approach is built upon several key technical innovations:

1. Markov Decision Process (MDP) Formulation

By treating text generation as a Markov Decision Process, the researchers utilize the Bellman equation to decompose the overall sentence reward into specific token-level actions. This allows the optimization objective to be applied at each step of the generation process.

2. Sequential KL (SeqKL) Constraint

Unlike standard DPO, which applies a single penalty at the end of a sequence, TDPO implements a forward KL divergence constraint at every token step. This ensures that the model's probability distribution remains anchored to the reference model throughout the entire generation, preventing the massive drifts seen in sentence-level methods.

3. TDPO1 vs. TDPO2

The paper explores two variants of the algorithm:

  • TDPO1: The base token-level objective that applies the SeqKL constraint uniformly.
  • TDPO2: An enhanced version that introduces a "stop-gradient" operator to the KL term of the preferred response. This prevents the model from over-optimizing the "chosen" answers and focuses the learning signal on suppressing the divergence of the "rejected" answers, leading to significantly better training stability.

Like the original DPO, TDPO is a "direct" method, meaning it does not require the training or maintenance of a separate reward model, preserving the efficiency of the alignment pipeline.

Experimental Results

The researchers evaluated TDPO against three major benchmarks: the IMDb Sentiment Dataset, Anthropic’s Helpful and Harmless (HH) dataset, and MT-Bench.

Alignment and Diversity

On the Anthropic HH dataset, TDPO2 demonstrated a clear superiority over traditional DPO. It achieved an Alignment Accuracy of 67.33%, compared to DPO’s 59.43%. More importantly, TDPO2 maintained a much higher Diversity (Entropy) score of 4.915, whereas DPO’s diversity dropped to 3.196. This confirms that token-level constraints allow the model to remain helpful and safe without sacrificing the richness of its language.

General Proficiency

In the MT-Bench evaluation—a GPT-4-based judge of multi-turn conversation quality—TDPO2 consistently outperformed Supervised Fine-Tuning (SFT), PPO, and DPO. Head-to-head comparisons showed that TDPO2 had a win rate of nearly 30% against the SFT baseline. The high rate of "ties" in these evaluations further suggests that TDPO2 rarely produces inferior results compared to established baselines, while frequently providing superior nuance.

Key Insights

The success of TDPO highlights two major findings in LLM alignment:

  • Granularity is Essential: Because LLMs function auto-regressively, token-level constraints are mathematically more consistent with the model's underlying architecture than sentence-level constraints.
  • Efficiency Frontiers: Analysis of "frontier" curves indicates that for any specific level of KL divergence, TDPO achieves a higher reward than DPO. This proves that TDPO is a more efficient optimizer, extracting more performance from the model with less distortion of the original pre-trained knowledge.

Limitations and Future Work

While TDPO represents a significant advancement, the authors note several areas for future exploration. The current research primarily focuses on single-turn dialogues and offline preference optimization. Future iterations could extend TDPO to multi-turn conversational strategies or iterative training loops where the model is updated continuously as new human preferences are sampled. Additionally, while the computational overhead of calculating KL divergence at every token is manageable, further optimization could make TDPO even more accessible for massive-scale model alignment.

Summary updated

BibTeX
@inproceedings{zeng2024token,
  author = {Yongcheng Zeng and Guoqing Liu and Weiyu Ma and Ning Yang and Haifeng Zhang and Jun Wang},
  title = {{Token-level Direct Preference Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=1RZKuvqYCR},
}
Figure