Enhancing SPARQL query generation for question answering with a hybrid encoder–decoder and cross-attention model

IF 3.1 3区 计算机科学 Q3 COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE
Yi-Hui Chen , Eric Jui-Lin Lu , Kwan-Ho Cheng
{"title":"Enhancing SPARQL query generation for question answering with a hybrid encoder–decoder and cross-attention model","authors":"Yi-Hui Chen ,&nbsp;Eric Jui-Lin Lu ,&nbsp;Kwan-Ho Cheng","doi":"10.1016/j.websem.2025.100869","DOIUrl":null,"url":null,"abstract":"<div><div>A question-answering (QA) system is essential for helping users retrieve relevant and accurate answers based on their queries. The precision of SPARQL query syntax generation is directly linked to the accuracy of the answers provided. Recently, many studies on knowledge graph-based natural language question-answering (KGQA) systems have leveraged the Neural Machine Translation (NMT) framework to translate input questions into SPARQL query syntax, a process known as Text-to-SPARQL. In NMT, cross-attention-based Transformers, ConvS2S, and BiLSTM models are commonly used for training. However, comparing the translation performance of these models is challenging due to their significant architectural differences. To address this issue, this paper integrates various encoder and cross-attention methods with a fixed LSTM decoder to form hybrid models, which are then trained and evaluated on QA systems. Beyond the hybrid models discussed, this study introduces an improved ConvS2S architecture featuring a Multi-Head Convolutional (MHC) encoder, designated as QAWizer_MHC. The MHC encoder incorporates the Transformer’s multi-head attention mechanism to compute dependencies within the input sequence. Additionally, the enhanced ConvS2S model captures local hidden features across different receptive fields within the input sequence. Experimental results demonstrate that QAWizer_MHC outperforms other models, achieving BLEU-1 scores of 76.52% and 83.37% on the QALD-9 and LC-QuAD-1.0 datasets, respectively. Furthermore, in end-to-end system evaluations on the same datasets, the model attained Macro F1 scores of 52% and 66%, respectively, surpassing other KGQA systems. The experimental findings indicate that even with limited computational resources and general embeddings, a well-designed encoder–decoder architecture that integrates cross-attention can achieve performance comparable to large pre-trained models.</div></div>","PeriodicalId":49951,"journal":{"name":"Journal of Web Semantics","volume":"87 ","pages":"Article 100869"},"PeriodicalIF":3.1000,"publicationDate":"2025-07-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Web Semantics","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1570826825000101","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0

Abstract

A question-answering (QA) system is essential for helping users retrieve relevant and accurate answers based on their queries. The precision of SPARQL query syntax generation is directly linked to the accuracy of the answers provided. Recently, many studies on knowledge graph-based natural language question-answering (KGQA) systems have leveraged the Neural Machine Translation (NMT) framework to translate input questions into SPARQL query syntax, a process known as Text-to-SPARQL. In NMT, cross-attention-based Transformers, ConvS2S, and BiLSTM models are commonly used for training. However, comparing the translation performance of these models is challenging due to their significant architectural differences. To address this issue, this paper integrates various encoder and cross-attention methods with a fixed LSTM decoder to form hybrid models, which are then trained and evaluated on QA systems. Beyond the hybrid models discussed, this study introduces an improved ConvS2S architecture featuring a Multi-Head Convolutional (MHC) encoder, designated as QAWizer_MHC. The MHC encoder incorporates the Transformer’s multi-head attention mechanism to compute dependencies within the input sequence. Additionally, the enhanced ConvS2S model captures local hidden features across different receptive fields within the input sequence. Experimental results demonstrate that QAWizer_MHC outperforms other models, achieving BLEU-1 scores of 76.52% and 83.37% on the QALD-9 and LC-QuAD-1.0 datasets, respectively. Furthermore, in end-to-end system evaluations on the same datasets, the model attained Macro F1 scores of 52% and 66%, respectively, surpassing other KGQA systems. The experimental findings indicate that even with limited computational resources and general embeddings, a well-designed encoder–decoder architecture that integrates cross-attention can achieve performance comparable to large pre-trained models.
使用混合编码器-解码器和交叉注意模型增强SPARQL问答查询生成
问答(QA)系统对于帮助用户根据他们的查询检索相关和准确的答案至关重要。SPARQL查询语法生成的准确性与所提供答案的准确性直接相关。最近,许多基于知识图的自然语言问答(KGQA)系统的研究利用神经机器翻译(NMT)框架将输入的问题翻译成SPARQL查询语法,这一过程被称为文本到SPARQL。在NMT中,基于交叉注意力的transformer、ConvS2S和BiLSTM模型通常用于训练。然而,比较这些模型的翻译性能是具有挑战性的,因为它们在架构上存在显著差异。为了解决这一问题,本文将各种编码器和交叉注意方法与固定的LSTM解码器集成在一起,形成混合模型,然后在QA系统上进行训练和评估。除了讨论的混合模型之外,本研究还介绍了一种改进的ConvS2S架构,该架构具有多头卷积(MHC)编码器,命名为QAWizer_MHC。MHC编码器结合了Transformer的多头注意机制来计算输入序列中的依赖关系。此外,增强的ConvS2S模型捕获了输入序列中不同接受域的局部隐藏特征。实验结果表明,QAWizer_MHC优于其他模型,在QALD-9和LC-QuAD-1.0数据集上分别获得了76.52%和83.37%的BLEU-1分数。此外,在相同数据集的端到端系统评估中,该模型分别获得了52%和66%的Macro F1分数,超过了其他KGQA系统。实验结果表明,即使在有限的计算资源和一般嵌入的情况下,设计良好的编码器-解码器架构集成了交叉注意,也可以达到与大型预训练模型相当的性能。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Web Semantics
Journal of Web Semantics 工程技术-计算机:人工智能
CiteScore
6.20
自引率
12.00%
发文量
22
审稿时长
14.6 weeks
期刊介绍: The Journal of Web Semantics is an interdisciplinary journal based on research and applications of various subject areas that contribute to the development of a knowledge-intensive and intelligent service Web. These areas include: knowledge technologies, ontology, agents, databases and the semantic grid, obviously disciplines like information retrieval, language technology, human-computer interaction and knowledge discovery are of major relevance as well. All aspects of the Semantic Web development are covered. The publication of large-scale experiments and their analysis is also encouraged to clearly illustrate scenarios and methods that introduce semantics into existing Web interfaces, contents and services. The journal emphasizes the publication of papers that combine theories, methods and experiments from different subject areas in order to deliver innovative semantic methods and applications.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信