[论文解读] Spanning the Visual Analogy Space with a Weight Basis of LoRAs
LoRWeB 学会一个 LoRA 适配器的基础,并在推理时动态组合同,以灵活地进行视觉类比编辑,在面对未见变换时达到最先进的泛化能力。
Visual analogy learning enables image manipulation through demonstration rather than textual description, allowing users to specify complex transformations difficult to articulate in words. Given a triplet $\{\mathbf{a}$, $\mathbf{a}'$, $\mathbf{b}\}$, the goal is to generate $\mathbf{b}'$ such that $\mathbf{a} : \mathbf{a}' :: \mathbf{b} : \mathbf{b}'$. Recent methods adapt text-to-image models to this task using a single Low-Rank Adaptation (LoRA) module, but they face a fundamental limitation: attempting to capture the diverse space of visual transformations within a fixed adaptation module constrains generalization capabilities. Inspired by recent work showing that LoRAs in constrained domains span meaningful, interpolatable semantic spaces, we propose LoRWeB, a novel approach that specializes the model for each analogy task at inference time through dynamic composition of learned transformation primitives, informally, choosing a point in a "space of LoRAs". We introduce two key components: (1) a learnable basis of LoRA modules, to span the space of different visual transformations, and (2) a lightweight encoder that dynamically selects and weighs these basis LoRAs based on the input analogy pair. Comprehensive evaluations demonstrate our approach achieves state-of-the-art performance and significantly improves generalization to unseen visual transformations. Our findings suggest that LoRA basis decompositions are a promising direction for flexible visual manipulation. Code and data are in https://research.nvidia.com/labs/par/lorweb
研究动机与目标
- 将视觉类比学习作为通过演示而非文本实现复杂图像编辑的手段进行动机阐释。
- 通过跨越一个 LoRA 基底来覆盖语义空间,克服单一 LoRA 适配器的局限性。
- 开发一个在推理时动态选择并对 LoRAs 加权的机制,基于输入的类比对进行。
- 共同学习基底和路由器,使其能够为未见的类比组合出合适的变换。
- 在多样化的视觉类比集合上展示改进的泛化能力和编辑保真度。
提出的方法
- 引入一个可学习的 N 个秩 r 的 LoRA 基底,以覆盖多样化的视觉变换。
- 将每对 LoRA 与一个可学习的键向量相关联,并使用编码器从输入三元组 ${a},{a'},${b}$ 生成查询。
- 通过查询与 LoRA 键之间的点积的 softmax 来计算混合系数,构建 Mixed LoRA。
- 将 Mixed LoRA 注入条件扩散/流模型(Flux.1-Kontext),以为新的图像 ${b}$ 生成 ${b'}$。
- 共同训练 LoRA 基底和编码器,使得组合能够泛化到未见的类比。
- 使用 CLIP 对条件图像进行编码,并通过扩展注意力机制向扩散模型提供完整的类比三元组,以实现详细的编辑。
实验结果
研究问题
- RQ1一个 LoRA 基底通过学习的路由器进行组合,是否能够泛化到训练中未见的视觉类比?
- RQ2相较于单一 LoRA 基线,基于输入动态混合 LoRAs 是否能在实现准确变换的同时更好地保留图像细节?
- RQ3在泛化、编辑准确性和内容保留方面,LoRWeB 与现有类比方法相比如何?
- RQ4基底规模和 LoRA 秩(r) 对性能和泛化有何影响?
- RQ5基于 CLIP 的编码是否足以用于 LoRA 选择,还是完整的类比三元组在扩展注意力条件下的扩展注意力对扩散模型有益?
主要发现
- 与单一 LoRA 基线和现有方法相比,LoRWeB 在未见的类比任务上获得了更好的泛化能力。
- 一个可学习的 LoRA 基底结合轻量级编码器,能够通过动态混合有效覆盖广泛的变换。
- 定量和人类评估均表明 LoRWeB 在多样任务中更好地保留输入内容,同时实现准确的编辑。
- 基底规模较大(N)且秩(r)恰当对性能重要;简单地提升秩而不进行基底多样化可能会降低效果。
- 使用完整的类比三元组与扩展注意力有助于在编辑过程中保持细粒度细节。
- 包括 CLIP 或 SigLIP 在内的多种编码器都能产生鲁棒结果,且编码器设计(对 a、a'、b 的分离编码)有助于任务理解。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。