- class pygod.nn.GUIDEBase(dim_a, dim_s, hid_a=64, hid_s=4, num_layers=4, dropout=0.0, act=<function relu>, **kwargs)#
Higher-order Structure based Anomaly Detection on Attributed Networks
GUIDE is an anomaly detector consisting of an attribute graph convolutional autoencoder, and a structure graph attentive autoencoder (not the same as the graph attention networks). Instead of the adjacency matrix, node motif degree is used as input of structure autoencoder. The reconstruction mean square error of the autoencoders are defined as structure anomaly score and attribute anomaly score, respectively.
Note: The calculation of node motif degree in preprocessing has high time complexity. It may take longer than you expect.
See [YZY+21] for details.
dim_a (int) – Input dimension for attribute.
dim_s (int) – Input dimension for structure.
hid_a (int, optional) – Hidden dimension for attribute. Default:
hid_s (int, optional) – Hidden dimension for structure. Default:
num_layers (int, optional) – Total number of layers in model. Default:
dropout (float, optional) – Dropout rate. Default:
act (callable activation function or None, optional) – Activation function if not None. Default:
**kwargs – Other parameters for GCN.
- forward(x, s, edge_index)#
Forward computation of GUIDE.