[dl輪読会]learning to skim text
TRANSCRIPT
1
Learning to Skim Text
Gota&Gando&(UMass&Amherst)&&
書誌情報▶ https://arxiv.org/pdf/1704.06877.pdf
▶ Adams Wei Yu (CMU), Hongrae Lee (Google), Quoc V. Le (Google)
▶ ACL 2017
▶ 概要:入力文を任意にskipするRNN architecture (LSTM-Jump)の提案
▶ 選定理由:タイトルとabstractで興味を持ったため
Motivation
▶ RNNをNLPタスクに用いる際、入力テキストの全部分を処理する必要がある=> より長いdocumentでは処理が遅い
▶ 大抵のテキストはredundancyがある
▶ “partial reading”が出来るarchitectureを考えたい
Methodology1. Softmax層の出力値分入力tokenをスキップ
2. 0が出力されるまで続ける
3. 0が出力されたらそのtime stepのhidden stateを対象タスクに使用
▶ Hyperparameters:N: 最大jump数, R: 1つのジャンプ後に読む入力token数, K: 1 jumpの最大サイズ
Training method▶ jump actionはmultinomial distributionからのサンプリングによって決定される(jump幅選択のN回試行)
▶ このサンプリングのステップは微分不可能なのでREINFORCEで勾配を求める=> 報酬:R (モデルの予測が正解: 1, 不正解: -1)=> 分散が高くなるので工夫 (Section 2.2)
▶ (現在だとGumbel Softmax等のreparam trickでも恐らく可能)
p(ji|hi(j1:i1); ✓a)
Training method
←monte carloサンプリングで近似
← の目的関数✓a
←REINFORCEでの勾配
Experiments▶ 4種のデータセットで実験
- Synthetic dataset- Sentiment Analysis- AG News (character-level)- Q/A
▶ 全て1-layerでvanilla LSTMとの比較詳細なパラメータ設定等はSection 3参照
Experiments (1) synthetic dataset▶ 入力系列の最初のtokenが正解の値のindexであるようなdata
▶ 1 million train set / 10,000 validation set, 入力系列の長さT=100
▶ そのまま訓練するとconvergeしないのでT={10, 20, 30, 40, 50, 60, 70, 80, 90, 100}のdataを生成し短い順に訓練
入力系列の例
Experiments (2) sentiment analysis▶ Rotten tomatoes
- 10,662 documents- average length: 22 words, max: 56 words- 訓練時パラメータ:R=8, K=10, N=3
▶ IMDB- 25,000 train / 25,000 test- average length: 240 words- 訓練時パラメータ:R=20, K=40, N=5
▶ ほぼ同精度で2x & 2.5x程度の高速化
Rotten tomatoesの結果
IMDBの結果
Experiments (3) char-lvl news classification
▶ AG’s news corpusの一部を使用:Zhang et al. (2015)と同じ
▶ 30,000 train / 1900 test examples for each class ▶ d_emb=16, 1-layer LSTM w/ n_hid=64 ▶ 訓練時のパラメータ:R=30, K=40, N=5
使用character
Experiments (4) sent-lvl automatic QA▶ Children’s Book Test dataset ▶ タスク:
context (20 sentences)とquery (1 sentence)が与えられるqueryの中の1語が消されている=>10候補の中からbest fitを選択
・・・
Experiments (4) sent-lvl automatic QA
▶ 全モデルで共通してK=5, R=1 (1文毎にジャンプ)
▶ regular LSTMと比べて1.4%-4.4%高いaccuracyを獲得
▶ 最大で6.26x faster
▶ LSTM-Jumpは読む文を選択できるのでqueryの記憶が新しいうちに予測出来たと解釈できる
Conclusions▶ 高速に入力系列を処理できるLSTM-Jumpの提案
▶ (T, R, Kを上手く調整すると)LSTMと同精度で高速にinference出来る
▶ jump actionパラメータの最適化はpolicy gradientで行う
▶ 大量のdocumentを処理する必要がある状況で有用かも
▶ hyperparameters ▶ attentionなど他のarchitectureとの組み合わせ
▶ REINFORCEの代わりにGumbel Softmax?