抽樣方差:為何大批次更穩?Sampling variance and batch size

IDL115 · CH03 · KP08 · 20/44
同一參數點下,把更多樣本平均,通常降低梯度估計方差。 / Average more gradients to reduce sampling variance.

定義方差Variance convention

這裡 S² 使用 n−1;定義不同會改有限母體係數。 / State the variance denominator.

S2=1n−1∑i=1n∥∇fi(w)−∇f(w)∥22S^2=\frac1{n-1}\sum_{i=1}^n\|\nabla f_i(w)-\nabla f(w)\|_2^2

兩種抽樣Two sampling schemes

不放回抽滿 n 筆時噪聲為零;有放回可能重複。 / Replacement can repeat samples.

E∥e∥22=(1−b/n)S2/bwithout replacement (29)E∥e∥22=n−1nS2bwith replacement (30)\begin{aligned}\mathbb E\|e\|_2^2&=(1-b/n)S^2/b\quad\text{without replacement (29)}\\\mathbb E\|e\|_2^2&=\frac{n-1}{n}\frac{S^2}{b}\quad\text{with replacement (30)}\end{aligned}

收斂率的解讀Interpreting rates

教材式 (27),(28) 將收斂趨勢與梯度誤差並列;完整界還需歷史誤差與目標假設。 / Error history and the metric matter.

O(1/t+∥et∥2),O((1−μ/L)t+∥et∥2)O(1/t+\|e_t\|^2),\quad O((1-\mu/L)^t+\|e_t\|^2)