2025-10-29 · 进阶 · 计算机视觉 · 机器学习

Group Relative Attention Guidance for Image Editing

该论文提出了一种名为“Group Relative Attention Guidance (GRAG)”的图像编辑方法,通过重新加权不同标记的delta值来调节模型对输入图像的关注点,从而实现对编辑强度的连续和细粒度控制。

更新于 2025-10-29。作者:Xuanpu Zhang、Xuesong Niu、Ruidong Chen、Dan Song、Jianhao Zeng、Penghui Du、Haoxiang Cao、Kai Wu、An-an Liu。

中文摘要

最近,基于Diffusion-in-Transformer模型的图像编辑技术得到了迅速发展。然而,现有的编辑方法往往缺乏对编辑程度的有效控制,限制了它们实现更定制化结果的能力。为了解决这一限制,我们研究了DiT模型中的MM-Attention机制,并观察到Query和Key标记共享一个仅与层相关的偏置向量。我们将这个偏置解释为模型固有的编辑行为,而每个标记与其对应偏置之间的差值则编码了内容特定的编辑信号。基于这一洞察,我们提出了组相对注意力引导(Group Relative Attention Guidance,简称GRAG),这是一种简单而有效的方法,通过重新加权不同标记的差值来调节模型对输入图像的关注度,相对于编辑指令,实现了连续和细粒度的编辑强度控制,无需任何调整。在现有图像编辑框架上进行的广泛实验表明,GRAG可以通过仅四行代码即可集成,并一致地提高编辑质量。此外,与常用的无分类器引导(Classifier-Free Guidance)相比,GRAG在控制编辑程度方面实现了更平滑和更精确的控制。我们的代码将在https://github.com/little-misfit/GRAG-Image-Editing上发布。

英文摘要

Recently, image editing based on Diffusion-in-Transformer models has undergone rapid development. However, existing editing methods often lack effective control over the degree of editing, limiting their ability to achieve more customized results. To address this limitation, we investigate the MM-Attention mechanism within the DiT model and observe that the Query and Key tokens share a bias vector that is only layer-dependent. We interpret this bias as representing the model's inherent editing behavior, while the delta between each token and its corresponding bias encodes the content-specific editing signals. Based on this insight, we propose Group Relative Attention Guidance, a simple yet effective method that reweights the delta values of different tokens to modulate the focus of the model on the input image relative to the editing instruction, enabling continuous and fine-grained control over editing intensity without any tuning. Extensive experiments conducted on existing image editing frameworks demonstrate that GRAG can be integrated with as few as four lines of code, consistently enhancing editing quality. Moreover, compared to the commonly used Classifier-Free Guidance, GRAG achieves smoother and more precise control over the degree of editing. Our code will be released at https://github.com/little-misfit/GRAG-Image-Editing.

解读

一句话总结

该论文提出了一种名为“Group Relative Attention Guidance (GRAG)”的图像编辑方法,通过重新加权不同标记的delta值来调节模型对输入图像的关注点,从而实现对编辑强度的连续和细粒度控制。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源