S2-20 · 进阶S2-20 · Advanced

泛化 · 把学到的规律用在未见样本Generalization · Apply Learned Structure to Unseen Samples

learned pattern + unseen same-distribution samples → reliable transfer

泛化是模型把学到的规律正确用于未见过但同分布的新样本。它有边界:当真实场景分布改变,同一个模型可能不再适用。Generalization is applying learned structure correctly to unseen examples from the same distribution. It has a boundary: when the real-world distribution changes, the same model may stop transferring.

01 · 会做新题,还是只会同一道题01 · Solve a new problem, not the same problem again

模型在同类新题上表现稳定,搬到另一种场景后仍该无条件相信它吗?A model works on similar new examples. Should you trust it unchanged after moving to a different setting?

02保持模型不变,把新数据从相似推向换场景Keep the Model Fixed; Shift New Data into a New Setting

唯一变量:分布偏移One variable: distribution shift
训练误差Training error
模型未变model unchanged
新数据误差New-data error
MSE × 1000
泛化判断Generalization
成立HOLDS
当前分布current distribution
S2-18 → S2-19 → S2-20同一数据集 · 同一坐标系 · 本页只移动蓝色新数据分布same dataset · same axes · this page moves only the blue new-data distribution

03泛化成立需要四个条件词Four Terms Matter in Generalization

learned · unseen · same distribution · correct
LEARNED

学到规律Learned structure

不是记住单个训练样本。Not memorizing individual training examples.

UNSEEN

未见样本Unseen examples

开发过程中没有回流答案。No answer feedback during development.

DISTRIBUTION

同分布Same distribution

生成数据的规律与训练场景相近。Data-generating conditions resemble training.

PERFORMANCE

正确迁移Correct transfer

新样本误差保持在可接受范围。New-example error remains acceptable.

04最小机制:测试高分只覆盖它代表的分布Minimal Mechanism: A Test Score Covers Only Its Represented Distribution

Pnew ≈ Ptrain
Pnew(x,y) ≈ Ptrain(x,y)
当新数据与训练分布相近,独立测试能估计泛化;偏移变大后,旧测试分不能自动外推到新场景。When new and training distributions are similar, independent testing estimates generalization. As shift grows, old test scores cannot be extrapolated automatically.
固定模型Fix the model排除重新训练no retraining
改变数据分布Shift data distribution蓝点离开旧规律blue points leave old structure
新数据误差上升New-data error rises显出泛化边界boundary becomes visible

05边界实验:把相似场景推到完全换场景Boundary Test: Push Similar Data into a New Setting

主动制造失败Create a failure

模型不动,蓝点整体偏移Keep the model fixed and shift blue points

训练误差保持不变,新数据误差却上升。不是模型“突然忘了”,而是使用场景越过了原证据覆盖范围。Training error stays fixed while new-data error rises. The model did not suddenly forget; deployment crossed the evidence boundary.

尚未执行。Not run yet.
一次测试高分证明任何场景都可用。One high test score proves every setting works. → ✓ 证据只覆盖被代表的数据分布。Evidence covers only represented distributions.
未见过就一定能证明泛化。Unseen automatically proves generalization. → ✓ 还要独立、同分布并达到可接受表现。It must also be independent, in-distribution, and acceptable.
分布偏移只能靠更大模型解决。Only a larger model solves distribution shift. → ✓ 先检测边界,再收集代表数据与重新验证。Detect the boundary, gather representative data, and revalidate.
06 · 一句话带走06 · One line to keep

泛化是把规律用于未见过但同分布的新样本;场景分布一变,旧测试高分就可能越过证据边界。Generalization applies structure to unseen, same-distribution examples; distribution shift can push old test scores beyond their evidence boundary.