Computation-friendly Graph Neural Network Design by Accumulating Knowledge on Large Language Models

Jialiang Wang, Shimin Di, Hanmo Liu, Zhili Wang, Jiachuan Wang, Lei Chen, Xiaofang ZhouarXiv 2024 · OpenReview

Abstract

Graph Neural Networks (GNNs) have achieved remarkable success but are often hindered by the complexity of their architectural designs, which are highly sensitive to specific data and tasks. Traditionally, optimizing these architectures involves intensive manual effort or computationally expensive automated algorithms that repeatedly try candidate designs. To address these challenges, we propose a computation-friendly framework that empowers Large Language Models (LLMs) with specialized knowledge for GNN design. Our framework establishes a knowledge retrieval pipeline that comprehends the intercorrelations between graph properties, GNN architectures, and performance. By converting past design experiences into structured knowledge, the LLM can quickly suggest high-performing initial proposals. We further introduce a knowledge-driven search strategy that emulates human expert exploration to refine these proposals. Extensive experiments show our framework can deliver top-tier initial models (e.g., Top-5.77%) for unseen datasets within seconds and achieve outstanding search performance in just a few iterations.

Introduction

Designing an effective GNN is notoriously difficult because a model's performance is highly sensitive to the specific topology of the graph—such as whether it exhibits homophily (similar nodes connect) or heterophily (dissimilar nodes connect). Current approaches generally fall into two camps, both with significant flaws:

  1. Traditional AutoML (AutoGNN): These methods often start from scratch for every new dataset, requiring massive computational resources and hundreds of "train-and-evaluate" cycles.
  2. Generic LLM-based Design: While LLMs have broad reasoning skills, they lack fine-grained expertise in GNN performance. They often suffer from inherent knowledge gaps regarding which specific architectures work for specific graph properties and can be misled by "semantic noise"—assuming two "citation networks" should use the same model even if their underlying structures are completely different.
The DesiGNN framework aims to move beyond general or direct LLM designs toward data-specific optimal designs, significantly improving accuracy across diverse datasets.

Our proposed framework, DesiGNN, aims to achieve "meta-level proficiency": the ability to interpret a new dataset's properties and immediately apply relevant design knowledge gathered from previous tasks, drastically shortening the development cycle.

The DesiGNN Framework

DesiGNN uses a Bayesian-inspired pipeline to solve for the best architecture without exhaustive searching. It consists of three main stages:

1. Graph Understanding and Empirical Filtering

To provide the LLM with the right data, we analyzed 16 graph properties (such as density, clustering, and homophily) across massive benchmarks. Using Kendall’s $\tau$ Coefficient, we identified which properties are actually reliable indicators of GNN performance, filtering out "noisy" properties that do not generalize well across different graph types.

2. Knowledge Retrieval (LLM as Meta-Controller)

Instead of asking an LLM to blindly "design a model," DesiGNN uses the LLM to adaptively weight the importance of different graph properties based on the dataset's description and the LLM's internal knowledge of graph literature. This creates a Knowledge Pool of top-performing models from the most structurally similar benchmark datasets.

3. Model Suggestion and Refinement

  • Desi-Init: The system provides an immediate initial model proposal based on the Knowledge Pool. This "zero-shot" proficiency allows DesiGNN to deliver a model ranking in the top 5.77% of all possible architectures within seconds, before any training has occurred on the new dataset.
  • Knowledge-Driven Refinement: If further optimization is needed, the framework uses a strategy involving "Controlled Exploration" (crossover with known good models) and "Directional Exploitation" (LLM-guided mutations based on training logs).

Overcoming the "Semantic Trap"

A core innovation of DesiGNN is its ability to bypass the "Semantic Trap." LLMs are easily distracted by human-readable labels; for instance, if a user describes a dataset as a "citation network," a raw LLM might suggest a standard GCN because that is what worked for the famous Cora dataset.

DesiGNN uses an LLM to evaluate similarity by balancing semantic features with empirical graph properties, avoiding the 'semantic trap' where similar-sounding datasets require different architectures.

As illustrated above, DesiGNN forces the LLM to align semantic descriptions with empirical structural properties. By introducing a performance-oriented similarity metric, the system identifies which datasets are likely to share the same optimal GNN architecture, regardless of whether their text descriptions match.

Experimental Results

We evaluated DesiGNN using NAS-Bench-Graph, a benchmark containing over 26,000 unique GNN architectures across 9 datasets, as well as Out-of-Distribution (OOD) datasets like DBLP, Flickr, and Actor to test true generalization.

  • Superior Accuracy: DesiGNN outperformed 17 baselines, including manual designs (GCN, GAT), classical AutoML (GNAS), and state-of-the-art LLM-based methods (GPT4GNAS).
  • Efficiency Gains: To reach the same performance level that DesiGNN achieves in just 10 validations, other automated methods typically required 40 to 80+ validations.
  • Robustness: On the "Actor" dataset—a known difficult heterophily task—DesiGNN significantly outperformed manual experts and generic LLM suggestions, proving its ability to handle diverse and challenging graph topologies.

Conclusion

DesiGNN represents a significant step toward automated, computation-friendly GNN design. By bridging the gap between empirical benchmark data and the reasoning capabilities of LLMs, it allows researchers to bypass the expensive trial-and-error phase of model development. Future work will involve expanding this "meta-knowledge" approach to more complex tasks like link prediction and scaling the search space to even more intricate macro-architectures.

Summary updated

BibTeX
@misc{wang2024computation,
  author = {Jialiang Wang and Shimin Di and Hanmo Liu and Zhili Wang and Jiachuan Wang and Lei Chen and Xiaofang Zhou},
  title = {{Computation-friendly Graph Neural Network Design by Accumulating Knowledge on Large Language Models}},
  year = {2024},
  eprint = {2408.06717},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.06717},
}
Figure