inferring and executing programs for visual reasoning

32
末安 慶大 株式会社みんなのウェディング NN論文を肴に酒を飲む会 #3 @Googleオフィス 2017.07.12

Upload: keita-sueyasu

Post on 21-Jan-2018

719 views

Category:

Science


2 download

TRANSCRIPT

Page 1: Inferring and executing programs for visual reasoning

末安慶大

株式会社みんなのウェディング

NN論文を肴に酒を飲む会 #3

@Googleオフィス

2017.07.12

Page 2: Inferring and executing programs for visual reasoning

自己紹介

名前

経歴

末安慶大 (すえやすけいた)

@playgroundxxxx

田舎の高専 ( 2010 ~ 2015 )

専攻科 ( 2015 ~ 2017 )

みんなのウェディング ( 2017.04 ~ )

趣味勢

Page 3: Inferring and executing programs for visual reasoning

紹介する論文

Page 4: Inferring and executing programs for visual reasoning

ざっくり言うと

画像に関する質問応答で、

NNを機能ごとにモジュールに分けて

モジュールの組み合わせ方と答えの

推論を同時に学習する

Page 5: Inferring and executing programs for visual reasoning

問題設定

Q: Are there an equal number of large things and metal spheres?

Q: What size is the cylinder that is left of the brown metal thing that is left ofthe big sphere?

Q: There is a sphere with the same size as the metal cube; is it made of the same material as the small red sphere?

Q: How many objects are either small cylinders or red things?

Page 6: Inferring and executing programs for visual reasoning

問題設定

a

yes

Are there an equal number of

large things and metal spheres?

x

q

NN

Page 7: Inferring and executing programs for visual reasoning

a

yes

Execution

Engine

Program

GeneratorAre there an equal number of

large things and metal spheres?

x

q

NN

NN

手法

Page 8: Inferring and executing programs for visual reasoning

a

yes

Execution

Engine

Program

GeneratorAre there an equal number of

large things and metal spheres?

x

q

Program Generator

Page 9: Inferring and executing programs for visual reasoning

Program

GeneratorAre there more cubes

then yellow things?

qsequence to sequence model

z

program

π

z = π ( q )

クエリを受け取ってprogramを出力するProgram Generator

Page 10: Inferring and executing programs for visual reasoning

How many cylinders are in front of the tiny

thing and on the left side of the green object?

クエリを関数の組み合わせで表現したものProgram

Page 11: Inferring and executing programs for visual reasoning

Program

Page 12: Inferring and executing programs for visual reasoning

ここは

Program

Page 13: Inferring and executing programs for visual reasoning

<SCENE>

<SCENE>

Program

Page 14: Inferring and executing programs for visual reasoning

<SCENE>

<SCENE>

ポーランド記法的に表現

Count FilterShape ‘cylinder’ And Relate ‘left’ Unique FilterColor ‘green’ <SCENE>

Relate ‘in front’ Unique FilterColor ‘small’ <SCENE>

Program

Page 15: Inferring and executing programs for visual reasoning

Are

there

more

cubes

than

yellow

things

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

GreaterThen

Count

FilterColor

‘yellow’

<SCENE>

Count

FilterShape

‘cube’

<SCENE>

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

q z

Program Generator

Page 16: Inferring and executing programs for visual reasoning

a

yes

Execution

Engine

Program

GeneratorAre there an equal number of

large things and metal spheres?

x

q

Execution Engine

Page 17: Inferring and executing programs for visual reasoning

Execution

Engine

z

Neural Module Networkφ

a = φ ( x, z )

GreaterThen Count FilterColor

‘yellow’ <SCENE> Count FilterShape

‘cube’ <SCENE>

x

a

yes

CNN

画像とprogramを受け取って答えを出力するExecution Engine

Page 18: Inferring and executing programs for visual reasoning

それぞれが小さいNNに対応Neural Module Network (NMN)

モチベーション

End-to-Endだと、そのタスクにしか使えないよね?

Neural Module Zooみたいなの作ったらすごくよくないですか!?

私的な意見

モジュールに分けてタスクに合わせて組み合わせたらいいじゃん

アイデア

Page 19: Inferring and executing programs for visual reasoning

Neural Module Network (NMN)

入力1つ

入力2つ

それぞれが小さいNNに対応

Page 20: Inferring and executing programs for visual reasoning

Execution Engine

CNN Classifier

Distribution over answer

yes no

Page 21: Inferring and executing programs for visual reasoning

実験

1. Program 教師あり + 教師なし

2. モジュールの出力可視化

3. 異なる特性の質問間の汎化具合

4. 異なるタイプの質問間の汎化具合

5. 未知語を含んだ質問の場合の精度

Page 22: Inferring and executing programs for visual reasoning

実験

1. Program 教師あり + 教師なし

全体の3%くらいの教師データで、フルで教師あり学習した場合とほぼ同等の精度がでている

Page 23: Inferring and executing programs for visual reasoning

実験

2. モジュールの出力可視化

各モジュールに専用の教師データを与えなくても、それぞれの役割について学習できている

Page 24: Inferring and executing programs for visual reasoning

実験

3. 異なる特性の質問間の汎化具合

Cubes

Condition A

gray, blue, brown, or yellow

Cylinders red, green, purple, cyan

Condition B

red, green, purple, cyan

gray, blue, brown, or yellow

ファインチューニング後は、オブジェクトに関して汎化できている

Page 25: Inferring and executing programs for visual reasoning

実験

4. 異なるタイプの質問間の汎化具合

実験1で、少ない教師データで良い結果が出たとはいえ、人工的な質問文のため、少量のデータで大部分の文の構造をカバーできるため、未知の構造について汎化できているとはいえない

平均の単語数16以下とそれ以外の質問セットで、それぞれShort, Longとして、Shortのみ教師ありで学習させた結果

Page 26: Inferring and executing programs for visual reasoning

実験

5. 未知語を含んだ質問の場合の精度

割と厳しそう…

Page 27: Inferring and executing programs for visual reasoning

実験

5. 未知語を含んだ質問の場合の精度

↑ 「box」を「cube」と解釈できている

Page 28: Inferring and executing programs for visual reasoning

まとめ

seq2seqとneural module networksを組み合わせることに

よって、質問を表現するモジュールの組み合わせと各モジュールの与えられた役割として正しい出力を同時に学習させることができている。

Page 29: Inferring and executing programs for visual reasoning

ICLRでも、強化学習の問題で必要なSkillの習得とそのSkillの組み合わせ方を別々に学習させる論文があった

Deep Learning、初期はEnd-to-endが売りだった気がするが、最近は意味的に分割するのが流行ってきている?

所感

Page 30: Inferring and executing programs for visual reasoning

Page 31: Inferring and executing programs for visual reasoning

ベースライン

LSTM

CNN + LSTM

CNN + LSTM + SA

CNN + LSTM + SA + MLP

クエリのみを考慮

CNNとLSTMの出力を結合して全結合を通して出力

上のやつにStacked Attentionというやつをかける

上のやつの全結合を多層パーセプトロンにしたやつ

Page 32: Inferring and executing programs for visual reasoning

データセット詳細