More Related Content
Similar to 【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features (20)
More from ARISE analytics (20)
【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features
- 2. ©2018 ARISE analytics 2
概要
タイトル: Deep Clustering for Unsupervised Learning of Visual Features
著者: Mathilde Caron, Piotr Bojanowski, Armand Joulin, Matthijs Douze
https://arxiv.org/abs/1807.05520
一言で言うと
すごい点
感想
CNNで特徴抽出してK-meansを繰り返す
教師なしでもCNNで特徴抽出ができる
DeepClusterを使って教師なしで pre-training → 少量の画像で
fine-tuning というやり方は現実の問題でも使えそう
モチベーション 学習データへのラベルづけが大変なので教師なしでやりたい
- 3. ©2018 ARISE analytics 3
Motivation
背景:
CNNは画像認識において非常に重要な技術になっている。その中で、オープンな大規模データセットで
あるImageNetは非常に大きな役割を果たした。
しかしながら、近年では様々な新手法が提案されているにも関わらず、そのパフォーマンスは上げどまっ
ている。ImageNetでは、SOTAな手法のパフォーマンスを評価しきれていないのではないか?
目的:
ImageNetより大きなデータセットを、コストをかけずに作りたい。
- 4. ©2018 ARISE analytics 4
ImageNetとは
ImageNet
- 画像1,400万枚、2万クラス以上
ILSVRC2012
ImageNetのサブセット
- 1,000 クラス
- 学習用データ: 120万枚
- 検証用データ: 5万枚
- 評価用データ: 10万枚
- 5. ©2018 ARISE analytics 5
ImageNetの限界
ConvNets and ImageNet Beyond Accuracy: Understanding Mistakes and
Uncovering Biases (Stock et al. 2017)
https://arxiv.org/abs/1711.11443
Top: Performance evolution of various
CNN architectures on ImageNet.
Bottom: Some images sampled from
the Internet and misclassified by a
ResNet-101.
Some test samples misclassified by a ResNet-101 (first row)
and a Densenet-161(second row).
The predicted class is indicated in red, the ground truth in
black and in parenthesis. All those examples gathered more
than four (4 or 5) positive answers over 5 on AMT. Note that
no adversarial noise has been added to the images.
- 7. ©2018 ARISE analytics 7
Deep Learningを用いたクラスタリング手法
https://arxiv.org/abs/1801.07648
COIL20: Columbia University Image Library
Clustering with Deep Learning: Taxonomy and New Methods (Aljalbout et al.
2018)
Modified in red
(Aljalbout et al. 2018)
Splitting GAN
(Grinblat et al. 2017)
GAN
Critic
output
Wasserstein
loss
k-Means
loss
Pretraining
and
fine tuning
k-Means
- 8. ©2018 ARISE analytics 8
Encoder / Decoderを使う方法
https://arxiv.org/abs/1511.06335
Unsupervised Deep Embedding for Clustering Analysis (Xie et al. 2015)
Encoder / Decoderで学習した表現について、クラスタのKL情報量を最小にするようクラスタリングす
る
Deep Embedded Clustering (DEC)
- 9. ©2018 ARISE analytics 9
クラスタリングのステップをDLへ組み込む方法
https://arxiv.org/abs/1604.03628
Joint Unsupervised Learning of Deep Representations and Image Clusters
(Yang et al. 2016)
階層的クラスタリングの併合を周期的プロセスと見立てて、RCNNを学習する
Joint Unsupervised Learning (JULE)
- 10. ©2018 ARISE analytics 10
CNNの表現を使う方法
https://arxiv.org/abs/1705.07091
CNN-Based Joint Clustering and Representation Learning with Feature Drift
Compensation for Large-Scale Image Data (Hsu et al. 2016)
ミニバッチ単位で、CNNの学習とk-meansを繰り返す
- 11. ©2018 ARISE analytics 11
GANを使う方法
https://arxiv.org/abs/1709.07359
Class-Splitting Generative Adversarial Networks (Grinblat et al. 2017)
Critic (Discriminator)の最終層の表現をクラスタリングし、クラスタのラベルでGeneratorを学習さ
せる
- 13. ©2018 ARISE analytics 13
概要
学習データとなる画像をCNNで教師なし学習させ、その最終層の表現をクラスタリングする。学習の際
の正解データとして、前Epochでのクラスタのラベルを用いる (pseudo-labeling)
- 14. ©2018 ARISE analytics 14
定式化
• Given a training set X = {x1, x2, ..., xn} of N images.
• each image xn is associated with a label yn in {0, 1}^k.
• This label represents the image’s membership to one of k possible
predefined classes.
• Fθ is a convnet mapping, where θ is the set of corresponding parameters.
• The features fθ(xn) produced by the convnet, and clusters them into k
distinct groups based on a geometric criterion.
• It jointly learns a d*k centroid matrix C and the cluster assignments yn
of each image n by solving the following problem.
- 15. ©2018 ARISE analytics 15
実装
- Standard AlexNet architecture
- Five convolutional layers with 96, 256, 384, 384 and 256 filters.
- Three fully connected layers.
- Remove the Local Response Normalization layers and use batch
normalization.
- For the clustering, features are PCA-reduced to 256 dimensions, whitened
and l2-normalized.
Image Transformation
- Sobel Filtering
Data Augmentation
- Random horizontal flips
- Crops of random sizes
and aspect ratios
Preprocessing CNN Clustering
http://nocotan.github.io/chainer/2017/08/04/chainercnn-copy.html
PCA
256
k-meansAlexNet
- 16. ©2018 ARISE analytics 16
実装上の工夫: 前処理
オブジェクトの分類には色よりもエッジの情報が重要だが、生の画像で学習させると最初のレイヤーが色
情報を抽出してしまう。
→画像にSobel Filterをかけ、エッジを抽出しておく
Filters from the first layer of an
AlexNet trained on unsupervised
ImageNet on raw RGB input (left) or
after a Sobel filtering (right).
- 17. ©2018 ARISE analytics 17
実装上の工夫: クラスタリング
Empty clusters:
• 空のクラスタができた場合、空でないクラスタをランダムに選び、そのセントロイドをわずかにずらして二
つのクラスタを作る
Trivial parametrization:
• クラスタの偏りを防ぐため、学習データを pseudo-labelのが一様分布からサンプリングする
or
• 損失関数をクラスタの大きさの逆数で重み付けする
- 19. ©2018 ARISE analytics 19
評価
a) クラスタと真のラベルとの相互情報量
真のラベルとクラスタのラベルがどの程度一致しているかを示す。真のラベルは学習時には使っていない
が、学習が進むにつれクラスタのラベルは真のラベルに近づいている
- 20. ©2018 ARISE analytics 20
評価
b) あるEpochと直前のEpochのクラスタの相互情報量
Epoch ごとにCNNを学習→k-meansでクラスタリングしたラベルで再学習を繰り返すため、クラスタの
中身は順次入れ替わっていく。Epochが進んでいくと、クラスタの中身の入れ替わりが少なくなっていく
= クラスタが安定していく。
とはいえ、0.8程度で上げどまるため、少なくない割合の画像はEpochのたびに別のクラスタに割り当て
られることになる。もっとも、実用上はこれでもそれほど問題なく、単一のモデルに収束していく (ホン
ト?)
- 21. ©2018 ARISE analytics 21
評価
c) クラスタ数 k の影響
クラスタ数 k を対数スケールで変更した時、ImageNetで300Epoch学習した後、別のデータセット*
でのmAPを調べる。最良のパフォーマンスは k=10,000の時に得られた。
真のクラス数(1,000)よりもある程度 大きなクラスタ数を選ぶのが良さそう
* Pascal VOC 2007のバリデーションセット, 20クラス
- 22. ©2018 ARISE analytics 22
Q&A
• そもそも学習できるの?
• 処理時間はどれくらい?
• どの程度良い表現を学習している?
• 別のデータセットでも使える?
• 別のモデルでも使える?
• 別のクラスタリングアルゴリズムは使える?
• 他のタスクにも使える?
- 23. ©2018 ARISE analytics 23
そもそも学習できるの?
A. できる
Deep Learningでは、学習データのラベルをランダム化しても、訓練誤差が0にできることが知られてい
る。同じように、ランダムなセントロイドによるクラスタを初期値として学習を始めても、中間層では徐々
に適切な表現を学習していく?
Understanding Deep Learning Requires Rethinking Generalization (Zhang et al.
2016)
Randomization tests.
...we train several standard architectures on a copy of the data where the
true labels were replaced by random labels. Our central finding can be
summarized as:
Deep neural networks easily fit random labels.
More precisely, when trained on a completely random labeling of the true
data, neural networks achieve 0 training error.
- 24. ©2018 ARISE analytics 24
処理時間はどれくらい?
A. 以下の環境で12日くらい
- 500エポック
- Pascal P100
- 市場価格100万円くらい?
全体の1/3くらいは k-means にかかる時間
→クラスタリングの際に全データをForwardする必要があるため、、通常の学習の1.5倍以上の時間が
かかる?
- 25. ©2018 ARISE analytics 25
どの程度良い表現を学習している?
A. CNNの各層で、他の教師なしと比べて良い表現を学習している
評価方法:
教師なしでpre-trainingしたCNNの各層について、それぞれの直後に線形分類器をおいてfine-
tuningした場合のaccuracyを評価 (パフォーマンスがよければ、その層はより良い表現を学習できて
いるはず)
MIT Places database
http://places.csail.mit.edu/
- 26. ©2018 ARISE analytics 26
どの程度良い表現を学習している?
深いレイヤーほどより大きな特徴を捉えている。が、畳み込みの最終層のフィルタのいくつかは、それまで
の層で捉えた特徴を捉え直しているだけに見えるものもある (下段)
- 28. ©2018 ARISE analytics 28
別のデータセットでも使える?
A. 使える
評価方法:
ImageNetは各クラスの画像数が均等になっており、DeepClusterに有利なデータである。
この影響を検証するため、YFCC100M*からランダムに選択した100万枚の画像について、その
accuracyを検証した
Yahoo Flickr Creative Commons 100 Millionデータセット。クラスに大きな偏りがある
- 29. ©2018 ARISE analytics 29
別のモデルでも使える?
A. 使える
教師ありの場合と同じように、より深いモデルを使うとパフォーマンスは向上する
評価方法:
ImageNetのデータを利用して教師なしでpre-trainingしたモデルを元に、PASCAL VOC 2007
のデータでfine-tuningした際のmAPを評価
- 30. ©2018 ARISE analytics 30
別のクラスタリングアルゴリズムは使える?
A. 使える
PIC (Power Iteration Clustering) を試したところ、大規模なデータセットについてパフォーマンス
がよかった
評価方法:
行のデータを利用して教師なしでpre-trainingしたモデルを元に、列のデータでfine-tuningした際の
accuracyを評価
- 31. ©2018 ARISE analytics 31
他のタスクにも使える?
A. 使える
評価方法:
ImageNetを利用して教師なしで学習したモデルを元に、列のデータで画像検索した際のmAPを評
価
http://www.robots.ox.ac.uk/~vgg/data/oxbuildings/
http://www.robots.ox.ac.uk/~vgg/data/parisbuildings/
- 32. ©2018 ARISE analytics 32
まとめ
タイトル: Deep Clustering for Unsupervised Learning of Visual Features
著者: Mathilde Caron, Piotr Bojanowski, Armand Joulin, Matthijs Douze
https://arxiv.org/abs/1807.05520
一言で言うと
すごい点
感想
CNNで特徴抽出してK-meansを繰り返す
教師なしでもCNNで特徴抽出ができる
DeepClusterを使って教師なしで pre-training → 少量の画像で
fine-tuning というやり方は現実の問題でも使えそう
モチベーション 学習データへのラベルづけが大変なので教師なしでやりたい