
DGL-RelGraphConv
Graphs and geometry165 ops1.3K params
Graph convolution with per-relation weights for knowledge graphs, regularized by basis or block decomposition.
Graphs and geometry · 162 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.
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.
This PyTorch Geometric RGCNConv instance keeps a full relation-specific weight matrix for each of its 8 relation types, with no basis or block decomposition.
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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}