DiffMG: Differentiable Meta Graph Search for Heterogeneous Graph Neural Networks

Yuhui Ding, Quanming Yao, Huan Zhao, Tong Zhang

Introduction

Heterogeneous Information Networks (HINs), such as the Microsoft Academic Graph, are characterized by diverse node types (e.g., authors, papers, venues) and complex edge relationships. Traditional Graph Neural Networks (GNNs) designed for HINs rely on meta paths—predefined linear sequences of node types—to guide neighbor aggregation. However, this approach suffers from significant limitations: it requires extensive manual domain expertise, is restricted to linear sequences that cannot capture branching semantics, and often struggles with computational efficiency or noise when automated.

To address these challenges, we introduce DiffMG (Differentiable Meta Graph Search), a novel framework that automates the discovery of complex semantic relationships using a differentiable neural architecture search (NAS) over a space of "meta graphs."

Methodology

DiffMG redefines the discovery of relational semantics as a NAS problem, moving beyond simple paths to more expressive Directed Acyclic Graph (DAG) structures.

Meta Graph Search Space

Instead of searching for linear paths, DiffMG searches for meta graphs represented as DAGs. This allows node representations to be formed by merging multiple incoming message-passing streams, capturing richer, non-linear semantics. To manage the search space, the framework incorporates Task-Dependent Type Constraints, which prune edge types that cannot logically reach the target node type based on the graph schema.

The search space for meta graph discovery (K=2) illustrating how different node types and relations are sampled within a DAG structure.

Standard differentiable NAS methods are often memory-intensive. DiffMG employs a sampling-based approach: in each iteration, it samples only one candidate edge type per link in the DAG based on current architecture weights. This strategy, combined with bi-level optimization of GNN weights and architecture parameters, keeps the search cost comparable to training a single model.

Key Results

We evaluated DiffMG across six real-world datasets for node classification (DBLP, ACM, IMDB) and recommendation (Yelp, Douban, Amazon).

Performance and Efficiency

DiffMG consistently outperformed state-of-the-art baselines, including HAN, MAGNN, and HGT. For example, on the IMDB classification task, it achieved a 61.04% Macro F1, surpassing the next best baseline, GTN.

Beyond accuracy, the efficiency gains are substantial. On the Amazon dataset, DiffMG found an optimal architecture in just 0.7 GPU minutes, compared to 800 GPU minutes required by evolutionary search methods like GEMS. Furthermore, DiffMG maintains a manageable memory footprint, avoiding the Out-of-Memory (OOM) errors common in attention-based models on large-scale graphs.

Validation AUC vs. GPU training time on Yelp and Douban datasets, demonstrating DiffMG's superior convergence speed and performance compared to GCN and HGT.

Discussion and Future Work

Our results confirm that branching meta graphs are more expressive and effective than linear meta paths. The integration of type constraints and sampling-based NAS allows for high-performance HIN learning without the prohibitive costs of manual design or exhaustive search.

While currently focused on GCN-based aggregators and static graphs, future work will explore extending DiffMG to dynamic or temporal HINs and incorporating a wider variety of aggregation styles (e.g., GAT or GIN). Additionally, a formal theoretical analysis of the convergence of this sampling-based differentiable search remains an open research direction.

Summary updated

BibTeX
@inproceedings{ding2021diffmg,
  author = {Yuhui Ding and Quanming Yao and Huan Zhao and Tong Zhang},
  title = {{DiffMG: Differentiable Meta Graph Search for Heterogeneous Graph Neural Networks}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2021},
  doi = {10.1145/3447548.3467447},
}
Figure