All models

DGL-RelGraphConv

Graph convolution with per-relation weights for knowledge graphs, regularized by basis or block decomposition.

Graphs and geometry · 165 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 (107 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

Family
R-GCN
Parameters
1.3K
Operations
165
Framework
PyTorch
Recurrent
No
Published
ESWC 2018
Cited by
181 (as of 18 October 2026)
Authors
Michael Schlichtkrull, Thomas N. Kipf, Peter Bloem and others
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
m532
Graph hash
ad74c78c19b9e365f5d4a60142beaa9feac0ea13e3fda6fb88fcc46e6bfb808f
Skeleton hash
3c72801938444b0469fb027b82bd90d2131de9c772c9bc8da4597b4b96c9216d
Architecture hash
d5f86801c58015cea0c22fb59e15104763542ee493393120cce544de2b8ccb00
Diagram SHA-256
c924988dadd401257275237a605836d45c4b53e0beed5f75b655a1b6896976e6
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

This DGL RelGraphConv instance uses the basis decomposition, sharing 4 basis transformations across its 8 relation types so that parameter updates are shared between rare and frequent relations.

About this model's family

R-GCN extends graph convolutional networks to knowledge graphs, where edges carry relation types, and the paper applies it to two standard knowledge base completion tasks: link prediction and entity classification. The motivation is that even the largest knowledge graphs, such as Yago, DBPedia or Wikidata, remain incomplete. R-GCNs are developed specifically to deal with the highly multi-relational data characteristic of realistic knowledge bases.

Each layer accumulates transformed feature vectors of neighboring nodes through a normalized sum, and, unlike a regular GCN, the transformation is relation-specific, depending on the type and direction of an edge. A single self-connection of a special relation type is added to each node so that a node's new representation can also depend on its own previous one. The catch is parameter growth: one weight matrix per relation means the number of parameters grows rapidly with the number of relations in the graph. The paper's answer is two regularizers: a basis decomposition that acts as weight sharing between relation types, and a block-diagonal decomposition that acts as a sparsity constraint on each relation's weights.

For entity classification the authors simply stack R-GCN layers with a softmax per node; the reported model has 2 layers and 16 hidden units. It achieves state-of-the-art results on AIFB and AM. For link prediction, R-GCN becomes the encoder of a graph auto-encoder, comprised of an entity encoder and a scoring function used as decoder. The decoder is the DistMult factorization, chosen as a scoring function known to perform well on standard link prediction benchmarks on its own. On FB15k-237, the dataset with inverse relation pairs removed, the R-GCN model outperforms the DistMult baseline by a large margin of 29.8%. The authors conjecture that the fixed normalization constant for aggregating messages is partly to blame for weaker results on MUTAG and BGS, where it is particularly problematic for nodes of high degree.

Key idea. R-GCN adds relation-specific transformations to graph convolution, depending on the type and direction of each edge, so GCNs can model multi-relational knowledge graphs. Basis and block-diagonal decompositions of the per-relation weights keep the parameter count in check for highly multi-relational data.

  • r-gcn
  • rgcn
  • relational graph convolutional network
  • relational gcn
  • rgcnconv
  • relgraphconv
  • knowledge graph
  • knowledge base completion
  • link prediction
  • entity classification
  • multi-relational graph
  • distmult
  • modeling relational data with graph convolutional networks
  • pytorch geometric rgcnconv
  • dgl relgraphconv

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

Cite the paper

@misc{schlichtkrull2017modelingrelationaldatagraph,
      title={Modeling Relational Data with Graph Convolutional Networks}, 
      author={Michael Schlichtkrull and Thomas N. Kipf and Peter Bloem and Rianne van den Berg and Ivan Titov and Max Welling},
      year={2017},
      eprint={1703.06103},
      archivePrefix={arXiv},
      primaryClass={stat.ML},
      url={https://arxiv.org/abs/1703.06103}, 
}