Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Semi supervised, weakly-supervised, unsupervised, and active learning

yu4u
March 05, 2020

Semi supervised, weakly-supervised, unsupervised, and active learning

主に画像データを対象とした、半教師あり学習、弱教師あり学習、教師なし学習、能動学習手法のまとめ

yu4u

March 05, 2020
Tweet

More Decks by yu4u

Other Decks in Technology

Transcript

  1. Semi-supervised Learning, Weakly-supervised Learning, Unsupervised Learning, and Active Learning Yusuke

    Uchida / @yu4u 1 DeNA AIシステム部内の技術共有会で発表した資料です
  2. これなに︖ • Semi-supervised Learning, Weakly-supervised Learning, Unsupervised Learning, Active Learning

    について、ざっくり古典&最新⼿法を紹介 • Disclaimer︓画像の話題中⼼です 2
  3. ⾊々な定義 3 O. Chapelle, B. Schlkopf, and A. Zien, "Semi-Supervised

    Learning," in The MIT Press, 2010. http://www.acad.bg/ebook/ml/MITPress-%20SemiSupervised%20Learning.pdf
  4. ⾊々な定義 4 X. Zhu, "Semi-supervised learning literature survey," in Tech.

    rep. 1530, University of Wisconsin-Madison, 2005. Pseudo label
  5. ⾊々な定義 • 通常のsupervised以外をweak supervisionと呼んだり 5 Supervised Semi-supervised Semi-supervised, Active learning

    Noisy labels Z. Zhou, "A brief introduction to weakly supervised learning," in National Science Review, Vol. 5, No. 1, pp. 44-53, 2018.
  6. ⾊々な定義 • 分かりやすい 6 J. Jeong, S. Lee, J. Kim,

    and N. Kwak, "Consistency-based Semi-supervised Learning for Object Detection," in Proc. of NIPS, 2019.
  7. 定義 • Supervised: 予測対象そのものが教師として付加されたデータ のみで学習 • Semi-supervised:予測対象そのものが教師として付加された データと、全く教師が付加されていないデータで学習 • Unsupervised:

    教師なし、データのみからの学習 • Weakly-supervised: 予測対象の不完全な教師が付加された データから学習 • Active learning: 教師つき・教師なしデータが与えられ、教師 なしデータに優先度をつけながら教師データを増やす • Transfer learning, Domain adaptation: 教師が⼤量にあるド メインの知識を他のドメインに転移 7
  8. Overview 8 ラベルがいっぱいあるドメインA ラベルありデータ ラベルが少ない応⽤先ドメインB ラベル あり データ ラベルなしデータ Domain

    adaptation Semi-supervised Unsupervised A⽤Model Supervised Transfer learning Finetune ラベル追加 Active learning B⽤Model B⽤Model B⽤Model B⽤Model
  9. Semi-supervised learning • 予測対象そのものが教師として付加されたデータと、全く 教師が付加されていないデータで学習 • X. Zhu, "Semi-supervised learning

    literature survey," in Tech. rep. 1530, University of Wisconsin-Madison, 2005. https://minds.wisconsin.edu/bitstream/handle/1793/60444/TR1530.pdf • O. Chapelle, B. Schlkopf, and A. Zien, "Semi-Supervised Learning," in The MIT Press, 2010. http://www.acad.bg/ebook/ml/MITPress-%20SemiSupervised%20Learning.pdf 12
  10. Semi-supervised learning • 考え⽅︓近いやつは同じラベルやろ • 「近い」の定義が重要(manifoldをうまく捉えたり) • Generative methods [Miller+,ʼ96]

    • Graph-based methods (label propagation) [Zhu+,ʼ02] • Low-density separation methods [Bennett+,ʼ99] 13 D. Miller and H. Uyar, "A mixture of experts classifier with learning based on both labelled and unlabelled data," in Proc. of NIPS, 1996. X. Zhu and Z. Ghahramani, "Learning from labeled and unlabeled data with label propagation," in CMU CALD tech. rep., 2002. K. Bennett and A. Demiriz, "Semi-supervised support vector machines," in Proc. of NIPS, 1999.
  11. Semi-supervised learning for DNN • 本質的に同じものであるデータに対する予測分布が ブレない “consistency regularization” が基本

    • VAT, Π model, Mean Teacher, pseudo label, … (昔とても良い解説記事があったのが消えてた) • 以降では最近の画像関係のモデルを解説 14
  12. MixMatch • 異なるK個(=2, in practice)のaugmentationを⾏ったラベルなし データの推論結果をsharpenすることでpseudo labelを作成 • ラベルあり、なしデータ間のmixup 15

    D. Berthelot, N. Carlini, I. Goodfellow, N. Papernot, A. Oliver, and C. Raffel, "MixMatch: A Holistic Approach to Semi-Supervised Learning," in Proc. of NIPS, 2019. https://github.com/google-research/mixmatch
  13. ReMixMatch • MixMatchをベースに改良 • Distribution alignment • Augmentation anchoring •

    CTAugment • Rotation loss (後述の弱教師) 17 D. Berthelot, N. Carlini, E. Cubuk, A. Kurakin, K. Sohn, H. Zhang, and C. Raffel, "ReMixMatch: Semi- Supervised Learning with Distribution Matching and Augmentation Anchoring," in Proc. of ICLR, 2020. https://github.com/google-research/remixmatch
  14. Distribution alignment • ラベルなしデータに対するモデルの「平均的な」推論結果のクラス 分布p~(y)が真のクラス分布 p(y)(の推定値)と同じになるように pseudo labelを補正する 18 直近128バッチ

    から算出 ラベル付き データから算出 ラベルあり・なしデータ間で、真のクラス分布が同じことを仮定 ⼤量のラベルなしデータからランダムに選択してラベルつけた、みたいなケースならOK︖ 補正前 pseudo label
  15. Augmentation anchoring • AutoAugmentとか “強い” augmentationしゅごい • MixMatchの枠組みでも使いたいが、augmentationの度合いが 強すぎて有意なpseudo labelにならない

    • そこで、”弱い” augmentationを⾏ったデータの推論結果を pseudo labelとして利⽤し、 異なるK個の “強い” augmentationを ⾏ったデータの推論結果に対してロスをかける • K=8(MixMatchでは K=2) 19 弱 強 強 強 強 強
  16. Control theory augment (CTAugment) • 適切なaugmentationのパターンを⾃動獲得するAutoAugmentは⼗ 分なvalデータがないと安定しないので、別のアプローチで⾃動獲得 • CTAugmentではtransformation毎に、強度が離散化されている •

    各強度はweight (0-1) を持っており、その強度でaugmentationし たときの実際のラベルと推論結果の⼀致度の指数加重平均 • このweightのベクトルをカテゴリカル分布にしたものから 実際に訓練に使うtransformationの強度を選択 (ただし、weightが0.8以下のものは選択されない) • transformation⾃体はuniformに2つ選ばれる • weightは、各強度をuniformに選択しラベル⼀致度を計算→update 20
  17. C.f. AugMix • オリジナルとaugmentした画像間の予測結果をconsistentにするロスを利⽤ 25 D. Hendrycks, N. Mu, E.

    Cubuk, B. Zoph, J. Gilmer, and B. Lakshminarayanan, "AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty," in Proc. of ICLR, 2020. https://github.com/google-research/augmix 異なるOPを異なる回数かけた画像 の線形和と、更にオリジナルの線形 和でaugmentationを定義 通常のCE オリジナル、aug1, aug2間のJSD
  18. そもそもSSLの設定は現実的なのか︖ • ラベルなし画像として、 ラベルあり画像のクラスを 過不⾜なく集めた画像集合を仮定 • どういう状況︖︕ • ラベルありとラベルなしの クラスの分布が乖離すると性能低下

    26 A. Oliver, A. Odena, C. Raffel, E. Cubuk, and I. Goodfellow, "Realistic Evaluation of Deep Semi-Supervised Learning Algorithms," in Proc. of NIPS, 2018. http://peluigi.hatenablog.com/entry/2018/09/07/162515(分かりやすい解説)
  19. Weakly-supervised learning • 予測対象の不完全な教師が付加されたデータから学習 • もともとはMultiple Instance Learning問題として提唱された 28 T.

    G. Dietterich, R. H. Lathrop, T. Lozano-Perez, "Solving the multiple instance problem with axis-parallel rectangles," in Artificial Artificial Intelligence, Vol. 89, Issues 1-2, pp. 31-71, 1997. • 通常は特徴量とラベルが1:1対応 • MILでは、複数の特徴量の集合(bag)に対して ラベルが付く • 分⼦形状が内部結合の状態によって変化するので MILとして解いている
  20. Weakly-supervised learning • 画像認識︓1枚の画像を “bag” とみなし、画像のラベルに 対応する領域がどこかに1つ以上存在するという問題設定 29 O. Maron

    and A. Ratan, "Multiple-Instance Learning for Natural Scene Classification," in Proc. of ICML, 1998. S. Andrews, I. Tsochantaridis, and T. Hofmann, "Support vector machines for multiple-instance learning," in Proc. of NIPS, 2003.
  21. Weakly-supervised learning • Multi-instance multi-label learning (MIML) とかいうのも 30 Z.

    Zhou, M. Zhang, S. Huang, and Y. Li, "Multi-instance multi-label learning," in Artificial Intelligence, Vol. 176, Issue 1, pp. 2291-2320, 2012.
  22. Weakly-supervised learning • 画像ラベル or BBOXからsegmentationを学習 31 G. Papandreou, L.

    Chen, K. Murphy, and A. Yuille, "Weakly- and Semi-Supervised Learning of a DCNN for Semantic Image Segmentation," in Proc. of ICCV, 2015.
  23. Unsupervised Learning • ⼀般的には、クラスタリングや主成分分析等の 教師なしでデータ⾃体の構造や表現を獲得する⼿法 • DNNのコンテキストだと、教師なしで画像から pretrainモデルを作る話(乱暴); self-supervisedとも •

    古典︖︓H. Barlow, "Unsupervised Learning," in Neural Computation, Vol. 1, Issue 3, pp. 295-311, 1989. • DNN︓Y. Bengio, A. Courville, and P. Vincent, "Representation Learning: A Review and New Perspectives," in TPAMI, Vol. 35 Issue 8, pp. 1798-1828, 2013. 33
  24. Unsupervised Learning for DNN • ⾃動的に教師となる情報を作り出せる ”pretext” taskで学習させる • pretext

    tasks • 画像の回転を推測させる • パッチ間の位置関係を推測させる • パッチのジグソーパズルを解かせる • Contrastive loss系 • 基本的にsemi-supervisedとしても使える 34 D. Berthelot, N. Carlini, E. Cubuk, A. Kurakin, K. Sohn, H. Zhang, and C. Raffel, "ReMixMatch: Semi- Supervised Learning with Distribution Matching and Augmentation Anchoring," in Proc. of ICLR, 2020.
  25. パッチ間の位置関係を推測させる • 8-way classification • 問題を簡単に解けてしまう “shortcut” の除去が重要 • エッジのつながり

    →cropにjitter • 画像の位置によって⾊ズレが発⽣する⾊収差 →グレーっぽくする 35 C. Doersch, A. Gupta, and A. Efros, "Unsupervised Visual Representation Learning by Context Prediction," in Proc. of ICCV, 2015.
  26. ジグソーパズルを解かせる • 9!-way classification 36 M. Noroozi and P. Favaro,

    "Unsupervised learning of visual representations by solving jigsaw puzzles," in Proc. of ECCV, 2016.
  27. 画像の回転を推定させる 38 S. Gidaris, P. Singh, and N. Komodakis, "Unsupervised

    Representation Learning by Predicting Image Rotations," in Proc. of ICLR, 2018.
  28. Contrastive loss系が流⾏り • 同⼀画像を異なるaugmentation したペアを同じ、他の画像ペアを違う と当てられるかというpretext task 39 (CPC) A.

    Oord, Y. Li, and O. Vinyals, "Representation Learning with Contrastive Predictive Coding," in arXiv:1807.03748, 2018. (CPCv2) O. Henaff, A. Srinivas, J. Fauw, A. Razavi, C. Doersch, S. Eslami, adn A. Oord, "Data-Efficient Image Recognition with Contrastive Predictive Coding," in arXiv:1905.09272, 2019. (MoCo) K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick, "Momentum Contrast for Unsupervised Visual Representation Learning," in arXiv:1911.05722, 2019. (PIRL) I. Misra and L. Maaten, "Self-Supervised Learning of Pretext-Invariant Representations," in arXiv:1912.01991, 2019. (SimCLR) T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, "A Simple Framework for Contrastive Learning of Visual Representations," in arXiv:2002.05709, 2020.
  29. Active learning • ラベルなしデータにアノテーションをする際に、 このデータにラベルをつけるとモデルの精度が⼀番上がる であろうデータを優先的にラベリングしていく考え⽅ 41 M. Wang and

    X. Hua, "Active learning in multimedia annotation and retrieval: A survey," in ACM Trans. on Intelligent Systems and TechnologyFebruary, 2011. Y. Fu, X. Zhu, and B. Li , "A survey on instance selection for active learning," in Knowledge and Information Systems, Vol. 35, pp 249–283, 2013.
  30. Active learning • ⾊々な⼿法が提案されているが… 最新のsemi-supervisedな⼿法でラベルなしデータを⼀緒 に学習すると性能がめっちゃ上がるし、そもそもactive learningの⼿法間の差がなくなったでという論⽂が⽴て続 けに出た 42 O.

    Simeoni, M. Budnik, Y. Avrithis, and G. Gravier, "Rethinking deep active learning: Using unlabeled data at model training," in arXiv:1911.08177, 2019. S. Mittal, M. Tatarchenko, O. Cicek, T. Brox, "Parting with Illusions about Deep Active Learning", in arXiv:1912.05361, 2019.