Skip to contents

The first bracket of the GCNII layer is the initial residual connection, the second the identity mapping. With the weight matrix taken as the identity – the "identity mapping" limit of the paper's own analysis, and the only deterministic choice available since no weight is passed – the second bracket collapses to I for every beta.

Usage

GcnII(A, H0, alpha = 0.1, beta = 0.5, K = 4)

Arguments

A

Square adjacency matrix.

H0

Initial node representation, one row per node.

alpha

Initial-residual weight in [0, 1].

beta

Identity-mapping weight, retained for the interface.

K

Number of layers.

Value

List with estimate, H, alpha, beta, K, n, method.

Details

Formula: H <- relu((1 - alpha) Ah H + alpha H0), repeated K times, with Ah = Dt^{-1/2}(A + I)Dt^{-1/2}.

References

Chen, Wei, Huang, Ding and Li (2020), Simple and deep graph convolutional networks, ICML 2020, PMLR 119:1725-1735, eq. (3). arXiv:2007.02133

Examples

set.seed(1)
A <- matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3, 3, byrow = TRUE)
H0 <- matrix(rnorm(6), 3, 2)
GcnII(A, H0)
#> $estimate
#> [1] 0.2224244
#> 
#> $H
#>            [,1]      [,2]
#> [1,] 0.00000000 0.6547422
#> [2,] 0.02552642 0.4897240
#> [3,] 0.00000000 0.1645538
#> 
#> $alpha
#> [1] 0.1
#> 
#> $beta
#> [1] 0.5
#> 
#> $K
#> [1] 4
#> 
#> $n
#> [1] 3
#> 
#> $method
#> [1] "H = relu((1-a) Ah H + a H0) with W = I, Chen et al. (2020) eq. (3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"