|
Algorithm 1 Overall procedure of SSGAE. |
Input: Graph , ; Learnable parameter ; Hyper-parameter ; Number L of the hidden layers in SSGAE; Number T of the training epochs. Output: Anomaly score for each node via function .
-
1:
▹ Training Stage.
-
2:
Randomly initialize and the trainable parameters in , and ;
-
3:
fordo;
-
4:
for do
-
5:
for do
-
6:
Calculate via Equation (3);
-
7:
end for
-
8:
;
-
9:
for do
-
10:
Calculate via Equation (6);
-
11:
end for
-
12:
;
-
13:
Calculate via Equation (4);
-
14:
Update and the trainable parameters in , , and via Equation (8) with the backpropagation algorithm.
-
15:
end for
-
16:
end for
-
17:
▹ Test Stage.
-
18:
fordo
-
19:
for do
-
20:
Calculate via Equation (3);
-
21:
end for
-
22:
;
-
23:
for do
-
24:
Calculate via Equation (6);
-
25:
end for
-
26:
;
-
27:
Calculate via Equation (4);
-
28:
Calculate anomaly score of each node in via Equation (9).
-
29:
end for
|