Table of Contents
Fetching ...

Does Homophily Help in Robust Test-time Node Classification?

Yan Jiang, Ruihong Qiu, Zi Huang

TL;DR

This work tackles robust node classification when test-time graphs exhibit distribution shifts and data quality issues. It proposes GrapHoST, a data-centric, test-time framework that learns a homophily predictor to reweight and prune test edges, transforming the test graph without retraining the fixed GNN. Grounded in Contextual Stochastic Block Model analysis, the method shows that increasing homophily in homophilic test graphs or decreasing it in heterophilic ones improves misclassification rates, and it demonstrates state-of-the-art gains up to $10.92\%$ across nine benchmarks. The approach is plug-and-play, scalable to large graphs, and effective across various GNN backbones, making it practically impactful for real-world deployment under test-time data quality issues. Overall, GrapHoST provides a principled, efficient way to leverage homophily at test time to enhance the robustness of pre-trained GNNs.

Abstract

Homophily, the tendency of nodes from the same class to connect, is a fundamental property of real-world graphs, underpinning structural and semantic patterns in domains such as citation networks and social networks. Existing methods exploit homophily through designing homophily-aware GNN architectures or graph structure learning strategies, yet they primarily focus on GNN learning with training graphs. However, in real-world scenarios, test graphs often suffer from data quality issues and distribution shifts, such as domain shifts across users from different regions in social networks and temporal evolution shifts in citation network graphs collected over varying time periods. These factors significantly compromise the pre-trained model's robustness, resulting in degraded test-time performance. With empirical observations and theoretical analysis, we reveal that transforming the test graph structure by increasing homophily in homophilic graphs or decreasing it in heterophilic graphs can significantly improve the robustness and performance of pre-trained GNNs on node classifications, without requiring model training or update. Motivated by these insights, a novel test-time graph structural transformation method grounded in homophily, named GrapHoST, is proposed. Specifically, a homophily predictor is developed to discriminate test edges, facilitating adaptive test-time graph structural transformation by the confidence of predicted homophily scores. Extensive experiments on nine benchmark datasets under a range of test-time data quality issues demonstrate that GrapHoST consistently achieves state-of-the-art performance, with improvements of up to 10.92%. Our code has been released at https://github.com/YanJiangJerry/GrapHoST.

Does Homophily Help in Robust Test-time Node Classification?

TL;DR

This work tackles robust node classification when test-time graphs exhibit distribution shifts and data quality issues. It proposes GrapHoST, a data-centric, test-time framework that learns a homophily predictor to reweight and prune test edges, transforming the test graph without retraining the fixed GNN. Grounded in Contextual Stochastic Block Model analysis, the method shows that increasing homophily in homophilic test graphs or decreasing it in heterophilic ones improves misclassification rates, and it demonstrates state-of-the-art gains up to across nine benchmarks. The approach is plug-and-play, scalable to large graphs, and effective across various GNN backbones, making it practically impactful for real-world deployment under test-time data quality issues. Overall, GrapHoST provides a principled, efficient way to leverage homophily at test time to enhance the robustness of pre-trained GNNs.

Abstract

Homophily, the tendency of nodes from the same class to connect, is a fundamental property of real-world graphs, underpinning structural and semantic patterns in domains such as citation networks and social networks. Existing methods exploit homophily through designing homophily-aware GNN architectures or graph structure learning strategies, yet they primarily focus on GNN learning with training graphs. However, in real-world scenarios, test graphs often suffer from data quality issues and distribution shifts, such as domain shifts across users from different regions in social networks and temporal evolution shifts in citation network graphs collected over varying time periods. These factors significantly compromise the pre-trained model's robustness, resulting in degraded test-time performance. With empirical observations and theoretical analysis, we reveal that transforming the test graph structure by increasing homophily in homophilic graphs or decreasing it in heterophilic graphs can significantly improve the robustness and performance of pre-trained GNNs on node classifications, without requiring model training or update. Motivated by these insights, a novel test-time graph structural transformation method grounded in homophily, named GrapHoST, is proposed. Specifically, a homophily predictor is developed to discriminate test edges, facilitating adaptive test-time graph structural transformation by the confidence of predicted homophily scores. Extensive experiments on nine benchmark datasets under a range of test-time data quality issues demonstrate that GrapHoST consistently achieves state-of-the-art performance, with improvements of up to 10.92%. Our code has been released at https://github.com/YanJiangJerry/GrapHoST.
Paper Structure (66 sections, 9 theorems, 21 equations, 8 figures, 14 tables, 1 algorithm)

This paper contains 66 sections, 9 theorems, 21 equations, 8 figures, 14 tables, 1 algorithm.

Key Result

Lemma 1

(Midpoint of embeddings). Vectors $(\mathbb{E}_{c_1}[\mathbf{h}'_i], \mathbb{E}_{c_2}[\mathbf{h}'_i])$ and $(\mathbb{E}_{c_1}[\mathbf{h}_i], \mathbb{E}_{c_2}[\mathbf{h}_i])$ share a same midpoint $\mathbf{m}$, and $\mathbf{m} = \frac{\boldsymbol{\mu_1} + \boldsymbol{\mu_2}}{2}$.

Figures (8)

  • Figure 1: Empirical observations of test node classification performance for a fixed pre-trained GNN under data quality issues. HD. is the edge homophily degree. (a) For a homophilic test graph with temporal shift (Arxiv, HD.=67.13%), increasing the test graph’s homophily degree improves the pre-trained GNN's performance. (b) For a heterophilic test graph with node attribute shift (Chameleon, HD.=22.52%), decreasing the homophily degree improves performance.
  • Figure 2: Overall framework for homophilic graphs. (a) A homophily predictor learns the homophily-based properties to classify edges as homophilic or heterophilic. (b) In the testing scenario, the learned homophily predictor estimates homophily confidence scores. Based on these scores, a homophily-weighted graph is constructed, followed by a confidence-aware homophily-based edge filtering process. The homophily-based transformed test graph is then passed to a fixed GNN classifier for enhanced test-time performance. A similar pipeline can be applied to heterophilic graphs, with predicted homophilic edges filtered out.
  • Figure 3: Ablation study of GrapHoST. "Base" refers to the performance of the base GCN by ERM.
  • Figure 4: Performance in bars and homophily degree in numbers before and after GrapHoST. As the homophily degree changes, the performance of GrapHoST is improved.
  • Figure 5: Performance under different test edge homophily weights. Using weight with (a) homophily scores in homophilic graphs or (b) heterophily scores in heterophilic graphs improves performance.
  • ...and 3 more figures

Theorems & Definitions (10)

  • Definition 1
  • Lemma 1
  • Lemma 2
  • Proposition 1
  • Theorem 1
  • Theorem 2
  • Lemma 1
  • Lemma 2
  • Theorem 1
  • Theorem 2