Top Banner
Reasoning With Neural Tensor Networks for Knowledge Base Completion Richard Socher, Danqi Chen, Christopher D. Manning, Andrew Y. Ng 2017/04/25 論文輪講 嘉村準弥
23

Reasoning with neural tensor networks for knowledge base completion

Jan 21, 2018

Download

Science

Junya Kamura
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Reasoning with neural tensor networks for knowledge base completion

Reasoning With Neural Tensor Networks for Knowledge Base Completion

Richard Socher, Danqi Chen, Christopher D. Manning, Andrew Y. Ng

2017/04/25 論文輪講 嘉村準弥

Page 2: Reasoning with neural tensor networks for knowledge base completion

agenda• 概要

• 手法

• 関連手法

• 実験

• まとめ

Page 3: Reasoning with neural tensor networks for knowledge base completion

概要

Page 4: Reasoning with neural tensor networks for knowledge base completion

概要• 2エンティティ間の関係を予測するモデルである

Neural Tensor Networkを提案+初期化方式の改良による性能向上

• 知識ベースにおける2単語を基に関係性予測を行ったところ既存のモデルを上回り、WordNetで86.2%、FreeBaseで90.0%の精度を得ることが出来た

Page 5: Reasoning with neural tensor networks for knowledge base completion

エンティティ間の関係性

Page 6: Reasoning with neural tensor networks for knowledge base completion

Neural Tensor Network (NTN)

• 2単語 が特定の関係Rである確率を求める e.g. (Bengal tiger, has part, tail) = true

(e1,e2 )

f = tanhWR

[1:k ] ∈�d×d×k =テンソルslice_ i = 1,...,k =テンソルのスライス

以下はニューラルネットワークの標準形式VR ∈�

k×2d

U ∈�k

bR ∈�k

Page 7: Reasoning with neural tensor networks for knowledge base completion

提案手法

Page 8: Reasoning with neural tensor networks for knowledge base completion

Neural Tensor Network

f = tanhWR

[1:k ] ∈�d×d×k

slice_ i = 1,...,k

• テンソルの各スライスは関係性それぞれ示していると見なすことが出来る。 →違う分野においても同様の関係として学習できる (「has part」と言う関係においてBengal tiger→tailとcar→brakeは同様な関係と見なすことができる)

VR ∈�k×2d

U ∈�k

bR ∈�k

Page 9: Reasoning with neural tensor networks for knowledge base completion

関連手法

Page 10: Reasoning with neural tensor networks for knowledge base completion

関連手法(Distance Model)

• 2単語間のL1距離を測ることによって関連性を推測→スコアが低いほど関連性が強い

• 問題点として2つのエンティティベクトルのパラメータが相互作用しない

WR,1,WR,2 ∈�d×d

Page 11: Reasoning with neural tensor networks for knowledge base completion

関連手法(Singule Layer Model)

• 単一層ニューラルネットワーク(非線形)

• 2つのエンティティベクトル間の弱い相互作用しか表現できない

• 提案手法におけるテンソル=0の状況

f = tanhWR,1,WR,2 ∈�

k×d

uR ∈�k×1

Page 12: Reasoning with neural tensor networks for knowledge base completion

関連手法(Hadamard Model)

• 複数の線形積を介してエンティティベクトルと相互作用する単一のベクトルとして表現

f = tanhW1,Wrel ,1,W2,Wrel ,2 ∈�

d×d

b1,b2 ∈�d×1

eR = relacion_ specific_ parameter

Page 13: Reasoning with neural tensor networks for knowledge base completion

関連手法(Bilinear Model)

• 双線形形式であり、線形相互作用のみをモデル化することができる。より複雑なモデルに適合できない

• 提案モデルにおけるパラメータ設定を変更した場合と同義

g(e1,R,e2 ) = e1TWRe2

WR ∈�d×d

Page 14: Reasoning with neural tensor networks for knowledge base completion

提案モデルの利点• bilenear modelと比較して大きいデータベースの場

合に特に有用な表現力を備える

• より小さいデータセットの場合、スライスの数を減らすことができ、関係間で変更することが可能

Page 15: Reasoning with neural tensor networks for knowledge base completion

初期化について• ランダム初期化でも良いが、さらなる向上を目指す

・単語ベクトルでエンティティベクトルを表現・事前に教師なし訓練された単語ベクトルで初期化

• エンティティベクトルは単語ベクトルを平均化すると性能が向上Vhomo sapiens = 0.5(Vhomo + Vsapiens)

Page 16: Reasoning with neural tensor networks for knowledge base completion

実験

Page 17: Reasoning with neural tensor networks for knowledge base completion

データセットと各データ数

• 不要な関係は除外して学習を実行(言い換えの関係「みかんとオレンジは似ている=オレンジとみかんは似ている」など)

• Wordnetは2つの単語を自由に設定可能

• Freebaseは関係性毎に単語が制限されている(関係性がgenderであればもう片方の単語はmale or femaleに制限される

Page 18: Reasoning with neural tensor networks for knowledge base completion

テストデータ• テストデータの関係性をランダムに入れ替えること

によって 2×#Test トリプレットを作成→ポジティブ、ネガティブデータを用意

• Freebaseに於いてはあり得る単語の組み合わせタイプのみ用意。(Pablo Picaso、国籍、スペイン)→ポジティブ(Pablo Picaso、国籍、米国)→ネガティブ(Pablo Picaso、国籍、Gogh)→不適当(テスト未使用)

Page 19: Reasoning with neural tensor networks for knowledge base completion

テスト方法• 各モデルとの精度を比較

• 開発データを用いてクロスバリデーションを行い、最適なハイパーパラメータを算出)1. vector initialization2. λ=0.0001 3. 隠れ層d=100 (single layer, NTN)4. training iterations T=5005. NTNにおけるスライス数=4

Page 20: Reasoning with neural tensor networks for knowledge base completion

精度比較結果

• WordNet→既存最高性能であるBilinearより2%向上 →Single Layerよりより4%向上(?)

Page 21: Reasoning with neural tensor networks for knowledge base completion

提案手法における 関係性毎の精度

• 関係性毎に精度は異なるが、いずれも他の手法より高精度であった(施設や死因などは推測が困難)

Page 22: Reasoning with neural tensor networks for knowledge base completion

初期化方法別による精度比較

• WV-init(事前に教師なし訓練された単語ベクトルで初期化)モデルが最も性能が良くなった。

Page 23: Reasoning with neural tensor networks for knowledge base completion

まとめ• NTNというモデルで2エンティティ間の関係性推測

が良好に行えた

• エンティティを単語ベクトルの平均で初期化することにより性能が向上