[论文解读] Medical diffusion on a budget: Textual Inversion for medical image generation
作者展示了通过在消费级GPU上仅用100个样本,利用文本反演训练小型文本嵌入即可将预训练的 Stable Diffusion 模型适配到多种医学影像模态,从而实现逼真的医学影像生成、数据增强以及灵活的疾病操作。
Diffusion models for text-to-image generation, known for their efficiency, accessibility, and quality, have gained popularity. While inference with these systems on consumer-grade GPUs is increasingly feasible, training from scratch requires large captioned datasets and significant computational resources. In medical image generation, the limited availability of large, publicly accessible datasets with text reports poses challenges due to legal and ethical concerns. This work shows that adapting pre-trained Stable Diffusion models to medical imaging modalities is achievable by training text embeddings using Textual Inversion. In this study, we experimented with small medical datasets (100 samples each from three modalities) and trained within hours to generate diagnostically accurate images, as judged by an expert radiologist. Experiments with Textual Inversion training and inference parameters reveal the necessity of larger embeddings and more examples in the medical domain. Classification experiments show an increase in diagnostic accuracy (AUC) for detecting prostate cancer on MRI, from 0.78 to 0.80. Further experiments demonstrate embedding flexibility through disease interpolation, combining pathologies, and inpainting for precise disease appearance control. The trained embeddings are compact (less than 1 MB), enabling easy data sharing with reduced privacy concerns.
研究动机与目标
- 证明在自然图像上训练的扩散模型可以通过文本反演适配到多种医学影像模态。
- 评估嵌入向量大小、训练样本数量和推理设置如何影响医学领域的生成质量。
- 展示实际应用:用于分类的合成数据增强、疾病进展插值,以及用于受控疾病外观的修复(inpainting)。
- 突出适合共享医疗数据、具隐私友好性且尺寸较小的嵌入向量。
提出的方法
- 使用 Stable Diffusion v2.0,保持架构冻结,通过文本反演为每个医学概念训练一个新的标记嵌入。
- 以恒定学习率(0.005)在每个类别100个样本、批量大小为1的条件下训练嵌入50,000步。
- 训练阶段的提示仅使用嵌入名称(无模板),评估则在每个设置下对比100个生成样本与100个真实样本,采用 Fréchet Inception Distance (FID)。
- 评估推理参数(采样步数、CFG 缩放)以及嵌入向量大小(8–64),以确定最佳生成质量。
- 通过在提示中组合多个嵌入来演示可组合扩散,生成具有多种病理或不同疾病进展的图像。
- 通过对区域进行遮罩并以疾病嵌入条件化扩散模型,将病变放置在特定位置进行修复(inpainting)。

实验结果
研究问题
- RQ1文本反演是否能够将预训练的自然图像扩散模型适应到多样的医学影像模态,且训练样本少至100例?
- RQ2嵌入向量大小、训练样本数量和推理设置如何影响医学影像的生成质量?
- RQ3嵌入向量是否能够支持在医学影像中进行组合提示、疾病进展插值以及定向修复(inpainting)?
- RQ4基于嵌入生成的合成数据在低数据情境下是否能提升下游医学分类性能?
主要发现
- 在每类100个样本、向量大小为64的嵌入比更小的尺寸或更少的样本在生成真实感方面更优。
- 增加训练样本数量对嵌入质量的提升比对步数或 CFG 缩放等微小变化的影响更大。
- 使用合成数据将基于多模态MRI的前列腺癌分类器的AUC从0.78提升至0.80(绝对增益2%),当添加2000个合成样本时。
- 嵌入能够在健康与疾病状态之间插值,并实现单幅图像中多种病理的组合。
- 修复(inpainting)能够在指定图像区域精确放置疾病外观,从而控性疾病位置和程度。
- 训练得到的嵌入体积小(不足1 MB),可在隐私顾虑较低的情况下分享。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。