Learning Discriminative and Generalizable Anomaly Detector for Dynamic Graph with Limited Supervision
Organizations: Universit´e de Montréal · International Digital Economy Academy (IDEA) · McGill University · Mila - Quebec Artificial Intelligence Institute.
Abstract
Dynamic graph anomaly detection is critical for many real-world applications but remains challenging due to the scarcity of labeled anomalies. Existing methods are either unsupervised or semi-supervised: unsupervised methods avoid the need for labeled anomalies but often produce ambiguous boundary, whereas semi-supervised methods can overfit to the limited labeled anomalies and generalize poorly to unseen anomalies. To address this gap, we consider a largely underexplored problem: learning a discriminative boundary from normal/unlabeled data, while leveraging limited labeled anomalies when available without sacrificing generalization to unseen anomalies. In this paper, we propose an effective, generalizable, and model-agnostic framework with three main components: (i) residual representation encoding that capture deviations between current interactions and their historical context, providing anomaly-relevant signals; (ii) a restriction loss that constrain the normal representations within an interval bounded by two co-centered hyperspheres, ensuring consistent scales while keeping anomalies separable; (iii) a bi-boundary optimization strategy that learns a discriminative and robust boundary using the log-likelihood distribution modeled by a normalizing flow. Extensive experiments demonstrate the superiority of our framework across diverse evaluation settings.
Figures & tables
| Methods | Wikipedia | MOOC | |||||||
|---|---|---|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | AUROC | AP | F1 | |
| DTDG-based DGAD Methods | |||||||||
| Netwalk | |||||||||
| AddGraph | |||||||||
| STRGNN | |||||||||
| Taddy | |||||||||
| Methods | UCI | Enron | LastFM | ||||||
|---|---|---|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | AUROC | AP | F1 | |
| CTDG-based DGAD Methods | |||||||||
| SAD | |||||||||
| GeneralDyG | |||||||||
| Representative CTDG Models | |||||||||
| JODIE | |||||||||
| Variant | Wikipedia | MOOC | ||||
|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | |
| SDGAD | {\color[rgb]{20,128,85}\mathbf{80.36{\scriptstyle\pm 0.69}}} | {\color[rgb]{20,128,85}\mathbf{5.41{\scriptstyle\pm 1.23}}} | {\color[rgb]{20,128,85}\mathbf{8.34{\scriptstyle\pm 2.72}}} | {\color[rgb]{20,128,85}\mathbf{72.87{\scriptstyle\pm 1.40}}} | {\color[rgb]{20,128,85}\mathbf{7.89{\scriptstyle\pm 0.38}}} | {\color[rgb]{20,128,85}\mathbf{7.15{\scriptstyle\pm 0.64}}} |
| w/o Res | {\color[rgb]{20,104,168}6.58{\scriptstyle\pm 2.48}} | |||||
| w/o | {\color[rgb]{236,84,20}79.44{\scriptstyle\pm 0.80}} | {\color[rgb]{236,84,20}5.33{\scriptstyle\pm 1.47}} | {\color[rgb]{236,84,20}6.01{\scriptstyle\pm 0.72}} | |||
| w/o | {\color[rgb]{20,104,168}80.36{\scriptstyle\pm 1.00}} | {\color[rgb]{20,104,168}5.38{\scriptstyle\pm 1.32}} | {\color[rgb]{20,104,168}7.41{\scriptstyle\pm 3.29}} | {\color[rgb]{20,104,168}72.54{\scriptstyle\pm 1.35}} | {\color[rgb]{236,84,20}6.42{\scriptstyle\pm 0.97}} | |
| TCL | {\color[rgb]{236,84,20}72.51{\scriptstyle\pm 1.76}} | {\color[rgb]{20,104,168}7.87{\scriptstyle\pm 0.71}} | ||||
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Nodes | Edges | Unique Edges | Timesteps | Edge Feature | Anomaly Ratio | Density |
|---|---|---|---|---|---|---|---|
| Wikipedia | 9227 | 157474 | 18257 | 152757 | 172 | 0.14% | 4.30E-03 |
| 10984 | 672447 | 78516 | 669065 | 172 | 0.05% | 8.51E-03 | |
| MOOC | 7144 | 411749 | 178443 | 345600 | 4 | 0.99% | 1.26E-02 |
| LastFm | 1980 | 1293103 | 154993 | 1283614 | 0 | - | 5.57E-01 |
| Enron | 184 | 125235 | 3125 | 22632 | 0 | - | 5.53E+00 |
| UCI | 1899 | 59835 | 20296 | 58911 | 0 | - | 3.66E-02 |
| / | Wikipedia | MOOC | ||||
|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | |
| 0.5/0.5 | {\color[rgb]{20,128,85}\mathbf{72.87{\scriptstyle\pm 1.40}}} | {\color[rgb]{20,128,85}\mathbf{7.89{\scriptstyle\pm 0.38}}} | ||||
| 1/0.1 | {\color[rgb]{20,128,85}\mathbf{80.67{\scriptstyle\pm 1.14}}} | |||||
| 1/0.5 | {\color[rgb]{20,128,85}\mathbf{5.41{\scriptstyle\pm 1.23}}} | {\color[rgb]{20,128,85}\mathbf{8.34{\scriptstyle\pm 2.72}}} | {\color[rgb]{20,128,85}\mathbf{7.69{\scriptstyle\pm 4.52}}} | |||
| 1/0.7 | ||||||
| 1/1 | ||||||
| Threshold | F1 | TPR | FPR |
|---|---|---|---|
| 0.01 | 0 | 0 | 0 |
| 0.1 | 0 | 0 | 0 |
| 0.3 | 0 | 0 | 0 |
| 0.5 | 0 | 0 | 0 |
| Threshold | F1 | TPR | FPR |
|---|---|---|---|
| 0.01 | 0.444444 | 1 | 0.002298 |
| 0.1 | 0.444444 | 1 | 0.002298 |
| 0.3 | 0.444444 | 1 | 0.002298 |
| 0.5 | 0.444444 | 1 | 0.002298 |
| Threshold | F1 | TPR | FPR |
|---|---|---|---|
| 0.01 | 0.029557 | 0.073171 | 0.000555 |
| 0.1 | 0.032520 | 0.024390 | 0.000620 |
| 0.3 | 0.020408 | 0.012195 | 0.000238 |
| 0.5 | 0.021277 | 0.012195 | 0.000175 |
| Threshold | F1 | TPR | FPR |
|---|---|---|---|
| 0.01 | 0.002664 | 1 | 0.976140 |
| 0.1 | 0.006867 | 0.695122 | 0.261700 |
| 0.3 | 0.031718 | 0.439024 | 0.034209 |
| 0.5 | 0.111111 | 0.097561 | 0.000858 |
| Methods | UCI | Enron | LastFM | ||||||
|---|---|---|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | AUROC | AP | F1 | |
| CTDG-based DGAD Methods | |||||||||
| SAD | |||||||||
| GeneralDyG | |||||||||
| Representative CTDG Models | |||||||||
| JODIE | |||||||||
| Methods | Few-shot=1 | Few-shot=2 | Few-shot=3 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | AUROC | AP | F1 | |
| SAD | |||||||||
| GeneralDyG | |||||||||
| JODIE | |||||||||
| +ours | |||||||||
| DyRep | |||||||||
| Methods | Few-shot=1 | Few-shot=2 | Few-shot=3 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| AUROC | AP | F1 | AUROC | AP | F1 | AUROC | AP | F1 | |
| SAD | |||||||||
| GeneralDyG | |||||||||
| JODIE | |||||||||
| +ours | |||||||||
| DyRep | |||||||||