Training a Diffusion-GAN With Modified Loss Functions to Improve the Head-and-Neck Intensity Modulated Radiation Therapy Fluence Generator

Thumbnail Image



Journal Title

Journal ISSN

Volume Title

Repository Usage Stats



Introduction: The current head-and-neck (HN) fluence map generator tends to producehighly modulated fluence maps and therefore high monitor units (MUs) for each beam, which leads to more delivery uncertainty and leakage dose. This project implements diffu- sion into the training process and modifies the loss functions to mitigate this effect.

Methods: The dataset consists of 200 head-and-neck (HN) patients receiving intensity mod-ulated radiation therapy (IMRT) for training, 16 for validation, and 15 for testing. Two models were trained, one with-diffusion and one without. The original model was a con- ditional generative adversarial network (GAN) written in TensorFlow, the model without diffusion was written to be the PyTorch equivalent of the original model. After confirming the model was properly converted to PyTorch by comparing outputs, both new models were modified to use binary cross entropy for the GAN loss and mean absolute error as a third loss function for the generator. Hyperparameters were carefully selected based on the training script for the original model, and further tuned with trial and error. The diffusion was implemented based on Diffusion-GAN and the associated GitHub repository. The two new models were compared by plotting training loss vs epoch over 500 epochs. The two models were compared to the original model by comparing the output fluence maps to the ground truth using similarity index and comparing DVH statistics among the three models.

Results: The with-diffusion model and no-diffusion model achieved similar training loss.The diffusion model and no-diffusion model consistently delivered better parotid sparing than the original model and delivered less dose to four of the six tested OAR. The with- diffusion model delivered less dose to five of the six tested OAR. The diffusion model had the least MUs: 23% less than the original model and 3% less than the no-diffusion model. The diffusion model had lower D2cc: 4% less than the original model and 1% less than the no-diffusion model on average. All three plans deliver 95% of the prescription dose to nearly the same percentage of PTV volume.

Conclusion: Implementing diffusion does not provide a significant impact on training timeand training loss. However, it does enable comparable dose performance to both the no- diffusion and original models, while significantly reducing the total MU’s and 3D max 2cc relative to the original model and slightly reducing these metrics relative to the no-diffusion model, indicating smoother fluence modulation. In addition, both new models reduced dose to the right and left parotids relative to the original model, and to four of six tested OAR total, while the with-diffusion model consistently delivers less dose to OAR than the no- diffusion model. This indicates that both the new loss functions and diffusion reduce the overall dose to the OARs while preserving dose conformity around the target.





Reid, Scott William (2024). Training a Diffusion-GAN With Modified Loss Functions to Improve the Head-and-Neck Intensity Modulated Radiation Therapy Fluence Generator. Master's thesis, Duke University. Retrieved from


Dukes student scholarship is made available to the public using a Creative Commons Attribution / Non-commercial / No derivative (CC-BY-NC-ND) license.