NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$P^2$GNN: Two Prototype Sets to boost GNN Performance

Arihant Jain, Gundeep Arora, Anoop Saladi, Chaosheng DongarXiv 2026

TL;DR

$P^2$GNN introduces a plug-and-play framework that uses two distinct sets of learnable prototypes to overcome the core limitations of Graph Neural Networks (GNNs): a lack of global context and vulnerability to neighborhood noise. By acting as global pseudo-neighbors and message-denoising filters, it delivers state-of-the-art performance across 18 diverse datasets, including massive production e-commerce systems at Amazon.

What Problem Does This Paper Address?

Standard Message Passing Graph Neural Networks (MP-GNNs) excel at capturing local graph structures, but they suffer from two fundamental flaws:

  1. Over-reliance on local context: GNNs struggle to see the bigger picture, often missing global, graph-level features that could inform better node representations.
  2. The homophily assumption: Traditional GNNs assume that connected nodes share similar characteristics or labels (homophily). In real-world scenarios—like fraud detection or product recommendation—graphs are often heterophilous, meaning connected nodes are highly dissimilar. When a GNN aggregates messages from a noisy, heterophilous neighborhood, its performance degrades drastically, sometimes even falling behind a simple Multi-Layer Perceptron (MLP).

While previous works have tried to fix this by adding edges to increase graph density, doing so introduces massive computational overhead ($O(|V|^2)$), making it impractical for large-scale industrial applications.

Methods

To tackle these issues without sacrificing scalability, the authors propose $P^2$GNN (Two Prototype Sets to boost GNN Performance). It introduces two types of class-independent, learnable prototypes that optimize the message-passing step:

  1. Prototypes as Neighbors ($P_N$): These are learnable pseudo-nodes densely connected to every node in the graph. They send messages to all nodes but do not receive any, acting as a universally accessible repository of global context. This keeps the computational complexity highly scalable at $O(K_N \cdot |V|)$, where $K_N \ll |V|$.
  2. Prototypes for Message Alignment ($P_A$): To handle neighborhood noise, aggregated messages are aligned with a separate set of clustered prototypes ($P_A$) using an attention mechanism. This acts as a soft-clustering/denoising filter, minimizing intra-cluster variance and reducing the influence of irrelevant neighbor features.
Figure 1: Schematic of P 2GNN. Two computational graphs for each target node: one with neighbouring nodes from source graph (CG1) and another with learnable KN class-independent prototypes PN as neighbouring nodes (CG2). GNN embeddings of target node obtained via message passing from both (Hbase from CG1, HPN from CG2 as in Eq. (1)) are mixed to form HN (Eq. (2)). HN is then aligned with KA learnable class-independent PA prototypes to create HA (Eq. (3)), followed by mixing with HN for final output Hout (Eq. (4)).

Optimization and Loss Functions

To ensure the prototypes remain representative and diverse, the model optimizes a joint loss function ($L_{final}$) that combines the downstream task loss with three auxiliary objectives:

  • Alignment Loss: Maximizes the cosine similarity between input features and the closest prototype to enforce a hard-clustering effect.
  • Diversity Loss: Maximizes the entropy of the prototype set to prevent "mode collapse" (where all prototypes converge to the same mean feature representation).
  • Sparsity Loss: Uses $\ell_1$ and $\ell_2$ regularization on the prototype matrix to mitigate overfitting and further reduce noise.

Unlike prior prototype-based methods, $P^2$GNN is completely task-agnostic, class-independent, and requires no pre-training.

Table 1: P 2GNN vs. Other Prototype-based Methods

Datasets

The authors evaluated $P^2$GNN across 18 total datasets spanning various domains, scales, and homophily levels:

  • Open-Source Benchmarks (Small-scale): Cornell, Wisconsin, Texas, Film, Chameleon, Squirrel, Cora, and CiteSeer.
  • Open-Source Benchmarks (Large-scale): Penn94, pokec, arXiv-year, snap-patents, genius, and twitch-gamers.
  • Fraud Detection Datasets: YelpChi and Amazon.
  • Proprietary E-commerce Datasets: Two massive, industrial node recommendation datasets (E-comm1 and E-comm2) from Amazon India, containing up to 3.5 million nodes and 400 million edges representing co-purchase and co-view relationships.

Key Insights and Ideas

  • Scalable Global Awareness: Instead of trying to densify the graph by adding millions of pairwise node edges, adding a handful of global pseudo-nodes ($P_N$) achieves a similar global context injection at a fraction of the computational cost.
  • Denoising via Soft-Clustering: Aligning messages to learned cluster centers ($P_A$) effectively filters out the noise introduced by heterophilous (dissimilar) neighbors, ensuring that positive signals are reinforced during aggregation.
  • Backbone Agnostic: $P^2$GNN is designed as a "plug-and-play" module. The authors successfully integrated it with multiple architectures, including GCN, SGC, and ACM-GCN, demonstrating its broad extensibility.

Key Results

  • Industrial Impact: When deployed on Amazon's production systems, $P^2$GNN outperformed existing GCN production models, yielding a 4% relative improvement on E-comm1 and a 1.5% gain on E-comm2 across metrics like Hits@K and MRR.
Table 4: Results on proprietary e-commerce datasets for the node recommendation task. Results are relative to a production model at an e-commerce store with GCN backbone.
  • State-of-the-Art Benchmarks: On open-source datasets, $P^2$GNN achieved the top average rank (1.5) against 15 baseline methods, showing substantial accuracy boosts on highly heterophilous (noisy) datasets like Film and Texas.
Table 5: Average classification accuracy and standard deviation on 8 real-world benchmark datasets with a random 60%/20%/20% data split. The best results are highlighted in bold, and the runner-up score with an underline. NA means that neither the reported results nor the code were available for evaluation. ACM-GCN is used as the backbone for P 2GNN across datasets for a fair comparison. In principle, any high-performing GNN can be used as the P 2GNN backbone.
  • Efficiency: Despite the added complexity of the prototype layers, the average running time per epoch remained highly comparable to the base GNN models, proving its viability for large-scale production environments.

Limitations and Future Work

While $P^2$GNN delivers strong empirical gains, the authors note a few areas for caution and future exploration:

  • Hyperparameter Complexity: The framework introduces several new hyperparameters, including the number of prototypes ($K_N, K_A$) and three auxiliary loss weights ($\lambda_{al}, \lambda_d, \lambda_s$). Finding the optimal configuration requires careful tuning (the authors recommend a Bayesian hyperparameter search).
  • Future Directions: The authors suggest extending this twin-prototype approach into other emerging paradigms within Graph Machine Learning, though specific architectures were not detailed in this paper.

Summary updated

BibTeX
@misc{jain2026p,
  author = {Arihant Jain and Gundeep Arora and Anoop Saladi and Chaosheng Dong},
  title = {{$P^2$GNN: Two Prototype Sets to boost GNN Performance}},
  year = {2026},
  eprint = {2603.09195},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.09195},
}
Figure