|
Algorithm 1 BreastSwimFedNeXt: Federated Swin Transformer Ensemble for Breast Cancer Classification. |
-
Require:
Distributed datasets from multiple clients, Swin Transformer variants (Tiny, Small, Base, Large), FL parameters
-
1:
Initialize FL parameters and set Swin Transformer variants and RF meta-learner
-
2:
for each client i do
-
3:
Perform local data preprocessing: apply augmentation (rotation, flipping, brightness, Gaussian noise, blur)
-
4:
Train local Swin Transformer model to extract features:
-
5:
-
6:
Optimize with local cross-entropy loss:
-
7:
end for
-
8:
Server aggregates model weights using FedAvg:
-
9:
Server constructs stacking ensemble: base predictions from all Swin variants → RF meta-learner
-
10:
return Final prediction
|