Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in anomaly_ratio for SWaT Dataset #109

Closed
blacksnail789521 opened this issue May 29, 2023 · 1 comment
Closed

Discrepancy in anomaly_ratio for SWaT Dataset #109

blacksnail789521 opened this issue May 29, 2023 · 1 comment

Comments

@blacksnail789521
Copy link
Contributor

blacksnail789521 commented May 29, 2023

Hello,

I've been closely examining the settings used in your scripts for anomaly detection and noticed a couple of potential discrepancies I wanted to bring to your attention.

In the original Anomaly Transformer's paper, it's stated:

For the main results, we set r = 0.1% for SWaT, 0.5% for SMD and 1% for other datasets

Upon reviewing your scripts, I found that the anomaly_ratio for most datasets matches the settings outlined in the Anomaly Transformer's paper, except for the SWaT dataset. In your scripts, the anomaly_ratio for the SWaT dataset is set to 1%, rather than the 0.1% indicated in the original documentation. I'm curious to understand the rationale behind this alteration.

Additionally, I noticed that in SWATSegLoader, swat_train2.csv is loaded as the training data and swat2.csv as the test data. However, in swat2.csv, the normal to attack ratio isn't 0.1% or 1%, but rather 12% (matched with TranAD paper). Could you please help clarify the reasoning for this difference as well?

Thank you for your time, and I appreciate your assistance in understanding these details.

@wuhaixu2016
Copy link
Member

Hi,

(1) In this paper, we find that setting the anomaly ratio as 1% for SWaT can boost the performance of all the models, including Anomaly Transformer. Thus, we set the hyperparameter as 1%.

(2) Why the set ratio is smaller than the exact anomaly ratio?
This comes from the adjustment strategy for evaluation. Here is a clarification: thuml/Anomaly-Transformer#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants