20260617:目前有914 页

This commit is contained in:
2026-06-17 15:02:40 +08:00
parent e96b955fda
commit 91fac5b6fc
423 changed files with 20687 additions and 34 deletions

View File

@@ -0,0 +1,51 @@
---
title: "动作头路由器 (Action Head Router)"
created: 2026-06-17
updated: 2026-06-17
type: concept
tags: [architecture, routing, reinforcement-learning]
sources: [raw/papers/zhang-tarpo-2026.md]
confidence: high
---
# 动作头路由器 (Action Head Router)
动作头路由器是 [[tarpo|TARPO]] 框架中的**轻量级路由决策模块**——一个附加在 LLM 骨干上的线性投影层,用于在每一步决定推理模式。
## 结构
```
rho(h_t) = Softmax(W_r * h_t + b_r)
```
- `h_t ∈ R^d`Transformer 最后一层隐藏状态
- `W_r ∈ R^{2×d}`:将 d 维隐藏状态投影到 2 维hard/soft 概率)
- `b_r ∈ R^2`:偏置项,初始化对训练有关键影响
这就是全文最 "lightweight" 的部分——仅 `2d + 2` 个参数。
## 初始化策略
偏置 `b_0` 的初始化影响模型对 hard/soft 的初始偏好:
- `b_0 = [2.2, 0]`:偏向 hard → 保守起点soft 比率随训练逐渐上升
- `b_0 = [0.85, 0]`:较均衡 → 早期就有较多 soft token
- 默认采用轻度 hard 偏好,与模型的自然倾向一致
## 训练与推理
- **训练时**:从 `ρ_θ` 采样路由决策,鼓励结构探索
- **推理时**:支持随机和确定性两种路由策略
## 与 LLM 骨干的关系
动作头是**最小侵入性**的——它不改变 Transformer 架构,仅读取最后一层隐藏状态作为输入。这种解耦设计使得:
1. 可轻松适配不同规模的 LLM
2. 路由决策和 token 生成使用共享的 advantage 信号联合优化
3. 训练稳定,不会干扰骨干的预训练知识
## 参考
- [[action-routing-policy|动作路由策略]]
- [[token-wise-routing|逐token路由]]
- [[tarpo|TARPO]]