SlideShare a Scribd company logo
BERTの
Multi Modalタスクへの活用
自己紹介
 Twitter/Github: ymym3412
 自然言語処理万事屋
MultiModalとは
複数のモダリティ(テキスト/画像/音声 etc...)を組み合わせて扱うこと
単一のモダリティでタスクを解くよりも性能が良くなることを期待できる
例えばSarcasm Detectionであれば
テキスト単体から検出するよりも
話者の画像や音声も活用した方が検出精度を
高められるということが直感的に想像できる
今回はVision+Languageに絞って話します
MultiModal領域でのBERT
 ViLBERT
 LXMERT
 VL-BERT
 Unicoder-VL
 UNITER
解きたいタスク
Visual Question Answering
Cross-Modal Retrieval
Visual Commonsense Reasoning
Referring Expression Comprehension
ViLBERT
ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)
 BERTのSelf-Attention Layerの代わりにCo-Attention Layerの導入
 Masked Multi-Modal LearningとMulti-Modal alignment Predictionの事前学習の導入
 画像の入力は物体検出で検出された領域
ViLBERT
ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)
 Co-Attention Layerの導入
 VisualとLinguisticの2つのTransformer Layerを用意
 Self-AttentionではQuery/Key/Valueがすべて自身だが、Co-AttentionではQueryは自身で
Key/Valueは対となるモーダルから来る
ViLBERT
ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)
 Multi-Modalモデル向け事前学習タスクの導入
 入力は[<IMG>, v1,…,<CLS>, w1, …, <SEP>]の形式
 Masked Multi-Modal Learning
 ランダムにマスクしたvi/wiのクラスを予測
 Multi-Modal Alignment Prediction
 画像とテキストがペアのデータかどうかを予測
ViLBERT
ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)
 事前学習したモデルを各タスクでFine-Turning
LXMERT
LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)
 Modal毎のTransformer EncoderとModalityを統合するCross-Modality Encoder
 5種類の事前学習タスクを導入
LXMERT
LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)
 Image Encoderでは物体検出で得たRoI FeatureとBBのPos Featureを合わせ、
Transformerの入力とし物体間のRelationも学習する
 Textは通常のTransformer
 Cross-Modality EncoderではModalを跨いだCross-Attention
 それぞれのEncoderを複数個Stackする
LXMERT
LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)
 5種類の事前学習タスク
 Masked Cross-Modality LM
 通常のMasked LMだがImageの情報も活用できる
 Masked Object Prediction/RoI-Feature Regression
 RoIをランダムにMask、最終的な出力とのL2 Lossを計算
 Masked Object Prediction/Detected-Label Classification
 出力からODのラベルを予測
 Cross-Modality Matching
 画像とテキストがペアか予測
 Image Question Answering
 QA問題を解く(コーパス中のQAのデータのみ)
LXMERT
LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)
 Devセットでは学習済みBERTで初期化するよりスクラッチでLXMERTを
学習させた方が良い性能。どちらが良いかは断定はできない
 VQA系のタスクに対しては、Image FeatureやImage-QAの事前学習
がうまく機能している
VL-BERT
VL-BERT: PRE-TRAINING OFGENERICVISUAL -LINGUISTICR EPRESENTATIONS(ICLR 2020)
 ImageとTextのEncoderを分離せず同じTransformerで扱う機構
 事前学習はMasked LMとMasked RoI Classification
VL-BERT
VL-BERT: PRE-TRAINING OFGENERICVISUAL -LINGUISTICR EPRESENTATIONS(ICLR 2020)
 ViLBERTやLXMERTはEncoderを分けてCo-Attentionを行っていたが、VL-BERTでは同じ
Transformer Encoderに入力しSelf-AttentionをすることでAttentionの制約を回避できる(著
者)
 Image Featureの生成に工夫が加えられている
Unicoder-VL
Unicoder-VL: A Universal Encoder for Vision and Language by Cross-modal(AAAI 2020)
 こちらもひとつのTransformer EncoderでTextとImageを扱う
 事前学習はMasked LM, Masked Object Classification, Visual-Linguistic Matching
 Unicoder-VLは他のモデルと違いdownstream taskがCross-Modal Retrieval
差が分かりづらくなってきた?
 VL-BERTの論文に各種Multi-Modal BERT系モデルの比較表がある
 Single TransformerやDownstream task, Pretrain Taskなどに差
UNITER
UNiversal Image-TExt Representation Learning
 モデルはImageとTextを同じTransformer Encoderに投入するタイプ
 4種類の事前学習タスクを用いる
 事前学習には従来の主流だったConceptual Captions[Sharma et al., 2018]に加えてCOCO[Chen et al., 2015],
Visual Genome[Krishna et al., 2016], SBU Captions[Ordonez et al., 2011]などの4種類のデータセットを用いる
UNITER
UNiversal Image-TExt Representation Learning
 4種類の事前学習タスク
 Masked Language Modeling
 Image-Text Matching
 Word-Region Alignment
 WordとRegionの対応付けを最適輸送問題として解く
 コスト関数はImageとWordのベクトルのコサイン類似度
 最適輸送をIPOTで求めその距離を損失とする
 Masked Region Modeling
 3種の損失関数を設計
 Masked Region Feature Regression
 Masked Region Classification
 Masked Region Classification with KL-D
UNITER
UNiversal Image-TExt Representation Learning
 実験結果ではここまで紹介したMultiModal系BERTモデルを凌いでいる
まとめ
 モデルの構造として各Modalを分けてEncodeするものと、ひとつのEncoderに投入するものが主流
 事前学習として、通常のBERTと同じMasked LMとImageのRoIに対するMasked Region
Modelがほとんどのモデルで行われる
 Masked Region ModelはL2回帰で行う場合とラベル分類で行う場合、あるいは両方を行う場合がある
 上記の事前学習に加えて画像とテキストのペアの正例/負例で行うImage-Text Matchingやモデル
固有の事前学習タスク(Image-QAやWord Region Alignmentなど)が提案されている
 事前学習にはConceptual Captionsを使う場合が多いが、UNITERでは加えてCOCO, Visual
Genome, SBU Captionsが用いられている
参考文献
 Lu, J., Batra, D., Parikh, D., Lee, S.: Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In:
NeurIPS (2019)
 Tan, H., Bansal, M.: Lxmert: Learning cross-modality encoder representations from transformers. In: EMNLP (2019)
 Su, W., Zhu, X., Cao, Y., Li, B., Lu, L., Wei, F., Dai, J.: Vl-bert: Pre-training of generic visual-linguistic representations. arXiv preprint
arXiv:1908.08530 (2019)
 Li, G., Duan, N., Fang, Y., Jiang, D., Zhou, M.: Unicoder-vl: A universal encoder for vision and language by cross-modal pre-training.
arXiv preprint arXiv:1908.06066 (2019)
 Yen-Chun Chen ? , Linjie Li ? , Licheng Yu ? , Ahmed El Kholy Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu:UNITER: UNiversal
Image-TExt Representation Learning. arXiv preprint arXiv:1909.11740 (2019)
 Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Doll´ar, P., Zitnick, C.L.: Microsoft coco: Common objects in
context. In: ECCV (2014)
 Krishna, R., Zhu, Y., Groth, O., Johnson, J., Hata, K., Kravitz, J., Chen, S., Kalantidis, Y., Li, L.J., Shamma, D.A., et al.: Visual genome:
Connecting language and vision using crowdsourced dense image annotations. IJCV (2017)
 Sharma, P., Ding, N., Goodman, S., Soricut, R.: Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic
image captioning. In: ACL (2018)
 Ordonez, V., Kulkarni, G., Berg, T.L.: Im2text: Describing images using 1 million captioned photographs. In: NeurIPS (2011)

More Related Content

PDF
[DL輪読会]Learning Transferable Visual Models From Natural Language Supervision
PPTX
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
PPTX
学習時に使ってはいないデータの混入「リーケージを避ける」
PDF
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
PPTX
Triplet Loss 徹底解説
PPTX
【DL輪読会】ViT + Self Supervised Learningまとめ
PDF
時系列予測にTransformerを使うのは有効か?
PPTX
Curriculum Learning (関東CV勉強会)
[DL輪読会]Learning Transferable Visual Models From Natural Language Supervision
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
学習時に使ってはいないデータの混入「リーケージを避ける」
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
Triplet Loss 徹底解説
【DL輪読会】ViT + Self Supervised Learningまとめ
時系列予測にTransformerを使うのは有効か?
Curriculum Learning (関東CV勉強会)

What's hot (20)

PDF
PRML学習者から入る深層生成モデル入門
PPTX
モデル高速化百選
PDF
最新リリース:Optuna V3の全て - 2022/12/10 Optuna Meetup #2
PPTX
[DL輪読会]ドメイン転移と不変表現に関するサーベイ
PDF
【DL輪読会】How Much Can CLIP Benefit Vision-and-Language Tasks?
PDF
continual learning survey
PDF
Transformerを多層にする際の勾配消失問題と解決法について
PPTX
[DL輪読会]GLIDE: Guided Language to Image Diffusion for Generation and Editing
PDF
SSII2022 [TS1] Transformerの最前線〜 畳込みニューラルネットワークの先へ 〜
PDF
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
PDF
機械学習のためのベイズ最適化入門
PDF
最近のDeep Learning (NLP) 界隈におけるAttention事情
PDF
最適輸送の計算アルゴリズムの研究動向
PDF
【DL輪読会】A Path Towards Autonomous Machine Intelligence
PDF
【DL輪読会】マルチエージェント強化学習における近年の 協調的方策学習アルゴリズムの発展
PDF
PPTX
【DL輪読会】マルチモーダル 基盤モデル
PDF
多様な強化学習の概念と課題認識
PDF
動作認識の最前線:手法,タスク,データセット
PPTX
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
PRML学習者から入る深層生成モデル入門
モデル高速化百選
最新リリース:Optuna V3の全て - 2022/12/10 Optuna Meetup #2
[DL輪読会]ドメイン転移と不変表現に関するサーベイ
【DL輪読会】How Much Can CLIP Benefit Vision-and-Language Tasks?
continual learning survey
Transformerを多層にする際の勾配消失問題と解決法について
[DL輪読会]GLIDE: Guided Language to Image Diffusion for Generation and Editing
SSII2022 [TS1] Transformerの最前線〜 畳込みニューラルネットワークの先へ 〜
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
機械学習のためのベイズ最適化入門
最近のDeep Learning (NLP) 界隈におけるAttention事情
最適輸送の計算アルゴリズムの研究動向
【DL輪読会】A Path Towards Autonomous Machine Intelligence
【DL輪読会】マルチエージェント強化学習における近年の 協調的方策学習アルゴリズムの発展
【DL輪読会】マルチモーダル 基盤モデル
多様な強化学習の概念と課題認識
動作認識の最前線:手法,タスク,データセット
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
Ad

Similar to Bert for multimodal (20)

PDF
論文紹介:A Survey of Vision-Language Pre-Trained Models
PPTX
Unified Vision-Language Pre-Training for Image Captioning and VQA
PDF
第六回全日本コンピュータビジョン勉強会資料 UniT (旧題: Transformer is all you need)
PDF
【CVPR 2020 メタサーベイ】Vision & Other Modalities
PDF
Vision and Language(メタサーベイ )
PDF
SSII2019OS: ビジョン&ランゲージによる意図理解と曖昧性解消
PPTX
CVPR2018 参加報告(速報版)2日目
PDF
[DL輪読会]One Model To Learn Them All
PPTX
Deep Learning による視覚×言語融合の最前線
PPTX
Leveraging Visual Question Answering for Image-Caption Ranking (関東CV勉強会 ECCV ...
PDF
20180622 munit multimodal unsupervised image-to-image translation
 
PDF
BERT+XLNet+RoBERTa
PDF
[DL Hacks]Pretraining-Based Natural Language Generation for Text Summarizatio...
PDF
【学会聴講報告】CVPR2024からみるVision最先端トレンド / CVPR2024 report
PDF
SPADE :Semantic Image Synthesis with Spatially-Adaptive Normalization
PPTX
Semi supervised, weakly-supervised, unsupervised, and active learning
PPT
[FUNAI輪講] BERT
PPTX
これからの Vision & Language ~ Acadexit した4つの理由
PPTX
ECCV2018参加速報(一日目)
PDF
【メタサーベイ】Vision and Language のトップ研究室/研究者
論文紹介:A Survey of Vision-Language Pre-Trained Models
Unified Vision-Language Pre-Training for Image Captioning and VQA
第六回全日本コンピュータビジョン勉強会資料 UniT (旧題: Transformer is all you need)
【CVPR 2020 メタサーベイ】Vision & Other Modalities
Vision and Language(メタサーベイ )
SSII2019OS: ビジョン&ランゲージによる意図理解と曖昧性解消
CVPR2018 参加報告(速報版)2日目
[DL輪読会]One Model To Learn Them All
Deep Learning による視覚×言語融合の最前線
Leveraging Visual Question Answering for Image-Caption Ranking (関東CV勉強会 ECCV ...
20180622 munit multimodal unsupervised image-to-image translation
 
BERT+XLNet+RoBERTa
[DL Hacks]Pretraining-Based Natural Language Generation for Text Summarizatio...
【学会聴講報告】CVPR2024からみるVision最先端トレンド / CVPR2024 report
SPADE :Semantic Image Synthesis with Spatially-Adaptive Normalization
Semi supervised, weakly-supervised, unsupervised, and active learning
[FUNAI輪講] BERT
これからの Vision & Language ~ Acadexit した4つの理由
ECCV2018参加速報(一日目)
【メタサーベイ】Vision and Language のトップ研究室/研究者
Ad

More from Yasuhide Miura (6)

PDF
Divide, Conquer and Combine: Hierarchical Feature Fusion Network with Local a...
PDF
A Survey on Cross-Modal Embedding
PDF
Maskgan better text generation via filling in the ____
PDF
Fast abstractive summarization with reinforce selected sentence rewriting
PDF
Deconvolutional paragraph representation learning
PDF
放送大学テキスト「自然言語処理」 7章 構文の解析(1)
Divide, Conquer and Combine: Hierarchical Feature Fusion Network with Local a...
A Survey on Cross-Modal Embedding
Maskgan better text generation via filling in the ____
Fast abstractive summarization with reinforce selected sentence rewriting
Deconvolutional paragraph representation learning
放送大学テキスト「自然言語処理」 7章 構文の解析(1)

Bert for multimodal

  • 2. 自己紹介  Twitter/Github: ymym3412  自然言語処理万事屋
  • 4. MultiModal領域でのBERT  ViLBERT  LXMERT  VL-BERT  Unicoder-VL  UNITER
  • 5. 解きたいタスク Visual Question Answering Cross-Modal Retrieval Visual Commonsense Reasoning Referring Expression Comprehension
  • 6. ViLBERT ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)  BERTのSelf-Attention Layerの代わりにCo-Attention Layerの導入  Masked Multi-Modal LearningとMulti-Modal alignment Predictionの事前学習の導入  画像の入力は物体検出で検出された領域
  • 7. ViLBERT ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)  Co-Attention Layerの導入  VisualとLinguisticの2つのTransformer Layerを用意  Self-AttentionではQuery/Key/Valueがすべて自身だが、Co-AttentionではQueryは自身で Key/Valueは対となるモーダルから来る
  • 8. ViLBERT ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)  Multi-Modalモデル向け事前学習タスクの導入  入力は[<IMG>, v1,…,<CLS>, w1, …, <SEP>]の形式  Masked Multi-Modal Learning  ランダムにマスクしたvi/wiのクラスを予測  Multi-Modal Alignment Prediction  画像とテキストがペアのデータかどうかを予測
  • 9. ViLBERT ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks(NeurIPS2019)  事前学習したモデルを各タスクでFine-Turning
  • 10. LXMERT LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)  Modal毎のTransformer EncoderとModalityを統合するCross-Modality Encoder  5種類の事前学習タスクを導入
  • 11. LXMERT LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)  Image Encoderでは物体検出で得たRoI FeatureとBBのPos Featureを合わせ、 Transformerの入力とし物体間のRelationも学習する  Textは通常のTransformer  Cross-Modality EncoderではModalを跨いだCross-Attention  それぞれのEncoderを複数個Stackする
  • 12. LXMERT LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)  5種類の事前学習タスク  Masked Cross-Modality LM  通常のMasked LMだがImageの情報も活用できる  Masked Object Prediction/RoI-Feature Regression  RoIをランダムにMask、最終的な出力とのL2 Lossを計算  Masked Object Prediction/Detected-Label Classification  出力からODのラベルを予測  Cross-Modality Matching  画像とテキストがペアか予測  Image Question Answering  QA問題を解く(コーパス中のQAのデータのみ)
  • 13. LXMERT LXMERT: Learning Cross-Modality Encoder Representations from Transformers(EMNLP2019)  Devセットでは学習済みBERTで初期化するよりスクラッチでLXMERTを 学習させた方が良い性能。どちらが良いかは断定はできない  VQA系のタスクに対しては、Image FeatureやImage-QAの事前学習 がうまく機能している
  • 14. VL-BERT VL-BERT: PRE-TRAINING OFGENERICVISUAL -LINGUISTICR EPRESENTATIONS(ICLR 2020)  ImageとTextのEncoderを分離せず同じTransformerで扱う機構  事前学習はMasked LMとMasked RoI Classification
  • 15. VL-BERT VL-BERT: PRE-TRAINING OFGENERICVISUAL -LINGUISTICR EPRESENTATIONS(ICLR 2020)  ViLBERTやLXMERTはEncoderを分けてCo-Attentionを行っていたが、VL-BERTでは同じ Transformer Encoderに入力しSelf-AttentionをすることでAttentionの制約を回避できる(著 者)  Image Featureの生成に工夫が加えられている
  • 16. Unicoder-VL Unicoder-VL: A Universal Encoder for Vision and Language by Cross-modal(AAAI 2020)  こちらもひとつのTransformer EncoderでTextとImageを扱う  事前学習はMasked LM, Masked Object Classification, Visual-Linguistic Matching  Unicoder-VLは他のモデルと違いdownstream taskがCross-Modal Retrieval
  • 18. UNITER UNiversal Image-TExt Representation Learning  モデルはImageとTextを同じTransformer Encoderに投入するタイプ  4種類の事前学習タスクを用いる  事前学習には従来の主流だったConceptual Captions[Sharma et al., 2018]に加えてCOCO[Chen et al., 2015], Visual Genome[Krishna et al., 2016], SBU Captions[Ordonez et al., 2011]などの4種類のデータセットを用いる
  • 19. UNITER UNiversal Image-TExt Representation Learning  4種類の事前学習タスク  Masked Language Modeling  Image-Text Matching  Word-Region Alignment  WordとRegionの対応付けを最適輸送問題として解く  コスト関数はImageとWordのベクトルのコサイン類似度  最適輸送をIPOTで求めその距離を損失とする  Masked Region Modeling  3種の損失関数を設計  Masked Region Feature Regression  Masked Region Classification  Masked Region Classification with KL-D
  • 20. UNITER UNiversal Image-TExt Representation Learning  実験結果ではここまで紹介したMultiModal系BERTモデルを凌いでいる
  • 21. まとめ  モデルの構造として各Modalを分けてEncodeするものと、ひとつのEncoderに投入するものが主流  事前学習として、通常のBERTと同じMasked LMとImageのRoIに対するMasked Region Modelがほとんどのモデルで行われる  Masked Region ModelはL2回帰で行う場合とラベル分類で行う場合、あるいは両方を行う場合がある  上記の事前学習に加えて画像とテキストのペアの正例/負例で行うImage-Text Matchingやモデル 固有の事前学習タスク(Image-QAやWord Region Alignmentなど)が提案されている  事前学習にはConceptual Captionsを使う場合が多いが、UNITERでは加えてCOCO, Visual Genome, SBU Captionsが用いられている
  • 22. 参考文献  Lu, J., Batra, D., Parikh, D., Lee, S.: Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In: NeurIPS (2019)  Tan, H., Bansal, M.: Lxmert: Learning cross-modality encoder representations from transformers. In: EMNLP (2019)  Su, W., Zhu, X., Cao, Y., Li, B., Lu, L., Wei, F., Dai, J.: Vl-bert: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530 (2019)  Li, G., Duan, N., Fang, Y., Jiang, D., Zhou, M.: Unicoder-vl: A universal encoder for vision and language by cross-modal pre-training. arXiv preprint arXiv:1908.06066 (2019)  Yen-Chun Chen ? , Linjie Li ? , Licheng Yu ? , Ahmed El Kholy Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu:UNITER: UNiversal Image-TExt Representation Learning. arXiv preprint arXiv:1909.11740 (2019)  Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Doll´ar, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In: ECCV (2014)  Krishna, R., Zhu, Y., Groth, O., Johnson, J., Hata, K., Kravitz, J., Chen, S., Kalantidis, Y., Li, L.J., Shamma, D.A., et al.: Visual genome: Connecting language and vision using crowdsourced dense image annotations. IJCV (2017)  Sharma, P., Ding, N., Goodman, S., Soricut, R.: Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In: ACL (2018)  Ordonez, V., Kulkarni, G., Berg, T.L.: Im2text: Describing images using 1 million captioned photographs. In: NeurIPS (2011)