Heterogeneous Graph Neural Architecture Search with GPT-4

Haoyuan Dong, Yang Gao, Haishuai Wang, Hong Yang, Peng ZhangarXiv 2023 · OpenReview

TL;DR

This paper introduces GHGNAS, a novel method for automatically designing Heterogeneous Graph Neural Networks (HGNNs) by leveraging the power of GPT-4. By crafting specific prompts that guide GPT-4 through a search and feedback loop, GHGNAS achieves more efficient and stable architecture discovery compared to existing methods.

What Problem Does This Paper Address?

Heterogeneous graphs, which represent complex relationships between different types of entities (think social networks or recommendation systems), are crucial for many real-world applications. Heterogeneous Graph Neural Networks (HGNNs) are designed to capture the rich information within these graphs. However, designing effective HGNN architectures is a challenging task, often requiring significant human expertise. Existing automated methods for HGNN architecture search (HGNAS) have struggled with inefficient search processes and unstable results, sometimes yielding architectures that perform worse than manually designed ones. This paper aims to address these limitations by introducing a more efficient, stable, and less expertise-dependent approach to HGNAS.

Methods

The core innovation of this work is the use of GPT-4, a large language model, to perform Heterogeneous Graph Neural Architecture Search (HGNAS). The proposed method, GHGNAS, frames the architecture search as a conversational process with GPT-4.

Here's how it works:

  • Prompt Engineering: The researchers designed a specific set of prompts that guide GPT-4. These prompts include:
  • A description of the downstream task (e.g., node classification, recommendation).
  • Information about the heterogeneous graph itself (node and edge types).
  • Details about the search space (available GNN operations and aggregation functions).
  • A search strategy (balancing exploration and exploitation).
  • Feedback from previously evaluated architectures.
  • Iterative Generation and Evaluation: GPT-4, guided by these prompts, generates candidate HGNN architectures. These architectures are then converted into actual HGNN models and evaluated on a downstream task.
  • Feedback Loop: The performance results (accuracy) of the evaluated architectures are fed back into the prompts. This feedback loop allows GPT-4 to learn from its previous generations and refine its search, aiming to discover better architectures.
  • Exploration and Optimization Stages: The search process is divided into two stages:
  • Exploration: GPT-4 is encouraged to explore a wide range of architectures to avoid local optima.
  • Optimization: GPT-4 analyzes the best-performing architectures found so far and uses this knowledge to generate even better ones.

This approach leverages GPT-4's powerful generalization capabilities to navigate the complex search space of HGNNs.

Datasets

The paper evaluates GHGNAS on several standard datasets for two common tasks:

  • Node Classification:
    • ACM
    • DBLP
  • Recommendation (Link Prediction):
    • Amazon
    • Yelp

These datasets are standard benchmarks in the field and are used in their original partitioning methods.

Key Insights and Ideas

  • LLMs as Architecture Designers: The paper demonstrates that large language models like GPT-4 can be effectively employed for complex architecture search tasks, significantly reducing the need for domain-specific expertise.
  • Prompt Engineering is Key: The success of GHGNAS hinges on carefully crafted prompts that provide GPT-4 with the necessary context, constraints, and feedback to guide its search.
  • Exploration-Exploitation for LLMs: Adapting the classic reinforcement learning strategy of exploration and exploitation to the LLM interaction process proves effective for discovering high-performing architectures.
  • Interpretability through Conversation: While GPT-4 acts as a black-box optimizer, the conversational nature of the interaction allows for some level of interpretability, as GPT-4 can provide insights into its reasoning and preferred operations.
  • Robustness to Seeds: Unlike some previous methods that are highly sensitive to random seeds, GHGNAS exhibits more stable performance across different search runs.

Key Results

  • Superior Performance: GHGNAS consistently outperforms existing HGNAS methods (based on reinforcement learning and differentiable search) and manually designed HGNNs on the tested datasets. For instance, on the DBLP dataset, GHGNAS achieved a rank of 3 in a benchmark search space.
  • Efficiency and Stability: The method is shown to be more efficient and stable than previous approaches, with GHGNAS achieving superior average performance across multiple search iterations.
  • Generalization: GHGNAS demonstrates the ability to design effective architectures even when provided with limited information about the specific datasets, highlighting GPT-4's generalization capabilities.
  • Meta-Structure Discovery: In a constrained search space, GHGNAS successfully identified optimal meta-paths (e.g., PAP for ACM, APV for DBLP), leading to improved performance.

Limitations and Future Work

  • API Costs: A significant limitation is the reliance on OpenAI's API, which incurs costs. The authors suggest exploring other LLMs in the future.
  • Reproducibility of Optimization: While the process is somewhat interpretable, the inherent randomness in LLM generation means that exact reproducibility of the optimization path can be challenging.
  • Manual Search Space Design: GHGNAS still relies on a pre-defined search space. Future work aims to extend GHGNAS to also automate the formulation and exploration of search spaces, further reducing human dependency.
  • Exploring Other LLMs: The authors plan to investigate the use of other LLMs, including free alternatives, to make the approach more accessible.

Summary updated

Abstract

Heterogeneous graph neural architecture search (HGNAS) represents a powerful tool for automatically designing effective heterogeneous graph neural networks. However, existing HGNAS algorithms suffer from inefficient searches and unstable results. In this paper, we present a new GPT-4 based HGNAS model to improve the search efficiency and search accuracy of HGNAS. Specifically, we present a new GPT-4 enhanced Heterogeneous Graph Neural Architecture Search (GHGNAS for short). The basic idea of GHGNAS is to design a set of prompts that can guide GPT-4 toward the task of generating new heterogeneous graph neural architectures. By iteratively asking GPT-4 with the prompts, GHGNAS continually validates the accuracy of the generated HGNNs and uses the feedback to further optimize the prompts. Experimental results show that GHGNAS can design new HGNNs by leveraging the powerful generalization capability of GPT-4. Moreover, GHGNAS runs more effectively and stably than previous HGNAS models based on reinforcement learning and differentiable search algorithms.
BibTeX
@misc{dong2023heterogeneous,
  author = {Haoyuan Dong and Yang Gao and Haishuai Wang and Hong Yang and Peng Zhang},
  title = {{Heterogeneous Graph Neural Architecture Search with GPT-4}},
  year = {2023},
  eprint = {2312.08680},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.08680},
}
Figure