ML Deep Metric Learning: A Survey
↓の論文のメモ
https://www.mdpi.com/2073-8994/11/9/1066
Metric Learning
データに対して学習プロセスを行うメトリック学習アプローチは、サンプルデータを区別する能力が高くなる
メトリック学習の主な目的は、同じクラスのサンプル間の距離を縮め、異なるクラスのサンプル間の距離を広げる新しいメトリックを学習する
データの表現能力を向上させることで、分類やクラスタリング問題でより正確な予測が可能になる
距離メトリックは、サンプル間の類似性関係を利用して、より意味のある強力な識別力を持つ新しいデータ表現を提供する
Deep Metric Learning
異なるサンプル間の距離を縮める一方で、同じサンプル間の距離を広げることを目的とするディープメトリック学習は、サンプル間の距離に直接関連しています。
metric loss function を利用して、同じサンプルを近づけ、異なるサンプルを遠ざけることを目指す
https://scrapbox.io/files/666c44b656b51a001d043253.png
Deep Learning metric problem
understanding video における問題
ビデオアノテーション、推薦、検索に対して、metric base のアップローチを用いることがd系流
percon re-identification の問題
metric learning を用いることで、異なる状況で撮影された同じ人物の異なる画像を識別することができる
Deep metric Learning の研究と成果
3D shape retrieval
Deep Correlated Metric Learning for Sketch-based 3D Shape Retrieval
Identifying Style of 3D Shapes using Deep Metric Learning
Sketch-based 3D shape retrieval using Convolutional Neural Networks
Deep Correlated Holistic Metric Learning for Sketch-Based 3D Shape Retrieval
Deep Nonlinear Metric Learning for 3-D Shape Retrieval
Triplet-Center Loss for Multi-view 3D Object Retrieval
Face recognition and verification
Targeting Ultimate Accuracy: Face Recognition via Deep Embedding
Discriminative Deep Metric Learning for Face Verification in the Wild
FaceNet: A unified embedding for face recognition and clustering
Deep Metric Learning for Face and Kinship Verification
Distance-Dependent Metric Learning
Speaker diarization
Designing an Effective Metric Learning Pipeline for Speaker Diarization
Text understanding and information retrieval in the literature
Siamese recurrent architectures for learning sentence similarity
Siamese Networks for Semantic Pattern Similarity
Siamese long short-term memory network for learning sentence representations
Learning Thematic Similarity Metric Using Triplet Networks
Deep metric learning の各問題に対する評価指標
1. Image clutering
F1-score
Normalized Mutual Information (NMI)
2. Image clustering
Recall@R (rank accuracy)
3. Person re-Identification
First Tier
E-measure
Second Tier
Discouted Cumulated Gain
Mean Average Precision
4. Semantic textual similarity
Pearson correlation
Spearman correlation
Mean Squared Error
5. Speaker verification
Equal Error Rate
Minimum Decision Cost Function
Sample Selection
情報量の多い sample は deep metric learning に大きな効果がある。
network model と metric loss function に対して特に有効
各種アプローチに対する sample selection
Constrastive learning
easy なアプローチは、random に positive/negative を選ぶ方法がある
さらに良くなるアプローチとして hard negative maining を用いる
Triplet Network
easy triplet のデータセットは識別力が低いのでモデルの更新に影響を与えない
一方で、情報量が多い sample triplet を用いることが推奨される
Hard negative sample & semi-hard negative mining
hard negative sample は、トレーニングデータによって決定される false-positive サンプルに対応する。
semi-hard negative mining は、anchor sample と比較して、マージン内にある negative sample を見つけることを目的とする。このアプローチは、positive と negative の sample 間の移行がよりソフト。
優れた mathematical model や architecture を作成しても、ネットワークに提示される sample の識別能力に依存して、ネットワークの学習能力は制限される可能性がある。
よりよく学習し、より良い表現を得るためには、識別力の高いトレーニング例を提示する必要がある
sample selection を前処理ステップとして利用することは有効
Deep metric learning に対して negative mining の研究が高い影響勝ちを持つ
情報量の多いサンプルを選ぶ権利を考えると、主な利点は過学習を避けることになる
ネットワークが学習する際に似たパターンは似たような相互作用を持つ
binary classification 問題を考えると、すべての可能な triplet 数は$ O(n^3)の計算量が必要になるので、時間やリソースのコスト増を引き起こす
なので、価値ある triplet sample を使う必要がある。
Loss function for Deep Metric Learning
Network
https://scrapbox.io/files/66704494355dfe001c30f3e5.png
Metric loss function
https://scrapbox.io/files/667044bc790415001c392241.png
Deep Metric Learning の loss function
Loss function
$ D_W(X_1, X_2)=||G_W(X_1) - G_W(X_2)||_2
Contrastive Loss
$ L_{\text{Contrastive}}=(1-\Upsilon)\frac{1}{2}(D_W)^2 + (\Upsilon)\frac{1}{2}\{\max (0, m-D_W)\}^2
Triplet Loss
$ L_{\text{Triplet}}=\max(0, ||G_W(X)-G_W(X^p)||_2 - ||G_W(X)-G_W(X^n)||_2 + \alpha)
Quadruple Loss
$ L_{\text{Quadruple}}=\max(0, ||G_W(X)-G_W(X^p)||_2 - ||G_W(X)-G_W(X^S)||_2 + \alpha_1) + \max(0, ||G_W(X)-G_W(X^S)||_2 - ||G_W(X)-G_W(X^n)||_2 + \alpha+2)
Angular Loss
$ L_{\text{Angular}}=\max(0, ||G_W(X)-G_W(X^p)||_2 - 4 \tan^2 \alpha || G_W(X^n)-G_W(X^C)||_2)
Discussion
Deep Metric Learning は、カテゴリ数が多く、単一カテゴリのサンプル数が少ないタスクにも効果がある
Deep Metric Learning は、metric loss function, sampling strategy, network structure で構成されているので、これを一体として考える必要がある。
Hard mining や Semi-hard mining strategy は、特定のタスクで効果があるが、メモリや時間を要する
Deep Metric Learning はデータに依存するため、特定のデータセットでは metric loss function の収束が遅くなることがある
この問題に対しては、pre-trained model を用いて対応するといったアプローチがある。