All models

DenseGCNConv

The GCN graph convolution written for a dense adjacency matrix, batch and mask included.

Graphs and geometry · 16 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (20 KB)

Open in a new tab

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

Parameters
22.9K
Operations
16
Framework
PyTorch
Recurrent
No
Published
ICLR 2017
Cited by
16,820 (as of 18 October 2026)
Authors
Thomas N. Kipf, Max Welling
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m728
Graph hash
68dbdf9ddbfad10e06f9d5724efb60e1a049c2d261ffe1da608b3761d19a230e
Skeleton hash
b2a41645a995549ac4f1034df250db464ed60d9b60ccac22e9c8af50a92a7090
Architecture hash
743646ccdb7c55bdab57d60565fb8261e5083dea86eb7138375fae4407a69ff0
Diagram SHA-256
1977fff607cee7b6f62fdc8897767c480e44ad858e94cb1b56d7b48aab48c3fc
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

DenseGCNConv is PyTorch Geometric's dense-adjacency version of the graph convolution layer, and its docstring simply points to the sparse GCNConv. That layer comes from Kipf and Welling's Graph Convolutional Network (GCN), a scalable approach for semi-supervised learning on graph-structured data built on an efficient variant of convolutional neural networks that operate directly on graphs. The paper motivates the layer as a localized first-order approximation of spectral graph convolutions, which is why a single layer only mixes a node with its immediate neighbours.

In the dense layer, self-loops are added by writing 1 onto the adjacency diagonal, or 2 when the improved flag is set. The adjacency is then scaled on both sides by inverse square-root node degree before being multiplied into the linearly transformed node features. Unlike the sparse layer, it takes a dense adjacency tensor that is broadcastable in the batch dimension, resulting in a shared adjacency matrix for the complete batch. An optional mask marks the valid nodes for each graph, so graphs of different sizes can be padded into one batch.

The paper's showcase model is a two-layer GCN for semi-supervised node classification. The model scales linearly in the number of graph edges. Its citation-network runs used 16 hidden units, the same width as the 16 output channels of the captured layer. The appendix adds a fact worth remembering when looking at an untrained trace: even an untrained GCN model with random weights can serve as a powerful feature extractor for nodes in a graph.

Key idea. A simple layer-wise propagation rule, a renormalized first-order approximation of spectral graph convolution, that makes semi-supervised node classification fast and scalable.

  • DenseGCNConv
  • dense GCN
  • GCN
  • graph convolutional network
  • Kipf and Welling
  • semi-supervised classification
  • node classification
  • spectral graph convolution
  • PyTorch Geometric
  • renormalization trick

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{kipf2017semisupervisedclassificationgraphconvolutional,
      title={Semi-Supervised Classification with Graph Convolutional Networks}, 
      author={Thomas N. Kipf and Max Welling},
      year={2017},
      eprint={1609.02907},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1609.02907}, 
}