🤖 AI Summary
This work addresses the inefficiency of existing graph neural network (GNN) approaches for reasoning over large-scale knowledge graphs, which struggle to adapt to diverse query structures and semantics, resulting in redundant computation and excessive data loading. To overcome these limitations, the authors propose KG-WISE, the first framework that leverages large language models (LLMs) to guide GNN-based reasoning. KG-WISE decomposes a pretrained GNN into fine-grained components and employs an LLM to generate reusable query templates, enabling on-demand loading of semantically relevant subgraphs and corresponding model parts. This approach supports query-aware dynamic model instantiation and subgraph retrieval, breaking free from static deployment constraints. Evaluated on a knowledge graph with 42 million nodes and 166 million edges, KG-WISE achieves up to a 28× speedup and 98% lower memory usage compared to state-of-the-art systems, while maintaining or improving accuracy.
📝 Abstract
Efficient inference for graph neural networks (GNNs) on large knowledge graphs (KGs) is essential for many real-world applications. GNN inference queries are computationally expensive and vary in complexity, as each involves a different number of target nodes linked to subgraphs of diverse densities and structures. Existing acceleration methods, such as pruning, quantization, and knowledge distillation, instantiate smaller models but do not adapt them to the structure or semantics of individual queries. They also store models as monolithic files that must be fully loaded, and miss the opportunity to retrieve only the neighboring nodes and corresponding model components that are semantically relevant to the target nodes. These limitations lead to excessive data loading and redundant computation on large KGs. This paper presents KG-WISE, a task-driven inference paradigm for large KGs. KG-WISE decomposes trained GNN models into fine-grained components that can be partially loaded based on the structure of the queried subgraph. It employs large language models (LLMs) to generate reusable query templates that extract semantically relevant subgraphs for each task, enabling query-aware and compact model instantiation. We evaluate KG-WISE on six large KGs with up to 42 million nodes and 166 million edges. KG-WISE achieves up to 28x faster inference and 98% lower memory usage than state-of-the-art systems while maintaining or improving accuracy across both commercial and open-weight LLMs.