Node-wise Filtering in Graph Neural Networks: A Mixture of Experts Approach

Haoyu Han, Juanhui Li, Wei Huang, Xianfeng Tang, Hanqing Lu, Chen Luo, Hui Liu, Jiliang Tang · DOI

Introduction

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data. However, most existing GNNs rely on a "one-size-fits-all" approach, applying a single global filter to the entire graph. This assumes that all nodes in a graph share similar structural properties, such as homophily (where connected nodes share labels) or heterophily (where they do not). In reality, many graphs are complex mixtures of both patterns. To address this, the authors introduce NODE-MOE, a framework that adaptively assigns specialized filters to individual nodes using a Mixture of Experts (MoE) architecture.

Comparison between Global Filtering (a) and Node-wise Filtering (b).

The Problem: Global Filters in Mixed Graphs

Traditional GNNs categorize graphs as either homophilic or heterophilic. Homophilic graphs benefit from low-pass filters that smooth features across neighbors, while heterophilic graphs require high-pass filters to highlight differences. The limitation of current models is their inability to handle "mixed" graphs where different communities exhibit different levels of homophily.

Homophily density distribution across benchmark datasets, showing the diverse structural patterns within single graphs.

As shown in the homophily distribution above, datasets like Chameleon and Squirrel are not purely heterophilic but contain a wide spectrum of local connectivity patterns. Applying a global filter in such cases is suboptimal; a filter that helps one group of nodes may actively degrade performance for another. The authors theoretically demonstrate that a global filter cannot achieve linear separability for all nodes in such mixed environments.

The NODE-MOE Framework

NODE-MOE treats graph filtering as a dynamic selection problem. The architecture consists of three core components:

  1. Specialized Experts: The model employs multiple GNN experts (specifically ChebNetII), each initialized to specialize in different spectral domains, such as low-pass, high-pass, or constant filtering. These experts refine their niche during training.
  2. Context-Aware Gating: A Graph Isomorphism Network (GIN) serves as the gating mechanism. It evaluates a node's local context—specifically the discrepancy between its features and its neighbors ($|AX - X|$)—to determine the optimal weight for each expert's output.
  3. Filter Smoothing Loss: To ensure the learned filters are stable and interpretable, a novel loss function is introduced. This prevents experts from developing erratic spectral responses, leading to significantly better training stability and final accuracy.

For large-scale applications, a Top-K gating strategy allows the model to activate only the most relevant experts per node, maintaining computational efficiency comparable to standard GNNs.

Experimental Evaluation

The model was evaluated across seven benchmarks, including citation networks (Cora, CiteSeer) and web link graphs (Chameleon, Squirrel). These datasets represent a diverse range of graph sizes and structural patterns.

Key Findings:

  • State-of-the-Art Performance: NODE-MOE achieved the best average rank across all datasets, outperforming both general-purpose GNNs (like GCN and GAT) and specialized heterophilic models (like LinkX).
  • Significant Gains on Mixed Graphs: On the Squirrel dataset, NODE-MOE reached 62.31% accuracy, a substantial improvement over the 57.12% achieved by a single-expert baseline.
  • Adaptability: The model demonstrated robustness by remaining a top performer on both highly homophilic and highly heterophilic datasets, proving its ability to adapt its filtering strategy node-by-node.

Conclusion

NODE-MOE shifts the paradigm of GNN filtering from global to local. By leveraging a Mixture of Experts and a context-aware gating mechanism, it provides the granularity needed to process complex, real-world graphs. This approach not only improves classification accuracy but also offers a more nuanced understanding of how different structural patterns coexist within a single network.

Summary updated

BibTeX
@misc{han2024node,
  author = {Haoyu Han and Juanhui Li and Wei Huang and Xianfeng Tang and Hanqing Lu and Chen Luo and Hui Liu and Jiliang Tang},
  title = {{Node-wise Filtering in Graph Neural Networks: A Mixture of Experts Approach}},
  year = {2024},
  eprint = {2406.03464},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.03464},
}
Figure