Files
myWiki/concepts/rspo.md

48 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "RSPO (Ranking-Guided Softmax Preference Optimization)"
created: 2026-06-28
updated: 2026-06-28
type: concept
tags: [generative-recommendation, reinforcement-learning, list-wise-optimization, ndcg]
sources: [GR4AD]
---
# Ranking-Guided Softmax Preference Optimization (RSPO)
RSPO 是 [[GR4AD]] 提出的排序引导 list-wise 强化学习算法用于在生成式推荐中显式优化列表级业务目标NDCG、eCPM
## 动机
LLM 领域的偏好优化方法DPO、GRPO、SimPO是为单输出对齐设计的。推荐系统需要生成**排序列表**per-item 奖励无法完整捕捉列表级优化目标。此外,训练样本不仅来自自生成 log还包含其他生产管线收集的数据参考分布可能缺失或过期。
## 目标函数
RSPO 的核心损失基于 LambdaRank 的 pairwise NDCG 优化思想:
$$\mathcal{L}_{RSPO} = -\mathbb{E}_{i,j}\left[\Delta_{ij} \cdot \log \sigma\left(\beta \log \frac{p_\theta(y_i|X)}{p_{ref}(y_i|X)} - \beta \log \frac{p_\theta(y_j|X)}{p_{ref}(y_j|X)}\right)\right]$$
其中 $\Delta_{ij} = |G_i - G_j| \cdot \left|\frac{1}{D_{|i-j|+1}}\right|$ 是 Lambda 权重——位置差异越大、增益差异越大的 item pair 获得越高的优化权重。$G_i = 2^{v_i} - 1$ 将价值 $v_i$eCPM映射为增益。
理论保证:$\mathcal{L}_{RSPO}$ 是 NDCG 代价的上界。
## 参考门控机制
训练样本来自异构来源,不是所有样本都有可靠的参考分布 $p_{ref}$
$$C_{ij} = \begin{cases} 1 & \text{if } \frac{1}{|\mathbb{E}_i \cup \{y_i\}|} \sum_{y_t} \left|\log \frac{p_\theta(y_t|X)}{p_{ref}(y_t|X)}\right| < \delta \\ 0 & \text{otherwise} \end{cases}$$
当当前模型与参考分布偏差过大时关闭参考约束以避免噪音正则化
## 与 DPO/GRPO 的对比
| 方法 | 优化粒度 | 排序感知 | 参考门控 |
|------|---------|---------|---------|
| DPO | pairwise preference | | |
| GRPO | group-wise relative | | |
| **RSPO** | **list-wise Lambda** | **是NDCG-aware** | **是(自适应门控)** |
## 参考
- [[GR4AD]]
- [[value-aware-supervised-learning|VSL]]
- [[unified-vsl-rspo|统一 VSL-RSPO 学习]]