Optimal Transport-Based Token Weighting scheme for Enhanced Preference Optimization

Meng Li, Guangda Huzhang, Haibo Zhang, Xiting Wang, Anxiang Zeng
5/24/2025
cs.CLcs.AIcs.LG

Official code: Mimasss2/OTPO (9 stars, last commit 2025-05-22).

Abstract

Direct Preference Optimization (DPO) has emerged as a promising framework for aligning Large Language Models (LLMs) with human preferences by directly optimizing the log-likelihood difference between chosen and rejected responses. However, existing methods assign equal importance to all tokens in the response, while humans focus on more meaningful parts. This leads to suboptimal preference optimization, as irrelevant or noisy tokens disproportionately influence DPO loss. To address this limitation, we propose \textbf{O}ptimal \textbf{T}ransport-based token weighting scheme for enhancing direct \textbf{P}reference \textbf{O}ptimization (OTPO). By emphasizing semantically meaningful token pairs and de-emphasizing less relevant ones, our method introduces a context-aware token weighting scheme that yields a more contrastive reward difference estimate. This adaptive weighting enhances reward stability, improves interpretability, and ensures that preference optimization focuses on meaningful differences between responses. Extensive experiments have validated OTPO's effectiveness in improving instruction-following ability across various settings\footnote{Code is available at https://github.com/Mimasss2/OTPO.}.

View on arXivView PDF

Code Implementations(1)

Mimasss2/OTPOOfficial100%

[ACL 2025] Optimal Transport-Based Token Weighting scheme for Enhanced Preference Optimization

90Python, MakefileMay 22, 20251 years ago

Similar Papers

Cite this paper

@article{li2025optimal,
  title  = {Optimal Transport-Based Token Weighting scheme for Enhanced Preference Optimization},
  author = {Meng Li and Guangda Huzhang and Haibo Zhang and Xiting Wang and Anxiang Zeng},
  year   = {2025},
  eprint = {2505.18720},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.18720v1}
}

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

Discussion