d-ailin / GDN

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

Non deterministic model? #18

Closed rashmikaslikar closed 2 years ago

rashmikaslikar commented 2 years ago

Hello, I am currently working in anomaly detection and I am very interested in your research. Thank you for sharing your work.

I am using your code to perform anomaly detection on the Server Machine Dataset (SMD). However while performing the experiments I observed that the training on GPU is not deterministic (even after setting the random seed and other measures for reproducibility). Have you also observed the same behavior? Are graph neural networks in general non deterministic or is this something specific to your model?

Thank you, once again. I am looking forward to your reply as this will help me further understand the issue and go about with the experimenting.

Best regards, Rashmi

d-ailin commented 2 years ago

Hi Rashimi,

Thanks for your interest in our work. Yes, I have also observed this behavior though I have set the random seeds.

I think one possible reason is the library itself (https://pytorch.org/docs/stable/notes/randomness.html), as they have mentioned this issue too. But I think if you want to see if the generation of graph can be a cause, you could just use a fixed graph and run multiple times to see.

d-ailin commented 2 years ago

Feel free to reopen the issue if there is any further question.

CLiJia commented 4 months ago

Hi, I've recently been working on anomaly detection as well. I tried to experiment with SMD dataset but I can't handle his format like SWAT because he detects multiple data from one sensor. Can you tell me how you are handling him. Looking forward to your reply.