Spatial Grounding for Localized Instruction Guided Image Editing

This direction is merged into another direction: unintended global modification. Its last version stays readable and citable here.

Version 1 of 1254 papers268 conceptsfrozen 2026-10-04

When we ask a generative model to "add sunglasses to the dog," we expect a surgical strike: the dog's face should change, but the grass, the sky, and the dog's fur should remain bit-for-bit identical. However, standard diffusion models often suffer from global bleed or over-editing. Because these models process the entire image through a global denoising lens, a change in one word of the prompt can trigger a cascade of unintended modifications, altering the lighting, background, or the very identity of the subject.

The central challenge in modern image editing is achieving spatial grounding—the ability to confine semantic changes to precise regions while anchoring the rest of the image in its original state.

The Problem of Global Entanglement

In a typical text-to-image pipeline, the text prompt influences the entire generation process. As Ashkan Mirzaei and colleagues observe in Watch Your Steps: Local Image and Scene Editing by Text Instructions, this lack of restraint leads to "over-editing," where pixels unrelated to the instruction are modified to satisfy the model's global interpretation of the prompt.

This happens because the model's internal representations are "entangled." In the latent space of a diffusion model, the features for "dog" and "grass" are not neatly separated into layers. When Xiangxi Shi and Guosheng Lin describe "catastrophic forgetting" of the background in Remember What You have drawn, they are highlighting a fundamental tension: the model prioritizes the new text attribute so heavily that it loses the context of the original image.

Localizing the Edit via Relevance Maps

To solve this, researchers have moved toward methods that automatically identify where an edit should happen. A key intuition introduced by Ashkan Mirzaei is the use of relevance maps. By calculating the difference between noise predictions made with and without the text instruction, the model can "see" which pixels are being pulled most strongly by the new text. These maps act as a natural, soft mask, allowing the system to confine updates to the necessary regions.

Similarly, Maria Mihaela Truşcǎ and Tinne Tuytelaars propose DM-Align, which uses natural language processing to align specific words in an instruction with regions in the image. By explicitly reasoning about which parts of the image correspond to the "source" and "target" of the edit, they generate precise masks that prevent the "black-box" diffusion process from touching the background.

Blending and Layered Decomposition

Another approach to spatial grounding is to treat the image not as a flat grid of pixels, but as a composition of distinct elements. Dani Lischinski and Omri Avrahami pioneered this with Blended Diffusion. Their method works by taking the noised version of the original image and "blending" it back into the diffusion process at every step. This ensures that the background remains anchored to the original pixels while the masked area is free to evolve according to the text prompt.

More recently, researchers have sought to bring the logic of professional editing software—layers—directly into the model architecture. Yuhui Yuan and his team introduced DesignEdit, which uses multi-layered latent decomposition. By breaking the image into foreground and background latents and using a "key-masking" self-attention mechanism, they allow for complex operations like moving or resizing objects without the "spatial entanglement" that usually causes the background to collapse or warp around the moved object.

Manipulating the Attention Mechanism

If we don't want to use explicit masks, we can instead manipulate the model's "brain"—its attention layers. Jing Gu and Tsu-Jui Fu demonstrate this in Photoswap. They found that by swapping the self-attention and cross-attention maps from a source image into a new generation, they could replace a subject (like a dog) with a personalized one (like your own pet) while perfectly preserving the original pose and background. This works because the attention maps effectively store the "layout" and "geometry" of the scene, independent of the specific textures being generated.

Refining the Training Signal

Finally, the field is recognizing that the "clumsiness" of current models often stems from noisy training data. Misha Sra and Pradeep Sen introduced Instruct-CLIP to address this by refining existing datasets. By learning to align the semantic delta (the change between two images) with the text instruction, they can filter out training samples where the model inadvertently changed the background.

This push for "edit hygiene" is echoed in the work of Haozhe Zhao and Xiaojian Ma, whose UltraEdit dataset provides 4 million fine-grained samples. Their goal is to teach the model that "less is more"—that a successful edit is defined as much by what doesn't change as by what does.

Papers in this version

Showing 60 of 254 papers.

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_spatial_grounding_for_localized_instruct_3cd08f03,
  title = {Spatial Grounding for Localized Instruction Guided Image Editing},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/spatial-grounding-for-localized-instruction-guided-image-editing/rdr_3cd08f03b4054b9496b6adca51c92c0a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-06},
}

This exact version (version 1, frozen text):

@misc{lacuna_spatial_grounding_for_localized_instruct_3cd08f03_v1,
  title = {Spatial Grounding for Localized Instruction Guided Image Editing},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/spatial-grounding-for-localized-instruction-guided-image-editing/rdr_3cd08f03b4054b9496b6adca51c92c0a/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-06},
}