SpatialNLI: A Spatial Domain Natural Language Interface to Databases Using Spatial Comprehension論文學習
研究背景
Due to the idiosyncrasy and expressiveness of the spatial semantics, it is unfeasible to adopt general NLI for the spatial domain directly. The challenge of adopting the existing general domain NLI to spatial domain lies to harnessing the expressiveness of spatial semantics. In general, spatial semantic understanding relies heavily on its contextual interpretation. Contextually dependent spatial semantics raises serious challenges for NLI to spatial domain databases.(由於空間語義的特殊性和表達性,直接對空間域採用通用 NLI 是不可行的。 將現有的通用領域 NLI 應用於空間領域的挑戰在於利用空間語義的表達能力。 一般來說,空間語義理解在很大程度上依賴於其上下文解釋。 上下文相關的空間語義對空間域資料庫的 NLI 提出了嚴峻的挑戰。
系統設計思路
- Inspired by the machine comprehension model, we propose a spatial comprehension model that is able to recognize the meaning of spatial entities based on the semantics of the context. The spatial semantics learned from the spatial comprehension model is then injected to the natural language question to ease the burden of capturing the spatial-specific semantics. With our spatial comprehension model and information injection, our NLI for the spatial domain, named SpatialNLI, uses a sequence-to-sequence (seq2seq) translation to capture the semantic structure of the question and translate it to the corresponding syntax of an executable query accurately.(受機器理解模型的啟發,我們提出了一種空間理解模型,該模型能夠根據上下文的語義識別空間實體的含義。 然後將從空間理解模型中學到的空間語義注入到自然語言問題中,以減輕捕獲特定空間語義的負擔。 通過我們的空間理解模型和資訊注入,我們用於空間域的 NLI,名為 SpatialNLI,使用序列到序列 (seq2seq) 轉換來捕獲問題的語義結構並將其準確地轉換為可執行查詢的相應語法 .
- Our fundamental strategy is to separate the tasks of NLI into the following two aspects:(我們的基本策略是將 NLI 的任務分為以下兩個方面:(1) seq2seq模型學習自然語言問題的語義結構;(2) 外部空間理解模型學習空間問題的空間語義。)
(1) the seq2seq model learns semantic structure of a natural language question
(2) an external spatial comprehension model learns the spatial semantics of a spatial question. - use an external spatial semantic understanding model to enhance the performance of the main seq2seq model.(使用外部空間語義理解模型來增強主seq2seq模型的效能。)
系統工作流程
The workflow of our SpatialNLI involves the following steps:(我們 SpatialNLI 的工作流程包括以下步驟:1.識別NL查詢中的歧義空間語義。2.構建一個空間理解模型,能夠從語義上理解空間相關問題。3.將從空間理解模型中檢索到的空間語義注入問題中。4.將問題“翻譯”為結構化查詢。5.將注入的符號替換為其原始文字。)
1.Identify ambiguous spatial semantics in the NL query.
2.Build a spatial comprehension model that is able to understand a spatial-related question semantically.
3.Injecting spatial semantics retrieved from the spatial comprehension model into the question.
4.“Translating” the question into a structured query.
5.Replace the symbols injected to their original text.
如何做實驗
- To evaluate the effectiveness of our system, we performed an experimental evaluation on dataset Geoquery and Restaurants.(為了評估我們系統的有效性,我們對資料集 Geoquery 和 Restaurants 進行了實驗評估。)
- To validate the performance of our system, several ablation experiments were conducted by the removal of (1) Copy Mechanism, (2) Spatial Comprehension Model, (3) Data Augmentation, (4) Type Feeding and (5) Information Injection, respectively.(為了驗證我們系統的效能,分別通過去除(1)複製機制,(2)空間理解模型,(3)資料增強,(4)型別饋送和(5)資訊注入進行了幾次消融實驗。)
- We also jointly train both datasets in a shared model compared with separate training. Our experiment results show that a shared model performs better than two separate models.(與單獨訓練相比,我們還在共享模型中聯合訓練兩個資料集。 我們的實驗結果表明,共享模型的效能優於兩個單獨的模型。)