|
Algorithm 1 STAG-GuardNet Training and Prediction Framework |
-
Require:
Training set , validation set , test set , HHMAO population size M, iteration limit I, and candidate hyperparameter vector
-
Ensure:
Optimized configuration and predicted attack-state probabilities
-
1:
Initialize HHMAO population
-
2:
for to I do
-
3:
for to M do
-
4:
Configure STAG-GuardNet using candidate and initialize trainable network weights
-
5:
for each training epoch do
-
6:
for each mini-batch do
-
7:
Construct the telemetry-adaptive graph and compute graph aggregation
-
8:
Update attack memory and temporal representation
-
9:
Apply risk-aware attention and obtain predictions
-
10:
Compute weighted cross-entropy loss
-
11:
Update trainable network weights using Adam and backpropagation
-
12:
end for
-
13:
end for
-
14:
Evaluate on using the validation objective
-
15:
end for
-
16:
Update candidate configurations using HHO exploration and MRFO refinement
-
17:
end for
-
18:
Select with the best validation objective and fix the corresponding STAG-GuardNet configuration
-
19:
Perform the forward pass on using the fixed trained model without HHMAO updates
-
20:
return and test-set attack-state probabilities
|