{"title":"Explaining results of path queries on graphs: Single-path results for context-free path queries","authors":"Jelle Hellings","doi":"10.1016/j.is.2024.102475","DOIUrl":null,"url":null,"abstract":"<div><div>Many graph query languages use, at their core, <em>path queries</em> that yield node pairs <span><math><mrow><mo>(</mo><mi>m</mi><mo>,</mo><mi>n</mi><mo>)</mo></mrow></math></span> that are connected by a path of interest. For the end-user, such node pairs only give limited insight as to <em>why</em> this result is obtained, as the pair does not directly identify the underlying path of interest.</div><div>In this paper, we propose the <em>single-path semantics</em> to address this limitation of path queries. Under single-path semantics, path queries evaluate to a single path connecting nodes <span><math><mi>m</mi></math></span> and <span><math><mi>n</mi></math></span> and that satisfies the conditions of the query. To put our proposal in practice, we provide an efficient algorithm for evaluating <em>context-free path queries</em> using the single-path semantics. Additionally, we perform a short evaluation of our techniques that shows that the single-path semantics is practically feasible, even when query results grow large.</div><div>In addition, we explore the formal relationship between the single-path semantics we propose the problem of finding the <em>shortest string</em> in the intersection of a regular language (representing a graph) and a context-free language (representing a path query). As our formal results show, there is a distinction between the complexity of the single-path semantics for queries that use a single edge label and queries that use multiple edge labels: for queries that use a single edge label, the length of the shortest path is <em>linearly upper bounded</em> by the number of nodes in the graph; whereas for queries that use multiple edge labels, the length of the shortest path has a worst-case <em>quadratic lower bound</em>.</div></div>","PeriodicalId":50363,"journal":{"name":"Information Systems","volume":"128 ","pages":"Article 102475"},"PeriodicalIF":3.0000,"publicationDate":"2024-10-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information Systems","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0306437924001339","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
Abstract
Many graph query languages use, at their core, path queries that yield node pairs that are connected by a path of interest. For the end-user, such node pairs only give limited insight as to why this result is obtained, as the pair does not directly identify the underlying path of interest.
In this paper, we propose the single-path semantics to address this limitation of path queries. Under single-path semantics, path queries evaluate to a single path connecting nodes and and that satisfies the conditions of the query. To put our proposal in practice, we provide an efficient algorithm for evaluating context-free path queries using the single-path semantics. Additionally, we perform a short evaluation of our techniques that shows that the single-path semantics is practically feasible, even when query results grow large.
In addition, we explore the formal relationship between the single-path semantics we propose the problem of finding the shortest string in the intersection of a regular language (representing a graph) and a context-free language (representing a path query). As our formal results show, there is a distinction between the complexity of the single-path semantics for queries that use a single edge label and queries that use multiple edge labels: for queries that use a single edge label, the length of the shortest path is linearly upper bounded by the number of nodes in the graph; whereas for queries that use multiple edge labels, the length of the shortest path has a worst-case quadratic lower bound.
许多图查询语言的核心都是使用路径查询,这种查询会产生由感兴趣的路径连接起来的节点对(m,n)。对于最终用户来说,这些节点对只能有限地说明为什么会得到这样的结果,因为这些节点对并不能直接确定感兴趣的底层路径。在本文中,我们提出了单路径语义来解决路径查询的这一局限性。在单路径语义下,路径查询只评估连接节点 m 和 n 且满足查询条件的一条路径。为了将我们的建议付诸实践,我们提供了一种使用单路径语义评估无上下文路径查询的高效算法。此外,我们还对我们的技术进行了简短评估,结果表明单路径语义在实践中是可行的,即使查询结果变得很大。此外,我们还探讨了单路径语义与我们提出的在正则语言(代表图)和无上下文语言(代表路径查询)的交集中寻找最短字符串问题之间的形式关系。正如我们的形式结果所示,单路径语义对于使用单个边标签的查询和使用多个边标签的查询的复杂性是有区别的:对于使用单个边标签的查询,最短路径的长度与图中节点的数量成线性上界;而对于使用多个边标签的查询,最短路径的长度在最坏情况下有二次下界。
期刊介绍:
Information systems are the software and hardware systems that support data-intensive applications. The journal Information Systems publishes articles concerning the design and implementation of languages, data models, process models, algorithms, software and hardware for information systems.
Subject areas include data management issues as presented in the principal international database conferences (e.g., ACM SIGMOD/PODS, VLDB, ICDE and ICDT/EDBT) as well as data-related issues from the fields of data mining/machine learning, information retrieval coordinated with structured data, internet and cloud data management, business process management, web semantics, visual and audio information systems, scientific computing, and data science. Implementation papers having to do with massively parallel data management, fault tolerance in practice, and special purpose hardware for data-intensive systems are also welcome. Manuscripts from application domains, such as urban informatics, social and natural science, and Internet of Things, are also welcome. All papers should highlight innovative solutions to data management problems such as new data models, performance enhancements, and show how those innovations contribute to the goals of the application.