Models
Autoencoders
Graph Autoencoder
\[Z = enc(X, A) \\ \hat{A} = \sigma (ZZ^T)\]
where $A$ denotes the adjacency matrix.
GeometricFlux.GAE
— TypeGAE(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.
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.VGAE
— TypeVGAE(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.
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.DeepSet
— TypeDeepSet(ϕ, ρ, 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.
Special Layers
Inner-product Decoder
\[\hat{A} = \sigma (ZZ^T)\]
where $Z$ denotes the input matrix from encoder.
GeometricFlux.InnerProductDecoder
— TypeInnerProductDecoder(σ)
Inner-product decoder layer.
Arguments
σ
: activation function.
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.VariationalGraphEncoder
— TypeVariationalGraphEncoder(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 ofnn
.z_dim
: dimension of latent variable layer. This will be parametrized intoμ
andlogσ
.
Encoder can be any graph convolutional layer.
Reference: Thomas N. Kipf, Max Welling (2016)