Bi-Directional MS Lesion Filling and Synthesis Using Denoising Diffusion Implicit Model-based Lesion Repainting

Jinwei Zhang, Lianrui Zuo, Yihao Liu, Samuel W. Remedios, Bennett A. Landman, Jerry L. Prince, Aaron Carass · DOI

Abstract

Automatic magnetic resonance (MR) image processing pipelines are widely used to study people with multiple sclerosis (PwMS), encompassing tasks such as lesion segmentation and brain parcellation. However, the presence of lesions often complicates these analyses, particularly in brain parcellation. Lesion filling is commonly used to mitigate this issue, but existing lesion filling algorithms often fall short in accurately reconstructing realistic lesion-free images, which are vital for consistent downstream analysis. Additionally, the performance of lesion segmentation algorithms is often limited by insufficient data with lesion delineation as training labels. In this paper, we propose a novel approach leveraging Denoising Diffusion Implicit Models (DDIMs) for both MS lesion filling and synthesis based on image inpainting. Our modified DDIM architecture, once trained, enables both MS lesion filling and synthesis. Specifically, it can generate lesion-free T1-weighted or FLAIR images from those containing lesions; or it can add lesions to T1-weighted or FLAIR images of healthy subjects. The former is essential for downstream analyses that require lesion-free images, while the latter is valuable for augmenting training datasets for lesion segmentation tasks. We validate our approach through initial experiments and demonstrate promising results in both lesion filling and synthesis, paving the way for future work.

Introduction

In Multiple Sclerosis (MS) research, clinicians rely on MRI to track brain atrophy and lesion progression. However, automated image analysis faces two significant hurdles. First, brain parcellation tools—which divide the brain into anatomical regions—are often confounded by the presence of lesions, leading to inaccurate volume measurements. While "lesion filling" (replacing lesions with healthy-looking tissue) is a standard preprocessing step, current algorithms frequently produce unrealistic textures that still disrupt downstream tools. Second, the development of robust deep learning models for lesion segmentation is hindered by a lack of large-scale, manually labeled datasets.

This paper addresses both challenges by treating lesion filling and synthesis as a unified image inpainting problem. By asking a generative model to "repaint" specific brain regions to be either healthy or pathological, we provide a bi-directional tool for both clinical analysis and data augmentation.

Methodology

The core of this framework is an adapted Denoising Diffusion Implicit Model (DDIM). Unlike standard diffusion models that require thousands of steps, DDIMs allow for accelerated inference, which the authors leveraged by sampling only every 10th step of a 1000-step noise schedule.

Bi-Directional Logic and the Repaint Strategy

The model utilizes a U-Net-based denoiser conditioned on a target mask ($M^{target}$). To fill a lesion, the model is instructed that the target state is healthy ($M^{target} = 0$). To synthesize a lesion, a mask defining the desired lesion location is provided.

A critical component of the inference phase is the Repaint strategy. During generation, a $M^{repaint}$ mask ensures that pixels outside the target area remain identical to the original scan. Inside the mask, pixels are iteratively refined to blend seamlessly with the surrounding tissue. To ensure boundary consistency, the generated image undergoes a final "re-noising" and "re-denoising" cycle, making the transition between original and AI-generated pixels indistinguishable.

Inference pipeline for lesion filling and generation using the Repaint strategy.

Experimental Setup

The model was trained on a multi-site dataset of T1-weighted (T1w) and FLAIR MRI slices from 66 MS subjects, totaling approximately 26,000 2D slices. Testing for the filling task was conducted on 15 MS subjects from an independent site. For the synthesis task, 10 healthy subjects were combined with 10 distinct MS lesion masks to evaluate the realism of generated pathology. Ground truth lesion masks were established using the SELF (Segmenting Lesions with Features) automated tool.

Key Results

The proposed method demonstrated high fidelity in both tasks, correctly learning the physics of different MRI sequences (e.g., generating hypo-intense lesions in T1w and hyper-intense lesions in FLAIR).

  • Lesion Filling: The filled images allowed the SLANT brain parcellation tool to function with high accuracy, achieving Dice Similarity Coefficients (DSC) of 0.932 for ventricles and 0.915 for white matter.
  • Lesion Synthesis: Synthetic lesions were highly realistic. When an independent lesion segmentation tool (SELF) was run on the synthetic images, it successfully identified the AI-generated lesions with a mean DSC of 0.832, suggesting the synthetic data is of sufficient quality to train or test other AI models.
Qualitative results for lesion filling and synthesis in T1w and FLAIR MRI.

Discussion and Future Work

While the 2D slice-based approach yields promising results, future iterations will explore native 3D diffusion models to improve spatial consistency across the entire brain volume. Additionally, further validation is required to compare the clinical accuracy of volume measurements derived from this method against industry standards like FSL. The ultimate goal is to demonstrate that segmentation models trained exclusively on this synthetic data can perform reliably on real-world clinical scans, thereby solving the data scarcity problem in MS research.

Summary updated

BibTeX
@misc{zhang2024bi,
  author = {Jinwei Zhang and Lianrui Zuo and Yihao Liu and Samuel W. Remedios and Bennett A. Landman and Jerry L. Prince and Aaron Carass},
  title = {{Bi-Directional MS Lesion Filling and Synthesis Using Denoising Diffusion Implicit Model-based Lesion Repainting}},
  year = {2024},
  eprint = {2410.05027},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.05027},
}
Figure