Files
myWiki/concepts/span-kto.md

49 lines
1.7 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: "Span-KTO"
created: 2026-07-02
updated: 2026-07-02
type: concept
tags: [preference-learning, kto, user-feedback, training, alignment]
sources:
- "[[verification-horizon-no-silver-bullet]]"
---
# Span-KTO
**Span 级 KTO**Kahneman-Tversky Optimization将 KTO 偏好学习从 response 级别扩展到 span 级别,每个 span 对应一个完整用户请求的 agent 回复。
## 与标准 KTO 的关系
- **KTO**Ethayarajh et al., 2024将前景理论引入 LLM 对齐,用 policy-reference log-likelihood ratio 作为隐式奖励,无需成对偏好数据
- **Step-level KTO**:扩展到步骤级,捕获更细粒度反馈
- **Span-KTO**:将奖励判断单元定义为 **人类标注 polarity 划分的连续 span**
## 核心公式
### Span 隐式奖励
$$r_\theta(x, S_k) = \sum_{t=s_k}^{e_k} [\log \pi_\theta(y_t|x, y_{<t}) - \log \pi_{ref}(y_t|x, y_{<t})]$$
### Reference PointEMA 估计)
$$z_{ref} \leftarrow \alpha \cdot z_{ref} + (1-\alpha) \cdot \bar{r}_{batch}$$
### Span 级偏好损失
positive span$-\lambda_w \cdot \sigma(\beta \cdot a_k)$ negative span$-\lambda_l \cdot \sigma(-\beta \cdot a_k)$其中 $a_k = r_\theta(x, S_k) - z_{ref}$
### Neutral Token 正则化
Neutral token 不参与偏好学习但保留标准 CE loss 作为正则化
## 实验效果
- 5 benchmark 上全面超越 SFT RW-SFT
- Aone-bench+13.3ppSFT 14.8% Span-KTO 28.1%
- **关键发现**不仅"解决更多问题"更重要的是"失败时表现更合理"——Inefficiency 改善 +34.5%Communication 改善 +26.5%
## 参考
- [[verification-horizon-no-silver-bullet|论文原文]]
- [[human-implicit-reward-signals|人类隐式奖励信号]]