Relieving the Over-Aggregating Effect in Graph Transformers

Junshu Sun, Wanxing Chang, Chenxue Yang, Qingming Huang, Shuhui Wang · OpenReview

Abstract

Graph attention has demonstrated superior performance in graph learning tasks. However, learning from global interactions can be challenging due to the large number of nodes. In this paper, we discover a new phenomenon termed over-aggregating. Over-aggregating arises when a large volume of messages is aggregated into a single node with less discrimination, leading to the dilution of the key messages and potential information loss. To address this, we propose Wideformer, a plug-and-play method for graph attention. Wideformer divides the aggregation of all nodes into parallel processes and guides the model to focus on specific subsets of these processes. Evaluations show that Wideformer can effectively mitigate over-aggregating, allowing backbone methods to focus on informative messages and achieve superior performance compared to baseline methods.

Introduction

Graph Transformers (GTs) were designed to overcome the structural limitations of traditional Graph Neural Networks (GNNs), such as "over-smoothing" (where node features become indistinguishable) and "over-squashing" (where information is lost during multi-hop passing). By utilizing global attention, GTs can theoretically learn from any node in a graph regardless of distance. However, as graphs scale, a new bottleneck emerges: over-aggregating.

In large graphs, linear attention models tend to assign similar importance scores to almost every node. When thousands of "messages" are averaged together with nearly uniform weights, the truly important signals are diluted. This phenomenon is quantified using attention entropy. As the graph size increases, this entropy hits a lower bound that grows with the number of nodes, making it mathematically difficult for the model to "focus" on relevant information.

The Wideformer Framework

To relieve message dilution, Wideformer introduces a two-stage approach that can be integrated into existing linear Graph Transformer backbones like GraphGPS, SGFormer, or Polynormer.

1. Dividing the Aggregation

Instead of compressing all $n$ nodes into a single representation, Wideformer partitions source nodes into $m$ distinct clusters. It employs a center-selection strategy—inspired by K-Means++—to select diverse "anchor" nodes from the query features. Each cluster is then aggregated independently and in parallel. By limiting the "input volume" per aggregation, Wideformer prevents key messages from being drowned out by the collective noise of the entire graph.

2. Guiding the Attention

Once $m$ different aggregation results are generated, the model must determine which clusters contain the most relevant information. Wideformer calculates a second level of attention between the target node and these clusters. It then sorts and weights these cluster outputs, ensuring the target node prioritizes the most informative groups of messages. This "wider" architecture allows the model to maintain high discrimination even in massive node populations.

Experimental Evaluation

The researchers evaluated Wideformer across 13 real-world datasets, spanning various scales and graph types:

  • Homophilic Graphs: Cora, CiteSeer, CoauthorCS, CoauthorPhysics, AmazonComputers, AmazonPhoto, and the large-scale ogb-arxiv.
  • Heterophilic Graphs: amazon-ratings, minesweeper, questions, roman-empire, tolokers, and twitch-gamer.

Key Results

  • Performance Gains: Wideformer consistently improved the accuracy or ROC-AUC of all three backbone models across nearly all datasets. For instance, on the questions dataset, it improved Polynormer's performance from 78.66% to 79.00%.
  • Entropy Reduction: Visualizations confirmed that Wideformer significantly lowers attention entropy compared to standard linear attention, proving that target nodes successfully focus on specific informative subsets.
  • Efficiency: Despite the clustering and sorting steps, Wideformer maintains linear complexity $O(nm)$. Empirical tests show only minor overhead (roughly 30% more time and <11% more memory) while scaling linearly with the number of nodes.
  • Structural Superiority: Wideformer outperformed simple entropy-based regularization (penalizing the loss function), suggesting that changing the structural aggregation process is more effective than adjusting the optimization goal alone.

Conclusion and Future Work

Wideformer addresses the inherent "entropy trap" of global attention in large-scale graphs. By shifting from a single deep aggregation to a wider, guided parallel process, it restores the discriminative power of Graph Transformers. Future research may explore more sophisticated, adaptive weighting mechanisms for the "guiding" step and learnable division strategies that evolve during training to further optimize performance on complex datasets.

Summary updated

BibTeX
@inproceedings{sun2025relieving,
  author = {Junshu Sun and Wanxing Chang and Chenxue Yang and Qingming Huang and Shuhui Wang},
  title = {{Relieving the Over-Aggregating Effect in Graph Transformers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=ckq032sarb},
}
Figure