It Takes a Graph to Know a Graph: Rewiring for Homophily with a Reference Graph

Harel Mendelman, Haggai Maron, Ronen Talmon · Submission to ICLR 2026 · Rejected

TL;DR

Standard Graph Neural Networks (GNNs) struggle on heterophilic graphs because message passing naturally smooths representations across connected nodes with different class labels. Rather than designing complex, specialized architectures, this paper introduces REFine: a scalable rewiring framework that builds a feature-and-label-diffused "reference graph" to provably increase edge homophily. Equipping vanilla GNNs (GCN, GATv2, APPNP) with REFine allows them to match or outperform specialized heterophilic models while scaling linearly with graph size.

What Problem Does This Paper Address?

Standard GNN message passing acts as a local smoothing operator ("birds of a feather flock together"). When a graph exhibits high homophily (neighbors share the same label), smoothing acts as a beneficial low-pass filter. On heterophilic graphs (neighbors frequently belong to different classes), this smoothing blends representations across distinct classes, destroying linear separability and degrading classification accuracy.

Prior attempts to address heterophily have predominantly focused on crafting complex architectures (e.g., higher-order neighbor aggregation, adaptive PageRank weights). Meanwhile, graph rewiring has mostly targeted over-smoothing and over-squashing (using graph curvature or spectral gaps) rather than homophily. This paper asks: Can we instead fix the graph topology itself by rewiring edges to explicitly and provably enhance homophily?

Methods

The proposed framework, REFine, rethinks rewiring through the lens of a reference graph $G_r$:

  1. Theoretical Motivation (Embedding Smoothness vs. Separability): The authors prove a lower bound on Dirichlet energy $\operatorname{tr}(Z^T L Z) \ge \frac{\alpha_m |E|}{2\|W\|^2}(1 - H(G))$ for linearly separable embeddings $Z$. In low-homophily graphs, embeddings cannot be both smooth and linearly separable, demonstrating why smoothing harms heterophilic learning.
  2. Guaranteed Homophily Enhancement: By adding edges present in $G_r \setminus G$ or deleting edges in $G \cap G_r^c$, the expected homophily of the rewired graph is guaranteed to improve, provided the reference graph satisfies simple criteria (e.g., $H(G_r \setminus G) > H(G)$ for edge addition).
  3. Constructing $G_r$ via Label-Driven Diffusion: Because ground-truth test labels are unknown, simply connecting training nodes with identical labels causes severe overfitting. Instead, the authors construct a feature affinity kernel $D$ and a training-label kernel $P$, then compute a symmetric three-step diffusion: $$\Gamma = PDP$$ This propagates label information across unlabeled nodes using feature geometry. Row-wise thresholding transforms $\Gamma$ into an unweighted binary reference graph $G_r$.

  4. Scalability with METIS Clustering: To avoid $O(n^3)$ full-graph kernel operations on large graphs, the graph is partitioned using METIS into balanced clusters of size $c \in \{100, 500\}$. REFine rewires each cluster independently in $O(c^2 n)$ time, parallelizes across GPUs, and preserves inter-cluster edges.

Datasets

The authors evaluated on 13 real-world datasets spanning diverse sizes ($183$ to $421\text{k}$ nodes) and edge homophily ratios ($H(G) \in [0.04, 0.84]$):

  • Small-to-medium benchmarks: Cornell ($H=0.12$), Texas ($H=0.06$), Wisconsin ($H=0.17$), Chameleon ($H=0.23$), Squirrel ($H=0.20$), BlogCatalog ($H=0.40$), Actor ($H=0.21$).
  • Large-scale benchmarks: BGP ($10\text{k}$ nodes), Tolokers ($11\text{k}$ nodes), Roman-empire ($22\text{k}$ nodes, $H=0.04$), Questions ($48\text{k}$ nodes), EllipticBitcoin ($203\text{k}$ nodes), Genius ($421\text{k}$ nodes).
  • High-homophily benchmarks (Appendix): Cora, Citeseer, Pubmed.

(All datasets were obtained via PyTorch-Geometric, utilizing official splits or standard 60/20/20 splits, including leakage-filtered splits for Chameleon and Squirrel).

Key Insights and Ideas

  • Smoothing vs. Separability Tension: The theoretical bound explicitly formalizes why heterophily breaks vanilla GNNs: GNN aggregation drives Dirichlet energy down, but linear separability on heterophilic graphs forces it up.
  • Diffusion Completes Missing Labels: A reference graph cannot rely purely on training labels without hurting out-of-sample generalization. Running diffusion through features ($\Gamma = PDP$) transfers discrete class supervision into unobserved nodes, creating a reference graph with substantially higher homophily than node features alone ($D$).
  • Data-Driven Topology Over Architectural Hacks: Instead of building deeper multi-hop aggregators, standard GCN/GAT models on a REFine-rewired graph consistently beat specialized heterophilic architectures.
  • Higher Gains at Lower Homophily: Datasets with the lowest initial homophily (e.g., Roman-empire, Texas) experience the most dramatic performance boosts.

Key Results

  • Surpassing Existing Rewiring Baselines: Across GCN, GATv2, and APPNP, REFine outperforms curvature- and spectral-based rewiring methods (SDRF, FoSR, BORF):
  • Roman-empire ($H=0.04$): GCN accuracy jumps from $37.0\%$ (None) and $46.2\%$ (SDRF) to $58.8\%$ with REFine.
  • Wisconsin ($H=0.17$): GCN accuracy increases from $57.2\%$ to $82.5\%$; APPNP increases from $62.1\%$ to $86.0\%$.
  • Texas ($H=0.06$): GATv2 accuracy increases from $53.2\%$ to $82.4\%$.
  • Beating Specialized Heterophilic GNNs: Standard GNNs + REFine outperform or match models like MixHop, $H_2$GCN, GPRGNN, and OrderedGNN:
  • On Roman-empire, standard GNN + REFine achieves $58.8\%$ vs. OrderedGNN's $45.5\%$ and $H_2$GCN's $34.3\%$.
  • On Chameleon, it reaches $44.5\%$ vs. MixHop's $43.2\%$.
  • Speed and Scalability: On Roman-empire ($22\text{k}$ nodes), REFine completes rewiring in $4.2$ seconds, compared to $380$ seconds for BORF and $20$ seconds for SDRF, while clustering overhead from METIS is negligible ($0.03$s).

Limitations and Future Work

  • Feature-Label Alignment Dependency: REFine relies on node features having sufficient geometric alignment with the labels to enable effective diffusion. If node features carry zero label correlation, $G_r$ cannot reliably increase homophily.
  • Node Classification Focus: The framework is formulated for node-level tasks and is currently inapplicable to graph-level classification.
  • High-Homophily Ineffectiveness: On graphs that are already strongly homophilic (e.g., Cora, Pubmed), rewiring yields no meaningful performance gain.
  • Future Directions: Developing mechanisms for simultaneous edge addition and deletion, exploring alternate ways to generate reference graphs, and applying reference graphs to target structural properties beyond homophily.

Summary updated

BibTeX
@misc{mendelman2025it,
  author = {Harel Mendelman and Haggai Maron and Ronen Talmon},
  title = {{It Takes a Graph to Know a Graph: Rewiring for Homophily with a Reference Graph}},
  year = {2025},
  eprint = {2505.12411},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.12411},
}
Figure