Asymmetric Tri-training
for Unsupervised Domain Adaptation
Kuniaki Saito1, Yoshitaka Ushiku1 and Tatsuya Harada1,2
1: The University of Tokyo, 2:RIKEN
ICML 2017 (8/6~8/11), Sydney
Background: Domain Adaptation (DA)
rucksack
keyboard
bicycle
Source TargetSource Target
• Supervised learning with a lot of samples
– Cost to collect samples in various domain
– Classifiers suffer from the change of domain
• The purpose of DA
– Training a classifier using source domain that works well on target domain
• Unsupervised Domain Adaptation
– Labeled source samples and unlabeled target samples
Related Work
• Applications on computer vision
– Domain transfer + Generative Adversarial Networks
– This paper: a novel approach w/o generative models
• Training CNN for domain adaptation
– Matching hidden features
of different domains
[Long+, ICML 2015][Ganin+, ICML 2014]
Real faces to illusts [Taigman+, ICLR 2017] Artificial images to real images [Bousmalis+, CVPR 2017]
No Adapt AdaptedSource Target
Class A
Class B
Theorem [Ben David+, Machine Learning 2010]
•
– Related work: regard as being sufficiently small
• Distribution matching approaches aim to minimize
• There is no guarantee that is small enough
– Proposed method: minimizes by reducing error on target samples
• absence of labeled samples
→ We propose to give pseudo-labels to target samples
Theoretical Insight
How much features are discriminative
: Divergence between domains
Error on source domainError on target domain
?
p1
p2
pt
S+Tl
Tl
S : source samples
Tl : pseudo-labeled target samples
Input
X
F1
F2
Ft
ŷ : Pseudo-label for target sample
y : Label for source sample
F
S+Tl
F1 ,F2 : Labeling networks
Ft : Target specific network
F : Shared network
Proposed Architecture
p1
p2
pt
S+Tl
Tl
S : source samples
Tl : pseudo-labeled target samples
Input
X
F1
F2
Ft
ŷ : Pseudo-label for target sample
y : Label for source sample
F
S+Tl
F is updated using
gradients from F1,F2,Ft
Proposed Architecture
p1
p2
pt
S
S
S : source samples
Tl : pseudo-labeled target samples
Input
X
F1
F2
Ft
ŷ : Pseudo-label for target sample
y : Label for source sample
F
S
All networks are trained
using only source samples.
1. Initial training
p1
p2
TInput
X
F1
F2
F
T
If F1 and F2 agree on their predictions, and either of their
probability is larger than threshold value, corresponding
labels are given to the target sample.
T: Target samples
2. Labeling target samples
F1, F2 : source and pseudo-labeled
samples
Ft: pseudo-labeled ones
F : learn from all gradients
p1
p2
pt
S+Tl
Tl
S : source samples
Tl : pseudo-labeled target samples
Input
X
F1
F2
Ft
ŷ : Pseudo-label for target sample
y : Label for source sample
F
S+Tl
3. Retraining network using pseudo-labeled target samples
p1
p2
pt
S+Tl
Tl
S : source samples
Tl : pseudo-labeled target samples
Input
X
F1
F2
Ft
ŷ : Pseudo-label for target sample
y : Label for source sample
F
S+Tl
Repeat the 2nd step and 3rd step
until convergence!
3. Retraining network using pseudo-labeled target samples
Overall objective
Overall Objective l1 |WT
1W2 |+L1 +L2 + L3
W1
W2
p1
p2
pt
S+Tl
F1
F2
Ft
F
S+Tl
Tl
L1
L2
L3
CrossEntropy
To force F1 and F2 to learn from different features.
Experiments
• Four adaptation scenarios between digits datasets
– MNIST, SVHN, SYN DIGIT (synthesized digits)
• One adaptation scenario between traffic signs datasets
– GTSRB (real traffic signs), SYN SIGN (synthesized signs)
• Other experiments are omitted due to the time limit…
– Adaptation on Amazon Reviews
GTSRB SYN SIGNS
SYN DIGITSSVHN
MNISTMNIST-M
Accuracy on Target Domain
• Our method outperformed other methods.
– The effect of BN is obvious in some settings.
– The effect of weight constraint is not obvious.
Source MNIST MNIST SVHN SYNDIG SYN NUM
Method Target MN-M SVHN MNIST SVHN GTSRB
Source Only (w/o BN) 59.1 37.2 68.1 84.1 79.2
Source Only (with BN) 57.1 34.9 70.1 85.5 75.7
DANN [Ganin et al., 2014] 81.5 35.7 71.1 90.3 88.7
MMD [Long et al., 2015 ICML] 76.9 - 71.1 88.0 91.1
DSN [Bousmalis et al, 2016 NIPS] 83.2 - 82.7 91.2 93.1
K-NN Labeling [Sener et al., 2016 NIPS] 86.7 40.3 78.8 - -
Ours (w/o BN) 85.3 39.8 79.8 93.1 96.2
Ours (w/o Weight constraint) 94.2 49.7 86.0 92.4 94.0
Ours 94.0 52.8 86.8 92.9 96.2
Summary and Future Work
• Summary
– Problem presentation for domain adaptation
– Proposal of Asymmetric tri-training
– Effectiveness is shown in experiments
• Future work
– Evaluate our method on fine-tuning of pre-trained model
For more details, please refer to…
Kuniaki Saito, Yoshitaka Ushiku, and Tatsuya Harada.
Asymmetric Tri-training for Unsupervised Domain Adaptation.
International Conference on Machine Learning (ICML), 2017.ICML
Supplemental materials
Relationship with Tri-training
• Tri-training [Zhou et al., 2005]
– Use three classifiers equally
• Use two classifiers to give labels to unlabeled samples
• Train one classifiers by the labeled samples
• Repeat in all combination of classifiers
• Our proposed method
– Use three classifiers asymmetrically
• Use fixed two classifiers to give labels
• Train a fixed one classifier using the pseudo-labeled samples
Accuracy during training
Blue: (correctly labeled samples)/(labeled samples))
Initially, the accuracy is high and gradually decreases.
Red: Accuracy of learned network. It gradually increases.
Green: The number of labeled samples.
A-distance between domains
• A-distance
– Calculated by domain classifier’s error
• Proposed method does not make the divergence small.
– Minimizing the divergence is not a only way to achieve a good
adaptation !!
Analysis by gradient stopping
p1
p2
pt
S+Tl
T
F2
Ft
F
S+Tl
F1
Analysis by gradient stopping
p1
p2
pt
S+Tl
T
F2
Ft
F
S+Tl
F1
Analysis by gradient stopping
p1
p2
pt
S+Tl
T
F2
Ft
F
S+Tl
F1
Analysis by gradient stopping
p1
p2
pt
S+Tl
T
F2
Ft
F
S+Tl
F1

Asymmetric Tri-training for Unsupervised Domain Adaptation

  • 1.
    Asymmetric Tri-training for UnsupervisedDomain Adaptation Kuniaki Saito1, Yoshitaka Ushiku1 and Tatsuya Harada1,2 1: The University of Tokyo, 2:RIKEN ICML 2017 (8/6~8/11), Sydney
  • 2.
    Background: Domain Adaptation(DA) rucksack keyboard bicycle Source TargetSource Target • Supervised learning with a lot of samples – Cost to collect samples in various domain – Classifiers suffer from the change of domain • The purpose of DA – Training a classifier using source domain that works well on target domain • Unsupervised Domain Adaptation – Labeled source samples and unlabeled target samples
  • 3.
    Related Work • Applicationson computer vision – Domain transfer + Generative Adversarial Networks – This paper: a novel approach w/o generative models • Training CNN for domain adaptation – Matching hidden features of different domains [Long+, ICML 2015][Ganin+, ICML 2014] Real faces to illusts [Taigman+, ICLR 2017] Artificial images to real images [Bousmalis+, CVPR 2017] No Adapt AdaptedSource Target Class A Class B
  • 4.
    Theorem [Ben David+,Machine Learning 2010] • – Related work: regard as being sufficiently small • Distribution matching approaches aim to minimize • There is no guarantee that is small enough – Proposed method: minimizes by reducing error on target samples • absence of labeled samples → We propose to give pseudo-labels to target samples Theoretical Insight How much features are discriminative : Divergence between domains Error on source domainError on target domain ?
  • 5.
    p1 p2 pt S+Tl Tl S : sourcesamples Tl : pseudo-labeled target samples Input X F1 F2 Ft ŷ : Pseudo-label for target sample y : Label for source sample F S+Tl F1 ,F2 : Labeling networks Ft : Target specific network F : Shared network Proposed Architecture
  • 6.
    p1 p2 pt S+Tl Tl S : sourcesamples Tl : pseudo-labeled target samples Input X F1 F2 Ft ŷ : Pseudo-label for target sample y : Label for source sample F S+Tl F is updated using gradients from F1,F2,Ft Proposed Architecture
  • 7.
    p1 p2 pt S S S : sourcesamples Tl : pseudo-labeled target samples Input X F1 F2 Ft ŷ : Pseudo-label for target sample y : Label for source sample F S All networks are trained using only source samples. 1. Initial training
  • 8.
    p1 p2 TInput X F1 F2 F T If F1 andF2 agree on their predictions, and either of their probability is larger than threshold value, corresponding labels are given to the target sample. T: Target samples 2. Labeling target samples
  • 9.
    F1, F2 :source and pseudo-labeled samples Ft: pseudo-labeled ones F : learn from all gradients p1 p2 pt S+Tl Tl S : source samples Tl : pseudo-labeled target samples Input X F1 F2 Ft ŷ : Pseudo-label for target sample y : Label for source sample F S+Tl 3. Retraining network using pseudo-labeled target samples
  • 10.
    p1 p2 pt S+Tl Tl S : sourcesamples Tl : pseudo-labeled target samples Input X F1 F2 Ft ŷ : Pseudo-label for target sample y : Label for source sample F S+Tl Repeat the 2nd step and 3rd step until convergence! 3. Retraining network using pseudo-labeled target samples
  • 11.
    Overall objective Overall Objectivel1 |WT 1W2 |+L1 +L2 + L3 W1 W2 p1 p2 pt S+Tl F1 F2 Ft F S+Tl Tl L1 L2 L3 CrossEntropy To force F1 and F2 to learn from different features.
  • 12.
    Experiments • Four adaptationscenarios between digits datasets – MNIST, SVHN, SYN DIGIT (synthesized digits) • One adaptation scenario between traffic signs datasets – GTSRB (real traffic signs), SYN SIGN (synthesized signs) • Other experiments are omitted due to the time limit… – Adaptation on Amazon Reviews GTSRB SYN SIGNS SYN DIGITSSVHN MNISTMNIST-M
  • 13.
    Accuracy on TargetDomain • Our method outperformed other methods. – The effect of BN is obvious in some settings. – The effect of weight constraint is not obvious. Source MNIST MNIST SVHN SYNDIG SYN NUM Method Target MN-M SVHN MNIST SVHN GTSRB Source Only (w/o BN) 59.1 37.2 68.1 84.1 79.2 Source Only (with BN) 57.1 34.9 70.1 85.5 75.7 DANN [Ganin et al., 2014] 81.5 35.7 71.1 90.3 88.7 MMD [Long et al., 2015 ICML] 76.9 - 71.1 88.0 91.1 DSN [Bousmalis et al, 2016 NIPS] 83.2 - 82.7 91.2 93.1 K-NN Labeling [Sener et al., 2016 NIPS] 86.7 40.3 78.8 - - Ours (w/o BN) 85.3 39.8 79.8 93.1 96.2 Ours (w/o Weight constraint) 94.2 49.7 86.0 92.4 94.0 Ours 94.0 52.8 86.8 92.9 96.2
  • 14.
    Summary and FutureWork • Summary – Problem presentation for domain adaptation – Proposal of Asymmetric tri-training – Effectiveness is shown in experiments • Future work – Evaluate our method on fine-tuning of pre-trained model For more details, please refer to… Kuniaki Saito, Yoshitaka Ushiku, and Tatsuya Harada. Asymmetric Tri-training for Unsupervised Domain Adaptation. International Conference on Machine Learning (ICML), 2017.ICML
  • 15.
  • 16.
    Relationship with Tri-training •Tri-training [Zhou et al., 2005] – Use three classifiers equally • Use two classifiers to give labels to unlabeled samples • Train one classifiers by the labeled samples • Repeat in all combination of classifiers • Our proposed method – Use three classifiers asymmetrically • Use fixed two classifiers to give labels • Train a fixed one classifier using the pseudo-labeled samples
  • 17.
    Accuracy during training Blue:(correctly labeled samples)/(labeled samples)) Initially, the accuracy is high and gradually decreases. Red: Accuracy of learned network. It gradually increases. Green: The number of labeled samples.
  • 18.
    A-distance between domains •A-distance – Calculated by domain classifier’s error • Proposed method does not make the divergence small. – Minimizing the divergence is not a only way to achieve a good adaptation !!
  • 19.
    Analysis by gradientstopping p1 p2 pt S+Tl T F2 Ft F S+Tl F1
  • 20.
    Analysis by gradientstopping p1 p2 pt S+Tl T F2 Ft F S+Tl F1
  • 21.
    Analysis by gradientstopping p1 p2 pt S+Tl T F2 Ft F S+Tl F1
  • 22.
    Analysis by gradientstopping p1 p2 pt S+Tl T F2 Ft F S+Tl F1

Editor's Notes

  • #3 (1つ前のスライドから)そのような問題に取り組んでいるのが、ドメイン適合。ドメイン適合では、Sourceと言われるドメインから、Targetと言われるドメインへの知識の転移を目指す。Sourceというのが、知識の元になるドメインということ。このドメインにおける、サンプルとラベル情報を利用する。そして、Targetという、識別の対象となるドメインで、精度高く働く識別器の獲得を目指す。Targetドメインにおいて、全くラベルが供給されない、Unsupervised Domain Adaptationが、最もチャレンジングで、実用的な課題といえる。本研究でも、Unsupervised Domain Adaptationに取り組む。
  • #4 盛んにDomain adaptationに対する研究が行われている。特に目を引いているのが、GANを使って、画像のドメインをSourceからTargetに変化させるような研究。右下の研究は、Googleの研究で、CVPR2017のオーラル。もちろん、GANを使わないアプローチも盛んに研究が行われていて、本研究もその一つ。
  • #5 分布を一致させるアプローチの元になっているのが、この定理。 分布の距離にあたる、2番目の項を1番目の、sourceにおけるエラーとともに、最小化するというアプローチになる。 三番目の項は、ターゲットにサンプルがどれだけ識別的になっているのかを示唆する。先行研究は、この項は十分に小さいと仮定していた。
  • #6 学習に使うネットワーク。先述のように、2つのネットワーク(青いネットワーク)をラベルづけにつかう。 1つのネットワーク(オレンジ)は、擬似ラベルのついたターゲットからしか学習しない。
  • #7 共有されているネットワーク(緑)は、3つのネットワーク、すべての勾配から学習する。次のスライドから、実際の学習プロセス。
  • #8 最初は、擬似ラベルがないので、ソースのみを用いて、全体のネットワークを学習させる。
  • #9 次に、ターゲットサンプルを、ラベルづけする。二つの識別器のクラス出力が一致する、なおかつ、どちらかの確率が、thresholdより大きいという条件を満たしたサンプルにのみ、対応する擬似ラベルを付与する。この条件を課すことで、より正確な擬似ラベルが得られると期待する。
  • #10 擬似ラベルを用いて、ネットワークを再学習。 青いネットワークは、ソースと、ターゲット両方から学習する。具体的には、ミニバッチをソース、ターゲットの半分づつから構成する。 オレンジのネットワークは、ターゲットのみから学習する。オレンジのネットワークからの勾配が緑のネットワークに、ターゲットに対する識別性をもたらすように。 ラベルづけ、再学習を何度も繰り返す。(ラベルづけ対象のサンプルは徐々に増やす。また、過学習を防ぐために、毎回、一度ラベルづけされたサンプルも、ラベルをクリアする。)
  • #11 擬似ラベルを用いて、ネットワークを再学習。 青いネットワークは、ソースと、ターゲット両方から学習する。具体的には、ミニバッチをソース、ターゲットの半分づつから構成する。 オレンジのネットワークは、ターゲットのみから学習する。オレンジのネットワークからの勾配が緑のネットワークに、ターゲットに対する識別性をもたらすように。 ラベルづけ、再学習を何度も繰り返す。(ラベルづけ対象のサンプルは徐々に増やす。また、過学習を防ぐために、毎回、一度ラベルづけされたサンプルも、ラベルをクリアする。)
  • #12 擬似ラベルをハードなラベルとみなして、ネットワークを学習させる。普通のクロスエントロピー。 2つの青いネットワークは、できるだけ、異なる性質をもつ識別器になってほしい。ということで、重みに制約を加える。 この制約によって、2つの青いネットワークが、異なる特徴から学習するようになると期待される。効果は、実験で確認することにする。
  • #13 数字画像、標識画像での精度評価。
  • #14 精度は、良い。 BNをネットワークに挿入した場合とそうでない場合に、データセットによっては大きく性能に差があった。 また、重みの対する制約は、ハッキリとした効果は認められなかった。これは、ラベルづけネットワークが、異なる初期値で重みを初期化することによると考えられる。そのため、制約を与えずとも、二つのネットワークが、異なる識別器として学習される。
  • #17 Tri-trainingは、3つの識別器を等価に扱う手法。 我々の手法は、役割を分担させている。ということで、Asymmetric tri-training
  • #18 ラベルづけの精度は最初はいいが、下がっていく。これは、擬似ラベルを付与すると、必ず間違ったラベルづけが含まれるので、それに起因する。また、ラベルづけされるサンプル(2つの識別器が予測を一致させる、かつthresholdを越す)ようなサンプル内で、間違いが増強されていくことが要因と考えられる。 しかし、全体の精度は、どんどん向上していく。
  • #19 ドメイン間の距離を測ったのが、A-distance. CNNの中間特徴から、ドメインを識別するようなSVMを学習させ、その識別器のErrorによって、図る。 提案手法は、ほとんどドメイン間の距離を小さくしていない。しかし、精度は大きく向上している。これは、ドメイン距離を小さくさせることが、adaptationの唯一の方法ではないということを示唆している。
  • #20 あとのスライドは、時間があったらでいいと思います。