Message-passing graph neural networks (GNNs) aggregate the features of neighboring nodes, which can hurt under heterophily, i.e., when connected nodes tend to differ in label. We distinguish two heterophily regimes, namely adversarial, where cross-class edges dilute the class signal and harm classification, and informative, where the heterophilous structure itself carries useful signal. We ask when it helps to process the message of each edge individually (per-edge routing), and when it suffices to treat all edges alike. To study this question, we introduce Cost-Sensitive Neighborhood Aggregation (CSNA), a GNN layer that computes the distance between the endpoints of each edge in a learned projection. It uses this distance to weight each message in two channels with independent transformations, for likely same-class and likely cross-class neighbors. Under a contextual stochastic block model, we show that mean aggregation can reverse the direction of the difference between the class means under heterophily, and that weighting same-class edges sufficiently more than cross-class edges preserves it. On six benchmarks, under a common tuning protocol, CSNA is within 0.5 percentage points of the most accurate method on two of the four adversarial-heterophily datasets and 4 to 5 points below it on the other two. On the two informative-heterophily datasets, it is about 13 and 16 points below a standard graph convolutional network (GCN). The learned distance separates same-class from cross-class edges only weakly (an AUC of 0.52 to 0.73), with no consistent difference between the regimes. Thus, on these benchmarks, we find no evidence that per-edge routing in this form adds value over uniform channels. Code is available at https://github.com/eyal-weiss/CSNA-public.
翻译:暂无翻译