DenseGATConv
A graph layer that weights each neighbor by learned attention, here in its dense-adjacency form.
Graphs and geometry · 24 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Graphs and geometry
- Parameters
- 91.9K
- Operations
- 24
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2018
- Paper
- Graph Attention Networks
- Cited by
- 12,095 (as of 19 October 2026)
- Authors
- Petar Veličković, Guillem Cucurull, Arantxa Casanova and others
- Source
- torch_geometric 2.6.1
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m726
- Graph hash
- 34f30eb096f3afc995b5e392ee0019fe6d9f131d8749c39c81f1cf17fd16e0d3
- Skeleton hash
- 6f2b9614b38143ceb2f6d4c3d23a042d2a201bae710d7f8c971717ad854be822
- Architecture hash
- 04457e73d892d96fc91068c24c3c50e25e115b85cd7bdae84b87171f26017052
- Diagram SHA-256
- d727291fa6be2a2a57425ae9a0582730cbe0f6caf350cac7ca1a2ff6bee1113b
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
GAT, the Graph Attention Network, is a neural network for graph-structured data built from masked self-attention layers in which nodes attend over the features of their neighbors. The layer lets a node give different weights to different neighbors without any costly matrix operation such as inversion and without knowing the graph structure upfront. The attention mechanism is applied in a shared manner to all edges, so it does not depend on upfront access to the global graph structure.
Inside a layer, a shared weight matrix transforms every node and a shared attention mechanism computes coefficients that indicate the importance of node j's features to node i. Several independent attention heads, K of them, run the same transformation in parallel and their features are concatenated. The paper's transductive model opens with K = 8 attention heads computing 8 features each, 64 in total, which is the configuration of the layer shown here. Dropout with p = 0.6 is applied to the layer inputs and to the normalized attention coefficients themselves, so at each training iteration a node is exposed to a stochastically sampled neighborhood.
The paper reports improving upon GCNs by 1.5% on Cora and 1.6% on Citeseer. This page shows the dense form of the layer, and the authors also produced a version that leverages sparse matrix operations, reducing storage complexity to linear in the number of nodes and edges.
Key idea. GAT builds graph networks from masked self-attention layers that assign different weights to neighbors without costly matrix operations or upfront knowledge of the graph structure.
- gat
- graph attention network
- graph attention networks
- densegatconv
- dense gat
- attention
- node classification
- graph neural network
- masked self-attention
- multi-head attention
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{veličković2018graphattentionnetworks,
title={Graph Attention Networks},
author={Petar Veličković and Guillem Cucurull and Arantxa Casanova and Adriana Romero and Pietro Liò and Yoshua Bengio},
year={2018},
eprint={1710.10903},
archivePrefix={arXiv},
primaryClass={stat.ML},
url={https://arxiv.org/abs/1710.10903},
}