TIS-DPO: Token-level Importance Sampling for Direct Preference Optimization With Estimated Weights

Aiwei Liu, Haoping Bai, Zhiyun Lu, Yanchao Sun, Xiang Kong +7 more
2/12/2026

No official code found. Best implementation: exlaw/TIS-DPO (14 stars, Apache-2.0, last commit 2025-04-16).

Abstract

Direct Preference Optimization (DPO) has been widely adopted for preference alignment of Large Language Models (LLMs) due to its simplicity and effectiveness. However, DPO is derived as a bandit problem in which the whole response is treated as a single arm, ignoring the importance differences between tokens, which may affect optimization efficiency and make it difficult to achieve optimal results. In this work, we propose that the optimal data for DPO has equal expected rewards for each token in winning and losing responses, as there is no difference in token importance. However, since the optimal dataset is unavailable in practice, we propose using the original dataset for importance sampling to achieve unbiased optimization. Accordingly, we propose a token-level importance sampling DPO objective named TIS-DPO that assigns importance weights to each token based on its reward. Inspired by previous works, we estimate the token importance weights using the difference in prediction probabilities from a pair of contrastive LLMs. We explore three methods to construct these contrastive LLMs: (1) guiding the original LLM with contrastive prompts, (2) training two separate LLMs using winning and losing responses, and (3) performing forward and reverse DPO training with winning and losing responses. Experiments show that TIS-DPO significantly outperforms various baseline methods on harmlessness and helpfulness alignment and summarization tasks. We also visualize the estimated weights, demonstrating their ability to identify key token positions.

View on arXivView PDF

Code Implementations(1)

exlaw/TIS-DPOCommunity100%
Apache-2.0

Code and data for paper "TIS-DPO: Token-level Importance Sampling for Direct Preference Optimization With Estimated Weights" Accepted by ICLR 2025

143Shell, PythonMar 16, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{liu2026tisdpo,
  title  = {TIS-DPO: Token-level Importance Sampling for Direct Preference Optimization With Estimated Weights},
  author = {Aiwei Liu and Haoping Bai and Zhiyun Lu and Yanchao Sun and Xiang Kong and Simon Wang and Jiulong Shan and Albin Madappally Jose and Xiaojiang Liu and Lijie Wen and Philip S. Yu and Mengsi Cao},
  year   = {2026},
  eprint = {2410.04350},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.04350},
  journal = {ICLR 2024 2024}
}

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/2410.04350.svg)](https://codeofpaper.com/paper/2410.04350)

Discussion