{ "
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 \u6570\u636e\u96c6\u662f\u7814\u7a76\u8bba\u6587\u7684\u6570\u636e\u96c6\u3002\u5bf9\u4e8e\u6bcf\u7bc7\u8bba\u6587\uff0c\u6211\u4eec\u90fd\u5f97\u5230\u4e00\u4e2a\u4e8c\u8fdb\u5236\u7279\u5f81\u5411\u91cf\uff0c\u8be5\u5411\u91cf\u8868\u793a\u5355\u8bcd\u7684\u5b58\u5728\u3002\u6bcf\u7bc7\u8bba\u6587\u5206\u4e3a 7 \u4e2a\u7c7b\u522b\u4e4b\u4e00\u3002\u8be5\u6570\u636e\u96c6\u8fd8\u5177\u6709\u5f15\u6587\u7f51\u7edc\u3002
\n\u8bba\u6587\u662f\u56fe\u7684\u8282\u70b9\uff0c\u8fb9\u7f18\u662f\u5f15\u6587\u3002
\n\u4efb\u52a1\u662f\u4f7f\u7528\u7279\u5f81\u5411\u91cf\u548c\u5f15\u6587\u7f51\u7edc\u4f5c\u4e3a\u8f93\u5165\uff0c\u5c06\u8282\u70b9\u5206\u7c7b\u4e3a 7 \u7c7b\u3002
\n", "This graph attention network has two graph attention layers.
\n": "\u8fd9\u4e2a\u56fe\u5f62\u5173\u6ce8\u7f51\u7edc\u6709\u4e24\u4e2a\u56fe\u5f62\u5173\u6ce8\u5c42\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": "\u7531\u4e8e\u6570\u636e\u96c6\u5f88\u5c0f\uff0c\u6211\u4eec\u8fdb\u884c\u5168\u6279\u91cf\u8bad\u7ec3\u3002\u5982\u679c\u8981\u8fdb\u884c\u91c7\u6837\u548c\u8bad\u7ec3\uff0c\u6211\u4eec\u5c06\u4e0d\u5f97\u4e0d\u4e3a\u6bcf\u4e2a\u8bad\u7ec3\u6b65\u9aa4\u5bf9\u4e00\u7ec4\u8282\u70b9\u4ee5\u53ca\u8de8\u8d8a\u8fd9\u4e9b\u9009\u5b9a\u8282\u70b9\u7684\u8fb9\u8fdb\u884c\u91c7\u6837\u3002
\n", "\n": "\n", "
A simple function to calculate the accuracy
\n": "\u8ba1\u7b97\u7cbe\u5ea6\u7684\u7b80\u5355\u51fd\u6570
\n", "Create Cora dataset
\n": "\u521b\u5efa Cora \u6570\u636e\u96c6
\n", "Create GAT model
\n": "\u521b\u5efa GAT \u6a21\u578b
\n", "Create configurable optimizer
\n": "\u521b\u5efa\u53ef\u914d\u7f6e\u7684\u4f18\u5316\u5668
\n", "Download the dataset
\n": "\u4e0b\u8f7d\u6570\u636e\u96c6
\n", "Load the dataset
\n": "\u52a0\u8f7d\u6570\u636e\u96c6
\n", "Activation function
\n": "\u6fc0\u6d3b\u529f\u80fd
\n", "Activation function after first graph attention layer
\n": "\u7b2c\u4e00\u4e2a\u56fe\u5f62\u5173\u6ce8\u5c42\u4e4b\u540e\u7684\u6fc0\u6d3b\u529f\u80fd
\n", "Adam optimizer
\n": "Adam \u4f18\u5316\u5668
\n", "Add an empty third dimension for the heads
\n": "\u4e3a\u5934\u90e8\u6dfb\u52a0\u4e00\u4e2a\u7a7a\u7684\u7b2c\u4e09\u4e2a\u7ef4\u5ea6
\n", "Adjacency matrix with the edge information. _^_0_^_ is _^_1_^_ if there is an edge from _^_2_^_ to _^_3_^_.
\n": "\u5305\u542b\u8fb9\u4fe1\u606f\u7684\u90bb\u63a5\u77e9\u9635\u3002_^_0_^__^_1_^_\u5982\u679c\u5b58\u5728\u4ece_^_2_^_\u5230\u7684\u8fb9\u7f18_^_3_^_\u3002
\n", "Apply dropout to the input
\n": "\u5c06\u4e22\u5931\u5e94\u7528\u4e8e\u8f93\u5165
\n", "Calculate configurations.
\n": "\u8ba1\u7b97\u914d\u7f6e\u3002
\n", "Calculate gradients
\n": "\u8ba1\u7b97\u68af\u5ea6
\n", "Calculate the loss for validation nodes
\n": "\u8ba1\u7b97\u9a8c\u8bc1\u8282\u70b9\u7684\u635f\u5931
\n", "Create an experiment
\n": "\u521b\u5efa\u5b9e\u9a8c
\n", "Create configurations
\n": "\u521b\u5efa\u914d\u7f6e
\n", "Dataset
\n": "\u6570\u636e\u96c6
\n", "Device to train on
\nThis creates configs for device, so that we can change the device by passing a config value
\n": "\u7528\u4e8e\u8bad\u7ec3\u7684\u8bbe\u5907
\n\u8fd9\u5c06\u4e3a\u8bbe\u5907\u521b\u5efa\u914d\u7f6e\uff0c\u4ee5\u4fbf\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f20\u9012\u914d\u7f6e\u503c\u6765\u66f4\u6539\u8bbe\u5907
\n", "Download dataset
\n": "\u4e0b\u8f7d\u6570\u636e\u96c6
\n", "Dropout
\n": "\u8f8d\u5b66
\n", "Dropout probability
\n": "\u8f8d\u5b66\u6982\u7387
\n", "Empty adjacency matrix - an identity matrix
\n": "\u7a7a\u90bb\u63a5\u77e9\u9635-\u6052\u7b49\u77e9\u9635
\n", "Evaluate the model
\n": "\u8bc4\u4f30\u6a21\u578b
\n", "Evaluate the model again
\n": "\u518d\u6b21\u8bc4\u4f30\u6a21\u578b
\n", "Feature vectors for all nodes
\n": "\u6240\u6709\u8282\u70b9\u7684\u7279\u5f81\u5411\u91cf
\n", "Final graph attention layer where we average the heads
\n": "\u6700\u540e\u4e00\u5f20\u56fe\u5173\u6ce8\u5c42\uff0c\u6211\u4eec\u5e73\u5747\u5934\u90e8
\n", "First graph attention layer
\n": "\u7b2c\u4e00\u4e2a\u56fe\u5f62\u5173\u6ce8\u5c42
\n", "First graph attention layer where we concatenate the heads
\n": "\u6211\u4eec\u8fde\u63a5\u5934\u90e8\u7684\u7b2c\u4e00\u4e2a\u56fe\u5f62\u6ce8\u610f\u5c42
\n", "Get the class names and assign an unique integer to each of them
\n": "\u83b7\u53d6\u7c7b\u540d\u5e76\u4e3a\u6bcf\u4e2a\u7c7b\u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684\u6574\u6570
\n", "Get the feature vectors
\n": "\u83b7\u53d6\u7279\u5f81\u5411\u91cf
\n", "Get the labels as those integers
\n": "\u83b7\u53d6\u8fd9\u4e9b\u6574\u6570\u7684\u6807\u7b7e
\n", "Get the loss for training nodes
\n": "\u83b7\u5f97\u8bad\u7ec3\u8282\u70b9\u7684\u635f\u5931
\n", "Get the number of classes
\n": "\u83b7\u53d6\u73ed\u7ea7\u6570
\n", "Get the paper ids
\n": "\u83b7\u53d6\u7eb8\u8d28\u8bc1\u4ef6
\n", "Labels for each node
\n": "\u6bcf\u4e2a\u8282\u70b9\u7684\u6807\u7b7e
\n", "Load the citations, it's a list of pairs of integers.
\n": "\u52a0\u8f7d\u5f15\u6587\uff0c\u8fd9\u662f\u4e00\u4e2a\u6574\u6570\u5bf9\u7684\u5217\u8868\u3002
\n", "Log the accuracy
\n": "\u8bb0\u5f55\u51c6\u786e\u6027
\n", "Log the loss
\n": "\u8bb0\u5f55\u635f\u5931
\n", "Loss function
\n": "\u4e8f\u635f\u51fd\u6570
\n", "Make all the gradients zero
\n": "\u5c06\u6240\u6709\u6e10\u53d8\u8bbe\u4e3a\u96f6
\n", "Map of paper id to index
\n": "\u7eb8\u5f20 ID \u5230\u7d22\u5f15\u7684\u6620\u5c04
\n", "Mark the citations in the adjacency matrix
\n": "\u5728\u90bb\u63a5\u77e9\u9635\u4e2d\u6807\u8bb0\u5f15\u7528
\n", "Model
\n": "\u578b\u53f7
\n", "Move the adjacency matrix to the device
\n": "\u5c06\u90bb\u63a5\u77e9\u9635\u79fb\u81f3\u8bbe\u5907
\n", "Move the feature vectors to the device
\n": "\u5c06\u7279\u5f81\u5411\u91cf\u79fb\u52a8\u5230\u8bbe\u5907
\n", "Move the labels to the device
\n": "\u5c06\u6807\u7b7e\u79fb\u5230\u8bbe\u5907\u4e0a
\n", "No need to compute gradients
\n": "\u65e0\u9700\u8ba1\u7b97\u68af\u5ea6
\n", "Nodes for training
\n": "\u8bad\u7ec3\u8282\u70b9
\n", "Nodes for validation
\n": "\u7528\u4e8e\u9a8c\u8bc1\u7684\u8282\u70b9
\n", "Normalize the feature vectors
\n": "\u5f52\u4e00\u5316\u7279\u5f81\u5411\u91cf
\n", "Number of classes for classification
\n": "\u7528\u4e8e\u5206\u7c7b\u7684\u7c7b\u6570
\n", "Number of features in the first graph attention layer
\n": "\u7b2c\u4e00\u4e2a\u56fe\u5f62\u5173\u6ce8\u56fe\u5c42\u4e2d\u7684\u8981\u7d20\u6570
\n", "Number of features in the input
\n": "\u8f93\u5165\u4e2d\u7684\u8981\u7d20\u6570\u91cf
\n", "Number of features per node in the input
\n": "\u8f93\u5165\u4e2d\u6bcf\u4e2a\u8282\u70b9\u7684\u8981\u7d20\u6570
\n", "Number of heads
\n": "\u5934\u6570
\n", "Number of nodes to train on
\n": "\u8981\u8bad\u7ec3\u7684\u8282\u70b9\u6570
\n", "Number of training iterations
\n": "\u8bad\u7ec3\u8fed\u4ee3\u6b21\u6570
\n", "Optimizer
\n": "\u4f18\u5316\u5668
\n", "Output layer (without activation) for logits
\n": "logits \u7684\u8f93\u51fa\u5c42\uff08\u672a\u6fc0\u6d3b\uff09
\n", "Random indexes
\n": "\u968f\u673a\u7d22\u5f15
\n", "Read the paper ids, feature vectors, and labels
\n": "\u9605\u8bfb\u7eb8\u5f20 ID\u3001\u7279\u5f81\u77e2\u91cf\u548c\u6807\u7b7e
\n", "Run the training
\n": "\u8fd0\u884c\u8bad\u7ec3
\n", "Save logs
\n": "\u4fdd\u5b58\u65e5\u5fd7
\n", "Set mode to evaluation mode for validation
\n": "\u5c06\u6a21\u5f0f\u8bbe\u7f6e\u4e3a\u8bc4\u4f30\u6a21\u5f0f\u4ee5\u8fdb\u884c\u9a8c\u8bc1
\n", "Set of class names and an unique integer index
\n": "\u4e00\u7ec4\u7c7b\u540d\u548c\u4e00\u4e2a\u552f\u4e00\u7684\u6574\u6570\u7d22\u5f15
\n", "Set the model to training mode
\n": "\u5c06\u6a21\u578b\u8bbe\u7f6e\u4e3a\u8bad\u7ec3\u6a21\u5f0f
\n", "Start and watch the experiment
\n": "\u5f00\u59cb\u89c2\u770b\u5b9e\u9a8c
\n", "Take optimization step
\n": "\u91c7\u53d6\u4f18\u5316\u6b65\u9aa4
\n", "The pair of paper indexes
\n": "\u4e00\u5bf9\u7eb8\u8d28\u7d22\u5f15
\n", "Training loop
\n": "\u8bad\u7ec3\u5faa\u73af
\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": "\u6211\u4eec\u6784\u5efa\u4e00\u4e2a\u5bf9\u79f0\u7684\u56fe\u5f62\uff0c\u5982\u679c\u7eb8\u5f20_^_0_^_\u5f15\u7528\u4e86\u7eb8\u5f20\uff0c_^_1_^_\u6211\u4eec\u4f1a\u5728\u5176\u4e2d\u653e\u7f6e\u4e00\u4e2a\u4ece_^_2_^_\u5230\u7684\u5fbd\u7ae0_^_3_^_\u4ee5\u53ca\u4ece_^_4_^_\u5230_^_5_^_\u3002
\n", "Whether to include edges. This is test how much accuracy is lost if we ignore the citation network.
\n": "\u662f\u5426\u5305\u62ec\u8fb9\u7f18\u3002\u8fd9\u662f\u6d4b\u8bd5\u5982\u679c\u6211\u4eec\u5ffd\u7565\u5f15\u6587\u7f51\u7edc\u4f1a\u635f\u5931\u591a\u5c11\u51c6\u786e\u6027\u3002
\n", "Whether to include the citation network
\n": "\u662f\u5426\u5305\u62ec\u5f15\u6587\u7f51\u7edc
\n", "