Many real graphs mix several kinds of things: authors, papers and venues, or users, products and sellers. A common way to model them is through meta-paths, which are fixed recipes for walking between node types. "Author, then a paper they wrote, then another author of that paper" is one example. Each recipe defines a different notion of "neighbor." A model builds one representation per recipe and then blends them. Today two things are fixed ahead of time for the whole graph: a human decides which recipes exist, and the model learns one importance weight per recipe. We propose to drop both assumptions. We would enumerate every short type-valid recipe automatically. A small learned gate, looking at each node's own features and a cheap summary of what each recipe's neighborhood looks like from that node, would then pick and weight a handful of recipes for that node alone. This borrows from adaptive feature fusion, the family of methods that compute input-dependent weights to decide which of several feature streams to trust.
The case for this rests on heterophily. Heterophily means connected nodes often carry different labels. In a heterophilous graph, a recipe that surrounds one node with same-label neighbors can surround another node with misleading ones. A single graph-wide weight must average over both cases. If per-node selection helps, the gain should be concentrated on graphs and on nodes where recipes disagree. On clean academic benchmarks it should mostly vanish. This prediction is falsifiable, and we treat it as the main test.
Core Claim
The weakness of current meta-path fusion is that it is global, not that it lacks capacity. Heterogeneous Graph Attention Network (HAN) runs attention within each meta-path neighborhood. It then computes one importance score per meta-path by averaging over all nodes before a softmax. Every node therefore receives the same blend. MAGNN keeps the intermediate nodes along each path instance, which fixes HAN's loss of path context. It keeps the same scalar, graph-level blending across meta-paths. MECCH shows that this attention overfits and needs full-batch training. It replaces the attention with mean pooling over "metapath contexts" (local subgraphs that contain each node once) plus a 1-D convolution across meta-paths. That convolution is trained once and applied identically to every node. All three rely on hand-chosen meta-path lists.
Our claim is that a node-conditional, sparse gate over an automatically enumerated set of candidate meta-paths does three things:
- It outperforms these global schemes on heterophilous heterogeneous graphs.
- It matches them on homophilous ones.
- It makes a hand-written meta-path list unnecessary.
The gate has to be small. That keeps it clear of the overfitting MECCH documents.
Research Program
Enumerating candidates. For a target node type, we list all type-valid meta-paths up to a fixed length $L$ (we plan $L \le 4$). On ogbn-mag-style schemas this gives tens of candidates rather than the usual two or three. Each candidate's neighborhood is summarized MECCH-style: a parameter-free mean over its metapath context, computed with sparse matrix products and precomputed once. This avoids the path-instance explosion that makes MAGNN costly.
Fusing per node. For node $v$ and candidate meta-path $m$, let $z_v^m$ be the pooled context embedding after a shared type-aware projection. Let $x_v$ be the node's own projected features. The fused representation is
$$h_v = x_v + \sum_{m \in S_v} g_{v,m}\, z_v^m,$$
where $g_{v,m}$ is a weight produced by a small scoring network $r$.
- What the scoring network sees. $r$ takes as input $x_v$, the mean of $z_v^m$, and the cosine similarity between $x_v$ and $z_v^m$. The similarity is a label-free proxy for how much the path's neighborhood resembles the node.
- Which paths are kept. $S_v$ is the top-$k$ set of candidates by that score. Training uses a straight-through relaxation, and weights are renormalized over $S_v$.
- Signed weights. Weights may be negative. The model can then subtract a neighborhood that is reliably dissimilar, which is one simple way heterophilous signal becomes usable.
We will study a scalar $g_{v,m}$ and a channel-wise $g_{v,m} \in \mathbb{R}^d$ separately. The file's fusion literature argues for channel-wise gates: FFA-Net uses channel and pixel attention to fuse feature maps from different depths, and ComBo uses a light transformer over features from multiple frozen backbones. We expect node-conditioning, not channel resolution, to carry most of the gain, and we test that directly.
Defining meta-paths from the gate. Aggregating how often each candidate is selected gives a data-driven meta-path definition. It can be compared with the expert lists, for example HAN's finding that APCPA matters more than APA on DBLP. It can also be compared with the global structures found by DiffMG, which uses differentiable architecture search to pick one meta-graph per task. Our selection differs in being per node and in being made at inference time.
Baselines
Naive reference. Uniform averaging over the same enumerated candidates, trained with the same encoder. It shows whether weighting matters at all once the candidate set is large.
Strongest meta-path method. MECCH with its 1-D convolutional fusion, run two ways: on the standard hand-picked meta-paths, and on our full enumerated set. Its reported advantage is an average gain of "around 2.59%" over RGCN, HGT, Simple-HGN, HAN, MAGNN and GTN on IMDB, ACM and DBLP. On IMDB specifically, MAGNN reports Macro-F1 of 61.44% against HAN's 58.51%, so beating MAGNN there means clearing 61.44% Macro-F1 under the same splits.
Strongest heterophilous baseline. H2G-former from When Heterophily Meets Heterogeneity, which uses masked label embeddings and cross-type attention with no meta-paths. It reports 28.47% accuracy on oag-cs versus 22.51% for HGT. Our target is to exceed 28.47% on oag-cs, or to match it at lower cost. We would also compare against its average rank of 1.1 across the benchmark.
HAN. Run with enumerated candidates as the global-scalar reference.
Ablations. Four ablations isolate the key ingredient:
- the same gate made node-invariant, by averaging the scores over nodes, which is HAN-like;
- node-invariant channel-wise weights, which is MECCH-like;
- node-conditional scalar weights;
- node-conditional channel-wise weights.
Fair comparison. All methods share the enumerated contexts and the projection width. Each gets the same hyperparameter search budget, 30 trials per method per dataset, and the same five seeds. Where the H2GB protocol requires minibatch training, that applies to all methods. "Beating" means a mean improvement larger than two seed standard deviations.
Why not just…?
Why not just concatenate all meta-path embeddings and let an MLP mix them? An MLP that also receives the node's own features can in principle learn node-dependent mixing, so this is the most serious threat. Two things count against it. Its input and parameter count grow linearly with the number of candidates, which the fusion literature flags as overfitting-prone when labels are scarce. It also yields no sparse selection, so there is no meta-path definition to read off and no compute saved. We run concat-plus-MLP on the enumerated set with an equal tuning budget. If it matches our gate on H2GB, we will report that the benefit comes from enumeration rather than gating, and narrow the claim accordingly.
Why not just keep HAN-style scalar attention? HAN's own ablation shows semantic attention beats no attention. However, its score is averaged over all nodes by construction, so it cannot express "this path helps these nodes and hurts those." The node-invariant ablation of our gate is exactly this model. The stratified analysis below shows whether per-node choice matters.
Why not just use MECCH's 1-D convolution on more meta-paths? MECCH is strong, cheap, and avoids the variance of attention, and on ACM and DBLP it may well tie us. Its filter is identical for every node, though. We run it on the full enumerated set, so any gap is attributable to node-conditioning rather than to the candidate list.
Why not just search meta-graphs with DiffMG? DiffMG returns one structure per task. Where recipe usefulness varies across nodes, one structure is the wrong object. Where it doesn't vary, DiffMG should match us, and we will say so.
Proposed Experiments
Benchmarks.
- Homophilous: DBLP, ACM and IMDB for node classification (Micro/Macro-F1), and LastFM for link prediction (ROC-AUC). MAGNN reports 98.91% AUC on LastFM.
- Heterophilous: from H2GB, ogbn-mag, oag-cs, RCDD and IEEE-CIS-G.
First decisive check. We compute, per node, the spread of label agreement across candidate meta-paths using training labels only. We then report accuracy gains over MECCH and over the node-invariant ablation, broken down by that spread.
- If the proposal is right, gains rise with spread.
- Gains should be near zero on ACM and DBLP.
- Aggregate gains on H2GB should correlate with each dataset's $H^2$ index.
If gains are flat across strata, or appear only on homophilous data, the per-node claim is wrong.
Second decisive check. We compare the gate's aggregate selection on DBLP and IMDB with the expert meta-path lists. We also measure how much accuracy is lost when training uses only the gate's top-selected paths versus the expert list.
Efficiency. We report precomputation time and memory against MAGNN and MECCH.
References
- Heterogeneous Graph Attention Network
- MAGNN: Metapath Aggregated Graph Neural Network for Heterogeneous Graph Embedding
- MECCH: Metapath Context Convolution-based Heterogeneous Graph Neural Networks
- FFA-Net: Feature Fusion Attention Network for Single Image Dehazing
- Fantastic Features and Where to Find Them: A Probing Method to combine Features from Multiple Foundation Models
- DiffMG: Differentiable Meta Graph Search for Heterogeneous Graph Neural Networks
- When Heterophily Meets Heterogeneity: New Graph Benchmarks and Effective Methods