Abstract
Graph Neural Architecture Search (GNAS) has shown promising results in automatically designing graph neural networks. However, GNAS still requires intensive human labor with rich domain knowledge to design the search space and search strategy. In this paper, we integrate GPT-4 into GNAS and propose a new GPT-4 based Graph Neural Architecture Search method (GHGNAS). The basic idea of our method is to design a new class of prompts for GPT-4 to guide it toward the generative task of graph neural architectures. The prompts consist of descriptions of the search space, search strategy, and search feedback of GNAS. By iteratively running GPT-4 with the prompts, GHGNAS generates more accurate graph neural networks with fast convergence. Experimental results show that embedding GPT-4 into GNAS outperforms the state-of-the-art GNAS methods.
Introduction
Heterogeneous graphs—containing multiple types of nodes and edges, such as research networks with authors, papers, and venues—are ubiquitous but complex. Designing Neural Architecture Search (NAS) for these graphs is notoriously difficult because the search space is vast; researchers must decide how to aggregate messages across many different relationship types.
Existing Heterogeneous GNAS (HGNAS) methods often rely on Reinforcement Learning (RL) or differentiable algorithms like DARTS. These approaches suffer from two major flaws: inefficiency, requiring massive computational resources and human expertise to define search strategies, and instability, being highly sensitive to random seeds. To address these challenges, researchers have developed GHGNAS, the first framework that leverages GPT-4 to automatically design architectures for Heterogeneous Graph Neural Networks (HGNNs).
Methodology
GHGNAS treats the Large Language Model (LLM) as a "black-box optimizer" guided by carefully designed prompts. Instead of a mathematical controller, the system uses an iterative loop to refine neural architectures based on performance feedback.
The process follows four key steps:
- Prompting: GPT-4 is provided with a task description, graph metadata, the available search space (e.g., GCN, GAT, Sage operations), and a specific search strategy.
- Two-Stage Search:
- Exploration Stage: GPT-4 samples diverse architectures to avoid local optima.
- Optimization Stage: GPT-4 analyzes top-performing architectures to exploit successful patterns and refine the search.
- Evaluation & Feedback: Each generated architecture is trained and tested. Its performance metrics (e.g., Macro-F1 or AUC) are fed back into the prompt for the next iteration.
- Architecture Generation: GPT-4 outputs a sequence representing the chosen operations for each edge type and the final aggregation method.
Experimental Setup
The model was evaluated on four standard benchmarks representing classic heterogeneous structures:
- Node Classification: ACM (target: Paper) and DBLP (target: Author).
- Link Prediction: Amazon (User-Item) and Yelp (User-Business).
Key Results and Insights
GHGNAS outperformed popular baselines (HAN, MAGNN) and existing NAS methods (HGNAS, DiffMG) across all datasets. On ACM, it achieved a Macro-F1 of 92.37%, while on DBLP it reached 93.84%. For link prediction on Amazon and Yelp, GHGNAS achieved AUCs of 79.16% and 92.80%, respectively.
Several key insights emerged from the study:
- Stability and Convergence: The most significant advantage was consistency. Unlike traditional methods that show high variance across different seeds, GHGNAS consistently found top-tier architectures and required fewer iterations to converge.
- LLMs as Zero-Shot Experts: Even when specific dataset information was removed from the prompt, GPT-4 optimized architectures effectively, suggesting a strong generalized understanding of neural architecture principles.
- Interpretable Search: GPT-4 can explain its choices. For instance, it noted that GCN operations correlated strongly with high performance on specific edge types like (Author-Paper), while SAGE was often detrimental in final layers.
Limitations and Future Work
Despite its success, GHGNAS faces challenges regarding the cost of OpenAI API calls and the inherent randomness of LLM outputs. Furthermore, while GPT-4 selects the architecture, the "menu" of operations is still manually designed. Future research could explore LLMs designing the search space itself. Currently, the complexity of heterogeneous search requires high-tier models like GPT-4, as smaller LLMs struggle with the task requirements.
Summary updated