Table 2 Proposed model FL framework with explainability across distributed clients.

From: Privacy preserving skin cancer diagnosis through federated deep learning and explainable AI

Federated learning workflow overview

 Input

  Distributed private datasets from Client-1, Client-2, Client-3 (Skin lesion images: benign, malignant)

  Predefined global model architecture (VGG19 customized for 3 classes)

  Batch size = 30

  Epoch = 20

  Optimizer = AdamW, SGD, RMSprop

  Communication Round = 25

 Output

  Trained a global model for skin cancer classification

  Visual explanations using Grad-CAM

Data acquisition and pre-processing

 Acquire skin lesion datasets from distributed clients [Client-1, Client-2, Client-3]

 Pre-process images (resize to 224 × 224 × 3, normalize, augment, convert format = PNG)

 Split each dataset into training (80%) and testing (20%) sets

Global model initialization

 Define the architecture of the global model (VGG19 with a 3-class output layer)

 Initialize model parameters with pretrained weights

 Upload the initialized global model to the central coordinating server

Define aggregation strategy

 Select FedAvg as the aggregation technique

Begin federated training (for R = 25 rounds)

 For each communication round r = 1 to 25:

 Distribute the current global model to all clients.

  At each client

   Load its private dataset

   Assign optimizer

   Client-1 → AdamW

   Client-2 → SGD

   Client-3 → RMSprop

   Train the local model on the client’s dataset

   Send updated local weights to the central server

  At the central server

   Aggregate weights using FedAvg

   Update the global model with averaged weights

   Evaluate the updated global model on client test sets

Explainability & fairness

 Apply Grad-CAM to the trained global model for visual explanation

 Generate heat maps to highlight critical regions influencing classification

 Check the fairness of model explanations across clients

 If unfair → Retrain global model

Validation phase

 Display the original image

 Present the predicted class

 Visualize the Grad-CAM heatmap overlay for interpretation