Proficient Graph Neural Network Design by Accumulating Knowledge on Large Language Models

Jialiang Wang, Hanmo Liu, Shimin Di, Zhili Wang, Jiachuan Wang, Lei Chen, Xiaofang Zhou

TL;DR

DesiGNN is a new framework that enables Large Language Models (LLMs) to design high-performance Graph Neural Networks (GNNs) by bridging the gap between general reasoning and specialized structural knowledge. By systematically accumulating experience from empirical benchmarks and aligning it with literature-based insights, DesiGNN delivers top-tier model proposals (ranking in the top 5.77% of all possibilities) for unseen datasets in just seconds, far outperforming traditional automated search methods.

What Problem Does This Paper Address?

Automating the design of machine learning models—known as Neural Architecture Search (NAS)—is a holy grail of AI. While LLMs have shown promise in general coding and reasoning, they struggle with data-sensitive tasks like GNN design. The authors identify two primary barriers:

  1. The Inherent Knowledge Gap: LLMs lack a fine-grained understanding of how specific graph properties (like homophily or density) dictate which GNN architecture will work best. Consequently, they tend to suggest "safe," generic models (e.g., a standard GAT stack) rather than data-specific optimal designs.
  2. External Noise: LLMs are easily misled by semantic descriptions. For example, if a user describes a dataset as a "citation network," the LLM might assume it is similar to other citation networks it knows (like Cora), even if the underlying structural properties are vastly different. This leads to "artificial hallucinations" where the LLM transfers ineffective design knowledge based on irrelevant labels.
Figure 1: Case studies illustrating inherent and external limitations of existing LLM-based methods.

Methods

The authors propose DesiGNN, a knowledge-centered framework that treats GNN design as a Bayesian inference problem. The pipeline consists of three main modules:

  • Graph Understanding: Instead of relying on text descriptions, DesiGNN uses "Confident Property Filtering." It identifies 16 graph properties (e.g., clustering, degree centrality, homophily) and uses empirical benchmarks to determine which ones are actually reliable indicators of model performance.
  • Knowledge Retrieval: The system builds a "Knowledge Pool" by identifying benchmark graphs structurally similar to the new, unseen dataset. Crucially, it uses an LLM as a "meta-controller" to adaptively weight these properties based on insights elicited from graph learning literature, ensuring the similarity metric is performance-oriented.
  • Model Suggestion and Refinement:
    • Initial Suggestion (Desi-Init): The LLM samples initial proposals based on the accumulated meta-knowledge.
  • Knowledge-Driven Refinement: The framework iteratively improves these models through "Controlled Exploration" (crossing over successful patterns from the knowledge pool) and "Directional Exploitation" (LLM-guided mutations based on training feedback).
Figure 2: The illustration of our knowledge-centered DesiGNN pipeline for designing GNNs.

Datasets

The framework was evaluated using:

  • NAS-Bench-Graph: A massive benchmark containing 9 datasets (Cora, Citeseer, PubMed, CS, Physics, Photo, Computer, and ogbn-arXiv) and over 26,000 unique GNN architectures with recorded performance.
  • Out-of-Distribution (OOD) Datasets: To test generalization, the authors included DBLP, Flickr, and Actor. These are particularly challenging because they often exhibit heterophily (nodes with different labels are linked), where standard GNN designs typically fail.

Key Insights and Ideas

  • Semantic $\neq$ Structural: The most profound insight is that semantic similarity (e.g., both datasets are about "social networks") is a poor predictor of GNN performance. Structural similarity (e.g., both have similar homophily ratios) is what matters.
  • LLMs as Knowledge Aligners: Rather than asking an LLM to "design a GNN," DesiGNN asks the LLM to "align these empirical properties with what you know from research papers." This grounds the LLM's reasoning in hard data while leveraging its vast training corpus of academic literature.
  • Bayesian Proficiency: By approximating the posterior belief of a model's success before training it, DesiGNN achieves "proficiency"—the ability to make expert-level decisions with minimal trial and error.

Key Results

  • Zero-Shot Excellence: The initial proposals from Desi-Init (delivered in ~10 seconds) outperformed manual designs and classical AutoML baselines across 11 datasets.
  • Top-Tier Ranking: Initial suggestions consistently ranked in the top 5.77% of the entire search space of 26,206 architectures.
  • Efficiency: DesiGNN reached higher accuracy levels in just 10 model validations than other state-of-the-art methods (like GNAS or Auto-GNN) could reach in 100 validations.
  • Robustness: On heterophily-heavy datasets like Actor, DesiGNN significantly outperformed human-designed models like GCN and GAT, which struggle when information propagation is counter-intuitive.

Limitations and Future Work

  • LLM Dependency: The system's performance is tied to the reasoning capabilities of the underlying LLM (e.g., GPT-4 vs. Llama-2). While Llama-2 performed well, GPT-4 showed superior "next-step" reasoning during refinement.
  • Knowledge Base Constraints: The current implementation relies on NAS-Bench-Graph. Expanding the knowledge pool to include even more diverse graph types and larger-scale datasets would further enhance its proficiency.
  • API Latency: While the system logic takes milliseconds, the total time is currently dominated by LLM API communication (averaging ~10 seconds per call).
  • Future Direction: The authors suggest that this "knowledge-accumulating" paradigm could be extended beyond GNNs to other specialized domains like time-series forecasting or combinatorial optimization.

Summary updated

BibTeX
@inproceedings{wang2026proficient,
  author = {Jialiang Wang and Hanmo Liu and Shimin Di and Zhili Wang and Jiachuan Wang and Lei Chen and Xiaofang Zhou},
  title = {{Proficient Graph Neural Network Design by Accumulating Knowledge on Large Language Models}},
  booktitle = {WSDM},
  year = {2026},
  doi = {10.1145/3773966.3777982},
}
Figure