Brief
Cora is a citation graph: 2,708 machine-learning papers linked by about 5,400 citations. Each paper is described by which of 1,433 dictionary words it contains, and belongs to one of 7 topics. The task is to predict the topic of every paper while you know the labels of only 140 of them, 20 per topic.
Words alone get you part of the way. The graph gets you much further, because papers mostly cite papers on the same topic. A graph neural network (GNN) uses that: each layer updates a node by mixing in its neighbours' features. The graph convolutional network (GCN) of Kipf and Welling does it with one matrix product per layer:
Here is the adjacency matrix with self-loops, so a node keeps its own features, and is the diagonal matrix of node degrees in . The factors stop well-cited papers from producing huge sums. The last layer uses softmax instead of ReLU. With two layers, each prediction sees papers up to two citations away.
The hidden layer also gives every paper an embedding, so the same model can recommend papers: suggest the nearest
papers in embedding space that a paper doesn't already cite. Load Cora with its standard split through PyTorch
Geometric (torch_geometric.datasets.Planetoid with name "Cora") or DGL (dgl.data.CoraGraphDataset). Use the
library only to load the data and write the GCN yourself.
DATA · Cora
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- Mean test accuracy of at least 80% over 10 seeds on the standard Cora split, recorded with `python tools/mlarena.py record BL-20 "<mean accuracy>%"`.
- The GCN layer is your own code. The graph library only loads the data.
- The README reports recall@10 on hidden citations for GCN embeddings and for raw features, with the hidden citations removed from the graph during training.
Side quests
Terms in plain words
- Graph
- A set of nodes joined by edges. Here each node is a paper and each edge is a citation.
- Adjacency matrix
- A square table with a 1 where two nodes are linked and a 0 where they aren't.
- Graph neural network (GNN)
- A network whose layers update each node by combining its own features with its neighbours' features.
- Self-loop
- An edge from a node to itself. Adding them means a node's own features are part of its update.
- Transductive learning
- Training while the whole graph, including the test nodes' features, is visible, but only some of the labels are.