Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2022.2.11 第6回 統計・機械学習若手シンポジウム チュートリアル講演 Vision and LanguageとTransformers

2022.2.11 第6回 統計・機械学習若手シンポジウム チュートリアル講演 Vision and LanguageとTransformers

第6回 統計・機械学習若手シンポジウム
2022年2月9日(水)- 11日(金)
オンライン開催
https://sites.google.com/view/statsmlsymposium21/

Seitaro Shinagawa

February 13, 2022
Tweet

More Decks by Seitaro Shinagawa

Other Decks in Research

Transcript

  1. Vision and Language と Transformers 2022.02.11 品川 政太朗 AHC-Lab, NAIST

    第6回 統計・機械学習若手シンポジウム チュートリアル講演 1/14
  2. 生息地:Vision and Language+対話 博士課程での研究: 対話的に画像を編集するシステム 科研費(若手):自然言語に紐づいて構 造化された表現に基づく画像生成基盤の 確立 経歴 2013年東北大学工学部卒業

    2015年東北大学大学院博士前期課程修了 2020年奈良先端大博士後期課程修了 同年11月から同大学助教 品川 政太朗(しながわ せいたろう)と申します 2/85
  3. コンピュータビジョン最前線 ニュウモンVision & Language NAIST助教 twitter cvpaper.challenge V&L group Vision

    and Language jp slack 強化学習苦手の会、若手の会 最近やってきたこと: 人をつなげる、人とつながること 本日の内容もこれらの資料がベース になってます (コミュニケーションはイイぞ) 3/85
  4. Vision and LanguageでもTransformerがアツい ViLBERT VisualBERT Unicoder-VL LXMERT VL-BERT Unified VLP

    UNITER VILLA Pixel-BERT VinVL OSCAR EARNIE-ViL VL-T5 ViLT word region alignment image- captioning Adversarial object label improve object detection Scene graph patch based whole word masking grid based base VideoBERT E2E-VLP Dialogue Dodecathlon 引用:コンピュータビジョン最前線 Winter 2021,ニュウモンVision & Language ’19 ’20 ’21 5/85
  5. なぜ物体領域特徴が重要? V&Lの問題を解くには、画像に登場する物体と物体間 の関係性を抽出することが有用であるため image from [Agrawal+, 2016] 例:「Q:口ひげは何でできてる?」 を解くのに必要な情報は? •

    物体情報:「人の顔」「バナナ」 • 関係情報「バナナが口元の位置」 物体領域特徴抽出器の気持ち 「問題を解くのに必要な情報だ けとってくればいいじゃない」 10/85
  6. 物体領域特徴を抽出するには? Faster R-CNN [Ren+,2017] captio n image- captioning region feature

    (固定次元) • 処理速度 0.2 秒/枚 • YOLOとかは使われない(比 較するのが面倒だから?) region feature Faster R-CNNとその派生を使うことが多い bounding box (bbox)候補抽出器 (9 type bbox / position) 予測確率が高い領域を採用 領域を固定の次元にpooling 11/85
  7. 第一進化形態:Bottom-up attention Bottom-up attention [Anderson+,2018] • VQA Challenge 2017優勝手法 •

    2018-2020頃のデファクト Faster R-CNNからの差分 • 物体の属性情報も予測するタス クを追加した • 例:"green" grass • 属性情報も付随している Visual Genome (VG) dataset を利用 (余談)品川の感想: 「Bottom-up attentionとは贅沢な名前だねえ・・・ Faster R-CNN+とかで良かったのでは・・・?」 12/85
  8. 第二進化形態:back to the grid feature 「下流タスク(VQA)を学習する前提ならRegion Proposal Network無くても性能出たわ」 [Jiang+,2020] 良く訓練されたFaster

    R-CNNは、 物体領域に区切らなくても既に良い特徴量抽出器! bottom-up attention grid feature [Jiang+,2020] Region Proposal Networkを除く利点: • 下流タスク訓練後に最終的な性能が向 上(物体領域抽出のミスが下流タスク の性能ボトルネックにならないため) • 処理速度が高速化される 【VQA全体の処理速度】 • 0.02 [秒/枚] (grid feature) • 0.89 [秒/枚] (bottom-up) 13/85
  9. VinVL's pre-training (4 large dataset) 現在のデファクトとなるFaster R-CNN訓練手法 • VQA Challenge

    2020の優勝手法 • 技術的新規性はないが、複数データセットをうまくブレンド して上手に訓練した点がウリ • 学習後にgrid featureを利用するのは第二形態と同じ 第三進化形態:VinVL [Zhang+,2021] Bottom-up attention (OpenImages datasetで訓練) 14/85
  10. 新しい流れ: Transformerによるpatchベース 画像をパッチに区切って一から学習(ViLT [Kim+,2021]) • 利点:Faster R-CNNを捨てられるので処理が速い Model Comparison [Kim+,2021]

    ViLT [Kim+,2021] UNITER [Chen+,2020]: a region based V&L model (処理が重い) Pixel-BERT [Huang+,2020]: a grid-based V&L model (処理速度まあまあ速い) ViLT: modified from UNITER (特徴量抽出がないので速い) 15/85
  11. シーングラフの利点 シーングラフは画像と文の仲立ち表現として機能する "two jockeys riding horses are racing on the

    track." Scene Graph image caption つまりこれは、画像と言語を結び付けるフレーム V&Lの評価に使ったり、V&Lの学習を助けるのに使える • 誤りのない説明文からのシーングラフ生成はルールで可能 • 画像からのシーングラフ生成はチャレンジングなトピック 19/85
  12. シーングラフの適用事例 image-captioningの評価 • SPICE [Anderson+,2016] • 画像と説明文のグラフ の一致度合で評価 • FAIEr

    [Wang+,2021] • SPICEの派生 • グラフでなく特徴量 ベースで比較 V&L BERTの訓練にも有用 (ERNIE-ViL [Yu+,2021] ) Scene graph to image generation [Johnson+,2018] 21/85
  13. Visual semantic embedding (VSE) 有名なCLIPの元になった方法論 対照学習で画像と言語の共通の潜在空間を学習する [Wu+, 2019] 画像 言語

    共通の 潜在空間 相互に変換可能だと、検索・生成に使えて嬉しい 埋め込む言語情報の単位は様々 • 物体ラベル [Frome+,2013] • 単語 [Kiros+,2014] • フレーズと文 [Wu+,2019] • (CLIPは雑多なテキスト) 23/85
  14. VSEのための対照学習(黎明期) 1正例1負例をつくってTriplet lossで学習 ※負例はミニバッチから一つランダムに選ぶ ※対照学習とは?→正例負例を比べて訓練する手法 Triplet loss 正例ペア 負例ペア 𝑣𝑗

    𝑡𝑗 𝑡𝑘 ※𝑠はスコア関数(cosが多い) 𝑣𝑗 と近いほどloss小 𝑣𝑗 と遠いほどloss小 𝑡𝑗 𝑡𝑘 𝑣𝑗 学習後 ℒ𝑣,𝑡 = Σ𝑗 Σ𝑘 max 0, 𝛼 − 𝑠 𝑣𝑗 , 𝑡𝑗 + 𝑠(𝑣𝑗 , 𝑡𝑘 ) ℒ𝑡,𝑣 = Σ𝑗 Σ𝑘 max 0, 𝛼 − 𝑠 𝑡𝑗 , 𝑣𝑗 + 𝑠(𝑡𝑗 , 𝑣𝑘 ) ℒ𝑡𝑜𝑡𝑎𝑙 = ℒ𝑣,𝑡 + ℒ𝑡,𝑣 24/85
  15. VSEのための対照学習(現在) 1正例N負例をつくってInfoNCE loss(の亜種)で学習 ※InfoNCE loss [van den Oord+,2018]については論文参照 ℒ𝑣,𝑡 =

    −𝔼 log exp 𝑠 𝑣, 𝑡𝑘 Σ exp 𝑠 𝑣, 𝑡𝑘 , ℒ𝑡,𝑣 = −𝔼 log exp 𝑠 𝑡, 𝑣𝑘 Σ exp 𝑠 𝑡, 𝑣𝑘 ℒ𝑡𝑜𝑡𝑎𝑙 = 1 2 (ℒ𝑣,𝑡 + ℒ𝑡,𝑣 ) 𝑡𝑗 𝑣𝑗 𝑡4 𝑡2 𝑡3 𝑡1 複数の負例と比べ る方が性能が良い 25/85
  16. Class-free classification 𝑠𝑖𝑗 = 𝑠𝑐𝑜𝑟𝑒 𝐼𝑖 , 𝑇𝑗 = cos

    𝐼, 𝑇 ⋅ exp 𝑡 softmax 𝑝11 𝐼 = exp 𝑠 𝐼1 , 𝑇1 Σ𝑗 𝑁 exp 𝑠 𝐼1 , 𝑇𝑗 ℒ𝐼 = −Σ𝑖 𝑁𝑦 𝑖 𝐼 𝑇 log 𝑝 𝑖 𝐼 𝑇 𝐼1 visual feature text feature 𝑇1 𝑇2 𝑇3 𝑠11 𝑠12 𝑠13 ⋯ 𝑇𝑁 ⋯ 𝑠1𝑁 1. calculate similarity scores 𝑝11 𝐼 𝑝12 𝐼 𝑝13 𝐼 ⋯ 𝑝 15 𝐼 2. normalize by softmax 𝑝 1 (𝐼) 1 0 0 ⋯ 0 𝑦 1 (𝐼) target label (positive pair is known) 3. It enables cross entropy with positive pair target label 27/85
  17. Class-free classification softmax ℒ𝑇 = −Σ𝑖 𝑁𝑦 𝑖 𝑇 log

    𝑝 𝑖 𝑇 visual feature text feature 𝑇1 𝑠11 𝑠21 𝑠31 𝑠𝑁1 𝑝 1 (𝑇) 1 0 0 0 𝑦 1 (𝑇) Text-images classification is also possible 𝐼1 𝐼2 𝐼3 𝐼𝑁 ⋯ 𝑝 11 𝑇 𝑝 21 𝑇 𝑝 31 𝑇 ⋯ 𝑝 𝑁1 𝑇 ⋯ ⋯ Total loss: ℒ𝑡𝑜𝑡𝑎𝑙 = ℒ𝐼 + ℒ𝑇 2 28/85
  18. CLIPのゼロショット画像認識 • "There is a group of orange fish eggs

    on the table" • "There is a group of orange foods on the table" • "There is a group of yellow fish eggs on the table" 0.627 0.181 0.192 probability (fish eggsを改悪) 手作りテンプレ: "There is a group of [color] [food] on the table" (色を改悪) CLIP 入力画像 手作り説明文を使った画像からの説明文検索 予測確率の高い文のラベルを予 測結果とする 上の例は2種類の分類に対応 30/85
  19. CLIPの面白い特徴:Typographic attack "There is a group of orange fish eggs

    on the table" "There is a group of yellow fish eggs on the table" "There is a group of blue fish eggs on the table" 0.005 0.833 0.162 probability CLIPは画像中のテキストに敏感(画像中にテキストが 映っている画像が多い?) 利用する時は注意する必要がある 31/85
  20. CLIPの応用例:テキストによる画像生成 基本的なアイデアはだいたい同じ 1. 画像生成モデル(StyleGANなど)の潜在変数zを初期化 2. zにノイズを加えて複数の新しいz’を作成 3. 複数のz’からそれぞれ画像を生成 4. CLIPで生成画像と入力テキストの類似度を計算

    5. 評価の高いzを残して2以降を繰り返す [Galatolo+,2021] z 𝑧1 ′ 𝑧2 ′ 𝑧3 ′ add noise 画像 生成器 image image image 0.627 0.181 0.192 CLIP text Q. backpropじゃだめなの? A. ある程度最適解に近づくと停滞しやすい(経験談) 32/85
  21. テキストからの画像生成の例 (using VQ-GAN) input text: "two judo players on TV."

    https://colab.research.google.com/drive/1ZAus_gn2RhTZWzOWUpPER NC0Q8OhZRTZ#scrollTo=ZdlpRFL8UAlW 33/85
  22. Attentionとは? ”たくさんのベクトルの集合から、必要な情報に関 連するベクトルを自動的に取捨選択する仕組み” CV最前線ニュウモンVision and Languageより引用 + attention (weight) 重みづけして足す

    (内挿操作) たくさんのベクトル の集合(材料) 完成品を得るためには重みづけ をどう自動で決めると良い? 出力 (完成品) 35/85
  23. Query, Key, ValueによるAttention計算 • Query:情報を引き出すための鍵 • Key:Valueにアクセスするための鍵穴 • Value:引っ張り出したい情報源 𝑄

    𝐾 𝑉 𝐴𝑡𝑡𝑒𝑛𝑡𝑖𝑜𝑛 𝑄, 𝐾, 𝑉 = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 𝑄𝑇𝐾 𝑑 ⋅ 𝑉 ※ 𝑑はスケーリング V&Lでよく出てくるのは以下の2種類 • Source-target attention:Queryが別の情報源から • Self-attention:Queryが同じ情報源から 36/85
  24. VQA Challenge2021優勝手法のテクニック: Learning to Attend image is cited from "VQA

    Challenge 2021 Winner talk" https://drive.google.com/file/d/1KjVjz9cG0KFbEzQwckyDXwrh_63-dbBn/view 1-stream型+モダリティごとに重みづけパラメータ𝜀1 , 𝜀2 を学 習 ( 𝜀1 = 𝑀𝐿𝑃1 (ℎ𝐶𝐿𝑆 ), 𝜀2 = 𝑀𝐿𝑃2 (ℎ𝐶𝐿𝑆 ) ) ℎ𝐶𝐿𝑆 1-stream型から2-stream型にも変化できる手法 39/85
  25. 余談:VQA Challenge2021 2021の優勝モデルはE2E-VLPなどのモデルをアンサンブルし つつ、物体領域特徴、grid特徴両方使ったモデル image is cited from "VQA Challenge

    2021 Winner talk" https://drive.google.com/file/d/1KjVjz9cG0KFbEzQwckyDXwrh_63-dbBn/view VQA2021 Winner Accuracy: 79.78% bottom-up attention VinVL Big ensemble with SoTA models region and grid feature 40/85
  26. 強化学習を使って文生成モデルをfine- tuningするケースは増えてきている Image-captioningへの強化学習の適用 • Self-Critical Attention [Rennie+, 2017] • Policy

    Gradient [Liu+, 2017] • Up-Down [Anderson+, 2018] (same as bottom-up attention paper) • Multi-task Captioning [Zhao+, 2018] • Stack Captioning [Gu+, 2018] OpenAIによるGPT-3+RL stylized generation, summarization using human feedback reward [Ziegler+, 2019] [Stiennon+, 2020] InstructGPT [Ouyang+, 2022] 42/85
  27. 強化学習とは? action 𝑎 reward 𝑟 next state 𝑠′ environment (unknown)

    𝑟 ≔ 𝑔 𝑠, 𝑎 𝑠′~𝑝𝑇 𝑠′|𝑠, 𝑎 Agent (policy) 𝑎~𝜋 𝑎|𝑠 predicted next token 𝑎 reward 𝑟 next state 𝑠′ environment (unknown) 𝑟 ≔ 𝑔 𝑠, 𝑎 𝑠′ = 𝑠, 𝑎 Language model 𝑎~𝜋 𝑎|𝑠 強化学習エージェントを環境の中で動かし、得られる報酬に よって学習を進めて環境に適応させていく手法 言語生成ではどうなる? • state 𝑠: 文脈情報と入力トークン • action 𝑎: 次に予測したトークン RL setting [森村哲郎, 強化学習] RL setting in text generation state 𝑠 state 𝑠 43/85
  28. 強化学習 (policy gradient)の気持ち There is a girl by the table

    . A man stands on the floor . A man is standing by a dog . 1. Exploration (文生成) 2. Update policy (訓練) There is a girl by the table . A man stands on the floor . A man is standing by a dog . 0.1 0.8 0.6 報酬 Scoring 環境 I see. The second one is great! 44/85
  29. 訓練時と推論時で分布が変わる問題 Training: Teacher forcing Inference: Free running • 入出力が固定 •

    前の時刻の予測が次 の時刻の予測に影響 しない • 前の時刻の予測が次 の時刻の入力になる 少しずれるとどんどんず れが増幅される・・・ 46/85
  30. RINFORCEの背景 Policy gradient theorem(方策勾配定理) ∇𝜃 𝑙𝑜𝑠𝑠 = −𝔼෠ 𝑌~𝜋𝜃 ෍

    𝑡=1 𝑇෡ 𝑌 ∇𝜃 log 𝜋𝜃 𝑦𝑡 |𝑠𝑡 ⋅ 𝑅 ෠ 𝑌, 𝑌 𝑙𝑜𝑠𝑠 = − 1 𝑁 ⋅ 1 𝑇 ෍ 𝑖=1 𝑁 ෍ 𝑡=1 𝑇෢ 𝑌𝑖 𝑅 ෡ 𝑌𝑖 , 𝑌𝑖 ⋅ 𝑦𝑖,𝑡 log 𝜋𝜃 = − 1 𝑁 ⋅ 1 𝑇 ෍ 𝑖=1 𝑁 ෍ 𝑡=1 𝑇෢ 𝑌𝑖 ∇𝜃 log 𝜋𝜃 𝑦𝑖,𝑡 |𝑠𝑖,𝑡 ⋅ 𝑅 ෡ 𝑌𝑖 , 𝑌𝑖 報酬で重みづけられたcross entropy つまり、REINFORCEはモデルが自分で生成した文を利用して再 訓練していることに相当する 49/85
  31. 実用上はベースライン関数を付ける ∇𝜃 𝑙𝑜𝑠𝑠 = −𝔼෠ 𝑌~𝜋𝜃 ෍ 𝑡=1 𝑇෡ 𝑌

    ∇𝜃 log 𝜋𝜃 𝑦𝑡 |𝑠𝑡 ⋅ 𝑅 ෠ 𝑌, 𝑌 − 𝑏 𝑠 ベースライン関数 𝑏 𝑠 で報酬を引く REINFORCEは方策勾配 ∇𝜃 𝑙𝑜𝑠𝑠の分散が大きい • ベースライン関数を導入することで分散を低減 できる • 理論的背景はControl variateを参照 言語モデルとしての利点: マイナスの報酬を考えられる(Unlikelihood training 的な要素が自然と入ってくる) →よくないサンプルを忘れるように学習できる 50/85
  32. Baseline showcase ミニバッチの 平均報酬 Self-critic [Rennie+,2017] REINFORCE w/ value network

    [Li+, 2017] 𝑏 𝑠 = 1 𝑁 ෍ 𝑖=1 𝑁 𝑅 ෡ 𝑌𝑖 , 𝑌𝑖 𝑏 𝑠 = 1 𝑁 ෍ 𝑖=1 𝑁 𝑅 ෠ 𝑌 𝑔𝑟𝑒𝑒𝑑𝑦,𝑖 , 𝑌𝑖 𝑏 𝑠 = 𝑉𝜙 𝑠 (Actor-critic) どれを選べばよい? • Self-criticがシンプルかつ強い • Actor-criticは報酬推定器が必要になるが、性能はあがる • 最近はBERTが用いられてきている[Khandelwal+,2021] Reward estimator 51/85
  33. 最近はREINFORCEよりもPPOを使う Huggingfaceにテキスト生成用のPPOライブラリがあ る(gpt-2だけ?) https://lvwerra.github.io/trl/ Proximal Policy Optimization (PPO) [Ziegler+,2019] 𝑙𝑜𝑠𝑠

    = −𝔼෠ 𝑌~𝜋𝑜𝑙𝑑 min ෍ 𝑡=1 𝑇 𝜋𝜃 𝑦𝑡 |𝑠𝑡 𝜋𝑜𝑙𝑑 𝑦𝑡 |𝑠𝑡 𝐴 𝑠𝑡 , 𝑦 , 𝑐𝑙𝑖𝑝 𝜋𝜃 𝑦𝑡 |𝑠𝑡 𝜋𝑜𝑙𝑑 𝑦𝑡 |𝑠𝑡 , 1 − 𝜖, 1 + 𝜖 𝐴 𝑠𝑡 , 𝑦 𝐴 𝑠𝑡 , 𝑦 = 𝑅 ෠ 𝑌, 𝑌 − 𝑏 𝑠 𝜋𝜃 :更新対象の方策 𝜋𝑜𝑙𝑑 :固定した古い方策 モデルが激しく更新されないよう 方策勾配を制御するためにクリッピ ングを導入 52/85
  34. 勉強になりそうなリポジトリ https://github.com/ruotianluo/self-critical.pytorch 非公式ですが、Self-criticのImage captioningをLSTMベース、 Transformerベースでそれぞれ実験できます。自分でモデルを組む のに参考になるかも Learning to Summarize from

    Human Feedback [Stiennon+, 2020] https://github.com/openai/summarize-from-feedback OpenAIが公開している、人間のラベル選択で学習した報酬モデル による言語生成モデルのfine-tuning手法です。対象としているの が要約タスクですが、広く一般に使える手法です。 54/85
  35. 最適輸送(さわりだけ) 3 6 𝛿 𝑧1 3 6 𝛿 𝑧2 1

    3 𝛿 𝑧′1 1 3 𝛿 𝑧′2 1 3 𝛿 𝑧′3 輸送量 𝑇11 = 2/6 𝑇23 = 2/6 画像と言語を教師なしで「緩く」対応つけるlossに 利用されている(UNITER, ViLT) コンピュータビジョン最前線 ニュウモンVision & Languageから引用 56/85
  36. 繰り返し Inexact Proximal point method for Optimal Transports(IPOT)[Xie+,2018] V&LではIPOTが使われてるのをよく見ます(なぜだろう) ポイント:generalized

    KL Bregman divergenceというのを 制約項に加えると、行列計算の繰り返しで最適輸送が解ける 試してみた:2文にIPOTを適用した時の輸送量Tの変化 ※embeddingにはword2vecを利用 ※輸送コストは1-cos(類似しているほど小さいコスト) like→went, buy fruits→apple といった輸送が確認できた 57/85
  37. 結局これをどうlossに使うの? • 輸送量𝑇はIPOTで勝手に決まる • 𝑐 𝑣𝑖 , 𝑡𝑗 ⋅ 𝑇を最小化するには、𝑐

    𝑣𝑖 , 𝑡𝑗 を小さくするように 学習が進む つまり、輸送コストを下げるために、近い特徴量同 士がさらに身を寄せ合う方向に学習が進む 58/85
  38. Explainability tools [Chefer+, CVPR2021] https://github.com/hila-chefer/Transformer-Explainability [Chefer+, ICCV2021] https://github.com/hila-chefer/Transformer-MM-Explainability Transformer Explainability

    [Chefer+, CVPR2021, ICCV2021] • DETR, ViTの判断根拠の可視化が可能(Google Colabあり) • VisualBERT, LXMERT, CLIPなど、V&Lにも対応 61/85
  39. ここがすごいよTransformer:モデルが変幻自在 Transformer Enc Dec 𝐾, 𝑉 Dec Enc Decoderのみモデル (GPT系)

    Encoderのみモデル (BERT、ViT系) Encoder-Decoderモデル もう全部系列として 生成しようぜ Decoderは要らない 分類ができたらいい これが原点 62/85
  40. いろいろなTransformerモデル Encoder-Decoder型 (Vanilla Transformer) Decoder-only型 (GPT-1,2,3) Encoder-only型 (BERT, ViT) Enc

    Dec 𝐾, 𝑉 • Encoderの出力がkey, valueとなる 注意機構(ソース・ターゲット注意) • Decoderはトークンを一つずつ予測 (自己回帰モデル) • Decoderはトークンを一つずつ予測 (自己回帰モデル) • 赤トークンから予測すればEncoder- Decoder風にも使える(Prompting) Dec • 先頭のトークンでクラス分類を行う (画像と文のペア識別、画像認識) • 適当にマスクしたトークンの復元課題 を解く(マスク付き言語モデリング) • 自己回帰モデルのような予測も可能 Enc 63/85
  41. Encoderのみモデルは学習方法が特徴的 代表的なモデル:BERT, Vision Transformer (ViT) ①の分類問題の例 (BERTの事前学習)Next sentence prediction [Devlin+,2019]

    • 入力トークン系列A,Bが続いているか二値分類する • 確率0.5で正例、負例の組を入力 (BERTのfine-tuning) • CLSトークンにタスク用の分類headを噛ませて分類 • 対照学習でN値分類もよくやる Enc ①先頭のCLSトークン で分類問題を解く ②トークンをマスク して穴埋め問題を解く トークン列Aトークン列B 64/85
  42. ViLBERT [Lu+,2019] 画像の先頭の[IMG]トークン は、画像全体の特徴量 [IMG]と[CLS]を使って二値分類 (最近はあまりみない) BERTみたいに確率0.5で正例負例をとってきて二値分類が多い(VisualBERT [Li+, 2019], Unicoder-VL

    [Li+, 2020], UNITER, LXMERT [Tan+,2019] ) 対照学習でN値分類(CLIP, LightningDOT [Sun+, 2021], FILIP [Yao+,2022]) ※BERTの事前学習では使えない(Early fusionだとペアごとにforward計算 をやり直す必要があり現実的ではない。fine-tuing時にVSEとして使う) Late fusion (CLIP) V&Lでやること:Image-Text Matching (ITM) ①先頭のCLSトークンで分類問題を解く Early fusion (BERT) 65/85
  43. ②トークンをマスクして穴埋め問題を解く Masked Language Modeling (MLM) 単純にマスクするだけではだめ V&Lでの亜種:Masked Region Modeling •

    領域ベースの物体特徴量トークンをマスクする • マスクトークンでなくzeroベクトルで埋める • 予測は物体ラベルの分類 サブワードはマスクしても簡 単に予測できてしまい画像を 観なくても復元できてしまう SceneGraphのノード相当を 丸ごと落とす (Whole Word Masking) ERNIE-ViL [Yu+,2021] 66/85
  44. Recent trend: V&L pre-trained models over V&L tasks ViLBERT VisualBERT

    Unicoder-VL LXMERT VL-BERT Unified VLP UNITER VILLA Pixel-BERT VinVL OSCAR EARNIE-ViL VL-T5 ViLT word region alignment image- captioning Adversarial object label improve object detection Scene graph patch based whole word masking grid based base VideoBERT E2E-VLP Dialogue Dodecathlon 引用:コンピュータビジョン最前線 Winter 2021,ニュウモンVision & Language ’19 ’20 ’21 70/85
  45. • Encoder-only transformer model • Training • Masked Langauge Modeling

    (MLM) • Next Sentence Prediction (NSP) BERT 引用:コンピュータビジョン最前線 Winter 2021,ニュウモンVision & Language NSP MLM 71/85
  46. • Training • Masked Region Modeling (MRM) • Masked Langauge

    Modeling (MLM) • Image-Text Matching (ITM) V&L BERT model region features with Faster R-CNN ITM MLM MRM 72/85
  47. UNITER [Chen+,2020] • A current baseline for V&L pre-trained model

    • Add Word Region Alignment (WRA) loss for training • WRA is based on Inexact Proximal point method for Optimal Transports(IPOT)[Xie+,2018] • It enables to align similar embedding in unsupervised manner 73/85
  48. Challenge of VQA: bias problem Early VQA dataset suffers from

    the following dataset bias problem [Goyal+, 2017] • Question : “What sport is · · · ” -> Answer: “tennis” (accuracy 41%) • Question: “How many · · · ” -> Answer: “2” (accuracy 39%) • Question: “Do you see · · · ” -> Answer: "yes" (accuracy 87%) 74/17
  49. Challenge of VQA: bias problem [Dancette,2021] found there are many

    bias under the dataset (coocurrence of multi-level elements such as objects, background, words. The challenge remains... 75/17
  50. Dialog oriented VLN: HANNA Proposed recovering function: If agent detects

    error (agent notices that it get lost), Ask user to help (input a new instruction) to recover from the error [Nguyen+, 2019] HANNA (Help ANNA!) task 81/85
  51. P.4 [Bommasani+, 2021] Bommasani et al. On the Opportunities and

    Risks of Foundation Models. In arXiv [cs.LG]. arXiv. http://arxiv.org/abs/2108.07258 P.6 [Wang, P+, 2022] Wang, P et al. Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Framework. In arXiv [cs.CV]. arXiv. http://arxiv.org/abs/2202.03052, 2022. P.7 [Xie+,2022] Xie, T. et al. UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models. arXiv [cs.CL] (2022) P.10 [Agrawal+, 2016] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C. Lawrence Zitnick, and Devi Parikh. VQA: visual question answering. ICCV2015. P.11 [Ren+,2017] Shaoqing Ren, et al. Faster R-CNN: Towards Real-Time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell., Vol. 39, No. 6, pp. 1137–1149, 2017. P.12 [Anderson+,2018] Peter Anderson, et al. Bottom-up and top-down attention for image captioning and visual question answering. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2018. P.13 [Jiang+,2020] Huaizu Jiang, et al. In defense of grid features for visual question answering. In Proceedings of CVPR, 2020. 参考文献 86/85
  52. P.14 [Zhang+,2021] Pengchuan Zhang, et al. VinVL: Making visual representations

    matter in vision-language models. CVPR. 2021. P.15 [Kim+,2021] Wonjae Kim, et al. ViLT: Vision-and-Language transformer without convolution or region supervision. ICML. 2021. [Chen+,2020] Yen-Chun Chen, et al. UNITER: universal image-text representation learning. In Proceedings of ECCV, Vol. 12375 of Lecture Notes in Computer Science, pp. 104–120, 2020. [Huang+,2020] Zhicheng Huang, et al. Pixel-BERT: Aligning image pixels with text by deep Multi-Modal transformers. arXiv preprint arXiv 2004.00849, 2020. P.18 [Johnson+,2015] Justin Johnson, et al. Image retrieval using scene graphs. In Proceedings of CVPR, 2015. 参考文献 87/85
  53. P.21 [Anderson+,2016] Peter Anderson, et al. SPICE: Semantic propositional image

    caption evaluation. In Proceedings of ECCV, 2016. [Wang+,2021] Sijin Wang, et al. Faier: Fidelity and adequacy ensured image caption evaluation. In Proceedings of CVPR, pp. 14050–14059, 2021. [Yu+,2021] Fei Yu, et al. Ernie-ViL: Knowledge enhanced vision-language representations through scene graphs. In Proceedings of AAAI, pp. 3208–3216, 2021. [Johnson+,2018] Johnson, Justin, Agrim Gupta, and Li Fei-Fei. "Image generation from scene graphs." Proceedings of the IEEE conference on computer vision and pattern recognition. 2018. P.22 [Frome+,2013] Andrea Frome, et al. DeViSE: A deep visual-semantic embedding model. [Kiros+,2014] Ryan Kiros, et al. Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539, 2014. [Wu+,2019] Hao Wu, et al. Unified visual-semantic embeddings: Bridging vision and language with structured meaning representations. In Proceedings of CVPR, 2019. 参考文献 88/85
  54. P. 25 [van den Oord+,2018] van den Oord, A., Li,

    Y. & Vinyals, O. Representation Learning with Contrastive Predictive Coding. arXiv [cs.LG] (2018) P.26 [Radford+,2021] Alec Radford, et al. Learning transferable visual models from natural language supervision. In Proceedings of ICML, Vol. 139, pp. 8748–8763, 2021. P.30 [Ramesh+,2021] Aditya Ramesh, et al. Zero-Shot Text-to-Image generation. arXiv preprint arXiv2102.12092, 2021. P.32 [Galatolo+,2021] Galatolo, F. A., et al. Generating images from caption and vice versa via CLIP-Guided Generative Latent Space Search. arXiv [cs.NE] (2021) 参考文献 89/85
  55. P. 42 [Rennie+,2017] Rennie, S. J., Marcheret, E., Mroueh, Y.,

    Ross, J., & Goel, V. (2017). Self- critical sequence training for image captioning. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 7008-7024). [Liu+,2017] Liu, S., Zhu, Z., Ye, N., Guadarrama, S., & Murphy, K. (2017). Improved image captioning via policy gradient optimization of spider. In Proceedings of the IEEE international conference on computer vision (pp. 873-881). [Anderson+,2018] Anderson, P., He, X., Buehler, C., Teney, D., Johnson, M., Gould, S., & Zhang, L. (2018). Bottom-up and top-down attention for image captioning and visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 6077-6086). [Zhao+,2018] Zhao, W., Wang, B., Ye, J., Yang, M., Zhao, Z., Luo, R., & Qiao, Y. (2018, July). A Multi-task Learning Approach for Image Captioning. In IJCAI (pp. 1205-1211). [Gu+,2018] Gu, J., Cai, J., Wang, G., & Chen, T. (2018, April). Stack-captioning: Coarse- to-fine learning for image captioning. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 32, No. 1). 参考文献 90/85
  56. P. 42 [Ziegler+, 2019] Ziegler, D. M., Stiennon, N., Wu,

    J., Brown, T. B., Radford, A., Amodei, D., Christiano, P., & Irving, G. Fine-Tuning Language Models from Human Preferences. arXiv. http://arxiv.org/abs/1909.08593 [Stiennon+, 2020] Stiennon, N., Ouyang, L., Wu, J., Ziegler, D. M., Lowe, R., Voss, C., Radford, A., Amodei, D., & Christiano, P. Learning to summarize from human feedback. NeurIPS2020. [Ouyang+, 2022] Ouyang, L. et al. Training language models to follow instructions with human feedback. https://cdn.openai.com/papers/Training_language_models_to_follow_instructions_wit h_human_feedback.pdf P.43 [森村哲郎, 強化学習] 森村哲郎, 強化学習 (機械学習プロフェッショナルシリ ーズ) 参考文献 91/85
  57. P. 51 [Rennie+,2017] Rennie, S. J., Marcheret, E., Mroueh, Y.,

    Ross, J., & Goel, V. (2017, July). Self-critical sequence training for image captioning. CVPR2017. [Li+,2017] Li, J., Monroe, W., & Jurafsky, D. (2017). Learning to Decode for Future Success. In arXiv [cs.CL]. arXiv. http://arxiv.org/abs/1701.06549 [Khandelwal+,2021] Khandelwal, A. (2021). WeaSuL: Weakly Supervised Dialogue Policy Learning: Reward Estimation for Multi-turn Dialogue. INLG2021. P.52 [Ziegler+,2019] Ziegler, D. M., Stiennon, N., Wu, J., Brown, T. B., Radford, A., Amodei, D., Christiano, P., & Irving, G. (2019). Fine-Tuning Language Models from Human Preferences. In arXiv [cs.CL]. arXiv. http://arxiv.org/abs/1909.08593 P.53 [Choshen+,2020] Choshen, L., Fox, L., Aizenbud, Z., & Abend, O. (2020). On the weaknesses of reinforcement learning for neural machine translation. ICLR2020. P.54 [Stiennon+, 2020] Stiennon, N., Ouyang, L., Wu, J., Ziegler, D. M., Lowe, R., Voss, C., Radford, A., Amodei, D., & Christiano, P. Learning to summarize from human feedback. NeurIPS2020. P.57 [Xie+,2018] Yujia Xie, et al. A fast proximal point method for computing exact Wasserstein distance. arXiv preprint arXiv 1802.04307, 2018. 参考文献 92/85
  58. P.61 [Chefer+, CVPR2021] Chefer, Hila and Gur, Shir and Wolf,

    Lior. Transformer Interpretability Beyond Attention Visualization. CVPR2021. [Chefer+, ICCV2021] Chefer, Hila and Gur, Shir and Wolf, Lior. Generic Attention-Model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers. ICCV2021. P.64 [Devlin+,2019] Jacob Devlin, et al. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of ACL, pp. 4171–4186, Minneapolis, Minnesota, 2019. 参考文献 93/85
  59. P.65 [Yao+,2022] Yao, L. et al. FILIP: Fine-grained Interactive Language-Image

    Pre-Training. in International Conference on Learning Representations (2022). [Lu+,2019] Jiasen Lu, et al. ViLBERT: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Proceedings of NeurIPS, Vol. 32, 2019. [Li+, 2019] Liunian Harold Li, et al. VisualBERT: A simple and performant baseline for vision and language. arXiv preprint arXiv 1908.03557, 2019. [Li+, 2020] Gen Li, et al. Unicoder-VL: A universal encoder for vision and language by Cross-Modal Pre-Training. In Proceedings of AAAI, Vol. 34, pp. 11336–11344, 2020. [Tan+,2019] Hao Tan and Mohit Bansal. LXMERT: Learning cross-modality encoder representations from transformers. In Proceedings of EMNLP-IJCNLP, pp. 5100–5111, 2019. P.66 [Yu+,2021] Fei Yu, et al. ERNIE-ViL: Knowledge enhanced vision-language representations through scene graphs. In Proceedings of AAAI, pp. 3208–3216, 2021. 参考文献 94/85
  60. P.67 [Zhou+,2020] Luowei Zhou, et al. Unified vision-language pre-training for

    image captioning and VQA. Vol. 34, pp. 13041–13049, AAAI2020. P.68 [Xu+, 2021] Haiyang Xu, et al. E2E-VLP: End-to-end vision-language pre-training enhanced by visual learning. In Proceedings of ACL, pp. 503–513, 2021. P.69 [Rothe+,2019] Rothe, S., Narayan, S. & Severyn, A. Leveraging Pre-trained Checkpoints for Sequence Generation Tasks. arXiv [cs.CL] (2019) P.73 [Chen+,2020] Yen-Chun Chen, et al. UNITER: Universal image-text representation learning. In Proceedings of ECCV, Vol. 12375, pp. 104–120, 2020. [Xie+,2018] Yujia Xie, et al. A fast proximal point method for computing exact Wasserstein distance. arXiv preprint arXiv 1802.04307, 2018. P. 74 [Goyal+,2017] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, Devi Parikh. Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answering. CVPR2017. P. 75 [Dancette,2021] Corentin Dancette, et al. Beyond Question-Based biases: Assessing multimodal shortcut learning in visual question answering. ICCV2021. 参考文献 95/85
  61. P.76 [Niu+,2020] Niu, Y. et al. Counterfactual VQA: A Cause-Effect

    Look at Language Bias. arXiv [cs.CV] (2020) P.77 [Johnson+,2017] Justin Johnson, et al. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In Proceedings of CVPR, 2017. P.79 [Benotti+,2021] Benotti, L., & Blackburn, P. Grounding as a Collaborative Process. EACL2021. 515–531. P.80 [Das+, 2017] Abhishek Das, et al. Visual dialog. In Proceedings of CVPR, pp. 1080– 1089, 2017. P.81 [Nguyen+, 2019] Khanh Nguyen, Hal Daumé III. Help, Anna! Visual Navigation with Natural Multimodal Assistance via Retrospective Curiosity-Encouraging Imitation Learning. EMNLP2019. P.85 [Qiu+, 2021] Qiu, Y. et al. Describing and Localizing Multiple Changes with Transformers. arXiv [cs.CV] (2021) 参考文献 96/85