Fix RBF time-bias initialization

This commit is contained in:
2026-07-24 14:39:15 +08:00
parent 20c99484f3
commit 7b48cb8425
3 changed files with 50 additions and 2 deletions

View File

@@ -343,6 +343,15 @@ GD^2
两个 output projection 的小方差初始化使两阶段在训练初期都接近恒等 residual update。
Relative Time Attention Bias 的初始化固定为:
- `rbf_proj.weight`:零初始化;
- `time_bias_scale`:初始化为 \(1.0\)
- 初始 RBF attention bias 仍严格为零;
- `rbf_proj.weight` 从第一个优化步骤即可获得梯度。
不得同时将 `rbf_proj.weight``time_bias_scale` 初始化为零否则两个相乘分支的梯度都会为零RBF 时间偏置将无法开始学习。
## 9. 信息流与语义
**Attention**:从历史疾病事件中选择和整合相关信息。