Differentiable open-ended commonsense reasoning 閱讀筆記
===
###### tags: `paper`, `public`
[原始論文](https://arxiv.org/pdf/2010.14439.pdf)
[code](https://github.com/yuchenlin/OpenCSR)
Abstract
===
- OpenSCR是一種評估模型推理能力的方法(?)
- DRFACT 用於對知識事實進行多跳推理
- 為了評估OpenCSR方法,作者適應了三個流行的多選擇數據集,並通過群眾外包收集了每個測試問題的多個新答案。
1 Introduction
===
- 現有的常識推理模型通常通過對問題—候選答案對進行評分來工作
- 通識常識事實語料庫中離線提取的大量與問題獨立的候選概念集合中產生一個排序的答案列表。
OpenCSR問題
---
- 通過問題本身從語料庫中檢索出相關的事實
多跳推理
---
- 從多個事實中進行推理,而不是僅依靠一個或幾個事實來回答問題
- OpenCSR中沒有可用的標註來幫助模型識別哪些事實需要被用於推理鏈,唯一的監督信號只有一組問題和答案
- 多數常識問題都需要進行跨概念的推理,但如「樹木」、「二氧化碳」、「大氣」和「光合作用」這些概念之間的關係很難用一個簡單的知識圖譜(KG)來表示。
- 知識圖譜(KG)
- 解決方法 : 常識語料庫(如GenericsKB)
- 一個收集了大量自然語言句子的語料庫,其中包含了許多具有共通性的常識事實,例如「樹木透過光合作用將二氧化碳從大氣中移除」。我們可以從這樣的語料庫中提取出事實
→ how can we conduct multi-hop reasoning over such a knowledge corpus, similar to the way multi-hop reasoning methods traverse a KG?
→ can we achieve this in a differentiable way, to support end-to-end learning?
- differentiable way
當一個模型是「可微分的」,代表著當我們對該模型進行訓練時,我們可以使用基於梯度的優化方法來找到最佳的模型參數,以最大化模型的性能。換句話說,如果模型是可微分的,那麼我們可以通過在模型中獲得對模型參數的梯度,來調整模型的參數,使其更好地擬合訓練數據,從而提高模型的性能。Ex. 線性回歸模型可微分
- end-to-end learning
在 end-to-end learning 中,我們將整個模型看作一個黑盒,只需要提供輸入和期望輸出,然後讓模型自己學習如何提取特徵和進行分類
- Multi-hop reasoning
指透過多個步驟來推理知識圖譜(Knowledge Graph)中的概念之間的關係。在知識圖譜中,每個概念都是一個節點,並且概念之間的關係可以表示為邊。透過多步推理,可以跨越多個節點和邊,從而推理出概念之間的複雜關係。
DRFACT
---
- formulate multi-hop reasoning over a corpus as an iterative process of differentiable fact-following operations over a hypergraph
- 把corpus 中的句子都encode成dense vector 去組成一個neural fact index,如此一來就可以在maximum inner product search (MIPS)做快速索引
- neural fact index : 將事實encode 成vector,這些向量就構成了一個neural fact index,可以用於快速檢索相關事實。例如,如果我們想知道英國的首都是什麼,我們可以計算每個向量與“英國的首都是什麼”這個向量的內積,並選擇最大的內積對應的事實。
- MIPS(之後有空在研究)
- 使用簡單的線性搜尋,需要逐個計算所有向量的內積
MIPS 是一種可以加速最大內積搜尋的方法,基於一個稱為「倒排索引表」的資料結構。在 MIPS 中,我們首先將所有向量進行分組,將每個向量的內積相當於「該向量所屬的組」和「輸入向量 $q$ 所屬的組」之間的內積,這樣可以大大減少需要計算的向量數量。
- fact-to-fact矩陣
- 存儲事實之間的符號鏈接(例如,如果兩個事實共享共同的概念,則它們會被連接)
<big>**evaluate OpenCSR methods**</big>
為了評估DRFACT方法而創建的OpenCSR數據集,並使用Crowd-sourcing人工標注來為測試問題收集多個新答案
2 Related Work
===
Commonsense Reasoning
---
- 最近常識推理 (CSR) 的一些方法,大多聚焦在多選題 QA 上然而,這些方法不太適用於實際應用中,因為通常不會有可用的答案候選者。
- UnifiedQA 和其他closed-book QA models可以生成問題的答案,但缺點是它們不提供答案的supporting evidence,這使得它們不太可信。
- closed-book models exist that are augmented with an additional retrieval module: 但這些模型主要適用於單跳推理。
QA over KGs or Text
---
- triple-based symbolic commonsense knowledge graphs (CSKGs)(例如“物體1”、“屬性”、“物體2”)中,由於其僅描述兩個實體之間的關係,所以在表示複雜的常識知識時可能受到限制。
- triple-based symbolic commonsense knowledge graphs (CSKGs)不能處的三元關係範例
ex. 「小明是這個班上最高的學生」:這個關係包含三個元素,分別是「小明」、「這個班」和「最高」。其中,「小明」和「這個班」是實體,「最高」是描述性詞語。
- GenericsKB (corpus of generic sentences about commonsense facts) :
- text can represent more complex commonsense knowledge, including facts that relate three or more concepts.
- OpenCSR might need interative retrieval(迭代檢索)
- OpenCSR provide fewer hints surface of the commnense questions
- surface hints
例如,在open-domain QA任務的一個問題中,“誰是美國的第一任總統?”這個問題中包含了“美國”、“第一任總統”等關鍵詞,這些關鍵詞就提供了關於回答這個問題所需要的一些線索。因此,這個問題的答案可以通過單個步驟的推理得到。
相比之下,OpenCSR任務的問題通常涉及更複雜的常識推理,問題的“表面信息”相對較少。例如,“為什麼貓喜歡捉老鼠?”這個問題中並沒有直接給出答案所需要的線索,回答這個問題需要涉及到多個概念(如貓、老鼠、狩獵等)之間的多層次推理過程。因此,OpenCSR任務對於常識推理的難度更高。
Multi-Hop Reasoning
---
- recent model using multi-hop reasoning through iterative retrieval(GRAFT-Net (Sun et al., 2018), MUPPET (Feldman and El-Yaniv, 2019), PullNet (Sun et al., 2019), and GoldEn (Qi et al., 2019)) are not end-to-end differentiable, so they are slow
- Neural Query Language (Cohen et al., 2020) :
- differentiable multi-hop
- entity-following templates for reasoning over a compactly stored symbolic KG
- 但KG只能處理二元關係
<font size="5">**DrKIT**</font>
| DrKIT | DRFACT |
| --- | --- |
| multi-hop between entities | multi-hop between facts |
| 1) finding mentions of new entities x’ that are related to some entity in X, guided by the indices, and then<br>2) aggregating these mentions to produce a new weighted set of entities. | |
| differentiable | differentiable |
| only named entities | |
| entity | fact |
| --- | --- |
| 具體的事物或概念 | 這些entities之間的關係 |
| 節點 | 邊線 |
| ex. 人、地點、組織、事件 | ex. “John是某個組織的CEO”、“Paris是法國的首都” |
---
3 Open-Ended Commonsense Reasoning
===
Task Formulation
---
- F: corpus of knowledge facts
- sentence that describes generic commonsense knowledge
- ex. “trees remove carbon dioxide from the atmosphere through photosynthesis.”
- V: denote a vocabulary of concepts
- noun or base noun phrase mentioned frequently in these facts
- ex. ‘tree’ and ‘carbon dioxide’
- q: question
- answer it by returning a weighted set of concepts, such as {(a1=‘renewable energy’, w1), (a2=‘tree’, w2), . . . }, where wi ∈ R is the weight of the predicted concept ai ∈ V.
- to be an interpretable, trustworthy reasoning models, it is expected that models can output intermediate results that justify the reasoning process
- i.e., the supporting facts from F. E.g., an explanation for ‘tree’ to be an answer to the question above can be the combination of two facts: f1 = “carbon dioxide is the major ...” and f2 = “trees remove ...”
Implicit Multi-Hop Structures
---
| Commonsense questions | multi-hop factoid QA |
| --- | --- |
| more implicit and relatively unclear | focus on querying about evident relations between named entities. |
| the reasoning process can be implicit and relatively unclear | the reasoning process can be decomposed into more specific qs |
| ex.<br>question: “what can help alleviate global warming?”<br>→<br>q1 = “what contributes to global warming”<br>q2 = “what removes q1. answer from the atmosphere”<br> ==— but many other decompositions are also plausible== | ex.<br>question: “which team does the player named 2015 Diamond Head Classic’s MVP play for?”<br>→<br>q1 = “the player named 2015 DHC’s MVP” <br>q2 = “which team does q1. answer play for” |
| 指需要透過人們對於一般常識的了解才能回答的問題 | 多個事實之間進行多次推理才能回答的問題 |
- unlike HotpotQA 我們沒有任何標準答案或事實作為訓練數據的依據
4 DrFact: An Efficient Approach for Differentiable Reasoning over Facts
===

Figure 3
<small>The overall workflow of DRFACT. We encode the hypergraph (Fig. 2) with a concept-to-fact sparse matrix E and a fact-to-fact sparse matrix S. The dense fact index D is pre-computed with a pre-trained bi-encoder. A weighed set of facts is represented as a sparse vector F. The workflow (left) of DRFACT starts mapping a question to a set of initial facts that have common concepts with it. Then, it recursively performs Fact-Follow operations (right) for computing Ft and At. Finally, it uses learnable hop-weights αt to aggregate the answers</small>
**<font size="5">總結步驟大綱</font>**
1. 預處理
製作**Sparse Fact-to-Fact Index (S)**和**Dense Neural Fact Index (D)**(Bi-encoder產生),以計算fact和fact之間的相似度
2. fact-following
1. sparse retrieva
將Ft-1傳入S矩陣中取得可能的Fst
Fst = Ft-1S
2. dense retrieval
1. 將Ft-1經過D轉為zt-1
zt-1 = Ft-1D
2. 再將zt-1和qt傳入MLP得到**ht−1**
ht-1 = g(zt-1,qt)
3. 使用MIPS(maximum inner product search)在D上用ht−1搜尋next-hop的前K個相關事實,即Fdt
Fdt = MIPS_k(ht-1,D)
3. element-wise multiplication
Ft = Fst ⊙ Fdt
4. At
1. 將Ft經過fact-to-concept matrix E產生At(set)
2. $A = \sum_{t=1}^T(\alpha_tA_t)$
5. 改進成self-following
t = Fact-Follow(Ft−1, q) + Filter(Ft−1, τ)
6. 學習讓**predict ans接近real ans** 和 *強化模型在多跳推理中使用的遠程證據對模型訓練的貢獻*
$$\lambda = l(A,A^*)$ +\frac{1}{T} \sum_{t=1}^{T}{l(F_t,F_t^*)}$$
4.1 Overview
---

- reasoning model will traverse hypergraph
- each hyperedge corresponds to a fact in F and connects the concepts in V
- 因為hyperedge (F)連接了提到的concepts (V),這樣的方式可以保留原始自然語言陳述的上下文信息。
1. 從question(concepts)開始traverse hypergraph, 最終經過多個hyperedge(facts)到達a set of cpncept nodes.
2. 我們想得到每個c (c ∈ V) 作為問題q的答案的可能性P(c|q)
3. Ft表示a weighted set of retrieved facts at 第t次hop, and F0 for the initial facts below
4. 我們迭代搜尋facts作為下次hop,最終我們用搜尋到的fact幫concept評分
5. (我們會將每次搜尋得到的一些事實(facts)加入到已經搜尋到的事實中,進而擴大已知的事實集合。這樣可以幫助模型更好地理解問題,並找到更精確的答案。而在最後一步,我們使用已經搜尋到的事實來幫每個候選答案(即V中的每個概念)進行評分,以判斷哪個答案最可能是正確的答案。)chatgpt不知道從哪知道的
4.2 Pre-computed Indices
---
- **Dense Neural Fact Index D**
- pre-train a bi-encoder architecture over BERT
- bi-encoder
[BERT to bi-encoder](https://www.notion.so/BERT-to-bi-encoder-b6d4254e10ef4b2c9ba732ca873cc106)
Bi-encoder是用於計算兩個文本之間相似度的一種方法。其中一個文本作為“query”(即問題),另一個文本則作為“candidate”(即可能的答案)。Bi-encoder將這兩個文本都嵌入到相同的向量空間中,然後計算它們之間的相似度得分
- 學習最大化含有question的正確答案的facts的分數
- 用MIPS再facts去做dense搜尋
- pre-train後,把fact F都embed成dense vector (使用 [CLS] 標記表示)
- D is a |F| × d dense matrix
- **Sparse Fact-to-Fact Index S**
- 通過一組連接規則去pre-compute facts 之間的sparse links(稀疏連接)
- ex. fi→fj when
- fi and fj has a least one common concept
- & fj 引入了至少兩個不在fi中的新concept
- S is a binary spare tensor(張量),舉有dense shape |F|×|F|
-
- **Sparse Index of Concept-to-Fact Links E**
- a concept can appear in multiple facts
- a fact usually mentions multiple concepts
- ⇒ 把每個fact和每個concept之間共同出現的情況encode成一個 sparse matrix with dense shape |V|×|F| (也就是concept-to-fact index)
- 將所有的concept與相關聯的fact之間的關聯性以稀疏矩陣的形式表示出來的索引
4.3 Differentiable Fact-Following Operation
---
<font size="5">fact-following framework</font>
- **P (Ft | Ft−1, q)** : 在問題q的背景下從一個fact到另一個fact的轉換model
- **S(Sparse Fact-to-Fact Index)** : Sij。直觀地說,如果我們可以從fi到fj進行遍歷,這些fact應該提到一些共同的concep
- 具體來說,稀疏矩陣 S 中的每一行代表一個事實,每一列代表一個特定的特徵,當 Ft-1 的向量表示通過矩陣乘法與 S 相乘時,會獲得一個長度為 S 的列向量,其中每個元素表示 Ft-1 和對應事實之間的相似性得分。通過對得分進行排序,可以獲得可能的下一個事實。
- **D(Dense Neural Fact Index)** 包含了每個fact的與一訊息,可用於衡量一個fact在某question下的可信度
- 使用TensorFlow的tf.RaggedTensor結構implement
<font size="5">fact-follow operation</font>
<font size="4">**sparse retrieva**</font>
- uses a fact-to-fact sparse matrix to obtain possible next-hop facts
- 作者使用了 TensorFlow 中的 tf.RaggedTensor 來存儲 S 矩陣,該方法可以節省大量的存儲空間和計算資源,可以高效地計算
取得下一跳的fact,Fst (a set)
$F_t^s = F_{t-1}S$
<font size="4">**dense retrieval**</font>
1. **將Ft-1作為input經過D得到一個密集向量zt-1**
- **zt-1**: Ft-1 集合中所有事實的向量表示聚合成的一個向量,它表示當前時間步前的所有事實的綜合信息。
$z_{t-1} = F_{t-1}D$
2. **將zt-1和qt傳入模型**
$h_{t-1} = g(z_{t-1},q_t)$
- **qt**: 是當前步驟的查詢向量,它基於輸入的question和先前的查詢向量計算而來,簡單來說,qt 是當前步驟的查詢
- **g()**: MLP(一種深度學習模型,也稱為fact-translating function),計算前一步的事實向量 zt-1 和當前步驟的查詢向量 qt的相似性得分
- **ht−1**: query vector a dense vector that has same dimemsionality as fact vector(zt-1)
$F_t^d = MIPS_k(h_{t-1},D)$
- 使用maximum inner product search (MIPS) 在 D上用ht−1搜尋next-hop的前K個相關事實,即Fdt
3. **element-wise multiplication**
- To get the best of both symbolic and neural world
- $F_t = F_t^s ⊙ F_t^d$
$\begin{split}F_t&=Fact-Follow(F_{t-1},q)\\&=F_{t-1}\odot MIPS_k(g(F_{t-1D,q_t},D))\end{split}$
4. **concept predictions**
1. **At** (a set of concept predictions) : multiply **Ft** with a precomputed **fact-to-concept matrix E →** At
2. **concept scores :**
- 好像是從At找出有提到concept c的facts中,分數最大的分數去aggregate the concept scores
- 好像是用於更新Pre-computed Indices中的S和D矩陣
3. $A = \sum_{t=1}^T(\alpha_tA_t)$
- αt is a learnable parameter (請看==Appendix B==)
5. **self-following**
- $F_t = Fact-Follow(F_{t−1}, q) + Filter(F_{t−1}, τ )$:
- a random-walk process on the hypergraph associated with the corpus.
- self-following
- performance improved
- augmenting(增加) Ft with the 高於threshold τ 的 Ft−1:
Ft = Fact-Follow(Ft−1, q) + Filter(Ft−1, τ )
- Ft 包含和自己高度相關的facts (distance t’<t),在不同的問題可能需要不同數量的推理步驟的情況下,可以improve model.
<font size="5">Initial Facts</font>
compute **initial facts F0**
1. 找到和question相關的facts
- 透過 MIPS 搜尋 **pre-trained bi-encoder and the associated index D** 找到和question q相關的facts
2. 找包含question concepts的facts
- 然後從使用concept-to-fact index E搜尋到的有包含question concepts的facts挑選
4.4 Auxiliary Learning with Distant Evidence
---
<font size="5">**Intermediate evidence**</font>
is important, weakly supervised setting hard to get the
<font size="4">To get supporting facts (有點雜訊)</font>
- using **distant supervision** <small>train by question</small> as dense retriecal
- pair question and its best answer to build query to our **pre-trained index D**
- 然後將結果分成四組
- 1) question-answer facts, 2) questiononly facts, 3) answer-only facts, and 4) none-facts
<font size="4">to get a 2-hop evidence chain</font>
- 確認只關於question的fact是否可以透過**sparse fact-to-fact matrix S**連接到只關於answer的fact
然後繼續收集所有facts set = {F∗ 1, F∗ 2, ...., F∗ T }
<font size="4">最終學習目標</font>
- optimize **concepts A** 和 **answer set $A^*$** 的 cross-entropy loss的final weighed set
- 目標是最小化預測結果和正確答案之間的距離
- $l(A,A^*)$
- optimize auxiliary loss from **distant evident**, 也就是predicted facts $F_t$ 和 distant supporing facts $F_t^*$之間hop-wise loss 的平均值
- 目標是提高模型在訓練中使用的遠程證據對模型訓練的貢獻
- 通過計算模型在每個推理步驟上預測的事實集合與實際事實集合之間的距離,從而強化模型在多跳推理中使用的遠程證據對模型訓練的貢獻
- $\frac{1}{T}\sum_{t=1}^{T}{l(F_t,F_t^*)}$
- $\lambda = l(A,A^*) +\frac{1}{T} \sum_{t=1}^{T}{l(F_t,F_t^*)}$
5 Experiments
===
5.1 Experimental Setup
---
<font size="5">Fact corpus and concept vocabulary</font>
- GenericsKB-Best corpus
- 包含了1,025,413個唯一的fact(F)
- 用***spaCy***工具對語料庫中的所有句子進行了預處理,並提取了至少被提及3次的名詞短語作為concept。這個 vocabulary V包含了80,524個concepts
<small>spaCy 是一個用於NLP的library。它提供tokenization)、詞性標註 (part-of-speech tagging)、named entity recognition、dependency parsing、word vectors...。spaCy 的優點之一是速度較快,也因此常被用在處理大量文本的應用場景中。</small>
- reformatted three existing multi-choice question answering datasets to allow evaluating OpenCSR methods
- QASC, OBQA,and ARC
- their questions require commonsense
knowledge about science and everyday objects
<font size="5">Datasets for OpenCSR</font>
- datasets
- $使用了crowd-workers(眾包工作者)來收集每個測試問題的更多答案 \rightarrow 7.5 answers per question on average$
- dataset難易度: percentage of “single-hop questions”
-==即能夠找到包含問題概念和答案概念的事實(從BM25檢索的前1k個事實中)==

<font size="5">Evaluation metrics</font>
>$q \rightarrow A = {(a1, w1),(a2, w2) . . . }$
- A : a weighted set of concepts
- $A^*$ : the set of true answer concepts
**Hit@K accuracy**
- 我們能不能在A(sorted in descending order of weight)的前K個concept裡找到至少一個正確answer concept
**Rec@K**
- As questions have multiple correct answers, ==recall== is also an important aspect for evaluating
- the average recall of the top-K proposed answers
5.2 Baseline Methods
---

<font size="5">Direct Retrieval Methods</font>
- use the concepts mentioned in the top-ranked facts as answer predictions
- 利用先前使用BM25檢索到的事實來訓練DPR模型
- BM25 : unsupervised method for retrieva
- Dense Passage Retrieval (DPR) model : state-of-theart trainable, neural retriever
- score concept 的方法
- 用DPR對BM25所檢索到的所有facts做相關性的打分,取其中最大者
><small>BM25
>假設一個查詢q包含{q1...,qn}n個詞和一個文檔d,BM25計算其相似度的方式是先計算qi在所有文檔中的的IDF,再乘上qi在d的TF,最後再使用b參數去調整要考慮是否要對長文做懲罰,以及使用k參數去控制TF的對相似度的影響</small>
><small>DPR(Dense Passage Retrieval)
>PR模型通過兩個步驟來實現檢索。首先,它使用一個檢索器網絡來將大量文本段落轉換為向量表示形式,這些向量可以被存儲在一個索引中。然後,當用戶提出問題時,DPR模型將問題轉換為向量表示形式,然後在索引中搜索相關的文本段落。最終,它返回最相關的文本段落作為回答</small>
><small>如何使用BM25檢索到的事實來訓練DPR模型?
>當使用BM25來檢索與問題相關的事實時,每個檢索到的事實可以被視為一個樣本,其中正樣本是與問題答案相關的事實,負樣本則是與問題答案無關的事實</small>
<font size="5">DrKIT</font>
- DrKIT和DRFACT之間的主要區別在於它們處理知識的方式不同
- DrKIT : a graph of entities and entity mentions
- 如果兩個實體在同一句話被提及,兩個實體就會被連接起來
- DRFACT : hypergraph of facts
<font size="5">Multiple-choice style re-ranking (MCQA)</font>
- fine-tune a pre-trained language model such as BERT
1. 將一個問題和一個特定的concept組合成一個新的序列,這個序列以"[CLS]question[SEP]choice"形式,[CLS]被用來表示問題,[SEP]被用來分隔問題和候選答案concept
2. 這個序列被送入模型進行訓練,模型學習如何對多個概念進行打分
><small>[CLS]和[SEP]
>通常在使用Transformer-based的模型中會使用到,其中[CLS]代表的是classification token,[SEP]代表的是sequence separator token。
>假設問題是 "What is the capital of France?",並且有三個候選概念:"Paris", "London", "Berlin"。要將這些信息組合成一個完整的輸入序列:[CLS] What is the capital of France? [SEP] Paris [SEP] London [SEP] Berlin [SEP]
</small>
-
5.3 Results and Analysis
---
<font size="5">Main results</font>

- DRFACT在所有數據集和指標上均優於所有基線方法
- 在QASC和OBQA數據集上的表現增益比ARC更大,maybe cause by former two have more multi-hop questions
- DRFACT+MCQA(貴)可以進一步提高了模型的性能
- 在使用 MCQA 重新排序器時,DRKIT的效果不如其他方法可能是因為 DRKIT 使用的entity為中心的推理方案會產生太多可能的concept,因此更容易在前幾位給出更多不相關的concept,進而影響最終的結果。
- Rec@K: 即使是DRFACT+MCQA模型,平均只能在前100個結果中召回約50%的正確答案
- 這表明OpenCSR仍然是一個非常具有挑戰性的問題,==未來的工作應該集中在提高排名更多正確答案的能力上。 ==
<font size="5">Run-time efficiency analysis</font>

- the entity-to-mention matrix (sp_e2m) of DrKIT is much **larger** than the fact-to-fact matrix (sp_f2f ) of DRFACT, DrKIT is about twice as slow as DRFACT.
- MCQA模塊的計算成本更高,因為它為每個問題和選擇的組合進行K次BERT-Large調用
- 在這些實驗中,DrKIT的T值為2,DRFACT的T值為3,MCQA重新排序器的K值為500
- T是指在DrKIT和DRFACT可以在多少步驟內查找到答案
<font size="5">Ablation study</font>

通過改變最大跳數 (T={1,2,3}),即 Fact-Follow 方法的調用次數,研究其對 DRFACT 性能的影響
- 當 T=3 時,DRFACT 的性能最佳。當 T=2 時,OBQA 的性能下降了0.7%
- 由於數據集的特性,特別是難題的百分比所致
- 測試了模型 (T=3) 去除auxiliary learning loss (Sec. 4.4) or the selffollowing,發現它們對 DRFACT 非常重要
- selffollowing尤其有助於 QASC 和 OBQA,因為這裡有更多的多跳問題
<font size="5">MQualitative analysis</font>

- 比較DPR和DRFACT在推理方面的行為
- DPR僅使用dense retrieval,沒有任何regularization,因此會產生無關的事實
<small>regularization是一種常用的機器學習方法,通常被用來防止過擬合或者控制模型的複雜度。</small>
6 Conclusion
===
- introduce and study a new task — open-ended commonsense reasoning (OpenCSR)
- 建構了三個 OpenCSR **datasets**
- DRFACT
- scalable multi-hop reasoning method
- traverses a corpus (as a hypergraph) via a differentiable “fact-following” reasoning process
- employing both a **neural dense index of facts** and **sparse tensors of symbolic links between facts**
- using a combination of MIPS and sparse-matrix computation.
-
*Ethical Considerations
---
- Crowd-workers
- 大多數問題都涉及基礎科學和關於我們物理世界的常識。沒有任何問題涉及敏感的個人觀點或涉及可識別個人身份信息
- Data bias
- 新數據集包括多位注釋者認為正確的許多答案,而不是像先前的多選常識推理數據集一樣只包括一個正確答案和少量干擾答案,因此在文化上更加平衡。然而,在本研究中沒有系統地測量這種潛在的偏見(或偏見減少)。
- Sustainability
- 使用 Google Cloud Platform
- Application
- responses may be wrong, or biased
Appendix
===
A Constructing OpenCSR Datasets
---
<font size="5">A.1 Reformatting Questions and Answers</font>
**how to reformat the existing three datasets and crowd-source annotations of multiple answers for evaluating OpenCSR**
1. remove some QA
- questions 答案不包含V(denote a vocabulary of concepts)中的concept
- 本來就設計成只能做multiple-choice的問題
2. rephrase questions with long answers to be an open-ended question querying a single concept
- 原始問題 (Q) 和原始正確選項 (A) 組合成一段長句,並將其重新表述為一個新問題 (Q*),查詢原始答案中的單個概念 (A*)
<small>(Q:“The Earth revolving around the sun can cause ”, A:“constellation to appear in one place in spring and another in fall”) to (Q*=“The Earth revolving around the sun can cause what to appear in one place in spring and another in fall?”, A*=“constellation”)</small>
<font size="5">A.2 Crowd-sourcing More Answers
</font>
述瞭如何收集更多的答案來評估OpenCSR,以確保OpenCSR可以正確地找出多個開放式問題的正確答案。作者通過使用Amazon Mechanical Turk的三階段註釋協議來收集答案,其中包括多選題檢查、從候選項中選擇和基於Web的答案收集。
B Details of Implementation and Our Experiments
---
<font size="5">B.1 DrFact Implementation
</font>
1. Pre-training Dense Fact Index D
- 跟著這個的步驟 [Karpukhin et al. (2020)](https://aclanthology.org/2020.emnlp-main.550/) to pre-train a ==biencoder question answering model==
- 創造 negative examples : 使用了 BM25 將不包含正確答案的句子作為反例,使用BM25檢索與問題相關的文本,並將得分最低的作為負例,因為這些文本與問題不相關
- 使用 BERT-base
- "base"表示模型的規模相對較小
- 它有12個Transformer編碼器層(L-12)、每個編碼器有768個隱藏單元(H-768)和12個注意力頭(A-12),因此輸入的向量維度為768(即d=768)。 "uncased"表示在訓練BERT時,將所有文本轉換成小寫字母。
2. Sparse Fact-to-Fact Index S
- i != j We do not allow self-link here but use self-following
- |I| >= 1,其中 I 是同時在 fi 和 fj 中提到的concept集。請注意,我們從 I 中刪除了最常見的 100 個concept(例如人類)
- |I| < |fi|。當 fi 中的所有概念都在 fj 中提到時,我們不創建連接,因為這通常是多餘的
- |fj | - |I| >= 2。只有當 fj 中有超過兩個未見過的概念不在 fi 中時,我們才創建連接,以便事實對事實連接創建有效的推理鏈。我們還限制一個事實最多只能被 1k 個不同的事實跟踪。
- distant supervision of justifications
- 如果之前因為某些原因被過濾掉的 distant supervision justifications 也包含了某些 fact-to-fact links,我們也會在這個步驟將它們加入
3. Hop-wise Question Encoding
- 使用 BERT-base 對問題 q 進行編碼
- 使用它的 [CLS] 標記向量作為 q 的密集表示
- 對於每個跳躍,我們附加了一個跳躍特定的層,以建模問題上下文在推理過程中的變化,即 qt = MLPθt(q)。
4. Fact Translating Function g
- ht−1 = MLPθg ([Ft−1; qt])
- ht−1的維度與U中的事實向量相同
- 這個步驟是將前一跳事實和當前跳的問題向量轉換為一個向量,以進行查詢。
5. Hop-wise Answer Weights αt
- 學習將q轉換為一個T維向量
- αt是第t個分量
- 學習如何在不同跳處權重問題向量
<font size="5">B.2 Hyper-parameters and Training Details</font>
- [BM25](https://github.com/elastic/elasticsearch)
- 用了elasticsearch的現成實現,這是一種開源的非監督式方法
- [DPR](https://github.com/facebookresearch/DPR)、[DKIT](https://github.com/google-research/language/tree/master/language/labs/drkit)
- 有現成的
- DrFact
- TensorFlow實現的版本,並且採用了V100 GPU進行訓練
- 調整了一些超參數,如批量大小、學習率、實體得分閾值和事實得分閾值等,這些超參數的調整是基於驗證集的實驗結果進行的。
- DPR、DrKIT和DrFact均基於BERT-base模型
- MCQA-reranker模型則基於BERT-Large模型。
C Discussion on Other Related Work
---
- Other Related Work Other Open-Domain QA models
- 如REALM(Guu等人,2020)、Path-Retriever(Asai等人,2020)、ORQA(Lee等人,2019)和RAG(Lewis等人,2020b),主要集中於對全維基百科語料庫進行問答,就像DrKIT(Dhingra等人,2020)一樣
- 其中一些模型明確使用頁面之間的連結形成推理鏈,而其他一些模型依賴昂貴的問答導向預訓練
- 由於DPR(Karpukhin等人,2020)已經展示了比大多數先前的方法更好的性能(參見他們的表4),因此本研究將DPR作為主要的評估基線。