Files
myWiki/concepts/gradient-alignment.md
2026-06-01 10:46:01 +08:00

47 lines
1.4 KiB
Markdown
Raw 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: "Gradient Alignment (PreRL)"
created: 2026-05-18
type: concept
tags: ["reinforcement-learning", "optimization", "theory"]
sources: ["https://arxiv.org/abs/2604.14142"]
---
# Gradient Alignment梯度对齐
## 定义
PreRL 有效性的理论基础log P(y) 和 log P(y|x) 的梯度方向在推理轨迹 y 上保持**非负内积**,确保优化边际分布自然改善条件分布。
## 形式化
设 θ' = θ + η · ∇log P_θ(y) · R(y) 为一步 PreRL 更新后的参数,一阶泰勒展开:
```
log P_θ'(y|x) ≈ log P_θ(y|x) + η · R(y) · ⟨∇log P_θ(y), ∇log P_θ(y|x)⟩ + O(η²)
```
当 R(y) > 0 且内积 ≥ 0 时,交叉梯度项非负,条件 log-probability **单调不减**
## 实证验证Qwen3-4B, AMC23, 400 rollouts
| 指标 | 值 |
|------|-----|
| 梯度内积(均值) | +9.23 |
| 梯度内积(最大值) | +46.18 |
| 梯度内积(最小值) | +0.94 |
| **负内积比例** | **0%** |
| 余弦相似度(均值) | 0.44 |
| log-prob 差异(均值) | 0.16 |
## 条件分布对齐
- 高概率/确定性 token: log P(y|x) ≈ log P(y)(强对齐)
- 早期序列/高不确定性 token: 存在分歧
- 总体分布高度重叠Figure 2c
## 相关概念
- [[shared-parameter-influence|共享参数影响]] — 梯度对齐的前提
- [[pre-train-space-reinforcement-learning|PreRL]]
- [[dual-space-rl|DSRL]]