HiGPT: Heterogeneous Graph Language Model

Jiabin Tang, Yuhao Yang, Wei Wei, Lei Shi, Long Xia, Dawei Yin, Chao Huang

Abstract

Heterogeneous graphs are essential for representing complex real-world data, yet existing Heterogeneous Graph Neural Networks (HGNNs) often struggle with distribution shifts and data scarcity. We present HiGPT, a generalist large graph language model that leverages an in-context heterogeneous graph tokenizer and a Mixture-of-Thought (MoT) instruction tuning paradigm. HiGPT achieves significant zero-shot and few-shot performance across diverse domains, demonstrating superior structural reasoning and cross-dataset generalization compared to traditional specialist models.

Introduction

In graph machine learning, heterogeneous graphs—containing diverse node and relation types—are the gold standard for complex data representation. However, current HGNNs are typically "specialists," trained and fine-tuned on specific datasets. This leads to failure under distribution shifts, such as moving from a movie database to an academic citation graph. Furthermore, fine-tuning requires substantial labeled data. HiGPT addresses these challenges by aiming for a "generalist" model capable of understanding heterogeneous logic across any graph structure.

Methodology

HiGPT introduces three core innovations to bridge the gap between Large Language Models (LLMs) and complex graph structures.

In-Context Heterogeneous Graph Tokenizer

Instead of hard-coding node types, HiGPT employs natural language descriptions (e.g., "This node represents a movie") to generate universal representations. An adaptive parameterized heterogeneity projector dynamically aligns the model with the specific schema of the input graph.

Overview of the HiGPT framework, illustrating the integration of language-enriched representations with a Heterogeneous Graph Transformer.

Heterogeneous Graph Instruction Tuning

The model follows a two-stage training process. First, it develops "relation awareness" by matching graph tokens to textual descriptions across a large corpus. Second, task-specific tuning aligns the model's reasoning with human instructions.

Mixture-of-Thought (MoT) Augmentation

To address data scarcity, HiGPT utilizes a Mixture-of-Thought (MoT) paradigm. By leveraging LLMs to generate diverse reasoning paths—such as Chain-of-Thought (CoT), Tree-of-Thought (ToT), and Panel simulations—the model learns how to reason about graph connections rather than merely memorizing labels.

The Mixture-of-Thought (MoT) simulation process used to generate diverse reasoning paths for instruction tuning.

Experimental Results

HiGPT was evaluated on IMDB, DBLP, and ACM datasets, focusing on cross-dataset generalization.

  • Zero-Shot Performance: When trained on IMDB and tested on DBLP, HiGPT significantly outperformed traditional baselines, demonstrating a generalizable understanding of graph heterogeneity.
  • Few-Shot Efficiency: On the IMDB dataset, HiGPT achieved a Macro-F1 score of 0.5247 with just a single training shot, surpassing traditional models like HAN or HGT that utilized 60 labeled examples.
  • Graph In-Context Learning (ICL): Providing a few example nodes in the prompt significantly boosts performance without weight updates, mirroring the ICL capabilities of standard LLMs.
  • Ablation Study: Removing graph tokens (w/o HG) resulted in a substantial accuracy drop, confirming the model's reliance on structural graph information rather than text alone.

Conclusion

HiGPT represents a significant advancement toward generalist graph models. While it demonstrates remarkable zero-shot and few-shot capabilities, challenges remain regarding computational overhead and scaling to billion-node graphs. Future work will explore larger instruction corpora and more complex graph-to-text reasoning tasks.

Summary updated

BibTeX
@inproceedings{tang2024higpt,
  author = {Jiabin Tang and Yuhao Yang and Wei Wei and Lei Shi and Long Xia and Dawei Yin and Chao Huang},
  title = {{HiGPT: Heterogeneous Graph Language Model}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
}
Figure