论文出处:Key-Value Memory Networks for Directly Reading Documents(2016-06)
代码(lua+torch):https://github.com/facebook/MemNN/tree/master/KVmemnn
WikiMovies数据集:https://research.fb.com/downloads/babi/
传统的QA基于KB和IE,这种方法有很大局限性。现在试图直接从原始文本中给出答案。KV-MemNN是一种基于key-value的Memory Network. 它在查询相关记忆时使用key,而在回答问题时使用value. 这种方法可以灵活的增加先验信息。
KV-MemNN可以看作是MemN2N的一个拓展. 而Recurrent Entity Network也借用了key-value memory,不过EntNet中的key是可学习的参数. EntNet笔记见Recurrent Entity Network笔记
Key Hashing
对于question
Key Addressing
Value Reading
answering
这里
KB triple
KB triple 包含{subject, relation, object},使用KB作为memory时,
sentence Level
key和value相同,都是sentence,这就和MemN2N模型一样了
window Level
将文本分割成窗口(window),每个窗口包含W个单词。每个窗口的中心单词是一个entity.
window+Center Encoding
同window Level类似,不过它将vocab_size
window + Title
某些问题的答案可能在文章标题中,所以考虑将title写入记忆中
作者建立了WikiMovies数据集,包含三种不同形式的数据,用来比较基于KB,IE和直接读取文本三种方法的性能。在三种数据形式上,KV-MemNN都比其他的方法效果好.