Generalize across Homophily and Heterophily: Hybrid Spectral Graph Pre-Training and Prompt Tuning

Haitong Luo, Suhang Wang, Weiyao Zhang, Ruiqi Meng, Xuying Meng, Yujun ZhangarXiv 2025 · DOI

Abstract

Graph Neural Networks (GNNs) typically rely on the homophily assumption, which limits their effectiveness on heterophilic graphs. We present HS-GPPT (Hybrid Spectral Graph Pre-training and Prompt Tuning), a novel framework designed to bridge this gap. By employing a hybrid spectral backbone and learnable prompt graphs that function as spectral reshapers, HS-GPPT enables effective knowledge transfer even when downstream graph structures differ significantly from pre-training data. Our evaluation across ten diverse datasets demonstrates that HS-GPPT consistently achieves state-of-the-art performance, particularly in low-data regimes.

Introduction

Most existing Graph Neural Networks (GNNs) are built on the homophily assumption—the principle that connected nodes tend to share similar features or labels. While this holds true for citation networks, many real-world graphs, such as chemical interaction or webpage networks, exhibit heterophily, where dissimilar nodes are more likely to connect.

Current graph "prompt tuning" paradigms, which adapt frozen pre-trained models to new tasks, often fail on heterophilic graphs. These methods typically rely on low-pass filters that smooth signals, effectively discarding the high-frequency information critical for heterophilic structures. This leads to two primary issues: a knowledge bottleneck, where high-frequency data is lost during pre-training, and a utilization bottleneck, where pre-trained knowledge is not fully aligned with downstream tasks.

Methods

HS-GPPT addresses these bottlenecks through a two-stage process: Hybrid Spectral Pre-training and Spectral-Aligned Prompt Tuning.

Hybrid Spectral Pre-training

To overcome the knowledge bottleneck, HS-GPPT utilizes a Beta Wavelet GNN (BWGNN) as its backbone. Unlike standard GCNs, BWGNN is a flexible architecture capable of acting as a low-pass, band-pass, or high-pass filter depending on its parameters. The model is pre-trained using a multi-view contrastive learning objective, which encourages the backbone to capture representations across the entire frequency spectrum.

The HS-GPPT framework, illustrating the pre-training and prompt tuning stages.

Spectral-Aligned Prompt Tuning

The core innovation of HS-GPPT lies in its use of prompt graphs—sets of virtual nodes and learnable edges—to adapt the frozen pre-trained model. These prompt graphs serve as "spectral reshapers," theoretically proven to adjust the input graph's frequency distribution to align with the pre-trained filters. By assigning a dedicated prompt to each filter in the backbone, HS-GPPT ensures that all pre-trained knowledge is effectively activated for the downstream task.

Key Results

The authors evaluated HS-GPPT in 5-shot learning scenarios across ten real-world datasets, ranging from highly homophilic (e.g., Cora, Pubmed) to highly heterophilic (e.g., Texas, Roman-empire).

F1 Score comparison across various datasets, highlighting the performance of the BWGNN-based framework.

HS-GPPT consistently outperformed state-of-the-art baselines in both transductive and inductive settings. The performance gains were most pronounced on heterophilic datasets. For example, on the Roman-empire dataset, HS-GPPT achieved an F1 score of 0.3520, significantly surpassing the next best baseline. Furthermore, the model demonstrated remarkable robustness, successfully transferring knowledge from homophilic pre-training graphs to heterophilic downstream tasks without the "negative transfer" issues common in previous methods.

Discussion and Conclusion

HS-GPPT formalizes the link between graph homophily and the spectral energy distribution, establishing that high-frequency signals are indispensable for heterophilic tasks. By treating prompts as structural adapters rather than simple feature vectors, the framework effectively bridges the gap between disparate graph structures.

While HS-GPPT is highly effective, its performance is sensitive to hyperparameters such as the connectivity threshold for prompt nodes. Future research may explore more complex topological patterns for prompts to further enhance spectral alignment and reduce sensitivity in extremely low-data regimes. Overall, HS-GPPT represents a significant step forward in developing generalizable graph models that can operate across the full spectrum of homophily and heterophily.

Summary updated

BibTeX
@misc{luo2025generalize,
  author = {Haitong Luo and Suhang Wang and Weiyao Zhang and Ruiqi Meng and Xuying Meng and Yujun Zhang},
  title = {{Generalize across Homophily and Heterophily: Hybrid Spectral Graph Pre-Training and Prompt Tuning}},
  year = {2025},
  eprint = {2508.11328},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.11328},
}
Figure