Learning to Follow Object-Centric Image Editing Instructions Faithfully

Tuhin Chakrabarty, Kanishk Singh, Arkadiy Saakyan, Smaranda Muresan

Introduction

While text-to-image generative models have reached impressive levels of realism, the task of editing existing images through natural language instructions—such as "Add a lighthouse to this coast"—remains a significant challenge. Researchers from Columbia University have identified that current state-of-the-art models often struggle with three primary issues: underspecification (not knowing where an object belongs), grounding (failing to localize the edit), and faithfulness (unintentionally altering parts of the image that should remain untouched).

The Faithfulness Challenge

A major hurdle in instruction-based editing is the tendency of models to "hallucinate" changes. Instead of performing a surgical edit, models often redraw the entire scene or remove existing elements. For instance, when asked to add an object, a model might replace a house with a completely different landscape, failing to preserve the context of the original image.

Figure 3: A comparison between an original scene (a) and a common failure mode (b) where the model fails to preserve existing structures while attempting an edit.

The root cause of these failures is often traced back to the training data. Previous benchmarks, like the original InstructPix2Pix dataset, relied on massive, automatically generated pairs that frequently contained noise, nonsensical edits, or lacked the spatial precision required for high-quality results.

Methods: Spatial Supervision and Data Curation

To address these limitations, the authors developed InstructPix2Pix+EntityMask, a model trained on a high-quality, curated pipeline. Their approach focuses on two main pillars: rigorous data filtering and explicit spatial supervision.

High-Quality Data Curation

The team moved away from raw automated outputs, implementing a multi-stage verification process:

  1. Reasoning: Chain-of-Thought (CoT) prompting via ChatGPT determines if an instruction is logical and identifies the specific "entity" to be modified.
  2. Localization and Masking: The pipeline uses GroundingDINO to identify bounding boxes and the Segment Anything Model (SAM) to generate precise segmentation masks.
  3. Controlled Generation: Edits are performed using Stable Diffusion Inpainting, restricted strictly to the generated mask.
  4. Verification: Visual Question Answering (VQA) via BLIP-2 ensures the edit was successful and the background remains unchanged.

Fine-tuning with Spatial Hints

The model is fine-tuned using the InstructPix2Pix architecture but with an added "supervision signal." During training, the model receives a denoised version of the image where the target area is highlighted by a mask or bounding box. This teaches the model to concentrate its generative capacity on the correct region, a skill that generalizes even when masks are not provided during inference.

Figure 6: The proposed editing pipeline: (a) input image, (b) localized bounding box, (c) precise segmentation mask, and (d) the final faithful result.

Evaluation and Results

The researchers evaluated their model against a test set of 465 pairs, including real-world data (MagicBrush) and creative visual metaphors.

  • Quantitative Performance: The InstructPix2Pix+EntityMask model achieved a TIFA score (a VQA-based metric) of 65.84, outperforming the baseline InstructPix2Pix score of 62.24.
  • Human Judgment: The improvement was most notable in human evaluations for out-of-domain tasks, where the proposed model scored 65.1 compared to the baseline's 25.2.
  • Qualitative Success: The model demonstrated a superior ability to handle complex figurative language and maintain image integrity in real-world photographs, whereas previous models often ignored instructions or completely redrew the input.

Conclusion

By prioritizing data quality over quantity and introducing spatial constraints during training, this research provides a robust framework for faithful image editing. While currently limited to single-turn, object-centric English instructions, the "EntityMask" approach sets a new standard for precision in the intersection of natural language and computer vision.

Summary updated

BibTeX
@inproceedings{chakrabarty2023learning,
  author = {Tuhin Chakrabarty and Kanishk Singh and Arkadiy Saakyan and Smaranda Muresan},
  title = {{Learning to Follow Object-Centric Image Editing Instructions Faithfully}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.646},
}
Figure