{ "
Cora dataset is a dataset of research papers. For each paper we are given a binary feature vector that indicates the presence of words. Each paper is classified into one of 7 classes. The dataset also has the citation network.
\nThe papers are the nodes of the graph and the edges are the citations.
\nThe task is to classify the nodes to the 7 classes with feature vectors and citation network as input.
\n": "Cora\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306f\u7814\u7a76\u8ad6\u6587\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3059\u3002\u5404\u8ad6\u6587\u306b\u306f\u3001\u5358\u8a9e\u306e\u5b58\u5728\u3092\u793a\u3059\u30d0\u30a4\u30ca\u30ea\u7279\u5fb4\u30d9\u30af\u30c8\u30eb\u304c\u4e0e\u3048\u3089\u308c\u307e\u3059\u3002\u5404\u8ad6\u6587\u306f7\u3064\u306e\u30af\u30e9\u30b9\u306e\u3044\u305a\u308c\u304b\u306b\u5206\u985e\u3055\u308c\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306f\u5f15\u7528\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3082\u3042\u308a\u307e\u3059
\u3002\n\u8ad6\u6587\u306f\u30b0\u30e9\u30d5\u306e\u7bc0\u70b9\u3067\u3001\u7aef\u306f\u5f15\u7528\u3067\u3059\u3002
\n\u30bf\u30b9\u30af\u306f\u3001\u7279\u5fb4\u30d9\u30af\u30c8\u30eb\u3068\u5f15\u7528\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u5165\u529b\u3068\u3057\u3066\u3001\u30ce\u30fc\u30c9\u30927\u3064\u306e\u30af\u30e9\u30b9\u306b\u5206\u985e\u3059\u308b\u3053\u3068\u3067\u3059\u3002
\n", "This graph attention network has two graph attention layers.
\n": "\u3053\u306e\u30b0\u30e9\u30d5\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u306f 2 \u3064\u306e\u30b0\u30e9\u30d5\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30ec\u30a4\u30e4\u30fc\u304c\u3042\u308a\u307e\u3059\u3002
\n", "We do full batch training since the dataset is small. If we were to sample and train we will have to sample a set of nodes for each training step along with the edges that span across those selected nodes.
\n": "\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u5c0f\u3055\u3044\u306e\u3067\u3001\u30d5\u30eb\u30d0\u30c3\u30c1\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3092\u884c\u3044\u307e\u3059\u3002\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u3057\u3066\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u5834\u5408\u3001\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30b9\u30c6\u30c3\u30d7\u3054\u3068\u306b\u4e00\u9023\u306e\u30ce\u30fc\u30c9\u3068\u3001\u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u306b\u307e\u305f\u304c\u308b\u30a8\u30c3\u30b8\u3092\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
\n", "\n": "\n", "
A simple function to calculate the accuracy
\n": "\u7cbe\u5ea6\u3092\u8a08\u7b97\u3059\u308b\u7c21\u5358\u306a\u95a2\u6570
\n", "Create Cora dataset
\n": "Cora \u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u4f5c\u6210
\n", "Create GAT model
\n": "GAT \u30e2\u30c7\u30eb\u306e\u4f5c\u6210
\n", "Create configurable optimizer
\n": "\u8a2d\u5b9a\u53ef\u80fd\u306a\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306e\u4f5c\u6210
\n", "Download the dataset
\n": "\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
\n", "Load the dataset
\n": "\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u8aad\u307f\u8fbc\u307f
\n", "Activation function
\n": "\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u6a5f\u80fd
\n", "Activation function after first graph attention layer
\n": "\u6700\u521d\u306e\u30b0\u30e9\u30d5\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30ec\u30a4\u30e4\u30fc\u5f8c\u306e\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u6a5f\u80fd
\n", "Adam optimizer
\n": "\u30a2\u30c0\u30e0\u30fb\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc
\n", "Add an empty third dimension for the heads
\n": "\u982d\u90e8\u306b\u7a7a\u306e 3 \u756a\u76ee\u306e\u30c7\u30a3\u30e1\u30f3\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0
\n", "Adjacency matrix with the edge information. _^_0_^_ is _^_1_^_ if there is an edge from _^_2_^_ to _^_3_^_.
\n": "\u30a8\u30c3\u30b8\u60c5\u5831\u3092\u542b\u3080\u96a3\u63a5\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3002_^_0_^__^_1_^__^_2_^__^_3_^_\u3082\u3057\u3082\u304b\u3089\u7aef\u304c\u3042\u3063\u305f\u3089\u306d
\n", "Apply dropout to the input
\n": "\u5165\u529b\u306b\u30c9\u30ed\u30c3\u30d7\u30a2\u30a6\u30c8\u3092\u9069\u7528
\n", "Calculate configurations.
\n": "\u69cb\u6210\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002
\n", "Calculate gradients
\n": "\u52fe\u914d\u306e\u8a08\u7b97
\n", "Calculate the loss for validation nodes
\n": "\u691c\u8a3c\u30ce\u30fc\u30c9\u306e\u640d\u5931\u306e\u8a08\u7b97
\n", "Create an experiment
\n": "\u30c6\u30b9\u30c8\u3092\u4f5c\u6210
\n", "Create configurations
\n": "\u69cb\u6210\u306e\u4f5c\u6210
\n", "Dataset
\n": "\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8
\n", "Device to train on
\nThis creates configs for device, so that we can change the device by passing a config value
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u30c7\u30d0\u30a4\u30b9
\n\u3053\u308c\u306b\u3088\u308a\u30c7\u30d0\u30a4\u30b9\u306e\u8a2d\u5b9a\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u8a2d\u5b9a\u5024\u3092\u6e21\u3059\u3053\u3068\u3067\u30c7\u30d0\u30a4\u30b9\u3092\u5909\u66f4\u3067\u304d\u307e\u3059
\n", "Download dataset
\n": "\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
\n", "Dropout
\n": "\u30c9\u30ed\u30c3\u30d7\u30a2\u30a6\u30c8
\n", "Dropout probability
\n": "\u8131\u843d\u78ba\u7387
\n", "Empty adjacency matrix - an identity matrix
\n": "\u7a7a\u306e\u96a3\u63a5\u884c\u5217-\u5358\u4f4d\u884c\u5217
\n", "Evaluate the model
\n": "\u30e2\u30c7\u30eb\u306e\u8a55\u4fa1
\n", "Evaluate the model again
\n": "\u30e2\u30c7\u30eb\u3092\u518d\u5ea6\u8a55\u4fa1\u3057\u3066\u304f\u3060\u3055\u3044
\n", "Feature vectors for all nodes
\n": "\u5168\u30ce\u30fc\u30c9\u306e\u7279\u5fb4\u30d9\u30af\u30c8\u30eb
\n", "Final graph attention layer where we average the heads
\n": "\u30d8\u30c3\u30c9\u3092\u5e73\u5747\u5316\u3059\u308b\u6700\u5f8c\u306e\u30b0\u30e9\u30d5\u30fb\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30fb\u30ec\u30a4\u30e4\u30fc
\n", "First graph attention layer
\n": "\u6700\u521d\u306e\u30b0\u30e9\u30d5\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30ec\u30a4\u30e4\u30fc
\n", "First graph attention layer where we concatenate the heads
\n": "\u30d8\u30c3\u30c9\u3092\u9023\u7d50\u3059\u308b\u6700\u521d\u306e\u30b0\u30e9\u30d5\u30fb\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30fb\u30ec\u30a4\u30e4\u30fc
\n", "Get the class names and assign an unique integer to each of them
\n": "\u30af\u30e9\u30b9\u540d\u3092\u53d6\u5f97\u3057\u3001\u305d\u308c\u305e\u308c\u306b\u4e00\u610f\u306e\u6574\u6570\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002
\n", "Get the feature vectors
\n": "\u7279\u5fb4\u30d9\u30af\u30c8\u30eb\u3092\u53d6\u5f97
\n", "Get the labels as those integers
\n": "\u30e9\u30d9\u30eb\u3092\u305d\u308c\u3089\u306e\u6574\u6570\u3068\u3057\u3066\u53d6\u5f97
\n", "Get the loss for training nodes
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30ce\u30fc\u30c9\u3067\u640d\u5931\u3092\u88ab\u308b
\n", "Get the number of classes
\n": "\u30af\u30e9\u30b9\u6570\u3092\u53d6\u5f97
\n", "Get the paper ids
\n": "\u7d19\u306e ID \u3092\u5165\u624b
\n", "Labels for each node
\n": "\u5404\u30ce\u30fc\u30c9\u306e\u30e9\u30d9\u30eb
\n", "Load the citations, it's a list of pairs of integers.
\n": "\u5f15\u7528\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u6574\u6570\u306e\u30da\u30a2\u306e\u30ea\u30b9\u30c8\u3067\u3059\u3002
\n", "Log the accuracy
\n": "\u7cbe\u5ea6\u3092\u8a18\u9332\u3059\u308b
\n", "Log the loss
\n": "\u640d\u5931\u3092\u8a18\u9332\u3059\u308b
\n", "Loss function
\n": "\u640d\u5931\u95a2\u6570
\n", "Make all the gradients zero
\n": "\u3059\u3079\u3066\u306e\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u30bc\u30ed\u306b\u3059\u308b
\n", "Map of paper id to index
\n": "\u7d19ID\u3068\u7d22\u5f15\u306e\u30de\u30c3\u30d7
\n", "Mark the citations in the adjacency matrix
\n": "\u5f15\u7528\u6587\u732e\u3092\u96a3\u63a5\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u306b\u8a18\u5165
\n", "Model
\n": "\u30e2\u30c7\u30eb
\n", "Move the adjacency matrix to the device
\n": "\u96a3\u63a5\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u3092\u30c7\u30d0\u30a4\u30b9\u306b\u79fb\u52d5
\n", "Move the feature vectors to the device
\n": "\u7279\u5fb4\u30d9\u30af\u30c8\u30eb\u3092\u30c7\u30d0\u30a4\u30b9\u306b\u79fb\u52d5\u3057\u307e\u3059
\n", "Move the labels to the device
\n": "\u30e9\u30d9\u30eb\u3092\u30c7\u30d0\u30a4\u30b9\u306b\u79fb\u52d5
\n", "No need to compute gradients
\n": "\u52fe\u914d\u3092\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093
\n", "Nodes for training
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u7528\u30ce\u30fc\u30c9
\n", "Nodes for validation
\n": "\u691c\u8a3c\u7528\u30ce\u30fc\u30c9
\n", "Normalize the feature vectors
\n": "\u7279\u5fb4\u30d9\u30af\u30c8\u30eb\u3092\u6b63\u898f\u5316
\n", "Number of classes for classification
\n": "\u5206\u985e\u3059\u308b\u30af\u30e9\u30b9\u6570
\n", "Number of features in the first graph attention layer
\n": "\u6700\u521d\u306e\u30b0\u30e9\u30d5\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30ec\u30a4\u30e4\u30fc\u306b\u542b\u307e\u308c\u308b\u30d5\u30a3\u30fc\u30c1\u30e3\u306e\u6570
\n", "Number of features in the input
\n": "\u5165\u529b\u5185\u306e\u30d5\u30a3\u30fc\u30c1\u30e3\u306e\u6570
\n", "Number of features per node in the input
\n": "\u5165\u529b\u5185\u306e\u30ce\u30fc\u30c9\u3042\u305f\u308a\u306e\u30d5\u30a3\u30fc\u30c1\u30e3\u6570
\n", "Number of heads
\n": "\u30d8\u30c3\u30c9\u6570
\n", "Number of nodes to train on
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u30ce\u30fc\u30c9\u6570
\n", "Number of training iterations
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u306e\u53cd\u5fa9\u56de\u6570
\n", "Optimizer
\n": "\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc
\n", "Output layer (without activation) for logits
\n": "\u30ed\u30b8\u30c3\u30c8\u306e\u51fa\u529b\u30ec\u30a4\u30e4\u30fc (\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u306a\u3057)
\n", "Random indexes
\n": "\u30e9\u30f3\u30c0\u30e0\u30a4\u30f3\u30c7\u30c3\u30af\u30b9
\n", "Read the paper ids, feature vectors, and labels
\n": "\u8ad6\u6587ID\u3001\u7279\u5fb4\u30d9\u30af\u30c8\u30eb\u3001\u30e9\u30d9\u30eb\u3092\u8aad\u3080
\n", "Run the training
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3092\u5b9f\u884c
\n", "Save logs
\n": "\u30ed\u30b0\u3092\u4fdd\u5b58
\n", "Set mode to evaluation mode for validation
\n": "\u691c\u8a3c\u7528\u306b\u30e2\u30fc\u30c9\u3092\u8a55\u4fa1\u30e2\u30fc\u30c9\u306b\u8a2d\u5b9a
\n", "Set of class names and an unique integer index
\n": "\u30af\u30e9\u30b9\u540d\u3068\u4e00\u610f\u306e\u6574\u6570\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30bb\u30c3\u30c8
\n", "Set the model to training mode
\n": "\u30e2\u30c7\u30eb\u3092\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30e2\u30fc\u30c9\u306b\u8a2d\u5b9a
\n", "Start and watch the experiment
\n": "\u5b9f\u9a13\u3092\u958b\u59cb\u3057\u3066\u898b\u308b
\n", "Take optimization step
\n": "\u6700\u9069\u5316\u306e\u4e00\u6b69\u3092\u8e0f\u307f\u51fa\u3059
\n", "The pair of paper indexes
\n": "\u4e00\u5bfe\u306e\u30da\u30fc\u30d1\u30fc\u30a4\u30f3\u30c7\u30c3\u30af\u30b9
\n", "Training loop
\n": "\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30eb\u30fc\u30d7
\n", "We build a symmetrical graph, where if paper _^_0_^_ referenced paper _^_1_^_ we place an adge from _^_2_^_ to _^_3_^_ as well as an edge from _^_4_^_ to _^_5_^_.
\n": "\u5bfe\u79f0\u7684\u306a\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002_^_0_^_\u7d19\u304c\u53c2\u7167\u3057\u3066\u3044\u308b\u7d19\u306e\u5834\u5408\u306f\u3001_^_1_^_\u7aef\u3092\u7aef\u304b\u3089\u7aef\u306b\u3001_^_2_^__^_3_^_\u7aef\u3092\u7aef\u3068\u3057\u3066\u914d\u7f6e\u3057\u307e\u3059\u3002_^_4_^_ _^_5_^_
\n", "Whether to include edges. This is test how much accuracy is lost if we ignore the citation network.
\n": "\u30a8\u30c3\u30b8\u3092\u542b\u3081\u308b\u304b\u3069\u3046\u304b\u3002\u3053\u308c\u306f\u3001\u5f15\u7528\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7121\u8996\u3059\u308b\u3068\u7cbe\u5ea6\u304c\u3069\u308c\u3060\u3051\u5931\u308f\u308c\u308b\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u3082\u306e\u3067\u3059
\u3002\n", "Whether to include the citation network
\n": "\u5f15\u7528\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u542b\u3081\u308b\u304b\u3069\u3046\u304b
\n", "