Share
Embed
論文読み会 SNLP2018 Sequence to Action: End to End Semantic Graph Generation for Semantic Parsing
第10回最先端NLP勉強会
Sequence-to-Action: End-to-End Semantic Graph Generation for Semantic Parsing (ACL2018)
https://sites.google.com/view/snlp-jp/home/
S
May 17, 2023
Transcript
32 slides
-
Sequence-to-Action: End-to-End Semantic Graph Generation for Semantic Parsing. ACL 2018
Bo Chen, Le Sun, Xianpei Han 第10回 最先端NLP勉強会 Titech Okazaki Lab/Hottolink: Sakae Mizuki 2018/08/04 ※ スライド中の図表は,本論文からの引用です -
Contents • What the Semantic Parsing is • Overview of
the research • Objective, Novelty, Challenge,… • Methodology • Experiment • Conclusion -
(Grounded) Semantic Parsing • 平文𝑥を意味表現𝑦に変換するタスク.意味表現として論理式を採用 • 𝑥:Which states border Texas?
• 𝑦:answer(A, (state(A), next_to(A, stateid(texas)))) • 実行可能な形式への変換 • 得られた𝑦を知識ベース𝐾に問い合わせて,推論結果 Ƹ 𝑧を得る • 𝐾:{(texas,type,state),(texas,next_to,lousiana),…} • Ƹ 𝑧:{new_mexico,oklahoma,arkansas,…} • Ƹ 𝑧が正解𝑧と一致するように(𝑥, 𝑦, 𝑧)からparser 𝑝 𝑦 𝑥 を学習 • 必ずしも𝑦が直接の目的変数とは限らない 𝐾 𝑝(𝑦|𝑥) 𝑥 𝑦 query Ƹ 𝑧 response 𝑧 eval training -
(Grounded) Semantic Parsing • 平文𝑥を意味表現𝑦に変換するタスク.意味表現として論理式を採用 • 𝑥:Which states border Texas?
• 𝑦:answer(A, (state(A), next_to(A, stateid(texas)))) • 実行可能な形式への変換 • 得られた𝑦を知識ベース𝐾に問い合わせて,推論結果 Ƹ 𝑧を得る • 𝐾:{(texas,type,state),(texas,next_to,lousiana),…} • Ƹ 𝑧:{new_mexico,oklahoma,arkansas,…} • Ƹ 𝑧が正解𝑧と一致するように(𝑥, 𝑦, 𝑧)からparser 𝑝 𝑦 𝑥 を学習 • 必ずしも𝑦が直接の目的変数とは限らない 𝐾 𝑝(𝑦|𝑥) 𝑥 𝑦 query Ƹ 𝑧 response 𝑧 eval training • 近年は Seq2Seq を応用する手法が人気です • もっと知りたい方へ ACL 2018 Tutorial: Neural Semantic Parsing • 意味表現としては,AMRもおもしろいです(宣伝) Abstract Meaning Representation Bank -
Research Overview (1/2) • Objective • 平文を,semantic graph記法による意味表現に変換する手法を提案 • Semantic
graph: クエリをグラフで表現したもの.DAG + 限量子 • Previous Research • 構文解析(CCG Parser)を用いて論理式に変換[Zettlemoyer+ 05,07] • Encoder-Decoderを用いて論理式に変換[Dong+ 16] • Novelty • semantic graphへの変換時に,知識ベースの情報を活用することが可能 • 平文からsemantic graphへの変換を,End-to-End形式で学習 • Challenge • 知識ベースに対して汎用的な手法であること • 特定の知識ベースのみに適用できる手法ではないこと • 平文をグラフ構造へ変換すること -
Research Overview (2/2) • Key to the Success • semantic
graphを生成する操作系列を予測する • グラフ生成操作:ノード追加,エッジ追加,ノード連結… • 平文から操作系列への変換を,Seq2Seq modelとして学習 • Decodingの際に,知識ベースに基づく選択制約を適用 • 知識ベースに反したグラフ生成操作は,予測候補から除外 • Experiment Result • 複数の知識ベースで,SOTAと同水準または上回る性能を実現 • 提案手法:選択制約の有効性を定量的に確認 -
Semantic Graph • 知識ベースへのクエリをグラフで表現したもの[Yih+ 15] • ラベル付き有向グラフ + 限量子スコープ •
node: variable, entity, type, operator • edge: attribute, relation -
Graph Generating Action • グラフ𝐺を直接生成するのは,むずかしい(graph matchingの問題) • 代わりに,グラフ生成操作𝑎 ∈ 𝐴の系列
𝑎𝑖 𝑖=1 𝑛 を扱うことにする • semantic graphの生成操作は,以下の6種類を定義した 生成操作 対象 操作 Add Variable Node Node 変数nodeを追加 Add Entity Node Node 固有表現nodeを追加 Add Type Node Node,Edge labeled edge(label=type)および型nodeを追加 Add Edge Edge labeled edgeを追加 Operation Action Quantifier 量化子の適用範囲を追加 Argument Action Argument edgeに接続される変数nodeを指定 -
Graph Generation Example 平文:Which river runs through the most states?
論理式:answer(A,most(A,B,(river(A),traverse(A,B),state(B))))) Semantic graph生成操作: -
Graph Generation Example 𝑥:Which river runs through the most states?
most A river type -
Graph Generation Example 𝑥:Which river runs through the most states?
most A river type -
Graph Generation Example 𝑥:Which river runs through the most states?
most A river type B state type traverse -
Graph Generation Example 𝑥:Which river runs through the most states?
most A river type B state type traverse -
Graph Generation Example 𝑥:Which river runs through the most states?
most A river type B state type traverse -
Graph Generation Example 𝑥:Which river runs through the most states?
most A river type B state type traverse return arg_1 arg_2 -
Graph Generating Action Prediction Model • 平文𝑥から生成操作 𝑎𝑖 に変換(=予測)するmodelを考える •
両方とも記号列なので,一般的なSeq2Seq modelが適用可能 • Input(𝑥): word sequence • Output(𝑦 = {𝑎𝑖 }): action sequence • Encoder: Bi-LSTM • Decoder: LSTM + Attention • タスク特有の工夫をいくつか導入 • Decoder prediction layer: parameter sharing • Entity handling: replace with typed IDs • Decodingの際に,選択制約を適用(次ページ) -
Constraint on Action Sequence Decoding • 操作𝑎𝑡 は,既に生成した操作系列𝑎𝑖<𝑡 との整合性が求められる •
例:ノード連結操作は,異なるnode pairが対象でなくてはならない • 不可能な操作は確率ゼロにする,つまり選択制約を導入する • 2種類の選択制約を定義した 1. 構造的制約(Structure Constraints) • semantic graph記法に由来するもの.知識ベースには依存しない • 例:非循環制約 → self-loop生成操作は不可 1. 意味的制約(Semantic Constraints) • 知識ベース(のスキーマ)に由来するもの • 例:型制約 → next_to edgeの両端nodeは state 型を要求 -
Experiment Setup • 既存研究で構築された3種類のデータセットを使用 • Geoquery[Zelle+ 96], ATIS[He+ 05], OVERNIGHT[Wang+
15] • 文・語彙数いずれも小規模 • 評価指標は,論理式𝑦による推論結果 Ƹ 𝑧の正解率(acc.)を採用 データセット クエリ数 知識ベース クエリの例 Geoquery 880 U.S. geography Which states border texas? ATIS 4,921 Flight Reservation Show me all the flights to Baltimore after six o’clock pm. OVERNIGHT 801~4,419 Scheduler, Restaurant, Basketball,… Show me the meeting starting latest in the day. -
Experiment Result: Geoquery, ATIS • SOTAを若干下回る水準の性能 • Seq2Seq型の先行研究に対して若干優位 • 先行研究[Dong+
16][Jia+ 16]は,論理式を生成 • 本研究は,操作系列を生成 • 提案手法の効率性を示唆(との主張) • 疑問:語彙数の影響は? • 選択制約(C1/C2)の有効性を確認 • 1~2ポイント程度の改善 Table. 1 C1:構造的制約,C2:意味的制約 -
Supplementary Analysis • 既存研究では Seq2Seq model を用いて論理式を生成 • 提案手法:操作系列の方が,系列長が短くなることを確認 •
長距離依存性の問題が緩和できるとの主張 • Error Analysisでは,以下の誤り事例が目立った,とのこと • 変則的な統語構造を持つクエリの解析に失敗 • 論理式要素の生成漏れ(MTの訳抜けに類似の現象?) Table. 4 データセット別・系列長平均値の比較 -
Conclusion • semantic graph記法を用いたSemantic Parsingの手法を提案 • グラフ操作系列を扱うことにより,Seq2Seq2 modelを用いて学習 • 系列長の短縮および,選択制約の導入を実現
• 複数の知識ベースで,SOTAと同水準または上回る性能を実現 -
Referenced Works [Yih+ 15] Semantic parsing via staged query graph
generation: Question answering with knowledge base. In: ACL2015. 2015. [Jia+ 16] Data recombination for neural semantic parsing. In: ACL2016. 2016. [Dong+ 16] Language to logical form with neural attention. In: ACL2016. 2016. [Zelle+ 96] Learning to parse database queries using inductive logic programming. In AAAI/IAAI. AAAI Press/MIT Press, Portland, OR, pages 1050–1055. 1996. [He+ 05] Semantic processing using the hidden vector state model. Computer Speech Language 19(1):85 – 106. 2005. [Wang+ 15] Building a semantic parser overnight. In: ACL2015. 2015.