Files
myWiki/concepts/reinforcement-learning.md

62 lines
2.2 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: "强化学习 (Reinforcement Learning)"
created: 2026-06-17
updated: 2026-06-17
type: concept
tags: [reinforcement-learning, training, fundamental]
sources: [raw/papers/zhang-tarpo-2026.md]
confidence: high
---
# 强化学习 (Reinforcement Learning)
强化学习RL是一种通过**试错和奖励信号**学习最优策略的机器学习范式。在 LLM 时代RL 已成为后训练post-training的核心方法论。
## 基本框架
- **智能体**Agent在环境中采取行动
- **状态**State环境的当前描述
- **动作**Action智能体的可选项
- **奖励**Reward环境对动作的反馈信号
- **策略**Policy从状态到动作的映射 `π(a|s)`
目标:最大化累积期望奖励。
## LLM 中的 RL
在 LLM 训练中RL 主要用于**对齐和推理能力增强**
### 策略梯度方法
- **[[grpo|GRPO]]**Group Relative Policy Optimization基于组内相对优势的策略优化DeepSeek-R1 和许多推理模型的核心训练方法
- **[[group-relative-policy-optimization]]**GRPO 的通用形式
- **PPO**Proximal Policy OptimizationChatGPT/InstructGPT 的训练方法
- **REINFORCE**:最基础的策略梯度方法
### 奖励设计
- **[[reward-model|Reward Model]]**:学习预测人类偏好的模型
- **[[rlhf|RLHF]]**RL from Human Feedback通过人类偏好训练
- **Outcome Reward**:基于最终答案正确性的奖励(如数学题)
- **Process Reward**:基于推理过程的奖励
### 应用场景
- **推理 RL**[[tarpo|TARPO]]、DeepSeek-R1 等,使用 RL 增强推理能力
- **对齐 RL**:使模型行为符合人类价值观
- **潜在推理 RL**[[latent-reasoning|潜在推理]] 中的 RL 应用
## 在 TARPO 中的角色
[[tarpo|TARPO]] 使用 RL 同时优化两个组件:
1. **LLM 骨干**:优化 token 生成策略(标准 RL
2. **[[action-head-router|动作头路由器]]**:优化推理模式选择的策略(扩展 RL
两者共享同一个 group-relative advantage 信号。
## 参考
- [[grpo|GRPO]]
- [[group-relative-policy-optimization]]
- [[rlhf|RLHF]]
- [[reward-model|Reward Model]]
- [[latent-reasoning|潜在推理]]
- [[tarpo|TARPO]]