Files
myWiki/concepts/certainty-based-loss.md

51 lines
1.6 KiB
Markdown
Raw Permalink 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: "Certainty-Based Loss"
created: 2026-05-15
updated: 2026-05-15
type: concept
tags: [loss-function, adaptive-computation, training]
sources: [raw/papers/darlow-ctm-2025.md]
---
# Certainty-Based Loss
**Certainty-Based Loss** 是 CTM 的训练损失函数,通过对多个内部 tick 的**动态选择**实现原生自适应计算。
## 定义
CTM 在每个 [[internal-ticks|internal tick]] t 产生输出 y_t如分类概率。对每个前向传播选择两个 tick
1. **t₁ = argmin_t(L_t)** — 损失最小的 tick"最佳"预测)
2. **t₂ = argmax_t(C_t)** — 确定性最高的 tick
其中 C_t = 1 normalized_entropy(y_t),衡量预测置信度。
最终损失:
```
L = (L_t₁ + L_t₂) / 2
```
## 为什么这个设计关键?
### 原生自适应计算
- 不要求模型在固定 tick 停止——损失函数不指定"正确"的 tick
- 模型可以自然地学习在达到足够确定性时停止
- 简单样本在早期 tick 达到高确定性 → 实际推理时可早停
### 校准对齐
- 同时优化损失最小化和确定性最大化
- 促使模型的置信度与准确性对齐(校准)
- ImageNet 实验显示 CTM 具有天然优秀的校准性能
## 与 ACT 的对比
| 维度 | ACT (Graves 2016) | CTM Certainty-Based Loss |
|------|-------------------|-------------------------|
| Halting 机制 | 显式 halting 模块 + 额外损失项 | 损失函数设计自然实现 |
| 计算惩罚 | 需要 ponder cost 正则化 | 不需要 |
| 何时停止 | 学习 halting 概率 | 确定性阈值 |
## 来源
- [[darlow-ctm-2025|CTM 论文]]