ADAMM: Anomaly Detection of Attributed Multi-graphs with Metadata: A Unified Neural Network Approach
Prerequisites: torch, torch-geometric, pytorch-lightning
Graphs & their associated Metadata features are jointly represented in ADAMM using Pytorch-geometric's Data object.
The Data object should contain an additional attribute "metadata" for storing the metadata features vector.
ADAMM supports directed, node & edge attributed, multi-graphs.
Function adamm_fit(train_dataset,test_datest) provides a simple example on how to train & test ADAMM using a custom dataset.
"train_dataset" is a list of torch-geometric Data objects (acting as train dataset), while "test_dataset" is the test dataset used for scoring anomalies in an inductive setting.
It returns the anomaly scores of the samples in test_dataset and the train validation score used for model selection.
File config.json allows to modify ADAMM's hyperparameters and configuration.
- If the input graphs are labeled the field "nfeat_node" should remain None, o.w. should be set equal to number of features.
- If metadata features are used the field "metadata_dim" should be set equal to the dimensions of the metadata, o.w. should be set to None.