记得上半年看GLMP,当时还跟别人讨论说memory都是骗人的,但是现在心态变正常了,能抓老鼠的都是好猫。下面对于这一系列的文章进行讲解。


1)LEARNING END-TO-END GOAL-ORIENTED DIALOG
2)Mem2Seq: Effectively Incorporating Knowledge Bases into End-to-End Task-Oriented Dialog Systems
3) GLOBAL-TO-LOCAL MEMORY POINTER NETWORKS FOR TASK-ORIENTED DIALOGUE
对于query的查询过程,是迭代查询还是并发查询每一条memory呢?
1)只是证实memory可以用在用在task-oriented上
2)
pointer network:
ptri={max(z)n+l+1 if ∃z s.t. yi=uz otherwise
要么从context+kb中抽取单词,要么从ut中抽取.where uz∈U is the input sequence and n+l+1 is the sentinel position index.
在multi-hop就是query与全部entity都计算一个attn分数,然后得到一个综合表达,进行多次,迭代询问
而3)


具体算法:
Knowledge read and write:
C=(C1,…,CK+1), where Ck∈R∣V∣×demb是一个要学习的embedding矩阵,用来表示 external knowledge as M=[B;X]=(m1,…,mn+l)(n是kb实体格式,l是历史长度),K是hop数量
pik=Softmax((qk)Tcik)
cik=B(Ck(mi))∈Rdemb(B是一个词袋模型,就是采出M中某一个词的embedding), pik是attn分数,
ok=∑ipikcik+1,qk+1=qk+ok,不是为什么p和c的上标不一样,
encode+decode的过程:
1.history写到external knowledge:
cik=cik+hmie if mi∈X and ∀k∈[1,K+1].就是说本来C是存在的一个参数矩阵,等到encode好饿之后,再加上一些参数,
2.生成Global memory pointer:
G=(g1,…,gn+l)是一个binary向量,每个entity独立计算attn,
使用hne作为query去进行multi-hop得到一个attn向量,训练目标是最后一层的注意力向量,某个词出现在目标句与否。
Glabel=(g1l,…,gn+ll)
gi=Sigmoid((qK)TciK),gil={10 if Object (mi)∈Y otherwise
Loss g=−∑i=1n+l[gil×loggi+(1−gil)×log(1−gi)]
3.生成Local memory pointer:
1)At each time step t, the global memory pointer G first modify the global contextual representation using its attention weights,就是让external knowledge中和目标句相关的才出现,是一种MLE训练思路。
cik=cik×gi,∀i∈[1,n+l] and ∀k∈[1,K+1]
and then the sketch RNN hidden state htd queries the external knowledge.
提取出的向量( The memory attention in the last hop) is the corresponding local memory pointer Lt, ---->代表着which is represented as the memory distribution at time step t.
local pointer的MLE训练:
Ltlabel={max(z)n+l+1 if ∃z s.t. yt=Object(mz) otherwise
4.最终如何生成:
y^t={argmax(Ptvocab)Object(margmax(Lt⊙R)) if argmax(Ptvocab)∈/ST otherwise
5.我的理解:
global pointer是确保目标句中的在external knowledge的memoryy矩阵权重最大。local pointer是某一步生成某一个字。
6.还有待回头学习。感觉还没搞完全懂。