FLAG: Towards Graph Query Autocompletion for Large Graphs

Peipei Yi, Jianping Li, Byron Choi, Sourav S. Bhowmick, Jianliang XuData Sci. Eng 2022 · DOI

Abstract

Formulating complex subgraph queries on massive graphs is a labor-intensive and error-prone task. Existing autocompletion tools often struggle with single large graphs due to data sparsity, where frequent subgraphs are either too small or too specific. This paper introduces FLAG (Flexible graph query autocompletion for Large Graphs), a framework that leverages wildcard labels to provide generalized, high-utility query suggestions. By employing a submodular ranking function and efficient pruning techniques, FLAG reduces user effort by approximately 50% while maintaining low latency.

Introduction

Visual graph query interfaces are essential for exploring large networks like social or citation graphs. However, manually constructing these queries requires significant effort in terms of mouse clicks and cognitive load. Traditional Graph Query Autocompletion (GQAC) methods, designed for databases of many small graphs, fail on single large graphs because the structural diversity leads to a "data sparsity" problem. FLAG addresses this by introducing structural summarization through wildcards, allowing the system to suggest templates rather than a flood of overly specific instances.

Methodology

Wildcard Labels and Structural Summarization

The core innovation of FLAG is the use of wildcard labels (*) to represent any possible node or edge label. This allows the system to suggest a single generalized structure that covers multiple specific labeled subgraphs, saving UI space and reducing user effort. To ensure suggestions remain intuitive and "well-formed," wildcards are typically restricted to the boundaries (leaf nodes) of the query.

Figure 1: Query autocompletion using wildcard labels to summarize potential specializations.

System Architecture

The FLAG framework operates via a client-server model. When a user submits a partial query $q$, the server decomposes it into wildcard features, generates candidate suggestions using an indexing system, and ranks them based on their utility to the user before returning the top-$k$ results.

Figure 2: The FLAG system architecture, illustrating the client-server interaction for query decomposition and suggestion ranking.

Ranking and Pruning

FLAG ranks suggestions using a utility function that balances two primary metrics:

  1. Specialization Power (SP): Measures how much a suggestion grows the user's current query.
  2. Summarization Power (SM): Measures how many specific candidates a single wildcard suggestion represents.

The authors prove that this utility function is submodular, allowing for a greedy algorithm that provides a $(1 - 1/e)$ approximation of the optimal ranking. To ensure performance on massive datasets, FLAG uses graph sampling and embedding-based conditions to quickly prune suggestions that would yield zero results in the target graph.

Evaluation

The framework was evaluated on three real-world datasets: Twitter (11M nodes), WordNet (74K nodes), and CiteSeer (3K nodes). Simulations demonstrated that FLAG saves roughly 50% of mouse clicks compared to manual formulation. Furthermore, the system typically returns suggestions in under 3.5 seconds. A user study with 10 volunteers confirmed a high correlation (0.819) between the system's automated "Total Profit Metric" and actual user satisfaction.

Conclusion

FLAG significantly improves the usability of graph databases by providing flexible, generalized autocompletion suggestions. By balancing structural growth with summarization, it overcomes the limitations of traditional GQAC on large graphs. Future work includes incorporating user history to further personalize rankings and exploring more flexible wildcard placements.

Summary updated

BibTeX
@article{yi2022flag,
  author = {Peipei Yi and Jianping Li and Byron Choi and Sourav S. Bhowmick and Jianliang Xu},
  title = {{FLAG: Towards Graph Query Autocompletion for Large Graphs}},
  journal = {Data Sci. Eng.},
  year = {2022},
  doi = {10.1007/s41019-022-00182-8},
}
Figure