[dl輪読会] “asymmetric tri-training for unsupervised domain adaptation (icml2017)” and neural...

38
DEEP LEARNING JP [DL Papers] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation Yusuke Iwasawa, Matsuo Lab http://deeplearning.jp/

Upload: yusuke-iwasawa

Post on 21-Jan-2018

890 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

DEEP LEARNING JP

[DL Papers]

“Asymmetric Tri-training for Unsupervised DomainAdaptation (ICML2017)” and Neural Domain Adaptation

Yusuke Iwasawa, Matsuo Lab

http://deeplearning.jp/

Page 2: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

書誌情報

• ICML2017 accepted

• Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada

• 選定理由:

– 実世界のデータ使う時は大体訓練とテストが違う分布=>ドメイン適応、大事(と個人的に思っている)

– +分布の差を吸収する技術は本質的と思っている(生成モデルとか,シミュレータの活用とか)

– 日本人で数少ないICML(12本?)

• この論文を中心に最近のドメイン適応系の論文をまとめた

– 本論文の本質と関係ないことも少し話します(主にRelated Work)2

Page 3: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Introduction: ML under Domain Bias

• DL含む多くの検証・一般的な学習理論は左を前提

• 一部の機械学習タスクはドメインバイアスがある(つまり右)

– 訓練時と異なるユーザを対象とする,ユーザの行動が変化する

– ドメインバイアスを無視すると,テストに対して精度が悪化3

P(X, y)

訓練データ

テストデータ

P(X, y)

訓練データ

テストデータ

P’(X, y)

w/oドメインバイアス w/ドメインバイアス

同じ真の分布からサンプルされたデータ

異なる真の分布からサンプルされたデータ

Page 4: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Introduction: Example of Domain Bias

4

http://vision.cs.uml.edu/adaptation.html

Page 5: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Introduction: Goal of Domain Adaptation

• ソースSについては教師ありデータDs={Xs, ys} ~ Ps(X, y)が大量に手に入る

• ターゲットTについては教師なしデータDt= {Xt} ~ Pt(X)が手に入るが,ラベルデータは全く手に入らない

• Ps(X, y)≠Pt(X, y)

• Goal: DsとDtを使ってTに対する経験損失Rt(h)を抑える

5

Page 6: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Introduction: Existing Methods and Its Cons

• 特徴量の分布P(Z)が近くなるようにする

– Sの分布Ps(Z) とTの分布Pt(Z)のずれをはかって,最小化

• Cons:P(Y|Z)が違えばDiscriminativeにならない

[Ganin, 2016] “Domain-Adversarial Training of Neural Networks”6

Page 7: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Introduction: Proposal and Results

• P(Y|Z)も適応させる方法を提案

– 擬似ラベルYt’をソースSのデータを使って構築する

– Yt’を使ってターゲットTの分類器を構築

• 半教師の手法であるtri-trainingをドメイン適応に一般化

– 役割の異なる分類器2つ(F1, F2)をSで訓練

– F1, F2を使ってTをラベルづけ(疑似ラベルを付与)

– 疑似ラベルを使ってTの分類器Ftを訓練

7

Page 8: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Related Works: Summary of Existing Methods

• Not deep (Fixed feature space)

– [Gong, 2012] GFK

– [Baktashmotlagh, 2013] UDICA

– [Sun, 2016] CORAL

– Many

• Deep (Neural based, Flexible feature space)

– Feature Adaptation

– Classifier Adaptation (<- This Work)• [Long, 2016] RTN (NIPS2016)

• [Sener, 2016] knn-Ad (NIPS2016)

• [Saito, 2017] ATDA (ICML2017)

8

Page 9: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Related Works: Feature Adaptation

Mathematical Foundation

[Ganin, 2016] “Domain-Adversarial Training of Neural Networks”

Visualization

[Ben-David, 2010] “A theory of learning from different domains”

ドメイン間の距離ソース損失

理想的なhを使うときの損失の差

9

Page 10: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Maximum Mean Discrepancy (MMD) [Tzeng, 2014]

• Sの事例間類似度 + Tの事例間の類似度 - SとTの間の類似度

• カーネルを使って計算(ガウシアンカーネルがよく使われているイメージ)

(Cited)https://www.dropbox.com/s/c8vhgrtjcqmz9yy/Gretton.pdf?dl=1

(Cited) [Tzeng, 2014]

10

Page 11: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Domain-Adversarial Neural Networks [Ganin, 2014]

• Zがどちらのドメインから来たのかを分類する分類器で測って最小化

• 分類器が識別出来ないような特徴空間に飛ばす

11

Page 12: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

MMD系とDANN系(+その派生)

• MMD系: 分布の差 Ps(Z) - Pt(Z)を計測

– DANN: マルチカーネルMMDを使う(MK-MMD)

– VFAE: MMD+グラフィカルモデルでzとsの独立性を表現

– CORAL: 2nd order momentのみを合わせる

– AdaBN: 平均と分散をドメインごとに計算して合わせるBN

– CMD: k-th order momentまで計算して合わせる

• DANN: 分布の比Ps(Z)/ Pt(Z)を計測

– KL-Divergence: KL(S|T) + KL (T|S),陽に1stモーメントを近づける

※どちらが良いかははっきりしてないと思う(例えば精度はMMD < DANN < CMD)

※GANみたいに比だと安定しないとかはあんまりない印

※Wasserstainみたいな輸送距離が使われているのは見たことないけどどうなるのか気になる 12

Page 13: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Recent Advance 1/3Encoderを完全共有はやり過ぎでは?=>Unshared encoder

• S-D共通のEnc,SのEnc,DのEnc• 共通Enc上での類似度(MMD or GAN)+各

ドメインでの再構成• 特徴空間を近づける系でSOTAの1つ• ※天才

[Tzeng, 2017] ADDA(Adversarial Discriminative Domain Adaptation)

[Bousmalis, 2016] DSN(Domain Separation Network)

• DANNのEnc部分を共有しない版• S部分だけ事前学習できるのが強み• DANNより良い

13

Page 14: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Recent Advance 2/3事例自体作っちゃえば?=>Adaptation on input spaces

• Sで条件付けてTの偽データを作成

• Tの偽データ+Sで分類器を訓練(偽データがTと近くなってれば上手くいく)

• (あんまり読んでない) 14

Page 15: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Recent Advance 3/3P(Y|Z)も違う場合あるよね?=> Classifier Adaptation

[Long, 2016] RTN (Residual Transfer Network)

• Encは共有 + MMDでドメイン距離を近づける• 工夫1:Sの分類器fsを,残差で表す(fS = fT + ⊿f)• 工夫2: fTはTを使ったエントロピーでも訓練• OfficeデータセットでSOTA(本研究は比較してない)• ※工夫1が天才• ※エントロピー正則化なくてもSOTAだけどあったほうが良い(ないとダメそうなので

不思議) 15

Page 16: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Classifier Adaptation

Mathematical Foundation

[Ben-David, 2010] “A theory of learning from different domains”

ドメイン間の距離ソース損失

理想的なhを使うときの損失の差

16

• C = Rs(h*) + Rt(h

*)• Cもちゃんと考慮したほうが良くない?という話

(普通はCは小さいと仮定している)

Page 17: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

17

Feature Adaptation Classifier Adaptation?

Name Ref. Minimize By Means Enc unshared? Y/N By Means

DDC [Tzeng, 2014] E|P(Zs) – P(Zt)| MMD N N /

DDA [Long, 2015] E|P(Zs) – P(Zt)| MK-MMD N N /

DANN [Ganin, 2014] E|P(Zs)/P(Zt)| Adversarial N N /

CORAL [Sun, 2016] E|P(Zs) – P(Zt)| 2nd order moment N N /

VFAE [Louizos, 2016] E|P(Zs) – P(Zt)| MMD + Graphical N N /

AdaBN [Li, 2017] E|P(Zs) – P(Zt)| Domain-wise BN N N /

CMD [Zellinger, 2017] E|P(Zs) – P(Zt)| k-th order moment N N /

UPLDA [Bousmalis, 2016] E|P(Xs)/P(Xt)| GAN / N /

DSN [Bousmalis, 2016]E|P(Zs) – P(Zt)| or E|P(Zs)/P(Zt)| MMD or Adversarial Y N /

ADDA [Tzeng, 2017] E|P(Zs)/P(Zt)| Adversarial Y N /

KNN-Ad [Sener, 2016] ?? ?? ?? Y ??

RTN [Long, 2016] E|P(Zs) – P(Zt)| MMD N Y Residual Classifier

ATDA [Saito, 2017] / / N Y Tri-Training

DRCN [Ghifary, 2016] Implicit Reconstruction N N /

CoGAN [Liu, 2016] Implicit GAN Y N /

GTA [Swami, 2017] Implicit Conditional GAN N N /

- Feature- Shared Enc

- Feature- Unshared Enc

- Classifier

- Feature- Implicit

Category

Page 18: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

18

Feature Adaptation Classifier Adaptation?

Name Ref. Minimize By Means Enc unshared? Y/N By Means

DDC [Tzeng, 2014] E|P(Zs) – P(Zt)| MMD N N /

DDA [Long, 2015] E|P(Zs) – P(Zt)| MK-MMD N N /

DANN [Ganin, 2014] E|P(Zs)/P(Zt)| Adversarial N N /

CORAL [Sun, 2016] E|P(Zs) – P(Zt)| 2nd order moment N N /

VFAE [Louizos, 2016] E|P(Zs) – P(Zt)| MMD + Graphical N N /

AdaBN [Li, 2017] E|P(Zs) – P(Zt)| Domain-wise BN N N /

CMD [Zellinger, 2017] E|P(Zs) – P(Zt)| k-th order moment N N /

UPLDA [Bousmalis, 2016] E|P(Xs)/P(Xt)| GAN / N /

DSN [Bousmalis, 2016]E|P(Zs) – P(Zt)| or E|P(Zs)/P(Zt)| MMD or Adversarial Y N /

ADDA [Tzeng, 2017] E|P(Zs)/P(Zt)| Adversarial Y N /

KNN-Ad [Sener, 2016] ?? ?? ?? Y ??

RTN [Long, 2016] E|P(Zs) – P(Zt)| MMD N Y Residual Classifier

ATDA [Saito, 2017] / / N Y Tri-Training

DRCN [Ghifary, 2016] Implicit Reconstruction N N /

CoGAN [Liu, 2016] Implicit GAN Y N /

GTA [Swami, 2017] Implicit Conditional GAN N N /

<- Proposal

Page 19: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Proposed Method: Asymmetric Tri-Training

• 基本的には2つの分類器F1, F2を使ってTのデータXtの一部に疑似ラベルyt’付与+{Xt, yt’ }を使ってTtを訓練

19

Page 20: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Prosed Method: Pseudo-Labeling

Xt

1. C1 = C2 (maximum prob class)2. α < Max(p1) and α < Max(p2)

Then add pseud label C1 to Xt

20

Page 21: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Proposed Method: Algorithm Summary

(1) Sを使ってiter回全てのネットワークを訓練

(2) Nt個を上限に疑似ラベルづけ(Tl)

(3) L = S∪ Tlを使って訓練- F, F1, F2をLで訓練- F, FtをTlで訓練

(4)疑似ラベルを更新(3に戻る)

21

Page 22: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Add-ons 1/2 : Weight constrains

• Weight constrains

• 気持ちとしてはW1とW2が直交して欲しい(同じ予測をすると2つ用意している意味がない)

• ※個人的には効いているのか不明だと思っている

– 単に|W1|や|W2|を小さくしているだけでは?

– 実験的にもそんなに貢献大きくない(表1)

22

Page 23: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Add-ons 2/2 : Batch Normalization

• Fの最終層にBNを追加すると精度上がった

– ※他の研究 ([Sun et al., 2017]のAdaBN [Li et al., 2016]のCORAL)で似たような効果が報告されていると書いてあったがやってること微妙に違うと思う

– ※ただし,Sだけで学習する場合には精度悪化したらしいので意味があるのかもしれない

23

Page 24: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Experimental Setup: Adaptation Task

• Visual

– MNIST->MNIST-M

– SVHN->MNIST

– MNIST->SVHN

– SYN DIGITS -> SVHN

– SYN SIGNS -> GTSRB

– ※ No evaluation on Office (because it requires additional dataset)

• Amazon Review (Sentiment Analysis)

– Type of products: books, DVDs, electronics, kitchen

24

Page 25: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Experimental Setup: Others

[ネットワーク構造]

• Visualでは[Ganin, 2014]とほぼ同じ構造のCNNを利用

• Amazon Reviewでは[Ganin, 2016]とほぼおなじ構造を利用

[ハイパーパラメータ]

• λ: Visual->0.01, Review-> 0.001

• 学習率:[0.01, 0.05]

[評価方法]

• S -> 全部訓練に利用,T->一部を学習に利用?

• Tの一部を検証に使ったと書いてある

– ※良いの?と思ったけどドメイン適応系では一般にやるっぽい.ターゲットが使えないとハイパラをどうやって選ぶのかという問題があるため

– ※ DANNはTのラベルを使わないReverse cross-validationという方法を利用 25

Page 26: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Result: Visual

• どのタスクでもSOTA

• BNがないと精度落ちる

• Weight Constrainはあったほうが良いが,そんなに変わらない 26

Page 27: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Result: Domain Invariance (MNIST-MNISTM)P

ropo

sal

DA

NN

Proxy A-distance※

※分類器でSとTをどのくらい識別できるか.今回は線形SVMを利用.

• DANNみたいに明示的にDomain-Invarianceの獲得を目的にしてないけど良くなっている(という主張.個人的にはそんなに変わってないやんという気がする.) 27

Page 28: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Result: Amazon

• Reviewでも大体提案手法が良い

• VFAEはあんまり説明してないけど,簡単に言えばVAE+MMD(グラフィカルモデルでzがドメインに依存しないようにしている)

28

Page 29: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Result: Gradient stop experiment

• F (Encorder)の学習にどの分類器の勾配を利用するか

• 3つ全て使う場合(None)が安定する– が必ずしもBestではない

29

Page 30: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Result: Accuracy of Three Classifiers

• 3つの分類器のTに対する精度がどのように変化したか

• どれも同じような変化

• ※え、じゃあFt意味ある?(個人的意見)

• ※1つの設定しかなかったので他のデータ気になる

30

Page 31: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Result: Labeling Accuracy and Classification Accuracy

31

Page 32: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

感想

• 個人的にはいくつか疑問(主に実験部分)

– ラベル付きTをパラメタの探索に使っている=>ずるい(それでDANNみたいにラベル付きTを使ってないものと比べて良いのか)

– 評価のやり方がどの論文読んでも違うのに数値比較して良いのか(既に観測済みの教師なし事例のみを対象にする場合もある)

– いくつかの関連研究(この文献より精度良い)がなかったことになっている(Arxivだから良いと言えば良い気もするけど)

– &めっちゃ関連するRTNが比較に入ってない

– |W1TW2|は本当に効くの?普通にやると単にノルム小さくなるだけでは?

– 3つの分類器どれも似た精度になるならtri-trainingいらないのでは?(要は疑似ラベルでTのラベルデータも用意することが大事なのでは)

• とはいえ良い論文

– 多くの研究が無視していた部分を考慮する方法を提案した貢献は大きい 32

Page 33: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

[WIP] あんまり説明できなかった研究

• 系列のドメイン適応

– [Purushotam, 2017] VRADA

• Tを生成できるzはTの分類にも寄与する

– [Ghifary, 2016] Deep Reconstruction-Classification Network

– [Sankaranarayan, 2017] Generate To Adapt

– [Liu, 2016] CoGAN

• グラフィカルモデル的に独立性を定義

– [Louizos, 2016] Variational Fair AutoEncoder

33

Page 34: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

Deep Reconstruction-Classification Network (DRN)

• SからTへの再構成誤差も追加,Tを生成できるzならきっとどちらにも使えるんじゃない?という話(CoGANとかGenerate to Adaptとかが同じ思想だと思う)

• SとTのalignmentをどうやってやるのかはパット見じゃわからなかった34

Page 35: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

[WIP] Common Dataset (not completed, not covered)

• Image

– MNIST-MNISTM

– MNIST-SVHN

– MNIST-USPS

– GTSRB: real world dataset of traffic sign (Domain separation netwroks)

– LINEMOD: CAD models of objects

– CFP (Celebrities in Frontal-Profile)

• Language

– Sentiment Analysis:

– Checkout [Huang, 2009]

• Others

– Healthcare:MIMIC-Ⅲ(not well known)

– Wifi dataset

35

Page 36: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

[WIP] Citations and Comments

• [Glorot, 2011] “Domain Adaptation for Large-Scale Sentiment Classification: A Deep Learning Approach”, ICML2011

– SとTのデータどちらも入れたAEによりTへの性能を検証

– DeepにするとよりTで性能上がる(Deepにするほどドメインの差が消えている)ことを示した

• [Long, 2015] “Learning Transferable Features”, NIPS2015

– MMDを多層に+マルチカーネルに(MK-MMD,Multi-Kernel MMD)

– 2015年時点でSOTA

• [Louizos, 2016] “Variational Fair Auto-Encoder”, ICLR2016

– 潜在変数zがドメインを識別する変数sと独立になるようにグラフィカルモデルを組んだ上で,VAEで表現

– それだけだと実際にはzとsが独立にならないので、MMDの項を追加

• [Ganin, 2016]

– 特徴空間Hにおけるドメインのずれを分類器で測る

– MMD系の手法よりこちらの方が精度高いことが多い (DSNとかでも超えてる)

– Proxy Α-distanceを近似していると考えることができる

• [Sanjay, 2017] “Variational Recurrent Adversarial Deep Domain Adaptation”, ICLR2017 Workshop

– DANNのエンコーダーをVRNNに

– 普通のRNN(LSTM)をエンコーダーにしたDANN(R-DANN)より良い

– R-DANNもDANNよりだいぶ良い

– 系列のドメイン適応を扱った珍しい論文

– 正直なぜLSTMをVRNNに変えると良いのかはよくわからない 36

Page 37: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

[WIP]Reverse cross-validation

• DANNの論文で使われている

• 他ではあんまり使われてないが,ラベルが無いデータに対する交差検証的な話

37

Page 38: [DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017)” and Neural Domain Adaptation

[WIP] その他の分野との比較

• 半教師あり学習

• 転移学習

• マルチタスク学習

• ドメイン汎化

38