본문 바로가기
AI 관련/논문 리뷰

[논문 리뷰] Dense Passage Retrieval for Open-Domain Question Answering

by 세계 최고의 AI Engineer_naknak 2024. 3. 4.

https://arxiv.org/pdf/2004.04906.pdf
Dense Passage Retrieval for Open-Domain Question Answering

요약 : 기존의 Sparse 한 Vector에서 Retrieve를 하는 게 아닌 Dense Passage Retrieval을 통해 QA를 더 효율적으로 할 수 있게 한다.
내가 이해한 바로 Dense Passage는 Docs를 Passage로 쪼개고 이 passage를 batch 단위로 나눠서 (Q, p-정답, p-오답, 오답...) 으로 한 다음에 B(B-1) 만큼 학습 데이터를 확보하도록 함



-------
https://gbdai.tistory.com/72

본 연구에서 제안하는 dense passage retriever(DPR)는 open-domain QA task에서 사용되는 retriever이며, passage(document)들을 low-dimensional and continuous space에서 indexing 하고, 이를 바탕으로 효과적으로 input text와 관련 있는 top-k개의 passage를 retrieve 함이 목적이다. 아래의 figure는 이 과정을 나타낸다.

(https://blog.kakaocdn.net/dn/byusRw/btso9gSjatI/23aN2D5A5syECq3q385bNk/img.png)

DPR이 위의 목적을 달성하기 위해서는, 우선적으로 passage를 low-dimensional and continuous space로 mapping해주는 encoder가 필요하다. 논문에서는 해당 encoder를 dense encoder $E_p()$라고 한다. $E_p()$는 passage의 정보를 잘 담고 있는 passage representation을 만들어낸다

또한, input text도 representation으로 변환해야만 두 representation의 유사도를 측정하여 relevant top-k passage를 골라낼 수 있다. 이를 위해 input text를 input representation으로 만들어주는 encoder $E_Q()$를 둔다

이렇게 두 encoder를 통해 만들어진 두 representation의 유사도를 구하여 relevant top-k passage를 선정하게 된다. 본 연구에서는 아래와 같이 dot product로 두 representation 간 유사도를 측정한다

(https://blog.kakaocdn.net/dn/dhpadf/btspdKrMMAx/ihUXnEEZxU3q1Ck8xiwNG1/img.png)

#### **Training**

DPR을 학습시킨다는 것은, representation을 잘 만들어내는 encoder가 되게끔 학습을 시키는 것이다.

즉, question과 passage 쌍이 서로 관련 있으면 smaller distance를 가지고, 관련이 없으면 bigger distance를 가지는 representation을 산출하는 encoder로 만들어간다는 것인데, 이를 위한 loss function은 아래와 같다

(https://blog.kakaocdn.net/dn/bcONmF/btso8yFACVu/vOE9SHNqU54TsR5CU5D4a0/img.png)

또한, m개의 instance로 구성된 Training Dataset D는D={⟨qi,p+i,p−i,1,…,p−i,n⟩} 이라고 하며, 위 수식에서 각각의 요소들은 아래와 같은 뜻을 가진다

- qi : question
- p+i : relevant(positive) passage
- p−i,j : irrelevant(negative) passage

댓글