#212 · Primary category: Deep Learning Frameworks

graphtransformer

aaai attention graph-deep-learning graph-neural-networks graph-transformer transformer transformer-networks transformers

Graph Transformer Architecture. Source code for "A Generalization of Transformer Networks to Graphs", DLG-AAAI'21.

Project last updated:07/27/21

GitHub Stars

1.0K

Forks

150

Contributors

2

License

MIT

Why we included this project

Graph Transformer is the reference implementation for a paper that extends the transformer architecture to arbitrary graphs, and it is a good place to start if you build graph neural network layers yourself. Where a standard transformer attends over a flat token sequence, this one ties attention to each node's local neighborhood and swaps sinusoidal positional encodings for Laplacian eigenvectors, so the model reads structure from the graph itself. It also adds explicit edge representations, which matters for molecular property prediction and knowledge graph reasoning, where the connections between nodes carry a lot of the information. The code is organized around the benchmarking-gnns framework, so environment setup, dataset download, and run scripts are all in place for reproducing the AAAI'21 results. Reading the implementation alongside the paper is a good way to see how transformers adapt beyond text, and the edge handling in particular is worth studying if your data has rich pairwise interactions.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category