Question: In this exercise, we aim to implement and learn the graph convolutional networks (GCNs) shown in Fig. 10.38. Specifically, we apply a two-layer GCN for
In this exercise, we aim to implement and learn the graph convolutional networks (GCNs) shown in Fig. 10.38. Specifically, we apply a two-layer GCN for semisupervised node classification on Cora data set. The data can be downloaded at https://linqs.soe.ucsc.edu/data. Specifically, first construct the undirected graph based on citation relations (i.e., there exists one undirected edge between two papers if one paper cites another), and node attributes represent the content words. Randomly split 500 nodes for validation and 1000 nodes for testing and the rest for training. Set the hidden dimension to be 64. Use ReLU and softmax functions as the nonlinear activation functions of the first and second layers, respectively. For semisupervised
node classification, use cross-entropy loss function and Adam optimizer with a learning rate 0.01 and a dropout rate 0.5 . Implement this model, then evaluate and report the node classification accuracy.

Input: A, adjacency matrix of the input graph of size n x n; X, the node attribute matrix of size n x d; w! (L= 1,..., L), the weight matrix at each layer; L, the number of layers; f, nonlinear activation function (e.g., sigmoid or ReLU function). . . Output: The node embedding matrices Z (l= 1,..., L). Method: //Preprocessing and Initialization (1) Add a self-edge for each node: A+ A+ I where I is an identity matrix; (2) Calculate the degree matrix D of A; (3) Normalize = D-1/2AD-1/2; (4) Initialize Z = X; (5) for (/= 1, ..., L){ // for each layer of GCNs //Propagation (6) (7) - AZ-1;// aggregate the neighboring embedding //Linear Transformation = 2 2w; // linear transformation of aggregated embedding //Nonlinear activation = (8) (9) FIGURE 10.38 z = f(z); // nonlinear activation of linearly transformed embedding }
Step by Step Solution
3.48 Rating (158 Votes )
There are 3 Steps involved in it
The test accuracy s... View full answer
Get step-by-step solutions from verified subject matter experts
