d-ailin / GDN

Implementation code for the paper "Graph Neural Network-Based Anomaly Detection in Multivariate Time Series" (AAAI 2021)
MIT License
481 stars 141 forks source link

GNN layers & topk relation #97

Closed sozgny closed 5 months ago

sozgny commented 6 months ago

Hi! Thank you for this amazing work. I am working on your project and I still can not understand completely the way that topk neighborhood is used. (forward fct in GDN class) We fix topk=20 but I cannot figure it out where and how it is used. In other hand:

  1. Learned graph is constructed for every node i, edge_index in edge_index_sets. What is exactly edge_index_sets and why do we need many edge index sets instead of one? I suppose that it contains lists(indexes) of (1-k) neighbors for every node ?
  2. We have edge_set_num GNN layers. In every layer we have complete graph or every layer contains the learned graph for every node?

P.s: I am a phd student and new to GNN. Anomaly detection with GNN is one of my subject in my thesis. So I am trying to fully understand how GNNs work and how to construct GNN layers etc. I will really be appreciated if you have time to answer my questions. Thanks!

d-ailin commented 5 months ago

Thanks for your interest and really sorry for the late reply.

  1. The edege_index_sets are previously aimed at providing structure information (edge connection). As in final version we set default as fully connected graph and use top-k to build the actual computing graph, we use the gated_edge_index instead which is the top-k graph.
  2. For every layer, we use the learned graph.
sozgny commented 5 months ago

Thanks a lot for the responses! :)