1.8 KiB
1.8 KiB
title, created, updated, type, tags, sources, confidence
| title | created | updated | type | tags | sources | confidence | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| Gumbel-Softmax 重参数化 | 2026-06-17 | 2026-06-17 | concept |
|
|
high |
Gumbel-Softmax 重参数化
Gumbel-Softmax 是一种将离散采样转化为可微操作的重参数化技巧,在 latent-reasoning RL 中用于为连续表征引入可微的随机性。
原理
标准 categorical 采样 v ~ Categorical(logits) 是不可微的(argmax 操作)。Gumbel-Softmax 通过 Gumbel 噪声和温度参数构造一个连续松弛:
y_i = exp((log pi_i + g_i) / tau) / sum_j exp((log pi_j + g_j) / tau)
其中 g_i ~ Gumbel(0, 1),tau 是温度参数。
当 tau → 0 时,y 趋近于 one-hot(真正的离散采样);当 tau > 0 时,y 是可微的连续向量。
在潜在推理中的应用
在潜在推理 RL 的 reparameterization-exploration 路线中,Gumbel-Softmax 用于:
- Soft token 构造:从 logits 分布中采样近似的概率加权 embedding
- 梯度估计:允许 RL 梯度信号通过 soft token 回传
- 探索引入:Gumbel 噪声在连续表征中引入了可控随机性
与 TARPO 的对比
| 维度 | Gumbel-Softmax 路线 | tarpo 路线 | |------|---------------------|---------------------| | 随机性类型 | 表征级(向量内部) | 结构级(模式间切换) | | 可微性 | 可微(重参数化) | 不可微(REINFORCE) | | 引入位置 | 每个 soft token 内部 | 每个 token 步的模式选择 |
TARPO 论文指出两者的结合(路由探索 + 重参数化 soft token)是有前景的未来方向。