--- ###### tags: `information retrieval` --- # Dense Passage Retrieval for Open-Domain Question Answering `EMNLP 2020` 本文提出只需要用少量的 question 和 passage pair 就能訓練 dense representation model 的方法,來解決 + TF-IDF 或是 BM25 受限於**字詞上的比對**,無法使用語意搜索 + 學習 dense-representation 需要**大量資料**來訓練 ## 方法  ### Dual-Encoder 架構 獨立的 question encoder $E_Q$ 和 passage encoder $E_P$ 來幫 query 和 passage 產生 embedding,最佳化相關 question 和 passage 的 dot-product 相似度 ### Inference 階段 FAISS 搜索 $E_Q(q)$ 和 $E_P(p)$ 之間的 dot-product 相似度 ### Encoders BERT_base model,使用 CLS token ### loss function 拉近 $q$ 和 Positive 的距離,拉遠 Negative 距離 + Question $q$ + Positive passages $P^{+}$ + Negative passages $P^{-}$ <img src="https://i.imgur.com/U1sOJDh.png" style="width:400px"> 訓練重點在於如何選出==難度高的 Negative passages==,本文提出三種方式 + Random + BM25: bm25 高相似度但不是答案 + Gold: positive passages paired with other questions + **In-batch negatives** 方法可以減少運算,又帶來一定的效能 ### In-batch negatives 假設 batch 內有 $B$ questions,每個 question 都有和其相關的一個passages,D 為 question 和 passage embedding 的維度 我們可以得到相似矩陣 $S$,代表 queries 和 passages 的相似度 $$ Q \in R^{B \times D} \\ P \in R^{B\times D} \\ S = QP^T \in R^{B \times B} $$ 我們能重複利用計算好的 embedding,輸入 B 個 query 和其 passages 就能有 B-1 個 negative passages ## 實驗 ### 資料集 <img src="https://i.imgur.com/GzJ3o3a.png" style="width:500px"> 由於 TREC, WebQuestions and TriviaQA 資料集內只提供 question 和 answer,沒有 passages,所以用 BM25 找出**最高相似度**且**包含答案**的 passage 當作 positive passage,如果 top-100 都不符合條件則捨去該 question。 QuAD and Natural Questions 已經提供 passages,將 passages 和 candidate pool 配對作為 positive passage **candidate pool**: `English Wikipedia dump from Dec. 20, 2018` ### 分數 DPR 除了 SQUAD 都比 BM25 厲害 + Training 欄位表示 encoder 對於每個資料獨立 (single) 或是共用 (multi) + 實驗設置為 negative 為 127 (in-batch) + 128 (BM25) + 因為 TREC 資料集很小,透過 multi 的上升最多, + TriviaQA 和 NQ 沒什麼提升甚至下降 + SQUAD 分數比 BM25 糟糕,推測是因為 SQUAD 是讓人類從 passage 中圈出答案,BM25 是字詞比對方式很適合在這資料集上  ### Negative 選擇 額外為每個 query 選出 1~2個 BM 25最高分結果作為 negative <img src="https://i.imgur.com/55Lj8EI.png" style="width:500px"> ### Sample efficiency DPR 在使用 1K 筆資料後的表現就比 BM25 好 <img src="https://i.imgur.com/fzlnO98.png" style="width:500px">
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up