Multi-Hop Paragraph Retrieval for Open-Domain Question Answering
任务
多跳开放域问题回答(QA)任务,需要同时进行文本推理和高效搜索。本文提出了一种检索多个支持段落的方法,这些段落嵌套在一个庞大的,包含回答一个给定问题的必要证据的知识库中。
方法(模型)
本文提出的方法通过形成一个问题和段落的联合向量表示来反复检索支持性段落。检索是通过考虑知识源中段落的上下文句子层面的表示来进行的。
- 任务定义:
( K S , Q , A ) (KS, Q, A) (KS,Q,A)
Background knowledge source: K S = P 1 , P 2 , . . . , P ∣ K S ∣ KS = {P_1, P_2, . . . , P_{|KS|}} KS=P1,P2,...,P∣KS∣
由 l i l_i li 个tokens组成的文本段落: P i = ( p 1 , p 2 , . . . , p l i ) P_i = (p_1, p_2, . . . , p_{l_i}) Pi=(p1,p2,...,pli)
m个tokens组成的段落: Q = ( q 1 , q 2 , . . . , q m ) Q = (q_1, q_2, . . . , q_m) Q=(q1,q2,...,qm)
n个tokens组成的答案: A = ( a 1 , a 2 , . . . , a n ) A = (a_1, a_2, . . . , a_n) A=(a1,a2,...,an)
- 目标:
使用背景知识源KS找到对问题Q的答案A。
A = φ ( Q , K S ) A = φ(Q, KS) A=φ(Q,KS)
- 方法:
MUPPET (multi-hop paragraph retrieval)
两个组件
paragraph and question encoder
- 段落编码不依赖于问题。
paragraph reader
使用MIPS(maximum inner product search)算法检索最有可能包含答案的段落,然后将的段落传递给阅读器模块,提取问题最有可能的答案。
支持多跳检索:
对于问题 Q Q Q,编码为 q q q,转换成搜索空间向量 q s q^s qs,用来检索(使用MIPS算法)top-k相关段落 P 1 Q , P 2 Q , . . . , P k Q ⊂ K S {P^Q_ 1, P^Q _2, . . . , P^Q_ k} ⊂ KS P1Q,P2Q,...,PkQ⊂KS,从检索段落中重构搜索向量, { q ~ 1 s , q ~ 2 s , . . . , q ~ k s } \{\tilde q^s_ 1, \tilde q^s_ 2, . . . , \tilde q^s_ k\} {q~1s,q~2s,...,q~ks},再执行一遍检索过程,可检索出下一个top-k相关段落。
模型结构:
Paragraph and Question Encoder
段落P由k个段落组成
P = ( s 1 , s 2 , . . . , s k ) P=(s_1, s_2, . . . , s_k) P=(s1,s2,...,sk)
每个段落由 l l l个tokens组成
s i = ( t i 1 , t i 2 , . . . , t i l ) s_i=(t_{i_1}, t_{i_2}, . . . , t_{i_l}) si=(ti1,ti2,...,til)
l l l:句子长度
编码:
(
s
1
,
s
2
,
.
.
.
,
s
k
)
=
f
(
P
)
(s_1, s_2, . . . , s_k)= f(P)
(s1,s2,...,sk)=f(P)
q = f ( Q ) q = f(Q) q=f(Q)
Word Embedding
t w t^w tw:word-level embedding 通过预训练的Word Embedding获得。
t c t^c tc:character-level embedding
token t 有
l
t
l_t
lt个字符
(
t
1
c
,
t
2
c
,
.
.
.
,
t
l
t
c
)
(t_{1}^c, t_{2}^c, . . . , t_{l_t}^c)
(t1c,t2c,...,tltc)
t
c
=
m
a
x
(
C
N
N
(
t
1
c
,
t
2
c
,
.
.
.
,
t
l
t
c
)
)
t^c= max(CNN(t_{1}^c, t_{2}^c, . . . , t_{l_t}^c))
tc=max(CNN(t1c,t2c,...,tltc))
连接两种嵌入形式:
t
=
[
t
w
;
t
c
]
t = [t^w; t^c]
t=[tw;tc]
Recurrent Layer
获得word representations之后,通过BiGRU获得 contextualized word representations。
(
c
1
,
c
2
,
.
.
.
,
c
m
)
=
B
i
G
R
U
(
t
1
,
t
2
,
.
.
.
,
t
m
)
(c_1, c_2, . . . , c_m) = BiGRU(t_1, t_2, . . . , t_m)
(c1,c2,...,cm)=BiGRU(t1,t2,...,tm)
Sentence-wise max-pooling
使用max-pooling获得sentence representations。
s
i
=
m
a
x
(
c
i
1
,
c
i
2
,
.
.
.
,
c
i
l
)
s_i=max(c_{i_1}, c_{i_2}, . . . , c_{i_l})
si=max(ci1,ci2,...,cil)
Reformulation Component
使用recurrent layers初始化问题Q和段落P的编码。
( c 1 q , c 2 q , . . . , c n q q ) (c^q_ 1, c^q_ 2, . . . , c^q_{ n_q}) (c1q,c2q,...,cnqq)
( c 1 p , c 2 p , . . . , c n p p ) (c^p_ 1, c^p_ 2, . . . , c^p_{ n_p}) (c1p,c2p,...,cnpp)
传递给bidirectional attention layer。使用ReLU作为激活函数。最终得到reformulated question representation, q ~ \tilde q q~
Reformulation Component图示:
![image-20210506145716584](https://i-blog.csdnimg.cn/blog_migrate/d5dddb12c6e84497639b79704900d062.png)
Sentence Encoder 图示:
![image-20210506145106251](https://i-blog.csdnimg.cn/blog_migrate/1e709355518a3669544ce4eb81570908.png)
Paragraph Reader
段落阅读器接输入为问题Q和段落P,并从P中提取最可能的答案跨度。
数据集
- HotpotQA
- SQuAD-Open
性能水平和结论
- HotpotQA数据集:
在HotpotQA distractor setting下,Joint EM和F1评分提升最为显著,分别提升了17.12和13.22。
在HotpotQA full wiki setting下,MUPPET在段落级别编码时,性能要优于句子级编码。
- SQuAD-Open数据集:
![image-20210507111825276](https://i-blog.csdnimg.cn/blog_migrate/85cfd13eab32b7e1df795457ec91ab44.png)
在SQuAD-Open数据集上,句子级别编码的MUPPET取得了最优的性能,表明本文提出的编码器不仅适用于多跳问题,还可以用于单跳问题。
结论:
本文提出的MUPPET,用于多跳段落检索在单跳和多跳QA数据集上都取得了不错的效果。