
Regular path queries (RPQs) are at the heart of navigational queries in graph databases. Motivated by new features of regular path queries in the languages Cypher, GQL, and SQL/PGQ, which require new approaches for indexing and compactly storing intermediate query results, we investigate a large corpus of real-world RPQs. Our corpus consists of 148.7 million RPQs occurring in 937.2 million SPARQL queries, used on 29 different data sets. We investigate three main questions on these logs. First, what is the syntactic structure of these RPQs? Second, how much nondeterminism (or ambiguity) do they have? Third, do they admit tractable evaluation under simple path and trail semantics? Concerning the first question, we show that all the RPQs can be classified in only 572 different syntactic shapes, which we provide in a downloadable data set in Zenodo. Furthermore, we classify the relative use of various RPQ operators, and popular predicates that are used for transitive navigation. Concerning the second question, we show that although non-determinism occurs in the RPQs, less than one in ten million requires a deterministic finite automaton with more states than the size of the regular expression. This is remarkable because this blow-up is known to be exponential in the worst case. Concerning the last question, the vast majority of expressions admits tractable evaluation.
Graph Neural Networks (GNNs) have the potential to address realworld problems involving continuously evolving, graph-structured data, such as fraud detection, real-time recommendations, and traffic monitoring. These applications require the timely processing of streaming (possibly unbounded) data, highlighting the need of integrating GNN inference with dataflow stream processing systems, like Apache Flink. In this paper, we present the first exploration of bridging this gap, by designing a streaming GNN serving pipeline with Flink and PyTorch. We propose a dataflow architecture that offloads subgraph construction to Flink, leveraging its state management and distributed processing capabilities. Despite achieving viable performance through asynchronous inference requests and careful parallelism tuning, we also identify significant limitations stemming from Flink's state scoping, lack of iterative processing, and computation pipelining. We propose solutions that mitigate these issues within Flink and discuss open challenges towards developing dataflow systems tailored to streaming GNN inference.
Property graph databases are widely used in applications such as social networks and fraud detection due to their ability to model relationships between entities efficiently. However, outsourcing graph data to third-party cloud providers introduces significant privacy risks, as memory access patterns and result sizes can leak sensitive information even when data is encrypted. While prior work has developed oblivious relational databases to mitigate such attacks, no existing solution supports oblivious query processing for property graphs, which pose unique challenges beyond those addressed in relational settings. We present a vision for an oblivious property graph database that supports Cypher queries on encrypted outsourced data. We envision leveraging secure hardware enclaves such as Intel SGX/TDX and AMD SEV-SNP to protect query execution while novel query processing algorithms mitigate side-channel vulnerabilities through doubly oblivious query processing schemes. Specifically, we discuss the challenges in supporting oblivious query processing algorithms for multi-hop and cyclic queries without revealing data or memory access patterns. Our work highlights a crucial gap and potential research directions in oblivious query processing for property graph databases.
Recently developed query languages for property graphs - GQL and SQL/PGQ - have now been standardized, and their theoretical models have been introduced and analyzed. These models however, do not yet have enough flexibility when it comes to process data stored as properties within property graphs; in particular they have limited ability to deal with various data types and operations on them. In a fully expressive query language, we should be able to perform meaningful computations on numerical and string data, among others. This includes queries that quantify over elements not explicitly present in the database. In this paper, we take a first step toward formalizing such expressive query languages and developing mathematical models that support them. Our approach is inspired by work on constraint databases, which permitted query evaluation for declarative languages that can reason about infinite domains and operations on them. We extend this approach to recently produced formal models of property graph query languages and analyze the gain in expressive power. This lays the foundation for further exploration and refinement of expressive query mechanisms for property graphs.
Stardog is a commercial Knowledge Graph platform built on top of an RDF graph database whose primary means of communication is a standardized graph query language called SPARQL. This paper describes our journey of developing a more performant query execution layer and plugging it into Stardog's query engine. The new executor, called BARQ, is based on the known principle of processing batches of tuples at a time in most critical query operators, particularly joins. In addition to presenting BARQ, the paper describes the challenges of integrating it into a mature, tightly integrated system based on the classical tuple-at-a-time Volcano model. It offers a gradual approach to overcoming the challenges that small- to medium-size engineering teams typically face. Finally, the paper presents experimental results showing that BARQ makes Stardog substantially faster on CPU-bound queries without sacrificing performance on disk-bound and OLTP-style queries.
Graph Neural Networks (GNNs) are the de facto models for deep learning on graph datasets, but training GNNs on large-scale datasets remains a challenge. Data partitioning plays a critical role in distributed mini-batch GNN training, as it directly impacts memory usage, training speed, and model accuracy. This survey comprehensively compares prevalent partitioning strategies in the Deep Graph Library (DGL) framework across standard benchmarks and models of varying depths. We systematically analyze aspects such as partition sizes, training times, memory overhead, and the accuracy associated with each partitioning method. Through this analysis, we uncover practical insights and the inherent trade-offs of these strategies. Our findings reveal surprising cases where simpler partitioning approaches outperform more sophisticated schemes. We conclude by offering practical guidelines for GNN partitioning.
Property graphs are widely used in domains such as healthcare, finance, and social networks, but they often contain errors due to inconsistencies, missing data, or schema violations. Traditional rule-based and heuristic-driven graph repair methods are limited in their adaptability as they need to be tailored for each dataset. On the other hand, interactive human-in-the-loop approaches may become infeasible when dealing with large graphs, as the cost--both in terms of time and effort--of involving users becomes too high. Recent advancements in Large Language Models (LLMs) present new opportunities for automated graph repair by leveraging contextual reasoning and their access to real-world knowledge. We evaluate the effectiveness of six open-source LLMs in repairing property graphs. We assess repair quality, computational cost, and model-specific performance. Our experiments show that LLMs have the potential to detect and correct errors, with varying degrees of accuracy and efficiency. We discuss the strengths, limitations, and challenges of LLM-driven graph repair and outline future research directions for improving scalability and interpretability.
SQL/PGQ is a new standard that integrates graph querying into relational systems, allowing users to freely switch between graph patterns and SQL. Our experiments show performance gaps between these models, as queries written in both formalisms can exhibit varying performance depending on the formalism used, suggesting that current approaches handle each query type separately, applying distinct optimizations to each formalism. We argue that a holistic optimization is necessary, where the system internally decides on the best algorithms regardless of whether queries are written in SQL or as graph patterns. We propose possible future research direction to unify these optimizations and mitigate performance gaps.
Enterprise applications of Large Language Models (LLMs) hold promise for question answering on enterprise SQL databases. However, the extent to which LLMs can accurately respond to enterprise questions in such databases remains unclear, given the absence of suitable Text-to-SQL benchmarks tailored to enterprise settings. Additionally, the potential of Knowledge Graphs (KGs) to enhance LLM-based question answering by providing business context is not well understood. This study aims to evaluate the accuracy of LLM-powered question answering systems in the context of enterprise questions and SQL databases, while also exploring the role of knowledge graphs in improving accuracy. To achieve this, we introduce a benchmark comprising an enterprise SQL schema in the insurance domain, a range of enterprise queries encompassing reporting to metrics, and a contextual layer incorporating an ontology and mappings that define a knowledge graph. Our primary finding reveals that question answering using GPT-4, with zero-shot prompts directly on SQL databases, achieves an accuracy of 16%. Notably, this accuracy increases to 54% when questions are posed over a Knowledge Graph representation of the enterprise SQL database. Therefore, investing in Knowledge Graph provides higher accuracy for LLM powered question answering systems.
Database systems depend on cardinality estimates for generation of optimal query execution plans. Selecting an appropriate cardinality estimation technique involves navigating trade-offs, including the accuracy of estimates, time required for estimation, and necessary statistics. These trade-offs can lead to different choices based on the dataset and query workload. Unfortunately there is limited support for advising graph database users in exploring these trade-offs and making the right choices for their scenarios. To address this critical gap, we introduce an advisor tool, HomeRun, which analyzes the performance of various cardinality estimation techniques in given usage scenarios. We explain HomeRun's capabilities using the industry-standard LSQB benchmark and synthetic scenarios. HomeRun reveals how minor changes in the dataset can significantly impact the conclusions about the performance of cardinality estimation techniques.
Leapfrog Triejoin (LTJ) is arguably the most practical and popular worst-case-optimal (wco) algorithm for solving basic graph patterns in graph databases. Its main drawback is that it needs the database triples (subject, predicate, object) represented as paths in a trie, for each of the six orders of subject, predicate, and object. The resulting blowup in space makes most systems disregard LTJ or implement it only partially, and their corresponding algorithms be non-wco. In this paper we show that, by using compact data structures, it is possible to build an index that at the same matches the query time performance of the fastest classic wco index, and uses half the space of non-wco indices (which are much slower). Concretely, we make use of compact tree representations to store functional tries using one bit per trie edge, instead of one pointer. The resulting structure, called compactLTJ, uses 25% of the space of classic wco implementations and 45%-65% of classic non-wco systems. At solving queries, it is on par with the fastest classic wco system, and two orders of magnitude faster than non-wco systems. We further incorporate improved query resolution strategies into compactLTJ, which makes it considerably faster than any other alternative to display the first query results.
Differential computation (DC) has emerged as a powerful general technique for maintaining computations over evolving datasets, even those containing arbitrarily nested loops, making DC particularly well-suited for graph computations. However, the general maintenance technique used by DC makes it less efficient for application-specific workloads. This paper shows how application-specific optimizations can improve both the runtime and memory characteristics of Differential Dataflow (DD), the reference implementation of DC. We present three optimizations for DD that make it more suitable for graph processing. Our first two optimizations are a redesign the in-memory indices that DD uses to maintain operator state, making them more read-friendly and decreasing the amount of data that operators need to scan from the indices. Next, we observe that DD's Reduce operator performs an expensive recomputation to determine whether or not there are any new outputs for changed inputs, even if the outputs have not actually changed. Our third optimization, called Fast Empty Difference Verification, detects when there are no output changes without performing DD's default rerunning logic. We present experiments on a variety of graph computation workloads demonstrating that our optimizations improve DD's runtime by up to 19x and reduce memory consumption by up to 1.7x.
Subgraph isomorphism is a crucial problem in graph-analytics with wide-ranging applications. This paper examines and compares two high-performance solutions to this problem: backtracking, represented by VF3, and compilation, represented by Dryadic. Despite both strategies being based on vertex-extension mapping, Dryadic significantly outperforms VF3 across all tests, with speed-ups ranging from a minimum of 4.95x to a maximum of 165x. To understand these disparities, the paper identifies and explores five key optimizations in Dryadic: candidate vertices generation, execution specificity, data graph storage, matching order, and redundancy elimination. With these optimizations removed, Dryadic's performance substantially degrades but it is still on average 10x faster than VF3 due to better spatial locality and search-space pruning. With the insights gained from these optimizations, we propose and implement two new techniques: lazy evaluation in Dryadic and connectivity checks in VF3, resulting in performance improvements of up to 1.23x and 1.46x, respectively.
In this paper we present TelarKG, a knowledge graph (KG) that consolidates multiple sources of information regarding the Chilean Constitutional process, particularly about the work of the members of the Constitutional Convention. TelarKG contains a wide range of public data, such as the materials from the commissions and information about the members' interventions and votes. In addition, the KG has been enriched with online user-generated content including posts from social networks related to the constitutional process, and transcriptions from the YouTube videos of the plenary sessions. Among other features, TelarKG leverages the semantic similarity search capabilities of the MillenniumDB endpoint to compute text similarity among convention members' Twitter messages. Additionally, we employ Entity Linking techniques to identify references to members of the Convention and Parties within these messages. TelarKG constitutes one of the most comprehensive historical archives on a political event, enabling users to query and navigate through diverse aspects of Chile's constitutional process.
Graph neural networks (GNNs) are widely used in many downstream applications, such as graphs and nodes classification, entity resolution, link prediction, and question answering. Several interpretability methods for GNNs have been proposed recently. However, since they have not been thoroughly compared with each other, their trade-offs and efficiency in the context of underlying GNNs and downstream applications are unclear. To support more research in this domain, we develop an end-to-end interactive tool, named gInterpreter, by re-implementing 15 recent GNN interpretability methods in a common environment on top of a number of state-of-the-art GNNs employed for different downstream tasks. This paper demonstrates gInterpreter with an interactive performance profiling of 15 recent GNN inter-pretability methods, aiming to explain the complex deep learning pipelines over graph-structured data.
Processing graphs that evolve over time has seen renewed attention. Processing solutions on dynamic graphs (often dubbed "graph streaming" solutions) aim to maintain the state for a graph query as the graph evolves over time, and to timely offer a solution (approximate, or precise) when requested by the user. In this space, and in the context of shared-nothing platforms, solutions have been proposed only for relatively simple problems (e.g., BFS, SSSP, PageRank), and some are limited to incremental-only evolutions traces. Support for more complex problems remains rather unexplored. To close this gap, we present a solution for the maximum flow problem that supports both add and delete events. We build this solution on top of an event-based abstraction. Integral to this abstraction is that events tied to both graph topology changes and algorithmic maintenance are processed asynchronously, concurrently, and autonomously (i.e., without shared state). We show that our implementation provides favourable time-to-solution and scales well by evaluating it on a real-world dynamic graph with 80 million edges. We compare its performance with snapshot-based solutions both internally (with our own implementation of a shared-nothing static algorithm) and externally (with Galois, a popular shared-memory framework for static graphs).
Business Process Management algorithms are heavily limited by suboptimal algorithmic implementations that cannot leverage state-of-the-art algorithms in the field of relational and graph databases. The recent interest in this discipline for various IT sectors (cyber-security, Industry 4.0, and e-Health) calls for defining new algorithms improving the performance of existing ones. This paper focuses on generating several traces collected in a log from declarative temporal models by pre-emptively representing those as a specific type of finite state automaton: we show that this task boils down to a single-source multi-target graph traversal on such automaton where both the number of distinct paths to be visited as well as their length are bounded. This paper presents a novel algorithm running in polynomial time over the size of the declarative model represented as a graph and the desired log's size. The final experiments show that the resulting algorithm outperforms the state-of-the-art data-aware and dataless sequence generations in business process management.