← All writing

FedGAN: generating retinal images across data partitions

The training setup, results, and limitations of my research on federated image generation.

From Hassan Kamran’s personal archive. Revised on 16 November 2026.

FedGAN is research I co-authored on generating retinal images with a generative adversarial network trained across separate data partitions. The question was whether the model could learn useful image structure without pooling those partitions into one training dataset.

The work was published in PLOS ONE as “FedGAN: Federated Diabetic Retinopathy Image Generation”. This is a condensed account of the implementation and its limits.

The training setup

We used a modified deep convolutional GAN, with a generator producing images and a discriminator learning to distinguish generated images from training examples. The model was pretrained on abdominal CT data, then trained on retinal-image data in a federated setup.

Preprocessing brought the images to 128 × 128 pixels and grayscale. Contrast enhancement and normalisation made the inputs more consistent, while the reduced resolution kept the experiment computationally manageable. This simplification also limits the fine detail the model can represent.

The experiment simulated clients using dataset partitions. It should not be described as a deployment across operating hospitals.

Federating both parts of the GAN

Each client trained locally. The server then combined generator and discriminator updates using federated averaging, before distributing the resulting model for another round.

The data partitions were deliberately non-identical. Different clients received different mixtures of retinal-image severity labels, making the task more demanding than dividing one uniform dataset into equal pieces.

We compared configurations with 3, 5, 7, and 10 clients. The smaller federation produced the strongest reported realism score among those configurations; adding clients did not automatically improve the result.

Retinal images generated in the three-client FedGAN experiment
Generated samples from the three-client experiment.

What the results mean

The original experiment reported realism scores of 0.43, 0.37, 0.36, and 0.35 for the four federation sizes. These are measures from that experiment, not diagnostic accuracy percentages. They do not establish that a generated image is suitable for clinical use.

The useful finding was a trade-off: local training and aggregation could produce synthetic retinal images, but increasing the number of heterogeneous clients made the training problem harder. The generated samples and training curves were more informative than a single headline percentage.

Keeping data local is not a complete privacy guarantee

Raw images were not exchanged during federated training. That is an architectural property, rather than proof that model updates cannot reveal information.

Privacy leakage, stronger aggregation methods, and the usefulness of the images in downstream tasks remain important questions. This project should be read as an image-generation experiment, not a claim of automatic regulatory compliance or a clinically validated diagnostic system.

More from the blog →