Models

Autoencoders

Graph Autoencoder

\[Z = enc(X, A) \\ \hat{A} = \sigma (ZZ^T)\]

where $A$ denotes the adjacency matrix.

GeometricFlux.GAEType
GAE(enc, [σ=identity])

Graph autoencoder.

Arguments

  • enc: encoder. It can be any graph convolutional layer.
  • σ: Activation function for decoder.

Encoder is specified by user and decoder will be InnerProductDecoder layer.

source

Reference: Thomas N. Kipf, Max Welling (2016)


Variational Graph Autoencoder

\[H = enc(X, A) \\ Z_{\mu}, Z_{logσ} = GCN_{\mu}(H, A), GCN_{\sigma}(H, A) \\ \hat{A} = \sigma (ZZ^T)\]

where $A$ denotes the adjacency matrix, $X$ denotes node features.

GeometricFlux.VGAEType
VGAE(enc[, σ])

Variational graph autoencoder.

Arguments

  • enc: encoder. It can be any graph convolutional layer.

Encoder is specified by user and decoder will be InnerProductDecoder layer.

source

Reference: Thomas N. Kipf, Max Welling (2016)


DeepSet

\[Z = \rho ( \sum_{x_i \in \mathcal{V}} \phi (x_i) )\]

where $\phi$ and $\rho$ denote two neural networks and $x_i$ is the node feature for node $i$.

GeometricFlux.DeepSetType
DeepSet(ϕ, ρ, aggr=+)

Deep set model.

Arguments

  • ϕ: Neural network layer for each input before aggregation.
  • ρ: Neural network layer after aggregation.
  • aggr: An aggregate function applied to the result of message function. +, -,

*, /, max, min and mean are available.

Examples

julia> ϕ = Dense(64, 16)
Dense(64 => 16)     # 1_040 parameters

julia> ρ = Dense(16, 4)
Dense(16 => 4)      # 68 parameters

julia> DeepSet(ϕ, ρ)
DeepSet(Dense(64 => 16), Dense(16 => 4), aggr=+)

julia> DeepSet(ϕ, ρ, aggr=max)
DeepSet(Dense(64 => 16), Dense(16 => 4), aggr=max)

See also WithGraph for training layer with static graph.

source

Reference: Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, Alexander J Smola (2017)


Special Layers

Inner-product Decoder

\[\hat{A} = \sigma (ZZ^T)\]

where $Z$ denotes the input matrix from encoder.

Reference: Thomas N. Kipf, Max Welling (2016)


Variational Graph Encoder

\[H = enc(X, A) \\ Z_{\mu}, Z_{logσ} = GCN_{\mu}(H, A), GCN_{\sigma}(H, A)\]

GeometricFlux.VariationalGraphEncoderType
VariationalGraphEncoder(nn, h_dim, z_dim)

Variational graph encoder layer.

Arguments

  • nn: neural network. It can be any graph convolutional layer.
  • h_dim: dimension of hidden layer. This should fit the output dimension of nn.
  • z_dim: dimension of latent variable layer. This will be parametrized into μ and logσ.

Encoder can be any graph convolutional layer.

source

Reference: Thomas N. Kipf, Max Welling (2016)