Characterizing Massive Activations of Attention Mechanism in Graph Neural Networks
<|reference_start|>Characterizing Massive Activations of Attention Mechanism in Graph Neural Networks: Graph Neural Networks (GNNs) have become increasingly popular for effectively modeling data with graph structures. Recently, attention mechanisms have been integrated into GNNs to improve their ability to capture complex patterns. This paper presents the first comprehensive study revealing a critical, unexplored consequence of this integration: the emergence of Massive Activations (MAs) within attention layers. We introduce a novel method for detecting and analyzing MAs, focusing on edge features in different graph transformer architectures. Our study assesses various GNN models using benchmark datasets, including ZINC, TOX21, and PROTEINS. Key contributions include (1) establishing the direct link between attention mechanisms and MAs generation in GNNs, (2) developing a robust definition and detection method for MAs based on activation ratio distributions, (3) introducing the Explicit Bias Term (EBT) as a potential countermeasure and exploring it as an adversarial framework to assess models robustness based on the presence or absence of MAs. Our findings highlight the prevalence and impact of attention-induced MAs across different architectures, such as GraphTransformer, GraphiT, and SAN. The study reveals the complex interplay between attention mechanisms, model architecture, dataset characteristics, and MAs emergence, providing crucial insights for developing more robust and reliable graph models.<|reference_end|>
@article{bini2024characterizing,
    title={Characterizing Massive Activations of Attention Mechanism in Graph
  Neural Networks},
    author={Lorenzo Bini, Marco Sorbi, Stephane Marchand-Maillet},
    journal={arXiv preprint arXiv:2409.03463},
    year={2024},
    archivePrefix={arXiv},
    eprint={2409.03463},
    primaryClass={cs.LG cs.AI}
}