Reading Wikipedia to Answer Open-Domain Questions
这篇论文介绍了一个回答开放提问的模型。选择用维基百科中的一部分来作为答案。
In order to answer any question, one must first retrieve the few relevant articles among more than 5 million items, and then scan them carefully to identify the answer.
整个模型分为两个部分,首先得到于问题相关度最高的五篇文章,然后再从这五篇文章中得到相应的回答。
- Document Retriever, a module using bigram hashing and TF-IDF matching designed to, given a question, efficiently return a subset of relevant articles
- Document Reader, a multi-layer recurrent neural network machine comprehension model trained to detect answer spans in those few returned documents.
1.Document Retriever
参考传统的QA模型,我们利用一种高效率的文件检索系统去缩小答案范围。文章和问题的相关性用基于TF-IDF的词贷模型表示。
We further improve our system by taking local word order into account with n-gram features. Our best performing system uses bigram counts while preserving speed and memory efficiency by using the hashing of (Weinberger et al.,2009) to map the bigrams to 224 bins with an unsigned murmur3 hash.
这里提到的bigram hashing大概是feature hashing的一种。将特征用哈希值表示出来。
但是没太明白对这个任务的帮助所在。
总的来说第一部分的筛选方法比较传统也比较容易实现。
2.Document Reader
这部分应该是模型的重点所在。
对于一个含有l个token的问题 -> q1,q2…ql
对于文章,以段落为单位。假设段落包括了m个单词 -> { p1,…pm }
we develop an RNN model that we apply to each paragraph in turn and then finally aggregate the predicted answers.
2.1 Paragraph encoding
文章的表示就是将单词的feature vector输入RNN(双向LSTM)得到。
一个词的feature vector包括了以下部分
Word embedding
Exact match
这个其实就是判断词语之间是否等价。包括original, low-ercase or lemma form
Token features
加入了NER,POS和IF三种feature
Aligned question embedding
这里也用到了注意力机制。计算出段落中单词和问题单词之间的attention score。 faligh(pi)=∑jai,jE(qj)
这里不知道是把几种feature直接拼起来了还是怎么的。
2.2 question encoding
在word embedding上面加一个RNN,然后把每一时刻的隐藏层结合起来。 q=∑jbjqj
bj 表示提问的每个单词的重要性。需要学习出来。
2.3 prediction
对于一个段落来说,模型的目的是找到答案的起始位置和终止位置。
Concretely,we use a bilinear term to capture the similarity between pi and q and compute the probabilities of each token being start and end as:
可以限制最大长度,最后得到
Ps∗Pe
的最大值就是答案。