Uni-Parser: Unified Semantic Parser for Question Answering on Knowledge Base and Database

30248

Authors

nan

Abstract

AbstractParsing natural language questions into executable logical forms is a useful and interpretable way to perform question answering on structured data such as knowledge bases (KB) or databases (DB). However, existing approaches on semantic parsing cannot adapt to both modalities, as they suffer from the exponential growth of the logical form candidates and can hardly generalize to unseen data. In this work, we propose Uni-Parser, a unified semantic parser for question answering (QA) on both KB and DB. We define the primitive (relation and entity in KB, and table name, column name and cell value in DB) as the essential element in our framework. The number of primitives grows only at a linear rate to the number of retrieved relations in KB and DB, preventing us from exponential logic form candidates. We leverage the generator to predict final logical forms by altering and composing top-ranked primitives with different operations (e.g. select, where, count). With sufficiently pruned search space by a contrastive primitive ranker, the generator is empowered to capture the composition of primitives enhancing its generalization ability. We achieve competitive results on multiple KB and DB QA benchmarks with more efficiency, especially in the compositional and zero-shot settings.

Keywords

nan

Full Content

Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 8858 - 8869 December 7-11, 2022 ©2022 Association for Computational Linguistics Uni-Parser: Unified Semantic Parser for Question Answering on Knowledge Base and Database Ye Liu1, Semih Yavuz1, Rui Meng1, Dragomir Radev2, Caiming Xiong1, Yingbo Zhou1 1 Salesforce Research, 2 Yale University {yeliu, syavuz, ruimeng, yingbo.zhou, cxiong}@salesforce.com, dragomir.radev@yale.edu Abstract Parsing natural language questions into exe- cutable logical forms is a useful and inter- pretable way to perform question answering on structured data such as knowledge bases (KB) or databases (DB). However, existing ap- proaches on semantic parsing cannot adapt to both modalities, as they suffer from the expo- nential growth of the logical form candidates and can hardly generalize to unseen data. In this work, we propose Uni-Parser, a unified semantic parser for question answering (QA) on both KB and DB. We introduce the primi- tive (relation and entity in KB, and table name, column name and cell value in DB) as an essen- tial element in our framework. The number of primitives grows linearly with the number of retrieved relations in KB and DB, preventing us from dealing with exponential logic form candi- dates. We leverage the generator to predict final logical forms by altering and composing top- ranked primitives with different operations (e.g. select, where, count). With sufficiently pruned search space by a contrastive primitive ranker, the generator is empowered to capture the com- position of primitives enhancing its generaliza- tion ability. We achieve competitive results on multiple KB and DB QA benchmarks more ef- ficiently, especially in the compositional and zero-shot settings. 1 Introduction With the recent advances in deep neural networks, question answering (QA) systems enable users to interact with massive data using queries in natu- ral language. However, it remains challenging to assess structured data, such as knowledge bases and databases. Semantic parsing is a core step of question answering for structured data. The goal is to convert a natural language question to an exe- cutable logical form (Berant et al., 2013; Yih et al., 2015), e.g., SQL for databases and S-expression for knowledge bases. To improve the accuracy and faithfulness in exe- cution of semantic parsing, recent KBQA studies propose to generate logical form candidates by enu- merating and selecting the best logical form by ranking (Berant and Liang, 2014; Yih et al., 2015; Sun et al., 2020; Ye et al., 2021). However, the number of logical form candidates may grow expo- nentially with the increase of reasoning depth for complex questions. Thus this approach can suffer from poor runtime performance due to the time- consuming logical form enumeration (Gu et al., 2021) and inefficient candidate ranking (Ye et al., 2021). For example, given an entity in a KB, we collect its logical form candidates by enumerating paths up to two hops. If the first hop with respect to the given entity contains N relations and the second hop contains M relations, the enumeration would result in N × M logical forms. …

Content truncated to 500 words

Labeled Text

AbstractParsing natural language questions into executable logical forms is a useful and interpretable way to perform question answering on structured data such as knowledge bases (KB) or databases (DB). However, existing approaches on semantic parsing cannot adapt to both modalities, as they suffer from the exponential growth of the logical form candidates and can hardly generalize to unseen data. In this work, we propose Uni-Parser, a unified semantic parser for question answering (QA) on both KB and DB. We define the primitive (relation and entity in KB, and table name, column name and cell value in DB) as the essential element in our framework. The number of primitives grows only at a linear rate to the number of retrieved relations in KB and DB, preventing us from exponential logic form candidates. We leverage the generator to predict final logical forms by altering and composing top-ranked primitives with different operations (e.g. select, where, count). With sufficiently pruned search space by a contrastive primitive ranker, the generator is empowered to capture the composition of primitives enhancing its generalization ability. We achieve competitive results on multiple KB and DB QA benchmarks with more efficiency, especially in the compositional and zero-shot settings.

Publication Details

Paper ID:
30248
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan