面向自动化线性 SQL 评分的语义查询相似度量化:一种基于图的方法
Quantifying Semantic Query Similarity for Automated Linear SQL Grading: A Graph-based Approach
AI总结:
本文提出一种基于图的最短路径编辑距离方法来量化 SQL 查询的语义差异,实验表明其评分准确性和可理解性优于现有技术并接近人工评分水平。
摘要:
量化数据库查询之间的语义相似度是一项关键挑战,具有广泛的应用,从查询日志分析到 SQL 技能的自动化教育评估。传统方法通常仅依赖语法比较,或仅限于检查语义等价性。本文提出了一种新颖的基于图的方法来衡量 SQL 查询之间的语义差异。查询被表示为隐式图中的节点,而节点之间的转换被称为编辑,并通过语义差异进行加权。我们采用最短路径算法来识别两个给定查询之间的最低成本编辑序列,从而定义一种可量化的语义距离度量。该技术的原型实现已通过实证研究进行了评估,结果有力地表明,与现有技术相比,我们的方法提供了更准确且更易于理解的评分。此外,结果表明我们的方法接近人工评分的质量,使其成为适用于多种数据库查询比较任务的稳健工具。
英文摘要:
Quantifying the semantic similarity between database queries is a critical challenge with broad applications, ranging from query log analysis to automated educational assessment of SQL skills. Traditional methods often rely solely on syntactic comparisons or are limited to checking for semantic equivalence. This paper introduces a novel graph-based approach to measure the semantic dissimilarity between SQL queries. Queries are represented as nodes in an implicit graph, while the transitions between nodes are called edits, which are weighted by semantic dissimilarity. We employ shortest path algorithms to identify the lowest-cost edit sequence between two given queries, thereby defining a quantifiable measure of semantic distance. A prototype implementation of this technique has been evaluated through an empirical study, which strongly suggests that our method provides more accurate and comprehensible grading compared to existing techniques. Moreover, the results indicate that our approach comes close to the quality of manual grading, making it a robust tool for diverse database query comparison tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。