Relieving the Over-Aggregating Effect in Graph Transformers

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

TL;DR

Graph Transformers often struggle with "over-aggregating," a newly identified phenomenon where key information is drowned out by a sea of noisy global messages. To fix this, the authors introduce Wideformer, a plug-and-play module that partitions nodes into clusters and uses a guiding mechanism to prioritize the most informative groups. This approach consistently boosts performance across 13 real-world datasets while maintaining linear scalability.

What Problem Does This Paper Address?

While Transformers have revolutionized graph learning by capturing long-range dependencies, they face a scaling crisis. Standard dense attention is $O(n^2)$, making it unusable for large graphs. Researchers have turned to linear global attention to solve this, but the authors discover a hidden cost: over-aggregating.

As the number of nodes ($n$) grows, linear attention mechanisms tend to assign increasingly uniform attention scores to all nodes. This leads to high attention entropy, meaning the model loses its "confidence" in which nodes are actually important. In large-scale graphs, the meaningful signal from a few key nodes gets diluted by the cumulative noise of thousands of irrelevant ones. This isn't just "over-smoothing" (where features become identical); it's a failure of the attention mechanism itself to discriminate between informative and noisy messages during a single aggregation step.

Attention entropy across different models and node scales. Global models exhibit near-maximum entropy, which worsens as graph size increases.

Methods

The authors propose Wideformer, which replaces the standard "one-shot" global aggregation with a two-step process:

  1. Dividing the Aggregation: Instead of compressing all $n$ nodes into one representation, Wideformer partitions source nodes into $m$ distinct clusters using a fast, non-iterative center-selection method (inspired by K-Means++). Each cluster is aggregated independently, producing $m$ parallel "messages." This prevents the key signals in one cluster from being immediately diluted by noise in another.
  2. Guiding the Attention: To help the target node make sense of these $m$ messages, Wideformer calculates cluster-level attention scores. It then sorts and weights the cluster outputs, effectively "guiding" the model to focus on the most informative groups of nodes.

Unlike sparse attention methods that shrink the receptive field to reduce noise, Wideformer maintains a global receptive field but distributes the processing to maintain signal clarity.

Datasets

The model was evaluated on 13 real-world datasets spanning different graph types:

  • Homophilic (nodes with similar labels connect): Cora, CiteSeer, CoauthorCS, CoauthorPhysics, AmazonComputers, AmazonPhoto, and ogb-arxiv.
  • Heterophilic (nodes with different labels connect): amazon-ratings, minesweeper, questions, roman-empire, tolokers, and twitch-gamer.

These datasets range in size from a few thousand nodes to over 160,000 (ogb-arxiv), providing a robust test for scalability and the over-aggregating effect.

Key Insights and Ideas

  • Gradient Dilution: The paper provides a mathematical derivation showing that in large graphs, the update signal (gradient) for a specific important node is hindered by the "cumulative impact of all other nodes." As $n$ increases, the relative strength of meaningful signals vanishes.
  • Entropy as a Diagnostic: The authors use normalized Shannon entropy to quantify over-aggregating. Lower entropy means the model is "focusing" better. They prove theoretically that attention entropy has a lower bound that increases with the number of nodes, explaining why the problem gets worse at scale.
  • The "Wide" in Wideformer: By increasing the "output volume" (producing multiple cluster representations instead of one), the model preserves more information before the final weighted sum, effectively widening the bottleneck.

Key Results

  • Consistent Performance Boost: Wideformer consistently improved the performance of three popular backbones (GraphGPS, SGFormer, and Polynormer) across all 13 datasets.
  • Entropy Reduction: Experimental results show that Wideformer significantly reduces attention entropy compared to baseline linear methods, confirming it successfully mitigates over-aggregating.
  • Linear Scalability: Despite the extra clustering step, Wideformer’s time cost scales linearly with the number of nodes, making it practical for large-scale applications.

Limitations and Future Work

  • Simple Weighting: The current "guiding" step uses a relatively simple weighting strategy. The authors suggest that exploring more complex, adaptive guiding strategies could further enhance performance.
  • Cluster Selection: While the current center-selection method is efficient, the authors noted that learnable cluster centers (though more computationally expensive) could potentially yield even better results.
  • Hyperparameter Sensitivity: The optimal number of clusters ($m$) usually falls between 3 and 5. If $m$ is too high, information becomes too dispersed; if too low, the dilution effect persists. Finding an automated way to set $m$ remains an open task.

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