【DL輪読会】Generalized Zero-Shot Learning via Disentangled Representation

>100 Views

February 26, 21

スライド概要

2021/02/26
Deep Learning JP:
http://deeplearning.jp/seminar-2/

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

DEEP LEARNING JP [DL Papers] Generalized Zero-Shot Learning via Disentangled Representation Yuting Lin, Kokusai Kogyo Co., Ltd.(国際航業) http://deeplearning.jp/ 1

2.

書籍情報 • タイトル – Generalized Zero-Shot Learning via Disentangled Representation • 著者 – Xiangyu Li, Zhe Xu, Kun Wei, Cheng Deng (Xidian University) – この研究室は、AAAI2021に論文3本を採択 • AAAI2021に採択 • Paper – https://www.aaai.org/AAAI21Papers/AAAI-1398.LiXu.pdf • Code – まだ未公開 2

3.

背景 • Zero-Shot Learning (ZSL) – 学習時はseenクラス、テスト時はunseenクラス • Generalized Zero-Shot Learning(GZSL) – テスト時はseenとunseenクラスが混在 – ZSLの変種で、 ZSLより現実的なシーンを想定し、もっとチャレンジング – 分類が行われる空間によって手法を分かれている • semantic-space:seenクラスのvisual-spaceからsemantic-spaceへのマッピングを学習し、そのマッ ピングをunseenクラスに適用 • visual-space:欠測データ問題とみなし、unseenデータ/特徴量を生成して、データをaugment • common-space: visionとsemantic特徴を共通の潜在空間にembed 3

4.

背景 • 既存のGZSLはnegativeな情報を排除していない – visual情報は全データセットから取得 – semantic情報は、一枚の画像に対する1クラスの情報から取得 – 認識に関係ない情報を排除するため、 visual情報とsemantic情報から、認識に寄与 する要素(category-distilling factors)と寄与しない要素(category-dispersing factors)をそれぞれ抽出(disentangle) 4

5.

概要 • 提案手法の概要 – Disentangled-VAEを提案し、visual情報とsemantic情報から、認識に寄与する要素 (category-distilling factors)と寄与しない要素(category-dispersing factors)をそれ ぞれ抽出(disentangle) – 潜在空間上の特徴に対し、batch re-combining方策で、disentanglementの学習をガ イドする ⇒ 認識に適するcategory-distilling factorsの取得に貢献 5

6.

既往研究 • Zero-Shot Learning – unseenクラスのsemantic記述をvisual-spaceにマッピング • Deep Learningが流行る前は、visual特徴とラフなラベルによる固い対応を作る[1][2] • Visual-space⇔semantic-spaceのマッピング関数を学習[3][4] • Visual-spaceとsemantic-spaceをcommon-spaceへのマッピング関数を学習[5][6] • 課題:学習データにseenクラスしかないため、過学習が起きやすい – 生成モデル(GAN, VAE)により、unseenクラスを生成 • 生成サンプルとseenクラスで分類モデルを学習[7] • 生成に基づくsemantic featureと生成したサンプルから推定したsemantic featureのconsistencyを損 失関数にする[8] • double-deck VAEで、visual featureとsemantic featureの連携をcross-modal reconstructionで推定[9] – 課題: • visual spaceとsemantic spaceにおけるcategory redundancy 6

7.

既往研究 • Disentangled Representation – 生成モデルに応用する研究が多い – 潜在空間を対象に、KL divergenceに大きいな重みをかけたり[11]、Total Correlation を抽出したり[12] 、することで生成画像の質を向上 – decoupling • 顔認識では、poseとidentify情報に分ける[13] • 動画解析では、 Self-Supervised Sequential VAEを用いて、時系列データを時間可変変数と不変 変数に分ける[14] • 画像スタイル変換  コンテント情報とスタイル情報に分ける[15]  ドメイン不変のコンテント情報とドメイン依存の属性情報に分ける[16][17][18] 7

8.

提案手法 • 問題定義 – visual space:𝑋⊆𝑅𝐷1 – semantic space: 𝐶⊆𝑅𝐷2 – seen categories: 𝑌 𝑆 = 𝑦𝑖𝑠 𝑖 = 1, 2, ⋯ , 𝑁𝑠 – unseen categories: 𝑌 𝑈 = 𝑦𝑗𝑢 𝑗 = 1, 2, ⋯ , 𝑁𝑢 , 𝑌 𝑆 ∩ 𝑌 𝑈 = ∅ – 学習サンプル • seenクラス: 𝑥, 𝑦 𝑠 , 𝑐 𝑥 ∈ 𝑋, 𝑦 𝑠 ∈ 𝑌 𝑆 , 𝑐 ∈ 𝐶 • unseenクラス: 𝑦 𝑢 , 𝑐 𝑦 𝑢 ∈ 𝑌 𝑈 , 𝑐 ∈ 𝐶 – 目的関数:𝑓 𝐺𝑍𝑆𝐿 : 𝑋 → 𝑌 𝑆 ∪ 𝑌 𝑈 8

9.

提案手法 • Disentangled-VAE – 平行するVAE構造 – visual & semantic特徴から、categorydistilling factors(𝑧𝑣𝑡 , 𝑧𝑠𝑡 ) and category𝑝 𝑝 dispersing factors (𝑧𝑣 , 𝑧𝑠 ) をdisentangle – encoder (𝐸𝑣 , 𝐸𝑠 ) で、分布𝑞 𝑧 𝑡 , 𝑧 𝑝 𝑥 を学習 – decoder (𝐷𝑣 , 𝐷𝑠 ) で、学習した𝑞 𝑧 𝑡 , 𝑧 𝑝 𝑥 で visual & semantic特徴を再構築 – Modality alignmentで、 visual spaceと semantic spaceをマッピング – 分類器(𝐹𝑣 , 𝐹𝑠 )で、 disentanglementの性能 を向上 9

10.

提案手法のloss関数 • VAE loss – visual featureに対し: 𝐿𝑣𝑉𝐴𝐸 – – – – = −෍ log 𝑝𝜃 𝑥 𝑝 𝑡 𝑞ф 𝑧𝑣 , 𝑧𝑣 𝑥 +𝐷𝐾𝐿 𝑞ф 𝑧𝑣𝑡 𝑥 ||𝑝(𝑧𝑣𝑡 ) 𝑝 𝑝 +𝛼𝐷𝐾𝐿 𝑞ф 𝑧𝑣 𝑥 ||𝑝(𝑧𝑣 ) 𝑝 𝑡 𝑧𝑣 , 𝑧𝑣 第一項:再構築loss 第二、三項:encoderが推定した分布とpriorのKL距離 𝑝 𝑡 再構築には、𝑧𝑣 と𝑧𝑣 の合計値を用いてdecoderに入れる 𝐿𝑉𝐴𝐸 = 𝐿𝑣𝑉𝐴𝐸 + 𝐿𝑠𝑉𝐴𝐸 10

11.

提案手法のloss関数 • Shuffling classification loss – category-dispersing factorsは分類に寄与しない – batch内の潜在空間上のdispersing特徴量をshuffle 𝑝 𝑝 𝑝 𝑝 𝑝 𝑝 𝑃 = 𝑧 𝑃 = 𝑧ǁ • 𝑍𝑚 , 𝑧 , ⋯ 𝑧 → 𝑍 𝑚 𝑚,1 𝑚,2 𝑚,𝑁 𝑚,1 , 𝑧ǁ𝑚,2 , ⋯ 𝑧ǁ𝑚,𝑁 𝑡 𝑡 𝑡 𝑇 • distilling特徴量は保持:𝑍𝑚 = 𝑧𝑚,1 , 𝑧𝑚,2 , ⋯ 𝑧𝑚,𝑁 – shuffleしたdispersing特徴量で分類器を学習 𝑝 𝑡 𝐿𝑆𝐶 = σ𝑚 σ𝑁 −𝐹 𝑧 𝑚 𝑖=1 𝑚,𝑖 + 𝑧𝑚,𝑖 𝑝 𝑡 𝑦𝑖 -𝐹𝑚 𝑧𝑚,𝑖 + 𝑧ǁ𝑚,𝑖 𝑦𝑖 • Where, 𝑚 ∈ 𝑣, 𝑠 , 𝑁 = 𝑏𝑎𝑡𝑐ℎ 𝑠𝑖𝑧𝑒, 𝑦𝑖 = label of latent feature – category-distilling factorsの学習に寄与 11

12.

提案手法のloss関数 • Modality alignment loss – visual spaceとsemantic spaceのalignmentが重要 – 異なる粒度のloss関数で学習 – cross-reconstruction loss:異なるmodalityで再構築できるか 𝐿𝐶𝑅 = 𝑥 − 𝐷𝑣 𝐸𝑠 𝑐 , + 𝑐 − 𝐷𝑠 𝐸𝑣 𝑥 – distribution-distance loss:異なるmodalityの潜在空間のWasserstein距離 𝐿𝐷𝐷 = + 𝜇𝑣𝑡 − 𝜇𝑠𝑡 𝑝 𝜇𝑣 − 2 2 𝑝 2 𝜇𝑠 2 + + 1 𝑡2 𝜎𝑣 1 𝑝2 𝜎𝑣 − − 1 2 𝑡2 𝜎𝑠 𝐹𝑟𝑜𝑏𝑒𝑛𝑖𝑢𝑠 1 2 𝑝2 𝜎𝑠 𝐹𝑟𝑜𝑏𝑒𝑛𝑖𝑢𝑠 1 2 1 2 – Where, 𝜇, 𝜎はencoder出力の事後分布の平均と分散 – 𝐿𝑀𝐴 = 𝐿𝐶𝑅 + 𝛽𝐿𝐷𝐷 • 全体のloss関数:L = 𝐿𝑉𝐴𝐸 + 𝛾𝐿𝑆𝐶 + 𝜆𝐿𝑀𝐴 12

13.

学習の詳細 • Disentangle-VAEの学習 – – – – 学習済モデルからvisual特徴を取得 人間がつけたannotationをsemantic特徴とする visual特徴とsemantic特徴がペアとなる category-distilling factorsとcategory-dispersing factorsを抽出できる • Classifierの学習 – seenクラスの(𝑧𝑣𝑡 , 𝑧𝑠𝑡 )とunseenクラスの𝑧𝑠𝑡 で学習 • Inference – 画像を𝐸𝑣 に入力し、𝑧𝑡 で種別を推定 13

14.

実験 • Dataset – Caltech- UCSD-Birds 200-2011 (CUB) • 200種類の鳥類のうち、150クラスをseen、50クラスをunseen – Animals with Attributes 1 (AWA1) and 2 (AWA2) • 50種類の動物のうち、40クラスをseen、10クラスをunseen – SUN Attribute dataset (SUN) • 717種類のシーンのうち、645シーンをseen、72クラスをunseen 14

15.

実験 • 学習済モデル – 各datasetのseenに対し、ResNet101を学習 • Encoder, Decoderの構造 – 2層のMLP • latent embedding size – 64 • 評価指標 –𝐻= 2×𝑈×𝑆 𝑈+𝑆 – U: unseenクラス平均精度 – S: seenクラス平均精度 15

16.

実験結果 • 提案手法の有効性を確認 • category-distilling factorを抽出することで、分類性能を向上することを確認 – CADA-VAEはcategory-distilling factorを配慮せず 16

17.

Ablation Study結果 • 提案手法の効果 – Disentanglement • category-distilling factorの抽出により、分類性能の向上を確認 – Batch recombining strategy • category-distilling factorのdisentanglementをガイド 17

18.

実験結果 • 𝐿𝑣𝑉𝐴𝐸 における重み𝛼の検証 𝐿𝑣𝑉𝐴𝐸 = − ෍ 𝑝 𝑧𝑣𝑡 , 𝑧𝑣 𝑥 𝑥 ||𝑝(𝑧𝑣𝑡 ) 𝑝 𝑝 𝑞ф 𝑧𝑣 𝑥 ||𝑝(𝑧𝑣 ) 𝑞ф +𝐷𝐾𝐿 𝑞ф 𝑧𝑣𝑡 +𝛼𝐷𝐾𝐿 𝑝 log 𝑝𝜃 𝑥 𝑧𝑣𝑡 , 𝑧𝑣 – category-dispersing factorの重み • 𝛼↑ ⇒ 𝑧 𝑝 の分布が指定の分布(正規分布)に接近 ⇒ 再構築への寄与度↓ • 最適値がdatasetに依存 18

19.

実験結果 • Discriminability of different latent features – 𝑧 𝑝 と𝑧 𝑡 で、別のclassifierを学習し、そのdiscriminabilityを検証 – 分類の学習に寄与しないネガティブな特徴を用いる場合、性能に悪影響することを 確認 19

20.

まとめ • Disentangled-VAEにより、 分類寄与する潜在空間上の情報categorydistilling factorsを抽出することで、GZSLの性能を向上 • Batch recombining strategyにより、 category-distilling factorsの抽出をガ イドする • 人間がつけたannotationからsemantic特徴を抽出する。付け方に言及しな かった • Loss関数の重みがDatasetに依存することは実用性に欠けた 20

21.

Reference [1] Lampert, C. H.; Nickisch, H.; and Harmeling, S. 2009. Learning to detect unseen object classes by between-class attribute transfer. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, 951–958. IEEE. [2] Lampert, C. H.; Nickisch, H.; and Harmeling, S. 2013. Attribute-based classification for zero-shot visual object cat- egorization. IEEE transactions on pattern analysis and ma- chine intelligence 36(3): 453–465. [3] Romera-Paredes, B.; and Torr, P. 2015. An embarrassingly simple approach to zero-shot learning. In International Con- ference on Machine Learning, 2152–2161. [4] Socher, R.; Ganjoo, M.; Manning, C. D.; and Ng, A. 2013. Zero-shot learning through cross-modal transfer. In Ad- vances in neural information processing systems, 935–943. [5] Akata, Z.; Perronnin, F.; Harchaoui, Z.; and Schmid, C. 2015a. Label-embedding for image classification. IEEE transactions on pattern analysis and machine intelligence 38(7): 1425–1438. [6] Sung, F.; Yang, Y.; Zhang, L.; Xiang, T.; Torr, P. H.; and Hospedales, T. M. 2018. Learning to compare: Relation net- work for few-shot learning. In Proceedings ofthe IEEE Con- ference on Computer Vision and Pattern Recognition, 1199– 1208. [7] Xian, Y.; Lorenz, T.; Schiele, B.; and Akata, Z. 2018b. Fea- ture generating networks for zero-shot learning. In Proceed- ings ofthe IEEE conference on computer vision and pattern recognition, 5542–5551. [9] Felix, R.; Kumar, V. B.; Reid, I.; and Carneiro, G. 2018. Multi-modal cycle-consistent generalized zero-shot learn- ing. In Proceedings of the European Conference on Com- puter Vision (ECCV), 21–37. [10] Schonfeld, E.; Ebrahimi, S.; Sinha, S.; Darrell, T.; and Akata, Z. 2019. Generalized zero-and few-shot learning via aligned variational autoencoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recogni- tion, 8247–8255. [11] Higgins, I.; Matthey, L.; Pal, A.; Burgess, C.; Glorot, X.; Botvinick, M.; Mohamed, S.; and Lerchner, A. 2016. beta- vae: Learning basic visual concepts with a constrained vari- ational framework . [12] Kim, H.; and Mnih, A. 2018. Disentangling by factorising. arXiv preprint arXiv:1802.05983 . [13] Tran, L.; Yin, X.; and Liu, X. 2017. Disentangled represen- tation learning gan for pose-invariant face recognition. In Proceedings ofthe IEEE conference on computer vision and pattern recognition, 1415–1424. [14] Zhu, Y.; Min, M. R.; Kadav, A.; and Graf, H. P. 2020. S3VAE: Self-Supervised Sequential VAE for Representation Disentanglement and Data Generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 6538–6547. [15] Jiang,W.; Liu, S.; Gao, C.; Cao, J.; He, R.; Feng, J.; and Yan, S. 2020. Psgan: Pose and expression robust spatial-aware gan for customizable makeup transfer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 5194–5202. [16] Almahairi, A.; Rajeswar, S.; Sordoni, A.; Bachman, P.; and Courville, A. 2018. Augmented cyclegan: Learning many- to-many mappings from unpaired data. arXiv preprint arXiv:1802.10151 . [17] Huang, X.; Liu, M.-Y.; Belongie, S.; and Kautz, J. 2018. Multimodal unsupervised image-to-image translation. In Proceedings of the European Conference on Computer Vi- sion (ECCV), 172– 189. [18] Lee, H.-Y.; Tseng, H.-Y.; Huang, J.-B.; Singh, M.; and Yang, M.-H. 2018. Diverse image-to-image translation via dis- entangled representations. In Proceedings of the European conference on computer vision (ECCV), 35–51. 21