Improving Attention Mechanism in Graph Neural Networks via Cardinality Preservation

Shuo Zhang, Lei Xie
7/4/2019
cs.LGstat.ML
transformer-attentiongnn

Official code: zetayue/CPA (17 stars, Python, MIT, last commit 2024-07-25).

Abstract

Graph Neural Networks (GNNs) are powerful to learn the representation of graph-structured data. Most of the GNNs use the message-passing scheme, where the embedding of a node is iteratively updated by aggregating the information of its neighbors.

Show full abstract

To achieve a better expressive capability of node influences, attention mechanism has grown to be popular to assign trainable weights to the nodes in aggregation. Though the attention-based GNNs have achieved remarkable results in various tasks, a clear understanding of their discriminative capacities is missing. In this work, we present a theoretical analysis of the representational properties of the GNN that adopts the attention mechanism as an aggregator. Our analysis determines all cases when those attention-based GNNs can always fail to distinguish certain distinct structures. Those cases appear due to the ignorance of cardinality information in attention-based aggregation. To improve the performance of attention-based GNNs, we propose cardinality preserved attention (CPA) models that can be applied to any kind of attention mechanisms. Our experiments on node and graph classification confirm our theoretical analysis and show the competitive performance of our CPA models.

View on arXivView PDF

Code Implementations(1)

zetayue/CPAOfficial100%
MIT

Source code for "Improving Attention Mechanism in Graph Neural Networks via Cardinality Preservation" (IJCAI 2020)

175PythonApr 23, 20202 years agoMIT
deep-learninggraph-attention-networksgraph-classificationgraph-convolutional-networksgraph-neural-networks+1 more

Similar Papers

Cite this paper

@article{zhang2019improving,
  title  = {Improving Attention Mechanism in Graph Neural Networks via Cardinality Preservation},
  author = {Shuo Zhang and Lei Xie},
  year   = {2019},
  eprint = {1907.02204},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1907.02204}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1907.02204.svg)](https://codeofpaper.com/paper/1907.02204)

Discussion