SlideShare a Scribd company logo
Star-Transformer
Qipeng Guo
Xipeng Qiu
Pengfei Liu
Yunfan Shao
Xiangyang Xue
Zheng Zhang
最先端論文紹介
2019/06/13
紹介者
M1本間
Transformer は強いが、フルAttention接続をもつ重い構造
→ 大規模なトレーニングデータに依存
軽量の代替手段である Start-Transformer を提案
• 隣のノード同士だけ接続し、他のノード同士は
shared relay node を介して接続する星型トポロジー
• 局所的な構成と長距離の依存性の両方を捉える能力
を維持しながら、複雑さを2次から1次に落とした
Abstract
Abstract
Transformer は強いが、フルAttention接続をもつ重い構造
→ 大規模なトレーニングデータに依存
軽量の代替手段である Start-Transformer を提案
• 隣のノード同士だけ接続し、他のノード同士は
shared relay node を介して接続する星型トポロジー
• 局所的な構成と長距離の依存性の両方を捉える能力
を維持しながら、複雑さを2次から1次に落とした
最近 fully-connected な attention-based のモデルがNLPタ
スク(MTやLM)で一般的になってきている
• Transformer (Vaswani et al., 2017)
• 多くのタスクで RNN や CNN にとって代わってきている
• GPT (Radford et al., 2018)
• BERT (Devlin et al., 2018)
• Transformer-XL (Dai et al., 2019)
• Universal Transformer (Dehghani et al., 2018)
Introduction
Introduction
最近 fully-connected な attention-based のモデルがNLPタ
スク(MTやLM)で一般的になってきている
• Transformer (Vaswani et al., 2017)
• 多くのタスクで RNN や CNN にとって代わってきている
• GPT (Radford et al., 2018)
• BERT (Devlin et al., 2018)
• Transformer-XL (Dai et al., 2019)
• Universal Transformer (Dehghani et al., 2018)
Introduction
しかし、Transformer には2つの 限界 がある
1. 系列長の2次の計算/メモリ量オーバーヘッドがある
• 特に長い文で問題
• Transformer-XLでは高速化と性能向上を達成しているが、LMタ
スクに特化した設計になっている
2. 大規模なトレーニングデータ、あるいは大規模なコー
パスでの事前学習が必要
• それ以外の場合では多くのタスクで失敗する
ことが調査によって示されている
Introduction
• なぜ Transformer が重いのか
→ 事前知識をうまく利用していないことが一因
例えば、局所的な構成性は、テキスト系列をモデル化するための
ロバストなバイアスであるが、Transformer はこのバイアスを非局
所的な構成性とともに学習するため、学習コストが増加する
この強力な事前知識を活用することはアーキテクチャを「明るく
する」のに役立つ?
Star-Transformer
Introduction
ring connection
radical
connection
非局所的
な構成性を保つ
局所的
な構成性を保つ
RNNやCNNと同等
Introduction
3つのNLPタスクで評価
テキスト分類
Text Classification
自然言語推論
Natural Language Inference
系列ラベリング
Sequence Labelling
すべてのタスクで通常の Transformer を上回った!
しかも計算複雑性は少ない!
Introduction
3つのNLPタスクで評価
テキスト分類
Text Classification
自然言語推論
Natural Language Inference
系列ラベリング
Sequence Labelling
シミュレーションタスクを詳細に分析すると
長期の依存関係を保持できていることがわかった!
Introduction
この論文の3つの Contributions
通常の Transformer と比較して 軽量 で、長期依存関係 をモデル
化するための機能を保持。接続数を 𝑛2
から 𝟐𝒏 に
長期依存関係を処理する能力を検証するためのシミュレーションタス
ク「Masked Summation」を設計。
Transformer と Star-Transformer の両方が LSTM および BiLSTM と比較
して長期依存関係の処理に優れていることを確認
意味的構成を radical connection と ring connection で分担。
非局所的構成 局所的構成
→ 中程度のサイズのデータセットに対応し、重い事前学習が不要
NLPのタスクで使われるNNのモデルを3つに大別
Modelling Local
Compositionality
局所構成性のモデリング
・CNN
Kim (2014), Kalchbrenner (2014)
・RNN
Cho (2014)
・self-attention mechanism
Yang (2016), Lin (2017)
Shen (2018)
・re-reading, global state
Cheng (2016), Zhang (2018)
Modelling Non-Local
Compositionality
非局所構成性のモデリング
・Syntactic tree → network structure
Tai (2015), Zhu (2015)
・self-attention only
Transformer (Vaswani, 2017)
GPT (Radford, 2018)
BERT (Devlin, 2018)
Transformer-XL (Dai, 2019)
Universal Transformer
(Dehghani, 2018)
CN3 (Liu, 2018)
Graph Neural
Networks
グラフニューラルネットワーク
・グラフ構造で情報を伝播
Gilmer (2017), Battaglia (2018)
Kipf and Welling (2016)
Liu (2018)
Star-Transformer
大規模な学習コーパス
or
事前学習
Related Work
NLPのタスクで使われるNNのモデルを3つに大別
Modelling Local
Compositionality
局所構成性のモデリング
・CNN
Kim (2014), Kalchbrenner (2014)
・RNN
Cho (2014)
・self-attention mechanism
Yang (2016), Lin (2017)
Shen (2018)
・re-reading, global state
Cheng (2016), Zhang (2018)
Modelling Non-Local
Compositionality
非局所構成性のモデリング
・Syntactic tree → network structure
Tai (2015), Zhu (2015)
・self-attention only
Transformer (Vaswani, 2017)
GPT (Radford, 2018)
BERT (Devlin, 2018)
Transformer-XL (Dai, 2019)
Universal Transformer
(Dehghani, 2018)
CN3 (Liu, 2018)
Graph Neural
Networks
グラフニューラルネットワーク
・グラフ構造で情報を伝播
Gilmer (2017), Battaglia (2018)
Kipf and Welling (2016)
Liu (2018)
Star-Transformer
大規模な学習コーパス
or
事前学習
Related Work
この3つを説明していく
Architecture
Implementation
Output
Model
この3つを説明していく
Architecture
Implementation
Output
Model
Model
• 1つの中継ノードと n個の衛星ノードで構成
• 𝑖 番目の衛星ノードの状態はテキスト系列内の 𝑖 番目の
トークンの素性を表す
• 中継ノードはすべての衛星ノードとの間で情報を収集、
分配するための仮想ハブとして機能
• (青線)と
(赤線)を持つ
Architecture Implementation Output
radical connection
ring connection
Model
衛星ノードを共有中継ノードに接続
2つの隣接しない衛星ノード同士を2ホップで接続
→ 2段階の更新で非局所情報を受信可能
隣接する衛星ノードを接続
局所的な関係を捉える
最初と最後のノードも接続
CNN や双方向 RNN と同様の役割
Architecture Implementation Output
radical connection
ring connection
Model
衛星ノードを共有中継ノードに接続
2つの隣接しない衛星ノード同士を2ホップで接続
→ 2段階の更新で非局所情報を受信可能
隣接する衛星ノードを接続
局所的な関係を捉える
最初と最後のノードも接続
CNN や双方向 RNN と同様の役割
Architecture Implementation Output
radical connection
ring connection
局所的構成性と非局所的
構成性の両方を同時に捉
えることが可能!
Model
• Transformer と似ていて、情報交換は attention mechanism に基づく
• Multi-head Attention
Architecture Implementation Output
• Update
• Position Embeddings
Model
• Transformer と似ていて、情報交換は attention mechanism に基づく
• Multi-head Attention
Architecture Implementation Output
• Update
• Position Embeddings
⊕
• scaled dot-product attention
𝐇 ∈ ℝ 𝑛×𝑑
:ベクトルの系列
𝐪 ∈ ℝ1×𝑑
:query ベクトル
𝐊 = 𝐇𝐖 𝐾
, 𝐕 = 𝐇𝐖 𝑉
𝐖 𝐾
, 𝐖 𝑉
:学習パラメータ
• multi-head attention
CNN におけるマルチチャネルと同様に、 𝐇 から有用な情報を集めるために利用
:連結演算子
𝐖𝑖
𝑄
, 𝐖𝑖
𝐾
, 𝐖𝑖
𝑉
, 𝐖𝑖
𝑂
:学習パラメータ
Model
• Transformer と似ていて、情報交換は attention mechanism に基づく
• Multi-head Attention
Architecture Implementation Output
• Update
• Position Embeddings
• 𝐬 𝑡
∈ ℝ1×𝑑
:Step 𝑡 における中継ノードの状態
• 𝐇 𝑡
∈ ℝ 𝑛×𝑑
:Step 𝑡 における全衛星ノードの状態
• 𝐄 = 𝐞1; … ; 𝐞 𝑛 , 𝐞𝑖 ∈ ℝ1×𝑑
:𝑖 番目のトークンの embedding
• 𝐂𝑖
𝑡
: 𝑖 番目の衛星ノードのための文脈情報
衛星ノードと中継ノードを交互に更新
Model
• Transformer と似ていて、情報交換は attention mechanism に基づく
• Multi-head Attention
Architecture Implementation Output
• Update
• Position Embeddings
• 系列情報を組み込むために position embedding も追加する
• 最初の層でトークン embedding とともに追加
Model
• 𝑇 回の更新の後の 𝐇 𝑇 と s 𝑇 の最終状態は、系列ラベリングや分類な
どの様々なタスクに使用可能
• タスク固有のモジュールにフィード
• 分類
• 最終層全体に max-pooling を適用し、それを s 𝑇 と併せるこ
とによって固定長の文レベルベクトルを生成し、Multi Layer
Perceptron (MLP) 分類器に入力
• 系列ラベリング
• 𝐇 𝑇 はすべての入力トークンに対応する素性
Architecture Implementation Output
• 目標:Transformer を軽量にし、適度なサイズのデータセットで簡単
に学習できるようにすること ∴ Transformer から多くの接続を削除
• 系列長 𝑛 で、隠れ状態の次元 𝑑 の場合の1層の計算量
標準のTransformer : 𝑂 𝑛2
𝑑
Star-Transformer : 𝑂 5𝑛𝑑 + 𝑂 𝑛𝑑 = 𝑂(6𝑛𝑑)
• 理論的には Transformer が見れるすべての関係を網羅
Transformer の 𝐡𝑖 ⟶ 𝐡𝑗 は 𝐡𝑖 ⟶ 𝐬 ⟶ 𝐡𝑗 でシミュレート
• 後述のシミュレーションタスクの実験では仮想ノードが長期の依存
関係を処理できることを示すいくつかの証拠を提示
• 最大依存パス長は 𝑂 1 (Transformer と比較すると 𝑂 2 )
• シミュレーションタスクでは10倍、実タスクでは4.5倍高速化
• 高速化の他に、中程度のデータセットに対して大幅な改善を達成
Comparison to the standard Transformer
• 目標:Transformer を軽量にし、適度なサイズのデータセットで簡単
に学習できるようにすること ∴ Transformer から多くの接続を削除
• 系列長 𝑛 で、隠れ状態の次元 𝑑 の場合の1層の計算量
標準のTransformer : 𝑂 𝑛2
𝑑
Star-Transformer : 𝑂 5𝑛𝑑 + 𝑂 𝑛𝑑 = 𝑂(6𝑛𝑑)
• 理論的には Transformer が見れるすべての関係を網羅
Transformer の 𝐡𝑖 ⟶ 𝐡𝑗 は 𝐡𝑖 ⟶ 𝐬 ⟶ 𝐡𝑗 でシミュレート
• 後述のシミュレーションタスクの実験では仮想ノードが長期の依存
関係を処理できることを示すいくつかの証拠を提示
• 最大依存パス長は 𝑂 1 (Transformer と比較すると 𝑂 2 )
• シミュレーションタスクでは10倍、実タスクでは4.5倍高速化
• 高速化の他に、中程度のデータセットに対して大幅な改善を達成
Comparison to the standard Transformer
Experiments
• 1つのシミュレーションタスク で評価
• 長期依存性の問題に直面したときの動作を確認
• 3つの実タスクを検証
• NVIDIA Titan X カード
• optimizer : Adam
• embedding size : 300
• 初期化 : GloVe
• “Ours + Char”:文字レ
ベルの事前学習された
embedding JMT を使用
→ embedding size : 400
※ ELMo や BERT のような教師なし/半教師ありモデルも双方向にモデルを改善するため
の解決策なので、比較でこれらのモデルは除外し、関連するアーキテクチャに注目
Text Classification Natural Language Inference Sequence Labelling
Masked Summation
Experiments
• 𝐗 ∈ ℝ 𝑛×𝑑
: 入力行列
• 𝐗 𝑖0 ∈ 0, 1 : 最初の次元、マスク値。0 の列を無視する
• 𝑘 : 入力内の 1 の数を制御するための暗黙変数
• 単純なベースラインは常に 𝑘/2 を推測していることに注意
• マスクされたベクトルの総和を求める
• 評価手法:平均二乗誤差(MSE)
• 生成されたデータセットの数:(train/dev/test:10k/10k/10k)
• 系列長 𝑛 が列の数 𝑘 より大幅に大きい場合、長期の依存関係の問題となる
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
𝑛 = 8, 𝑘 = 3, 𝑑 = 3 の例
Experiments
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
• 結果
• モデルの性能曲線を見ると、LSTMやBiLSTMよりも良い事がわかる (a)
• → 非局所的/長期の依存関係を処理する能力を保持している
• パディング、マスキング、およびデータ処理の影響を無視できるため、このタス
クで速度を調査 (b)
• 特に長い系列長の場合は他のモデルよりも高速
Experiments
• SST (Stanford Sentiment Treebank) と MTL-16 (様々なドメイン上の16
個の小さなデータセット) の2つのデータセットで実験
• 標準の Transformer が1つのGPUカードで実行できるように、長さが
256を超える系列を切り捨てる
• 中継ノード s 𝑇 と衛星ノード max(𝐇 𝑇) を使い、softmax 分類器に入力
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
Experiments
• SST (Stanford Sentiment Treebank) と MTL-16 (様々なドメイン上の16
個の小さなデータセット) の2つのデータセットで実験
• 標準の Transformer が1つのGPUカードで実行できるように、長さが
256を超える系列を切り捨てる
• 中継ノード s 𝑇 と衛星ノード max(𝐇 𝑇) を使い、softmax 分類器に入力
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
SST では Transformer に
対して
2.5 ポイント改善
MTL-16 では 平均精度は 4.2 ポイント改善
(Transformer は大きな学習セットが必要)
1,400 程度の小規模なデータセットでもうまく機能
平均推論時間が4.5倍高速化
Experiments
• SNLI (Stanford Natural Language Inferense) を使用
• Star-Transformer を文ベクトルベースのモデルとして設定し、他の文
ベクトルベースのモデルと比較
• Bowman, 2016 に習い、concat 𝐫1, 𝐫2, 𝐫1 − 𝐫2 , 𝐫1 − 𝐫2 を使用
• 𝐫1, 𝐫2 は入力文の表現で、 s 𝑇 + max(𝐇 𝑇) で計算
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
Experiments
• SNLI (Stanford Natural Language Inferense) を使用
• Star-Transformer を文ベクトルベースのモデルとして設定し、他の文
ベクトルベースのモデルと比較
• Bowman, 2016 に習い、concat 𝐫1, 𝐫2, 𝐫1 − 𝐫2 , 𝐫1 − 𝐫2 を使用
• 𝐫1, 𝐫2 は入力文の表現で、 s 𝑇 + max(𝐇 𝑇) で計算
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
典型的なベースラインを超え、他の
最先端のモデルとも同程度
SNLI データセットは小さなデータセッ
トではないため、Transformer の汎化性
能を向上させることは重要
SNLI では良いが SST ではパッとしない結果
Experiments
• 品詞タグ付け (PTB) と NER (CoNLL 2003, CoNLL 2012) タスク
• 各位置で衛星ノードの最終状態 𝐇 𝑇 を使用してラベルを分類
• 複雑な NN が CRF の代替となり得ると信じて、CRF層なしの結
果を報告
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
Experiments
• 品詞タグ付け (PTB) と NER (CoNLL 2003, CoNLL 2012) タスク
• 各位置で衛星ノードの最終状態 𝐇 𝑇 を使用してラベルを分類
Text
Classification
Natural
Language
Inference
Sequence
Labelling
Masked
Summation
最先端の性能を達成
CRF 層なしでも良い
結果
モデルがCRFの部分
的な能力を捉えるの
に十分な能力を持っ
ていることを示唆
Ablation Study
• radical connection と ring connection の有効性を
ablation study でテスト
Ablation Study
• radical connection と ring connection の有効性を
ablation study でテスト
(a) は長期依存関係を処理
する能力を失い、シミュ
レーションタスクで大きく、
実タスクで少し性能悪化
(b) は最大経路長が変わら
ないためシミュレーション
タスクには効くが、実タス
クの性能は悪化
radical connection と ring connection の両方が必要
Conclusion and Future Works
• トポロジーをsparse化することで標準の Transformer の計
算の複雑さを減らす Start-Transformer を提案
• 標準の Transformer と比較して優れていて、最先端のモ
デルと同等の結果が得られた
• 教師なしの事前学習の要素を除外することによって、
Star-Transformer の能力を検証
• future works
• 大規模コーパスの教師なし事前学習によって Star-Transformer の
能力を調査
• より多くのNLPの事前知識をモデルに導入

More Related Content

What's hot

[DL輪読会]Flow-based Deep Generative Models
[DL輪読会]Flow-based Deep Generative Models[DL輪読会]Flow-based Deep Generative Models
[DL輪読会]Flow-based Deep Generative Models
Deep Learning JP
 
Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)
Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)
Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)Ohsawa Goodfellow
 
【DL輪読会】Perceiver io a general architecture for structured inputs & outputs
【DL輪読会】Perceiver io  a general architecture for structured inputs & outputs 【DL輪読会】Perceiver io  a general architecture for structured inputs & outputs
【DL輪読会】Perceiver io a general architecture for structured inputs & outputs
Deep Learning JP
 
論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」
論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」
論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」
Naonori Nagano
 
Practical recommendations for gradient-based training of deep architectures
Practical recommendations for gradient-based training of deep architecturesPractical recommendations for gradient-based training of deep architectures
Practical recommendations for gradient-based training of deep architectures
Koji Matsuda
 
現在のDNNにおける未解決問題
現在のDNNにおける未解決問題現在のDNNにおける未解決問題
現在のDNNにおける未解決問題
Daisuke Okanohara
 
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
Shotaro Sano
 
Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015
Ryosuke Okuta
 
ディープラーニングフレームワーク とChainerの実装
ディープラーニングフレームワーク とChainerの実装ディープラーニングフレームワーク とChainerの実装
ディープラーニングフレームワーク とChainerの実装
Ryosuke Okuta
 
[第2版]Python機械学習プログラミング 第8章
[第2版]Python機械学習プログラミング 第8章[第2版]Python機械学習プログラミング 第8章
[第2版]Python機械学習プログラミング 第8章
Haruki Eguchi
 
AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...
AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...
AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...
T T
 
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
Deep Learning JP
 
ディープラーニングゼミ TensorFlowで学ぶ理論と実践
ディープラーニングゼミ TensorFlowで学ぶ理論と実践ディープラーニングゼミ TensorFlowで学ぶ理論と実践
ディープラーニングゼミ TensorFlowで学ぶ理論と実践
Yota Ishida
 
A Study of the Learnability of Relational Properties - Model Counting Meets M...
A Study of the Learnability of Relational Properties - Model Counting Meets M...A Study of the Learnability of Relational Properties - Model Counting Meets M...
A Study of the Learnability of Relational Properties - Model Counting Meets M...
T T
 
DL Hacks輪読 Semi-supervised Learning with Deep Generative Models
DL Hacks輪読 Semi-supervised Learning with Deep Generative ModelsDL Hacks輪読 Semi-supervised Learning with Deep Generative Models
DL Hacks輪読 Semi-supervised Learning with Deep Generative Models
Yusuke Iwasawa
 
Tf勉強会(5)
Tf勉強会(5)Tf勉強会(5)
Tf勉強会(5)
tak9029
 
畳み込みLstm
畳み込みLstm畳み込みLstm
畳み込みLstm
tak9029
 
[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について
Deep Learning JP
 
Meta-Learning with Memory Augmented Neural Network
Meta-Learning with Memory Augmented Neural NetworkMeta-Learning with Memory Augmented Neural Network
Meta-Learning with Memory Augmented Neural Network
Yusuke Watanabe
 

What's hot (20)

[DL輪読会]Flow-based Deep Generative Models
[DL輪読会]Flow-based Deep Generative Models[DL輪読会]Flow-based Deep Generative Models
[DL輪読会]Flow-based Deep Generative Models
 
Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)
Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)
Learning Deep Architectures for AI (第 3 回 Deep Learning 勉強会資料; 松尾)
 
【DL輪読会】Perceiver io a general architecture for structured inputs & outputs
【DL輪読会】Perceiver io  a general architecture for structured inputs & outputs 【DL輪読会】Perceiver io  a general architecture for structured inputs & outputs
【DL輪読会】Perceiver io a general architecture for structured inputs & outputs
 
論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」
論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」
論文紹介:「End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF」
 
Practical recommendations for gradient-based training of deep architectures
Practical recommendations for gradient-based training of deep architecturesPractical recommendations for gradient-based training of deep architectures
Practical recommendations for gradient-based training of deep architectures
 
現在のDNNにおける未解決問題
現在のDNNにおける未解決問題現在のDNNにおける未解決問題
現在のDNNにおける未解決問題
 
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
再帰型ニューラルネット in 機械学習プロフェッショナルシリーズ輪読会
 
Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015
 
ディープラーニングフレームワーク とChainerの実装
ディープラーニングフレームワーク とChainerの実装ディープラーニングフレームワーク とChainerの実装
ディープラーニングフレームワーク とChainerの実装
 
[第2版]Python機械学習プログラミング 第8章
[第2版]Python機械学習プログラミング 第8章[第2版]Python機械学習プログラミング 第8章
[第2版]Python機械学習プログラミング 第8章
 
AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...
AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...
AI2: Safety and Robustness Certification of Neural Networks with Abstract Int...
 
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
 
ディープラーニングゼミ TensorFlowで学ぶ理論と実践
ディープラーニングゼミ TensorFlowで学ぶ理論と実践ディープラーニングゼミ TensorFlowで学ぶ理論と実践
ディープラーニングゼミ TensorFlowで学ぶ理論と実践
 
A Study of the Learnability of Relational Properties - Model Counting Meets M...
A Study of the Learnability of Relational Properties - Model Counting Meets M...A Study of the Learnability of Relational Properties - Model Counting Meets M...
A Study of the Learnability of Relational Properties - Model Counting Meets M...
 
DL Hacks輪読 Semi-supervised Learning with Deep Generative Models
DL Hacks輪読 Semi-supervised Learning with Deep Generative ModelsDL Hacks輪読 Semi-supervised Learning with Deep Generative Models
DL Hacks輪読 Semi-supervised Learning with Deep Generative Models
 
Tf勉強会(5)
Tf勉強会(5)Tf勉強会(5)
Tf勉強会(5)
 
畳み込みLstm
畳み込みLstm畳み込みLstm
畳み込みLstm
 
[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について
 
Effective Java 輪読会 項目45-48
Effective Java 輪読会 項目45-48Effective Java 輪読会 項目45-48
Effective Java 輪読会 項目45-48
 
Meta-Learning with Memory Augmented Neural Network
Meta-Learning with Memory Augmented Neural NetworkMeta-Learning with Memory Augmented Neural Network
Meta-Learning with Memory Augmented Neural Network
 

Similar to 論文紹介 Star-Transformer (NAACL 2019)

2020 03 05_mar_revenshtein_transformer_tmu_homma
2020 03 05_mar_revenshtein_transformer_tmu_homma2020 03 05_mar_revenshtein_transformer_tmu_homma
2020 03 05_mar_revenshtein_transformer_tmu_homma
広樹 本間
 
Mplusの使い方 初級編
Mplusの使い方 初級編Mplusの使い方 初級編
Mplusの使い方 初級編
Hiroshi Shimizu
 
Mplusの使い方 中級編
Mplusの使い方 中級編Mplusの使い方 中級編
Mplusの使い方 中級編
Hiroshi Shimizu
 
CRF を使った Web 本文抽出
CRF を使った Web 本文抽出CRF を使った Web 本文抽出
CRF を使った Web 本文抽出
Shuyo Nakatani
 
Effective Modern C++ 勉強会 Item26
Effective Modern C++ 勉強会 Item26Effective Modern C++ 勉強会 Item26
Effective Modern C++ 勉強会 Item26Akihiro Nishimura
 
Web本文抽出 using crf
Web本文抽出 using crfWeb本文抽出 using crf
Web本文抽出 using crfShuyo Nakatani
 
2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...
2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...
2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...
広樹 本間
 
Deep Collective Classification in Heterogeneous Information Networks
Deep Collective Classification in Heterogeneous Information Networks Deep Collective Classification in Heterogeneous Information Networks
Deep Collective Classification in Heterogeneous Information Networks
Kota Kakiuchi
 
[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...
[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...
[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...
Deep Learning JP
 
Learning structured embeddings of knowledge bases 文献講読
Learning structured embeddings of knowledge bases 文献講読Learning structured embeddings of knowledge bases 文献講読
Learning structured embeddings of knowledge bases 文献講読
poppyuri
 
[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...
[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...
[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...
Deep Learning JP
 
猫でも分かるVariational AutoEncoder
猫でも分かるVariational AutoEncoder猫でも分かるVariational AutoEncoder
猫でも分かるVariational AutoEncoder
Sho Tatsuno
 
Approximate Scalable Bounded Space Sketch for Large Data NLP
Approximate Scalable Bounded Space Sketch for Large Data NLPApproximate Scalable Bounded Space Sketch for Large Data NLP
Approximate Scalable Bounded Space Sketch for Large Data NLPKoji Matsuda
 
形態素解析も辞書も言語モデルもいらないend-to-end音声認識
形態素解析も辞書も言語モデルもいらないend-to-end音声認識形態素解析も辞書も言語モデルもいらないend-to-end音声認識
形態素解析も辞書も言語モデルもいらないend-to-end音声認識
Tomoki Hayashi
 
全力解説!Transformer
全力解説!Transformer全力解説!Transformer
全力解説!Transformer
Arithmer Inc.
 
論文紹介 "DARTS: Differentiable Architecture Search"
論文紹介 "DARTS: Differentiable Architecture Search"論文紹介 "DARTS: Differentiable Architecture Search"
論文紹介 "DARTS: Differentiable Architecture Search"
Yuta Koreeda
 
LCCC2010:Learning on Cores, Clusters and Cloudsの解説
LCCC2010:Learning on Cores,  Clusters and Cloudsの解説LCCC2010:Learning on Cores,  Clusters and Cloudsの解説
LCCC2010:Learning on Cores, Clusters and Cloudsの解説
Preferred Networks
 
Transformerを多層にする際の勾配消失問題と解決法について
Transformerを多層にする際の勾配消失問題と解決法についてTransformerを多層にする際の勾配消失問題と解決法について
Transformerを多層にする際の勾配消失問題と解決法について
Sho Takase
 
Decoupled Neural Interfaces using Synthetic Gradients
Decoupled Neural Interfaces using Synthetic GradientsDecoupled Neural Interfaces using Synthetic Gradients
Decoupled Neural Interfaces using Synthetic Gradients
tm_2648
 

Similar to 論文紹介 Star-Transformer (NAACL 2019) (20)

2020 03 05_mar_revenshtein_transformer_tmu_homma
2020 03 05_mar_revenshtein_transformer_tmu_homma2020 03 05_mar_revenshtein_transformer_tmu_homma
2020 03 05_mar_revenshtein_transformer_tmu_homma
 
Mplusの使い方 初級編
Mplusの使い方 初級編Mplusの使い方 初級編
Mplusの使い方 初級編
 
Mplusの使い方 中級編
Mplusの使い方 中級編Mplusの使い方 中級編
Mplusの使い方 中級編
 
CRF を使った Web 本文抽出
CRF を使った Web 本文抽出CRF を使った Web 本文抽出
CRF を使った Web 本文抽出
 
matsumura m
matsumura mmatsumura m
matsumura m
 
Effective Modern C++ 勉強会 Item26
Effective Modern C++ 勉強会 Item26Effective Modern C++ 勉強会 Item26
Effective Modern C++ 勉強会 Item26
 
Web本文抽出 using crf
Web本文抽出 using crfWeb本文抽出 using crf
Web本文抽出 using crf
 
2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...
2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...
2020 acl learning_to_recover_from_multi-modality_errors_for_non-autoregressiv...
 
Deep Collective Classification in Heterogeneous Information Networks
Deep Collective Classification in Heterogeneous Information Networks Deep Collective Classification in Heterogeneous Information Networks
Deep Collective Classification in Heterogeneous Information Networks
 
[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...
[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...
[DL輪読会]SOLAR: Deep Structured Representations for Model-Based Reinforcement L...
 
Learning structured embeddings of knowledge bases 文献講読
Learning structured embeddings of knowledge bases 文献講読Learning structured embeddings of knowledge bases 文献講読
Learning structured embeddings of knowledge bases 文献講読
 
[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...
[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...
[DL Hacks] Deterministic Variational Inference for RobustBayesian Neural Netw...
 
猫でも分かるVariational AutoEncoder
猫でも分かるVariational AutoEncoder猫でも分かるVariational AutoEncoder
猫でも分かるVariational AutoEncoder
 
Approximate Scalable Bounded Space Sketch for Large Data NLP
Approximate Scalable Bounded Space Sketch for Large Data NLPApproximate Scalable Bounded Space Sketch for Large Data NLP
Approximate Scalable Bounded Space Sketch for Large Data NLP
 
形態素解析も辞書も言語モデルもいらないend-to-end音声認識
形態素解析も辞書も言語モデルもいらないend-to-end音声認識形態素解析も辞書も言語モデルもいらないend-to-end音声認識
形態素解析も辞書も言語モデルもいらないend-to-end音声認識
 
全力解説!Transformer
全力解説!Transformer全力解説!Transformer
全力解説!Transformer
 
論文紹介 "DARTS: Differentiable Architecture Search"
論文紹介 "DARTS: Differentiable Architecture Search"論文紹介 "DARTS: Differentiable Architecture Search"
論文紹介 "DARTS: Differentiable Architecture Search"
 
LCCC2010:Learning on Cores, Clusters and Cloudsの解説
LCCC2010:Learning on Cores,  Clusters and Cloudsの解説LCCC2010:Learning on Cores,  Clusters and Cloudsの解説
LCCC2010:Learning on Cores, Clusters and Cloudsの解説
 
Transformerを多層にする際の勾配消失問題と解決法について
Transformerを多層にする際の勾配消失問題と解決法についてTransformerを多層にする際の勾配消失問題と解決法について
Transformerを多層にする際の勾配消失問題と解決法について
 
Decoupled Neural Interfaces using Synthetic Gradients
Decoupled Neural Interfaces using Synthetic GradientsDecoupled Neural Interfaces using Synthetic Gradients
Decoupled Neural Interfaces using Synthetic Gradients
 

More from 広樹 本間

論文紹介: Improving grammatical error correction models with purpose built advers...
論文紹介: Improving grammatical error correction models with purpose built advers...論文紹介: Improving grammatical error correction models with purpose built advers...
論文紹介: Improving grammatical error correction models with purpose built advers...
広樹 本間
 
Infusing sequential information into conditional masked translation model wit...
Infusing sequential information into conditional masked translation model wit...Infusing sequential information into conditional masked translation model wit...
Infusing sequential information into conditional masked translation model wit...
広樹 本間
 
論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus
論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus
論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus
広樹 本間
 
EMNLP 2019 parallel iterative edit models for local sequence transduction
EMNLP 2019 parallel iterative edit models for local sequence transductionEMNLP 2019 parallel iterative edit models for local sequence transduction
EMNLP 2019 parallel iterative edit models for local sequence transduction
広樹 本間
 
2019 Levenshtein Transformer
2019 Levenshtein Transformer2019 Levenshtein Transformer
2019 Levenshtein Transformer
広樹 本間
 
2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...
2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...
2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...
広樹 本間
 
2019年度チュートリアルBPE
2019年度チュートリアルBPE2019年度チュートリアルBPE
2019年度チュートリアルBPE
広樹 本間
 
Unsupervised multilingual word embeddings
Unsupervised multilingual word embeddingsUnsupervised multilingual word embeddings
Unsupervised multilingual word embeddings
広樹 本間
 
Improving neural machine translation by incorporating hierarchical subword fe...
Improving neural machine translation by incorporating hierarchical subword fe...Improving neural machine translation by incorporating hierarchical subword fe...
Improving neural machine translation by incorporating hierarchical subword fe...
広樹 本間
 
A deep relevance model for zero shot document filtering
A deep relevance model for zero shot document filteringA deep relevance model for zero shot document filtering
A deep relevance model for zero shot document filtering
広樹 本間
 
Reusing weights in subword aware neural language models
Reusing weights in subword aware neural language modelsReusing weights in subword aware neural language models
Reusing weights in subword aware neural language models
広樹 本間
 
最終発表
最終発表最終発表
最終発表
広樹 本間
 
企画書 VirtualDarts v2
企画書 VirtualDarts v2企画書 VirtualDarts v2
企画書 VirtualDarts v2
広樹 本間
 

More from 広樹 本間 (13)

論文紹介: Improving grammatical error correction models with purpose built advers...
論文紹介: Improving grammatical error correction models with purpose built advers...論文紹介: Improving grammatical error correction models with purpose built advers...
論文紹介: Improving grammatical error correction models with purpose built advers...
 
Infusing sequential information into conditional masked translation model wit...
Infusing sequential information into conditional masked translation model wit...Infusing sequential information into conditional masked translation model wit...
Infusing sequential information into conditional masked translation model wit...
 
論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus
論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus
論文紹介 JParaCrawl: A Large Scale Web-Based English-Japanese Parallel Corpus
 
EMNLP 2019 parallel iterative edit models for local sequence transduction
EMNLP 2019 parallel iterative edit models for local sequence transductionEMNLP 2019 parallel iterative edit models for local sequence transduction
EMNLP 2019 parallel iterative edit models for local sequence transduction
 
2019 Levenshtein Transformer
2019 Levenshtein Transformer2019 Levenshtein Transformer
2019 Levenshtein Transformer
 
2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...
2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...
2019 dynamically composing_domain-data_selection_with_clean-data_selection_by...
 
2019年度チュートリアルBPE
2019年度チュートリアルBPE2019年度チュートリアルBPE
2019年度チュートリアルBPE
 
Unsupervised multilingual word embeddings
Unsupervised multilingual word embeddingsUnsupervised multilingual word embeddings
Unsupervised multilingual word embeddings
 
Improving neural machine translation by incorporating hierarchical subword fe...
Improving neural machine translation by incorporating hierarchical subword fe...Improving neural machine translation by incorporating hierarchical subword fe...
Improving neural machine translation by incorporating hierarchical subword fe...
 
A deep relevance model for zero shot document filtering
A deep relevance model for zero shot document filteringA deep relevance model for zero shot document filtering
A deep relevance model for zero shot document filtering
 
Reusing weights in subword aware neural language models
Reusing weights in subword aware neural language modelsReusing weights in subword aware neural language models
Reusing weights in subword aware neural language models
 
最終発表
最終発表最終発表
最終発表
 
企画書 VirtualDarts v2
企画書 VirtualDarts v2企画書 VirtualDarts v2
企画書 VirtualDarts v2
 

論文紹介 Star-Transformer (NAACL 2019)

  • 1. Star-Transformer Qipeng Guo Xipeng Qiu Pengfei Liu Yunfan Shao Xiangyang Xue Zheng Zhang 最先端論文紹介 2019/06/13 紹介者 M1本間
  • 2. Transformer は強いが、フルAttention接続をもつ重い構造 → 大規模なトレーニングデータに依存 軽量の代替手段である Start-Transformer を提案 • 隣のノード同士だけ接続し、他のノード同士は shared relay node を介して接続する星型トポロジー • 局所的な構成と長距離の依存性の両方を捉える能力 を維持しながら、複雑さを2次から1次に落とした Abstract
  • 3. Abstract Transformer は強いが、フルAttention接続をもつ重い構造 → 大規模なトレーニングデータに依存 軽量の代替手段である Start-Transformer を提案 • 隣のノード同士だけ接続し、他のノード同士は shared relay node を介して接続する星型トポロジー • 局所的な構成と長距離の依存性の両方を捉える能力 を維持しながら、複雑さを2次から1次に落とした
  • 4. 最近 fully-connected な attention-based のモデルがNLPタ スク(MTやLM)で一般的になってきている • Transformer (Vaswani et al., 2017) • 多くのタスクで RNN や CNN にとって代わってきている • GPT (Radford et al., 2018) • BERT (Devlin et al., 2018) • Transformer-XL (Dai et al., 2019) • Universal Transformer (Dehghani et al., 2018) Introduction
  • 5. Introduction 最近 fully-connected な attention-based のモデルがNLPタ スク(MTやLM)で一般的になってきている • Transformer (Vaswani et al., 2017) • 多くのタスクで RNN や CNN にとって代わってきている • GPT (Radford et al., 2018) • BERT (Devlin et al., 2018) • Transformer-XL (Dai et al., 2019) • Universal Transformer (Dehghani et al., 2018)
  • 6. Introduction しかし、Transformer には2つの 限界 がある 1. 系列長の2次の計算/メモリ量オーバーヘッドがある • 特に長い文で問題 • Transformer-XLでは高速化と性能向上を達成しているが、LMタ スクに特化した設計になっている 2. 大規模なトレーニングデータ、あるいは大規模なコー パスでの事前学習が必要 • それ以外の場合では多くのタスクで失敗する ことが調査によって示されている
  • 7. Introduction • なぜ Transformer が重いのか → 事前知識をうまく利用していないことが一因 例えば、局所的な構成性は、テキスト系列をモデル化するための ロバストなバイアスであるが、Transformer はこのバイアスを非局 所的な構成性とともに学習するため、学習コストが増加する この強力な事前知識を活用することはアーキテクチャを「明るく する」のに役立つ? Star-Transformer
  • 9. Introduction 3つのNLPタスクで評価 テキスト分類 Text Classification 自然言語推論 Natural Language Inference 系列ラベリング Sequence Labelling すべてのタスクで通常の Transformer を上回った! しかも計算複雑性は少ない!
  • 10. Introduction 3つのNLPタスクで評価 テキスト分類 Text Classification 自然言語推論 Natural Language Inference 系列ラベリング Sequence Labelling シミュレーションタスクを詳細に分析すると 長期の依存関係を保持できていることがわかった!
  • 11. Introduction この論文の3つの Contributions 通常の Transformer と比較して 軽量 で、長期依存関係 をモデル 化するための機能を保持。接続数を 𝑛2 から 𝟐𝒏 に 長期依存関係を処理する能力を検証するためのシミュレーションタス ク「Masked Summation」を設計。 Transformer と Star-Transformer の両方が LSTM および BiLSTM と比較 して長期依存関係の処理に優れていることを確認 意味的構成を radical connection と ring connection で分担。 非局所的構成 局所的構成 → 中程度のサイズのデータセットに対応し、重い事前学習が不要
  • 12. NLPのタスクで使われるNNのモデルを3つに大別 Modelling Local Compositionality 局所構成性のモデリング ・CNN Kim (2014), Kalchbrenner (2014) ・RNN Cho (2014) ・self-attention mechanism Yang (2016), Lin (2017) Shen (2018) ・re-reading, global state Cheng (2016), Zhang (2018) Modelling Non-Local Compositionality 非局所構成性のモデリング ・Syntactic tree → network structure Tai (2015), Zhu (2015) ・self-attention only Transformer (Vaswani, 2017) GPT (Radford, 2018) BERT (Devlin, 2018) Transformer-XL (Dai, 2019) Universal Transformer (Dehghani, 2018) CN3 (Liu, 2018) Graph Neural Networks グラフニューラルネットワーク ・グラフ構造で情報を伝播 Gilmer (2017), Battaglia (2018) Kipf and Welling (2016) Liu (2018) Star-Transformer 大規模な学習コーパス or 事前学習 Related Work
  • 13. NLPのタスクで使われるNNのモデルを3つに大別 Modelling Local Compositionality 局所構成性のモデリング ・CNN Kim (2014), Kalchbrenner (2014) ・RNN Cho (2014) ・self-attention mechanism Yang (2016), Lin (2017) Shen (2018) ・re-reading, global state Cheng (2016), Zhang (2018) Modelling Non-Local Compositionality 非局所構成性のモデリング ・Syntactic tree → network structure Tai (2015), Zhu (2015) ・self-attention only Transformer (Vaswani, 2017) GPT (Radford, 2018) BERT (Devlin, 2018) Transformer-XL (Dai, 2019) Universal Transformer (Dehghani, 2018) CN3 (Liu, 2018) Graph Neural Networks グラフニューラルネットワーク ・グラフ構造で情報を伝播 Gilmer (2017), Battaglia (2018) Kipf and Welling (2016) Liu (2018) Star-Transformer 大規模な学習コーパス or 事前学習 Related Work
  • 16. Model • 1つの中継ノードと n個の衛星ノードで構成 • 𝑖 番目の衛星ノードの状態はテキスト系列内の 𝑖 番目の トークンの素性を表す • 中継ノードはすべての衛星ノードとの間で情報を収集、 分配するための仮想ハブとして機能 • (青線)と (赤線)を持つ Architecture Implementation Output radical connection ring connection
  • 19. Model • Transformer と似ていて、情報交換は attention mechanism に基づく • Multi-head Attention Architecture Implementation Output • Update • Position Embeddings
  • 20. Model • Transformer と似ていて、情報交換は attention mechanism に基づく • Multi-head Attention Architecture Implementation Output • Update • Position Embeddings ⊕ • scaled dot-product attention 𝐇 ∈ ℝ 𝑛×𝑑 :ベクトルの系列 𝐪 ∈ ℝ1×𝑑 :query ベクトル 𝐊 = 𝐇𝐖 𝐾 , 𝐕 = 𝐇𝐖 𝑉 𝐖 𝐾 , 𝐖 𝑉 :学習パラメータ • multi-head attention CNN におけるマルチチャネルと同様に、 𝐇 から有用な情報を集めるために利用 :連結演算子 𝐖𝑖 𝑄 , 𝐖𝑖 𝐾 , 𝐖𝑖 𝑉 , 𝐖𝑖 𝑂 :学習パラメータ
  • 21. Model • Transformer と似ていて、情報交換は attention mechanism に基づく • Multi-head Attention Architecture Implementation Output • Update • Position Embeddings • 𝐬 𝑡 ∈ ℝ1×𝑑 :Step 𝑡 における中継ノードの状態 • 𝐇 𝑡 ∈ ℝ 𝑛×𝑑 :Step 𝑡 における全衛星ノードの状態 • 𝐄 = 𝐞1; … ; 𝐞 𝑛 , 𝐞𝑖 ∈ ℝ1×𝑑 :𝑖 番目のトークンの embedding • 𝐂𝑖 𝑡 : 𝑖 番目の衛星ノードのための文脈情報 衛星ノードと中継ノードを交互に更新
  • 22. Model • Transformer と似ていて、情報交換は attention mechanism に基づく • Multi-head Attention Architecture Implementation Output • Update • Position Embeddings • 系列情報を組み込むために position embedding も追加する • 最初の層でトークン embedding とともに追加
  • 23. Model • 𝑇 回の更新の後の 𝐇 𝑇 と s 𝑇 の最終状態は、系列ラベリングや分類な どの様々なタスクに使用可能 • タスク固有のモジュールにフィード • 分類 • 最終層全体に max-pooling を適用し、それを s 𝑇 と併せるこ とによって固定長の文レベルベクトルを生成し、Multi Layer Perceptron (MLP) 分類器に入力 • 系列ラベリング • 𝐇 𝑇 はすべての入力トークンに対応する素性 Architecture Implementation Output
  • 24. • 目標:Transformer を軽量にし、適度なサイズのデータセットで簡単 に学習できるようにすること ∴ Transformer から多くの接続を削除 • 系列長 𝑛 で、隠れ状態の次元 𝑑 の場合の1層の計算量 標準のTransformer : 𝑂 𝑛2 𝑑 Star-Transformer : 𝑂 5𝑛𝑑 + 𝑂 𝑛𝑑 = 𝑂(6𝑛𝑑) • 理論的には Transformer が見れるすべての関係を網羅 Transformer の 𝐡𝑖 ⟶ 𝐡𝑗 は 𝐡𝑖 ⟶ 𝐬 ⟶ 𝐡𝑗 でシミュレート • 後述のシミュレーションタスクの実験では仮想ノードが長期の依存 関係を処理できることを示すいくつかの証拠を提示 • 最大依存パス長は 𝑂 1 (Transformer と比較すると 𝑂 2 ) • シミュレーションタスクでは10倍、実タスクでは4.5倍高速化 • 高速化の他に、中程度のデータセットに対して大幅な改善を達成 Comparison to the standard Transformer
  • 25. • 目標:Transformer を軽量にし、適度なサイズのデータセットで簡単 に学習できるようにすること ∴ Transformer から多くの接続を削除 • 系列長 𝑛 で、隠れ状態の次元 𝑑 の場合の1層の計算量 標準のTransformer : 𝑂 𝑛2 𝑑 Star-Transformer : 𝑂 5𝑛𝑑 + 𝑂 𝑛𝑑 = 𝑂(6𝑛𝑑) • 理論的には Transformer が見れるすべての関係を網羅 Transformer の 𝐡𝑖 ⟶ 𝐡𝑗 は 𝐡𝑖 ⟶ 𝐬 ⟶ 𝐡𝑗 でシミュレート • 後述のシミュレーションタスクの実験では仮想ノードが長期の依存 関係を処理できることを示すいくつかの証拠を提示 • 最大依存パス長は 𝑂 1 (Transformer と比較すると 𝑂 2 ) • シミュレーションタスクでは10倍、実タスクでは4.5倍高速化 • 高速化の他に、中程度のデータセットに対して大幅な改善を達成 Comparison to the standard Transformer
  • 26. Experiments • 1つのシミュレーションタスク で評価 • 長期依存性の問題に直面したときの動作を確認 • 3つの実タスクを検証 • NVIDIA Titan X カード • optimizer : Adam • embedding size : 300 • 初期化 : GloVe • “Ours + Char”:文字レ ベルの事前学習された embedding JMT を使用 → embedding size : 400 ※ ELMo や BERT のような教師なし/半教師ありモデルも双方向にモデルを改善するため の解決策なので、比較でこれらのモデルは除外し、関連するアーキテクチャに注目 Text Classification Natural Language Inference Sequence Labelling Masked Summation
  • 27. Experiments • 𝐗 ∈ ℝ 𝑛×𝑑 : 入力行列 • 𝐗 𝑖0 ∈ 0, 1 : 最初の次元、マスク値。0 の列を無視する • 𝑘 : 入力内の 1 の数を制御するための暗黙変数 • 単純なベースラインは常に 𝑘/2 を推測していることに注意 • マスクされたベクトルの総和を求める • 評価手法:平均二乗誤差(MSE) • 生成されたデータセットの数:(train/dev/test:10k/10k/10k) • 系列長 𝑛 が列の数 𝑘 より大幅に大きい場合、長期の依存関係の問題となる Text Classification Natural Language Inference Sequence Labelling Masked Summation 𝑛 = 8, 𝑘 = 3, 𝑑 = 3 の例
  • 28. Experiments Text Classification Natural Language Inference Sequence Labelling Masked Summation • 結果 • モデルの性能曲線を見ると、LSTMやBiLSTMよりも良い事がわかる (a) • → 非局所的/長期の依存関係を処理する能力を保持している • パディング、マスキング、およびデータ処理の影響を無視できるため、このタス クで速度を調査 (b) • 特に長い系列長の場合は他のモデルよりも高速
  • 29. Experiments • SST (Stanford Sentiment Treebank) と MTL-16 (様々なドメイン上の16 個の小さなデータセット) の2つのデータセットで実験 • 標準の Transformer が1つのGPUカードで実行できるように、長さが 256を超える系列を切り捨てる • 中継ノード s 𝑇 と衛星ノード max(𝐇 𝑇) を使い、softmax 分類器に入力 Text Classification Natural Language Inference Sequence Labelling Masked Summation
  • 30. Experiments • SST (Stanford Sentiment Treebank) と MTL-16 (様々なドメイン上の16 個の小さなデータセット) の2つのデータセットで実験 • 標準の Transformer が1つのGPUカードで実行できるように、長さが 256を超える系列を切り捨てる • 中継ノード s 𝑇 と衛星ノード max(𝐇 𝑇) を使い、softmax 分類器に入力 Text Classification Natural Language Inference Sequence Labelling Masked Summation SST では Transformer に 対して 2.5 ポイント改善 MTL-16 では 平均精度は 4.2 ポイント改善 (Transformer は大きな学習セットが必要) 1,400 程度の小規模なデータセットでもうまく機能 平均推論時間が4.5倍高速化
  • 31. Experiments • SNLI (Stanford Natural Language Inferense) を使用 • Star-Transformer を文ベクトルベースのモデルとして設定し、他の文 ベクトルベースのモデルと比較 • Bowman, 2016 に習い、concat 𝐫1, 𝐫2, 𝐫1 − 𝐫2 , 𝐫1 − 𝐫2 を使用 • 𝐫1, 𝐫2 は入力文の表現で、 s 𝑇 + max(𝐇 𝑇) で計算 Text Classification Natural Language Inference Sequence Labelling Masked Summation
  • 32. Experiments • SNLI (Stanford Natural Language Inferense) を使用 • Star-Transformer を文ベクトルベースのモデルとして設定し、他の文 ベクトルベースのモデルと比較 • Bowman, 2016 に習い、concat 𝐫1, 𝐫2, 𝐫1 − 𝐫2 , 𝐫1 − 𝐫2 を使用 • 𝐫1, 𝐫2 は入力文の表現で、 s 𝑇 + max(𝐇 𝑇) で計算 Text Classification Natural Language Inference Sequence Labelling Masked Summation 典型的なベースラインを超え、他の 最先端のモデルとも同程度 SNLI データセットは小さなデータセッ トではないため、Transformer の汎化性 能を向上させることは重要 SNLI では良いが SST ではパッとしない結果
  • 33. Experiments • 品詞タグ付け (PTB) と NER (CoNLL 2003, CoNLL 2012) タスク • 各位置で衛星ノードの最終状態 𝐇 𝑇 を使用してラベルを分類 • 複雑な NN が CRF の代替となり得ると信じて、CRF層なしの結 果を報告 Text Classification Natural Language Inference Sequence Labelling Masked Summation
  • 34. Experiments • 品詞タグ付け (PTB) と NER (CoNLL 2003, CoNLL 2012) タスク • 各位置で衛星ノードの最終状態 𝐇 𝑇 を使用してラベルを分類 Text Classification Natural Language Inference Sequence Labelling Masked Summation 最先端の性能を達成 CRF 層なしでも良い 結果 モデルがCRFの部分 的な能力を捉えるの に十分な能力を持っ ていることを示唆
  • 35. Ablation Study • radical connection と ring connection の有効性を ablation study でテスト
  • 36. Ablation Study • radical connection と ring connection の有効性を ablation study でテスト (a) は長期依存関係を処理 する能力を失い、シミュ レーションタスクで大きく、 実タスクで少し性能悪化 (b) は最大経路長が変わら ないためシミュレーション タスクには効くが、実タス クの性能は悪化 radical connection と ring connection の両方が必要
  • 37. Conclusion and Future Works • トポロジーをsparse化することで標準の Transformer の計 算の複雑さを減らす Start-Transformer を提案 • 標準の Transformer と比較して優れていて、最先端のモ デルと同等の結果が得られた • 教師なしの事前学習の要素を除外することによって、 Star-Transformer の能力を検証 • future works • 大規模コーパスの教師なし事前学習によって Star-Transformer の 能力を調査 • より多くのNLPの事前知識をモデルに導入