Skip to contents

Kipf and Welling's equation (7), the first-order layer with the single parameter of equation (6), before equation (8) renormalises it. The operator I + D^{-1/2} A D^{-1/2} has eigenvalues in \([0, 2]\). Isolated nodes have zero degree; their normalising factor is taken to be zero rather than infinite, so they keep only their own features.

Usage

Gcnemd(G, X, W)

Arguments

G

Square adjacency matrix.

X

Node feature matrix, one row per node.

W

Weight matrix, one row per input feature.

Value

List with estimate (mean output activation), H, preactivation, n, method.

Details

Formula: H' = relu((I + D^{-1/2} A D^{-1/2}) X W), D = diag(rowSums(A)).

References

Kipf and Welling (2017), Semi-supervised classification with graph convolutional networks, ICLR 2017, eq. (7). arXiv:1609.02907

Examples

set.seed(1)
G <- matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3, 3, byrow = TRUE)
X <- matrix(rnorm(6), 3, 2)
W <- matrix(rnorm(4), 2, 2)
Gcnemd(G, X, W)
#> $estimate
#> [1] 0.2235309
#> 
#> $H
#>           [,1] [,2]
#> [1,] 1.1078063    0
#> [2,] 0.2333788    0
#> [3,] 0.0000000    0
#> 
#> $preactivation
#>            [,1]       [,2]
#> [1,]  1.1078063 -0.8442669
#> [2,]  0.2333788 -0.7574748
#> [3,] -0.7777589 -0.2269641
#> 
#> $n
#> [1] 3
#> 
#> $method
#> [1] "H' = relu((I + D^{-1/2} A D^{-1/2}) X W), Kipf & Welling (2017) eq. (7)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"