[论文解读] A Closer Look at Parameter-Efficient Tuning in Diffusion Models
本文提出对扩散模型中参数高效微调的系统性研究,采用适配器——一种插入U-Net架构的小型可学习模块。通过方差分析(ANOVA)分析设计因素,发现输入位置是最关键的因素,发现在交叉注意力模块之后插入适配器可实现SOTA性能,仅增加0.75%的参数量,在个性化和少样本微调任务中优于全量微调(如DreamBooth)。
Large-scale diffusion models like Stable Diffusion are powerful and find various real-world applications while customizing such models by fine-tuning is both memory and time inefficient. Motivated by the recent progress in natural language processing, we investigate parameter-efficient tuning in large diffusion models by inserting small learnable modules (termed adapters). In particular, we decompose the design space of adapters into orthogonal factors -- the input position, the output position as well as the function form, and perform Analysis of Variance (ANOVA), a classical statistical approach for analyzing the correlation between discrete (design options) and continuous variables (evaluation metrics). Our analysis suggests that the input position of adapters is the critical factor influencing the performance of downstream tasks. Then, we carefully study the choice of the input position, and we find that putting the input position after the cross-attention block can lead to the best performance, validated by additional visualization analyses. Finally, we provide a recipe for parameter-efficient tuning in diffusion models, which is comparable if not superior to the fully fine-tuned baseline (e.g., DreamBooth) with only 0.75 \% extra parameters, across various customized tasks.
研究动机与目标
- 为解决像Stable Diffusion这样的大规模扩散模型微调带来的高内存和计算成本问题。
- 研究参数高效微调在扩散模型中的应用,受自然语言处理领域进展的启发,但针对U-Net的复杂架构进行适配。
- 系统性探索适配器的设计空间——重点关注输入位置、输出位置和函数形式——以实现最佳性能。
- 识别适配器设计中最具影响力的因素,并为下游任务提供实用且高效的微调方案。
提出的方法
- 将适配器设计空间分解为正交因素:输入位置、输出位置和函数形式。
- 应用方差分析(ANOVA)评估离散设计选择对连续评估指标(如FID、CLIP相似度)的影响。
- 将适配器——小型低秩MLP模块——插入U-Net架构的特定层中,冻结原始模型权重。
- 通过噪声预测差异的可视化分析适配器位置如何影响提示敏感度。
- 在个性化和少样本微调任务中采用统一的评估协议,使用DreamBooth基准和花卉数据集。
- 将性能最佳的适配器配置与全量微调(DreamBooth)及同期方法进行比较,评估FID和CLIP相似度。
实验结果
研究问题
- RQ1在扩散模型中,适配器设计因素(输入位置、输出位置或函数形式)中哪一个对下游性能影响最大?
- RQ2在U-Net架构中,适配器的最优输入位置在哪里,以最大化提示敏感度和生成质量?
- RQ3能否通过极小的参数增加(≤0.75%)实现参数高效微调,使其性能匹配或超越全量微调(如DreamBooth)?
- RQ4适配器位置如何影响模型感知和响应输入提示变化的能力?通过噪声预测差异的可视化可说明此问题。
- RQ5在多样化的微调任务中,该方法与全量微调基线及同期参数高效方法相比,其性能在定量上如何?
主要发现
- ANOVA分析显示,输入位置是影响性能的最关键因素,涵盖多种设计选项。
- 在交叉注意力模块之后(CA_out)插入适配器可实现最佳性能,因其能最大程度提升提示敏感度和视觉质量。
- 在花卉数据集上,该方法实现FID为24.49,优于全量微调基线(FID 28.15)。
- 在DreamBooth个性化任务中,该方法在视觉质量和CLIP相似度方面与DreamBooth相当或更优,且仅增加0.75%的参数。
- 噪声预测差异的可视化证实,CA_out和CA_c输入位置对提示变化的响应比其他位置更强烈。
- 与全量微调相比,该方法将内存使用量和训练时间减少了约30%,同时保持或提升了生成质量。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。