When to Pre-Train Graph Neural Networks? From Data Generation Perspective!

Yuxuan Cao, Jiarong Xu, Carl Yang, Jiaan Wang, Yunchao Zhang, Chunping Wang, Lei Chen · DOI · OpenReview

TL;DR

This paper introduces W2PGNN, a novel framework that addresses the critical question of when to use graph pre-training for Graph Neural Networks (GNNs). Instead of relying on costly trial-and-error, W2PGNN quantifies the "feasibility" of pre-training by modeling the data generation process, helping researchers avoid negative transfer and select optimal pre-training data.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have shown remarkable success in various domains. To overcome the challenge of limited labeled data, a common practice is "pre-training" on large unlabeled graph datasets to learn transferable knowledge, followed by "fine-tuning" on specific downstream tasks. However, a significant issue is "negative transfer," where pre-training actually hurts downstream performance, especially when pre-training and downstream data come from different domains or have conflicting underlying patterns. Existing research has focused on what to pre-train and how to pre-train, but this paper tackles the fundamental question of when pre-training is beneficial in the first place, before investing significant computational resources.

Methods

The core of W2PGNN lies in a data generation perspective. Instead of directly comparing pre-training and downstream graphs, W2PGNN models how downstream graphs could be generated from the pre-training data.

  1. Graphon Basis: Pre-training data is first fitted into "graphons," which are mathematical objects representing the limiting behavior of graph sequences and can be thought of as continuous summaries of graph patterns. A set of these graphons forms a "graphon basis," where each graphon captures a fundamental transferable pattern.
  2. Generator Space: A "graph generator" is created as a convex combination of these graphon basis elements. This generator represents a comprehensive summary of the pre-training data's transferable knowledge. The space of all possible generators forms the "generator space."
  3. Feasibility Quantification: The feasibility of pre-training for a given downstream graph is quantified by the maximum probability that the downstream graph can be generated by any generator within the generator space. This is approximated by minimizing the distance between the downstream graph's graphon representation and the generators.
  4. Graphon Basis Selection: To manage complexity, W2PGNN proposes three types of graphon bases: integrated (assuming high similarity), domain (leveraging domain information), and topological (focusing on structural similarity).

Datasets

The paper uses a variety of datasets for evaluation:

  • Node Classification (Pre-training): Academia (Academia, DBLP(SNAP), DBLP(NetRep)), Movie (IMDB), Social (Facebook, LiveJournal).
  • Node Classification (Downstream): US-Airport, Europe-Airport, H-Index, Chameleon.
  • Graph Classification (Pre-training): ZINC15 dataset, split into five subsets (ZINC15-0 to ZINC15-4) based on molecular scaffolds.
  • Graph Classification (Downstream): BACE, BBBP, MUV, HIV, ClinTox (from MoleculeNet).

Key Insights and Ideas

  • Shifting Focus from "How" to "When": The paper argues that understanding when pre-training is beneficial is a prerequisite to optimizing how it's done. This is crucial for avoiding wasted effort and negative transfer.
  • Generative Modeling as a Solution: By framing the problem as data generation, W2PGNN provides a principled way to assess transferability. If a downstream graph can be "generated" by a model trained on pre-training data, it's likely to benefit.
  • Graphons as Powerful Summaries: Graphons offer a robust mathematical framework to represent and combine complex graph patterns, allowing for a more nuanced understanding of transferability than simple graph metrics.
  • The Importance of Diverse Graphons: The proposed three types of graphon bases (integrated, domain, topological) highlight that different aspects of graph structure and domain information can contribute to transferability, and a combination is often best.
  • Feasibility as a Predictor: The core insight is that the estimated "feasibility" of pre-training strongly correlates with actual downstream performance, acting as a reliable indicator.

Key Results

  • High Correlation: W2PGNN consistently shows a strong positive Pearson correlation coefficient between its estimated pre-training feasibility and the best achieved downstream performance across various node and graph classification tasks. This indicates its effectiveness in predicting beneficial pre-training scenarios.
  • Superiority over Baselines: W2PGNN generally outperforms baseline methods (e.g., Graph Statistics, EGI) in predicting pre-training feasibility, often achieving the highest overall ranking.
  • Effective Data Selection: Experiments demonstrate that W2PGNN can effectively select pre-training datasets that lead to superior downstream performance compared to using all available pre-training data or relying on simpler heuristics. This also offers computational savings.
  • Theoretical Justification: The paper provides theoretical proofs for the properties of the generator space and the preservation of transferable patterns, grounding the empirical findings.

Limitations and Future Work

  • Computational Cost of Graphon Estimation: While W2PGNN is more efficient than exhaustive "pre-train and fine-tune" approaches, the estimation of graphons can still be computationally intensive, especially for very large graphs.
  • Approximation of Feasibility: The paper relies on approximations for GW distance and graphon estimation, which might introduce some error.
  • Future Work: The authors suggest exploring more sophisticated graphon basis selection strategies and investigating the application scope of pre-trained models more deeply. Further research could also focus on developing more efficient graphon estimation techniques.

Summary updated

BibTeX
@inproceedings{cao2023when,
  author = {Yuxuan Cao and Jiarong Xu and Carl Yang and Jiaan Wang and Yunchao Zhang and Chunping Wang and Lei Chen and Yang Yang},
  title = {{When to Pre-Train Graph Neural Networks? From Data Generation Perspective!}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
  doi = {10.48550/arxiv.2303.16458},
}
Figure