Distribution Shift入門: Covariate・Label・Concept Shift
2026年10月の再サーベイ: 研究史・重要文献・最近の進展を整理した新版を追加しました(2026年10月3日基準)。以下は従来のメモです。定義・適用条件の訂正は新版を参照してください。
定義
sourceとtargetの同時分布をそれぞれ $P_s(X,Y)$、$P_t(X,Y)$ とします。distribution shiftは $P_s(X,Y)\ne P_t(X,Y)$ の総称です。同時分布は
\[p(x,y)=p(y\mid x)p(x)=p(x\mid y)p(y)\]と2通りに分解できるため、「どの因子が不変か」という仮定で代表的なshiftを分けます。
| 名称 | 不変と仮定する因子 | 変化する因子 | 典型的な補正 |
|---|---|---|---|
| covariate shift | $p_s(y\mid x)=p_t(y\mid x)$ | $p_s(x)\ne p_t(x)$ | $p_t(x)/p_s(x)$ によるimportance weighting |
| label shift | $p_s(x\mid y)=p_t(x\mid y)$ | $p_s(y)\ne p_t(y)$ | class prior $p_t(y)/p_s(y)$ の推定 |
| concept shift/drift | 上記conditionalが変化 | $p_t(y\mid x)\ne p_s(y\mid x)$ | target label、時系列監視、再学習等が必要 |
実データでは複数因子が同時に変わり得ます。unlabeled target dataだけから一般の $P_t(Y\mid X)$ を同定することはできないため、補正法は仮定とsupport conditionを明示します。
Covariate shiftのrisk補正
covariate-shift仮定と $p_t(x)>0\Rightarrow p_s(x)>0$ のsupport条件の下では
\[R_t(f)=\mathbb E_{(x,y)\sim P_t}[\ell(f(x),y)] =\mathbb E_{(x,y)\sim P_s} \left[\frac{p_t(x)}{p_s(x)}\ell(f(x),y)\right].\]重みはlabel比ではなく input density ratio $p_t(x)/p_s(x)$ です。重みが大きいと分散が 増えるため、clipやregularizationにはbias–variance trade-offがあります。
Label shiftの条件
label shiftでは $w_y=p_t(y)/p_s(y)$ を推定します。 Lipton et al. (ICML 2018) のBBSEは、 black-box classifierのsource confusion matrixがinvertibleであること、target classのsupportが sourceに含まれること等を仮定します。classifierが「ある」だけではlabel shiftを識別できません。
評価と診断
- splitを作る軸(time、location、domain、class prior)を明記する。
- target labelをmodel selectionやshift診断に使ったか分ける。
- density-ratioやconfusion matrixのconditioning、有効sample sizeを確認する。
- shift仮定を満たす合成実験と、仮定が破れる実データ評価を分ける。
- shift検出、原因同定、性能補正を同じ問題として扱わない。
標準的な入口はMIT Pressの Dataset Shift in Machine Learning です。以下は過去に集めた図・dataset・論文メモとして残します。
全体概観
- MIT Press公式: Dataset Shift in Machine Learning
- Environment and Distribution Shift
- Nature ref pdf
- Nature ref web
- Vector Inst のまとめ
- Vector Inst のまとめ pdf
-
When Training and Test Sets are Different: Characterising Learning Transfer
- 自分でやったまとめ PDF
Shift の種類
- Covariate Shift (共変量シフト)
- Target Shift (Label Shift, Prior Probability Shift, Prevalance Shift / 流行シフト)
- Concept Shift




Covariate Shift

Label Shift (Prior Probability Shift / Target Shift)
- これは、prevalence shiftと同じ
- target shift ともいう?
- ‘Prior probability shift’ とも同じ?
- Maximum Likelihood With Bias-Corrected Calibration is Hard-To-Beat at Label Shift Adaptation

Shift への対応
Covariate Shift
- 重み付けする
- この重みはデータが、分布 p からきたか、 分布 q からきたかを学習する
- covariate shiftのimportance weightは $\beta(x)=p_t(x)/p_s(x)$。 label ratio $p_t(y)/p_s(y)$ を使うのはlabel-shift仮定のとき。
Label Shift
- 混合行列を計算する
- ref Precision

Other Reference
- Understanding Dataset Shift(旧Towards Data Science記事URL:
https://towardsdatascience.com/understanding-dataset-shift-f2a5a262a766、2026-09-30時点で記事本文ではなくサイトトップへ転送) - トップカンファレンスにおけるデータセットシフトと機械学習
- データセットシフトの学習理論


Paper Reference
- A Critical Analysis of Distribution Shift : ICLR2021 Reject
- 旧日本語まとめは公開終了(旧URL:
https://github.com/MLHPC/Papers/issues/209、2026-09-30確認)
- 旧日本語まとめは公開終了(旧URL:
"Delving Deep into the Generalization of Vision Transformers under Distribution Shifts":
— Ziwei Liu (@liuziwei7) June 19, 2021
Paper: https://t.co/SC8rnrvFqY
Code: https://t.co/HAOwsK42aG
- We investigate the OOD generalization of vision transformers.
- We integrated domain adaptation techniques into transformers. pic.twitter.com/E5oZHPEo9q
彼らは以下の Shift の分類をしてる




Dataset
See also OOD Datasets まとめ
| Name | Shift Type | Reference |
|---|---|---|
| MNIST-C | Corruption Shift | Google Github |
| MNIST-R (RotatedMNIST) | Rotation? Shift | DomainBed |
| CMNIST (ColoredMNIST) | Correlation Shift | DomainBed |
| MNIST Background Random | Background Shift | LISA (Prev name of Mila) ‘s description Dataset |
| MNIST -> SVHN | Style Shift | Torchvision |
| Morpho-MNIST | Perturbation Shift | Github |
| ImageNet-Real | ID: Annotation Shift? (relabels the validation set of the original ImageNet in orderto correct labeling errors) | Github |
| ImageNet-V2 | ID: Sample Selection Bias? | Github |
| ImageNet-C | Corruption Shift | Github |
| ImageNet-P | Perturbation Shift | Github |
| ImageNet-A | (places the ImageNet objects in unusual contexts or orientations) | Github |
| ImageNet-O | OOD (contains image concepts from outside ImageNet-1K) | Github |
| ImageNet-R | Style Shift (contains abstract or rendered versions of the object) | Github |
| ImageNet-Sketch | Style Shift | Github |
| Stylized-ImageNet | Texture Shift | Github |