HTML : Hierarchical Topology Multi-task Learning for Semantic Parsing in Knowledge Base Question Answering (2025)

Abstract: Knowledge base question answering (KBQA) aims to answer natural language questions by reasoning over structured knowledge bases. Existing approaches often struggle with the complexity of mapping questions to precise logical forms, particularly when dealing with diverse entities and relations. In this paper, we propose Hierarchical Topology Multi-task Learning (HTML), a novel framework that leverages a hierarchical multi-task learning paradigm to enhance the performance of logical form generation. Our framework consists of a main task: generating logical forms from questions, and three auxiliary tasks: entity prediction from the input question, relation prediction for the given entities, and logical form generation based on the given entities and relations. Through joint instruction-tuning, HTML allows mutual guidance and knowledge transfer among the hierarchical tasks, capturing the subtle dependencies between entities, relations, and logical forms. Extensive experiments on public benchmarks show that HTML markedly outperforms both supervised fine-tuning methods and training-free ones based on powerful large language models (e.g., GPT-4), demonstrating its superiority in question understanding and structural knowledge reasoning.

## introduction knowledge base question answering (kbqa) is a critical task that bridges unstructured natural language questions with structured knowledge bases (kbs) to deliver precise answers @xcite . generally, kbqa involves knowledge retrieval @xcite and semantic parsing @xcite @xcite to obtain the final answer. regarding the input question, knowledge retrieval may include approaches like named entity recognition @xcite and entity linking @xcite ), * corresponding author, bwxing714@gmail.com which provide the meta knowledge for semantic parsing. as the core component in kbqa, semantics parsing aims to translate unstructured natural language questions into the corresponding structured logical forms (e.g. s-expression @xcite ), which is then converted into an executable graph database query (e,g, sparql @xcite ) for retrieving answers from knowledge bases, such as freebase @xcite , wikidata @xcite and dbpedia @xcite . with the advances of pre-trained large language models (llms), state-of-the-art (sota) works widely adopt llms to enhance semantic parsing to generate possible logical forms @xcite @xcite @xcite @xcite . chatkbqa @xcite fine-tuning large language models (llms) to unify the phrases of knowledge retrieval and semantic parsing, directly generating the logical form only based on the question. in the postprocessing retrieval phrase, the logical form is refined to leverage the kbs and converted into the executable query. coq @xcite first decomposes the question into smaller ones and extracts the reference knowledge, based on which the logical form is then generated. different from the supervised fine-tuning methods, a number of works @xcite @xcite leverage commercial llms' (e.g. gpt4 (openai, 2023)) strong reasoning abilities via in-context learning @xcite in a training-free manner. this line of methods queries the apis to generate the executable query (e.g., sparql) or logical form to interact with kbs, always consisting of multiple steps and api calls. tog @xcite ) method implements an llm-kg integrating paradigm via treating the llm as an agent, which iteratively performs beam search on the kb, identifies the most promising reasoning paths, and ultimately returns the most likely reasoning results. despite the recently achieved progress, we discover that there exist three issues in semantic parsing, resulting in inaccurately mapping complex questions to logical forms or excusable queries, especially when handling diverse entities and relations that require multi-hop reasoning. to tackle the above issues, in this paper, we propose a novel hierarchical task topology paradigm in semantic parsing, as shown in fig. 1 . regarding semantic parsing as the main task, we discompose it into three subtasks: entity recognition and alignment (entra), entity-aware relation extraction (eare) and logical form skeleton generation (skelgen). entra aims to extract the entities in the question and predict the aligned ones in the kbs. eare aims to predict the relations existing among the given entities. skelgen aims to generate the correct logical form with the given entities and the relations among them. the three subtasks are intertwined with each other with intrinsic hierarchical topologies, and they collaboratively support semantic parsing. to further implement our paradigm, we propose hierarchical topology multi-task learning (html) to effectively model the interdependencies among semantic parsing, entra, eare and skelgen within a unified instruction-tuning framework, as shown in fig. 2 . after constructing the instructions for each task, we mix them in specific proportions to form an instruction-following training set for fine-tuning the open-resource llms. by leveraging mutual guidance and knowledge transfer across these hierarchically organized tasks, html effectively models the compositional nature of kbqa, where entity-relation dependencies and structural reasoning are tightly intertwined. in the inference stage, only the semantic parsing instruction is adopted while the captured hierarchical topology multi-task knowledge support accurate generation of logical forms. experimental results on standard benchmarks demonstrate that html significantly outperforms both sft and trainingfree sota approaches, demonstrating stronger capability in question understanding and structural reasoning. this work advances the kbqa field by illustrating how hierarchical task decomposition and multi-task instruction-tuning can be integrated to address the challenge of semantic parsing. ## html accurately mapping natural language questions to structured logical forms remains a significant challenge in kbqa. to address this fundamental problem, we propose an innovative hierarchical topological multi-task learning (html) framework (shown in fig. 2 ), which implements a hierarchical task topology paradigm (shown in fig. 1 ). in this section, we depict the details of html. ## conclusion in this paper, we propose hierarchical topology multi-task learning (html), which is a novel framework discomposing the semantic parsing task into several interdependent subtasks. html effectively models the interdependencies among semantic parsing, entity recognition and alignment, entity-aware relation extraction, and logical form skeleton generation within a unified instructiontuning framework. the subtasks can synergistically enhance semantic parsing by effectively improving the quality of logical form generation. extensive experiments on public benchmark verify the superiority html, which achieves new state-of-the-art performance and demonstrates advantages.