Files
myWiki/concepts/mapping-loss.md

61 lines
1.9 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: "Mapping Loss: 联合任务与几何约束的损失函数"
created: 2026-06-25
updated: 2026-06-25
type: concept
tags: [loss-function, mapping-networks, regularization, lipschitz-continuity]
sources: ["[[sen-mapping-networks]]"]
---
# Mapping Loss (映射损失)
Mapping Loss 是 [[sen-mapping-networks|Mapping Networks]] 的训练损失函数,同时优化下游任务性能和 [[mapping-theorem|Mapping Theorem]] 所要求的几何/解析性质。
## 公式
$$L_{\text{map}} = L_{\text{task}} + \lambda_{\text{stab}} L_{\text{stab}} + \lambda_{\text{sm}} L_{\text{smooth}} + \lambda_{\text{al}} L_{\text{align}}$$
其中 λ_stab, λ_smooth, λ_align 均为**可训练系数**,使网络自适应地平衡各组件。
## 四组件详解
### 1. Task Loss (L_task)
标准交叉熵损失,确保生成的参数在下游任务上功能最优:
$$L_{\text{task}} = -\sum_i y_i \log \hat{y}_i$$
### 2. Stability Loss (L_stab)
强制**局部 Lipschitz 连续性**(对应 Mapping Theorem 的 A1 假设):
$$L_{\text{stab}} = \mathbb{E}_{\epsilon \sim \mathcal{N}(0,\sigma^2 I)}\left[\|f_{\theta'}(z+\epsilon) - f_{\theta'}(z)\|^2_2\right]$$
确保隐向量的小扰动不导致输出大变化。
### 3. Smoothness Loss (L_smooth)
强制 **C² 连续性**(对应定理的 A3 假设):
$$L_{\text{smooth}} = \|\nabla_z M_\phi(z)\|^2_F$$
惩罚 Jacobian 的 Frobenius 范数,防止生成的权重空间出现震荡。
### 4. Alignment Loss (L_align)
保持隐向量与映射权重方向的兼容性:
$$L_{\text{align}} = 1 - \cos(z, \bar{W}^m)$$
其中 W̄^m 是调制后投影层的行均值。
## 消融结果
在 FashionMNIST 上Task Loss 单独 87.79%,每增加一个组件 +1-2%,全组合达 91.88%。Stability 和 Smoothness 贡献略高于 Alignment。
## 参考
- [[lipschitz-continuity]]
- [[mapping-theorem]]
- [[solvability-theorem]]