<<Natural Language Inference over Interaction Space >>論文速讀
阿新 • • 發佈:2018-10-25
sdn conn 細節 .com 進行 github span mage 提取 模型結構
Embedding Layer
Encoding Layer
模型結構
code :https://github.com/YichenGong/Densely-Interactive-Inference-Network
首先是模型圖:
Embedding Layer
詞嵌入+字嵌入+syntactical features (句法特征) 拼接。
詞嵌入:glove pre-trained, 可訓練
字嵌入:conv1d +maxpoling ,解決oov問題,(P,H公用同一個卷積參數)
syntactical features: pos tagging+binary exact match (EM) feature 的onehot
Encoding Layer
P H經過2層highway network 得到 p*d 、h*d維的矩陣,再經過self-attention,self-att公式如下:
~P跟P同時經過fuse-gate,fuse-gate可以看做是skip connection .公式如下
intra-attention and fuse gate 時 ,P H的參數不共享。但是參數權重的差異會加懲罰,為了保證PH可以平行的學習相似性。
Interation Layer
Feature Extraction Layer
利用denseNet進行特征提取,resNet 也可以,但是參數太多。
沒有用BN,
激活函數relu。具體細節看代碼。
Output Layer
uses a linear layer and flattened 進行分類、
感想
0、詞向量的表示上,
1、DenseNet,
2、fuse-gate,
參考:
https://blog.csdn.net/xiayto/article/details/81247461
<<Natural Language Inference over Interaction Space >>論文速讀