S2-19 · 进阶S2-19 · Advanced

过拟合 · 训练题越背越熟,新题反而变差Overfitting · Better Memorization, Worse New Examples

capacity too high → training error falls while test error rebounds

过拟合是模型把训练数据的偶然噪声也记住,导致新数据表现变差。关键证据是训练误差继续下降,而测试误差已经反弹。Overfitting means the model memorizes accidental training noise and performs worse on new data. The key signature is training error continuing downward after test error has turned upward.

01 · 背答案还是学规律01 · Memorize answers or learn the rule?

黑线穿过每个红点拿到“满分”,为什么蓝色新题却离它越来越远?The black curve passes through every red point for a “perfect score.” Why do blue new examples drift farther away?

02继续增加弯曲程度,看误差分叉Increase Flexibility and Watch Errors Split

唯一变量:曲线复杂度One variable: curve complexity
训练误差Training error
MSE × 1000 ↓
测试误差Test error
MSE × 1000
诊断Diagnosis
平衡BALANCED
看误差分叉watch the split
S2-18 → S2-19 → S2-20同一数据集 · 同一坐标系 · 红训练 / 蓝测试 / 黑模型same dataset · same axes · red train / blue test / black model

03过拟合的四个连续信号Four Linked Signals of Overfitting

more capacity · noise chasing · train down · test up
CAPACITY

能力继续增加Capacity keeps rising

黑线获得更多不必要的弯折。The curve gains unnecessary bends.

NOISE

追逐训练噪声Chase training noise

偶然偏高偏低也被当成规律。Accidental offsets are treated as structure.

TRAIN

训练误差更低Training error falls

最终可穿过所有红点。Eventually it passes through every red point.

TEST

测试误差反弹Test error rebounds

蓝点不共享训练集的偶然噪声。Blue points do not share accidental training noise.

04最小机制:训练更好与泛化更好不是同义词Minimal Mechanism: Better Training Fit Is Not Better Generalization

Etrain ↓ while Etest
Etrain ↓ Etest
两条误差曲线开始分叉时,继续压低训练损失反而削弱新样本表现。验证集常用于找到分叉前的停止点。Once the errors split, further training-loss reduction harms new-example performance. Validation data often finds the stop before that split.
增加复杂度Increase complexity可穿过更多红点fit more red points
记住偶然噪声Memorize noise训练误差继续降training error falls
蓝点不跟随Blue points do not follow测试误差反弹test error rebounds

05边界实验:让训练误差降到 0Boundary Test: Drive Training Error to Zero

主动制造失败Create a failure

复杂度拉满,逐点记忆Max complexity and memorize every point

黑线会穿过所有红点,训练误差近乎 0;但在红点之间和边缘剧烈摆动,蓝点误差暴涨。The curve crosses all red points for near-zero training error, yet swings between and beyond them, sending blue-point error sharply upward.

尚未执行。Not run yet.
训练误差越低,模型一定越好。Lower training error always means a better model. → ✓ 必须同时看独立数据误差。Independent-data error must be checked too.
过拟合就是模型太大。Overfitting simply means a large model. → ✓ 它是相对数据、约束与任务的行为证据。It is behavior relative to data, constraints, and task.
测试集也可用来反复选停止点。Use the test set repeatedly to choose stopping. → ✓ 选方案用验证集,测试保留独立验收。Use validation for choices and reserve test for acceptance.
06 · 一句话带走06 · One line to keep

过拟合发生在模型继续压低训练误差,却因记住噪声而让独立测试误差反弹。Overfitting occurs when memorizing noise keeps lowering training error while independent test error rebounds.