Disentangling Homophily and Rarity: Explaining Failure in Graph Neural Networks
Organizations: Simula Research Laboratory
Abstract
Are heterophilic nodes in a graph harder to classify because they are heterophilic or because they are rare? Some existing work frames classification of such nodes as a subgroup generalisation problem, where a model performs well on the majority group at the expense of the rare group. Others explain this as a problem of neighbourhood aggregation in graph neural networks (GNNs). We assess these two viewpoints through a detailed evaluation of six GNNs on five datasets of varying homophily, and find that homophilic nodes tend to be easier to classify, even when they are rare---challenging the subgroup framing. However, our findings also nuance existing beliefs about how GNNs misrepresent heterophilic nodes. We demonstrate that the information needed to classify heterophilic nodes correctly is often recoverable by retraining the classification head of a model, or even just the final linear classification layer.
Figures & tables
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Deviation |
|---|
| The registered code used scikit-learn’s default label set for macro-F1. This takes the union of the labels in the true values and predictions, so the classes included in the average could vary between evaluations. We replaced this with the classes present in the evaluated subset’s true labels. The Roman-empire recovery experiments were rerun because the error also affected the validation score used for checkpoint selection. All macro-F1 scores were then recalculated using the corrected definition. |
| The preregistration described a rule where only classes with at least 10 tail test nodes should be included in class-wise accuracy comparisons. In contrast, for macro-F1, all classes represented among the tail nodes. Although motivated by removing noisy results, we felt the rule was too arbitrary and changed it so that class-wise accuracy now uses the same rule as the existing macro-F1. All dependent estimates, tables, and figures were recalculated. The only visible difference on the plotted figures was that the class-adjustment of Roman-empire in Figure 4 became less conclusive, with the adjusted models landing either side of 0. |
| Minor grammatical, nomenclature, and notation adjustments were made to the RQ formulations. For example, we use the term rare homophily tail in this paper, instead of minority pattern tail , which is used in the preregistration. |
| Model | Encoder | Training |
|---|---|---|
| MLP [ 24 ] | Shared backbone; model-specific operation is the identity, so each block has no graph access. | AdamW, lr , wd 0, 1000 steps. |
| GCN [ 26 ] | Shared backbone; parameter-free symmetric degree-normalised neighbour aggregation ( ). Self-loops added. | AdamW, lr , wd 0, 1000 steps. |
| GraphSAGE-mean [ 27 ] | Shared backbone; concatenation of the node state and mean neighbour state (1024-dimensional), followed by an FFN with widths . No self-loops. | AdamW, lr , wd 0, 1000 steps. |
| H2GCN-2 [ 11 ] | Ego and neighbour separation over exact 1-hop and 2-hop indicator matrices, each symmetrically normalised; network_setup = M73-R-T1-G-V-T2-G-V-C1-C2-D0.5 ; internal width 73; input-feature normalisation on; dropout 0.5. the native 7-block concatenation (511-dim); the source output layer is removed. | Adam, lr 0.01, L2 , 2000 epochs. |
| GPR-GNN [ 12 ] | Two-layer MLP feature extractor (width 512), then learned GPR propagation: , , personalised PageRank initialisation; feature dropout 0.5, propagation dropout 0.5. (512-dim). | Adam, lr 0.002, wd on the linear layers and 0 on , 1000 epochs. |
| ACM-GCN [ 13 ] | Plain acmgcn : one layer, one hop; three channels (low-pass aggregation, high-pass diversification, identity) mixed per node by learned attention; variant=0 , structure_info=0 ; width 512. the mixed representation (512-dim). | AdamW, lr 0.01, wd , dropout 0.5, 500 epochs (the authors’ large-scale protocol). |
| Procedure | Runs | GPU-hours |
|---|---|---|
| 1,050 | 179.714 | |
| 1,050 | 19.095 | |
| 1,050 | 53.941 | |
| 1,050 | 177.189 | |
| Total | 4,200 | 429.939 |
| Dataset | Bin | Nodes | % of nodes |
|---|---|---|---|
| PubMed | 2,696 | 13.7 | |
| (homophilic, mean 0.792) | 524 | 2.7 | |
| 1,891 | 9.6 | ||
| 14,606 | 74.1 | ||
| ogbn-arxiv | 30,364 | 17.9 | |
| (homophilic, mean 0.635) | 20,524 | 12.1 |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | ||||
| Designed model | Standard baseline | PubMed | ogbn-arxiv | |
| H2GCN-2 | GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | ||
| GPR-GNN | GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | ||
| ACM-GCN | GCN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | |||
| Model | PubMed | ogbn-arxiv | |
| MLP | [-1pt] | [-1pt] | |
| GCN | [-1pt] | [-1pt] | |
| GraphSAGE-mean | [-1pt] | [-1pt] | |
| H2GCN-2 | [-1pt] | [-1pt] | |
| GPR-GNN | [-1pt] | [-1pt] | |
| Low-homophily tail | High-homophily tail | ||||
|---|---|---|---|---|---|
| Model | PubMed | ogbn-arxiv | Roman-empire | Amazon-ratings | arxiv-year |
| GCN | |||||
| GraphSAGE-mean | |||||
| H2GCN-2 | |||||
| GPR-GNN | |||||
| ACM-GCN | |||||
| Low-homophily tail | High-homophily tail | ||||
|---|---|---|---|---|---|
| Model | PubMed | ogbn-arxiv | Roman-empire | Amazon-ratings | arxiv-year |
| GCN | |||||
| GraphSAGE-mean | |||||
| H2GCN-2 | |||||
| GPR-GNN | |||||
| ACM-GCN | |||||
| Model | |||||
|---|---|---|---|---|---|
| ACM-GCN | [-1pt] | [-1pt] | [-1pt] | [-1pt] | [-1pt] |
| GCN | [-1pt] | [-1pt] | [-1pt] | [-1pt] | [-1pt] |
| GraphSAGE-mean | [-1pt] | [-1pt] | [-1pt] | [-1pt] | [-1pt] |
| Model | Procedure | FG-CCDB gain [95% CI] | GroupDRO gain |
|---|---|---|---|
| GraphSAGE-mean | [-1pt] | +.116 | |
| [-1pt] | +.156 | ||
| [-1pt] | +.162 | ||
| GCN | [-1pt] | +.025 | |
| [-1pt] | +.108 | ||
| [-1pt] | +.122 |