Multi-Reward as Condition for Instruction-based Image Editing

Xin Gu, Ming Li, Libo Zhang, Fan Chen, Longyin Wen, Tiejian Luo, Sijie Zhu

TL;DR

Researchers have developed a novel framework that improves instruction-based image editing by teaching models to recognize and learn from the flaws in their training data. By using a Large Vision Language Model (LVLM), specifically GPT-4o, to provide multi-perspective "rewards"—scores and text feedback on instruction following, detail preservation, and quality—they can condition diffusion models to target "perfect" results during inference, significantly outperforming current state-of-the-art methods.

What Problem Does This Paper Address?

Instruction-based image editing (e.g., "add a mustache to the man") relies on training triplets: an original image, a text instruction, and the edited result. However, creating these datasets at scale usually involves synthetic generation using models like Stable Diffusion or DALL-E.

The problem is that these synthetic "ground truths" are often quite noisy. They frequently fail in three specific ways:

  1. Inaccurate Instruction Following: The model ignores the prompt (e.g., the glasses don't turn green).
  2. Poor Detail Preservation: The model changes parts of the image it wasn't supposed to (e.g., the background changes while editing a person's shirt).
  3. Generation Artifacts: The edited area looks distorted or "uncanny."
Examples of flawed training data and the proposed multi-reward framework.

Standard training treats these flawed images as perfect targets. This paper argues that instead of trying to manually refine millions of images, we should label the flaws and tell the model exactly how "rewarding" each training sample is.

Methods

The authors introduce a two-step approach: Evaluation and Conditioning.

1. Multi-Perspective Evaluation

They use GPT-4o as a "judge" to evaluate 20,000 triplets from the popular InsPix2Pix dataset. For every triplet, GPT-4o provides:

  • Quantitative Scores (0–5): For Instruction Following, Detail Preserving, and Generation Quality.
  • Textual Feedback: Descriptive reasons for low scores (e.g., "The colors of clothes and background are not consistent").
GPT-4o evaluation prompts and resulting multi-perspective rewards.

2. Multi-Reward Conditioning (MRC)

The core technical novelty is how this feedback is integrated into the diffusion model (like InsPix2Pix or SmartEdit):

  • Encoding: Reward scores are converted via positional encoding and an MLP, while text feedback is processed through a text encoder.
  • Injection: These "multi-reward" embeddings are fed into the model as auxiliary conditions. They are integrated into the latent noise via an attention mechanism and added to the U-Net blocks.
  • Inference Strategy: During training, the model learns the relationship between low rewards and poor edits. At inference (test time), the user simply sets the reward conditions to the maximum (Score 5, "No negative aspects") to guide the model toward the highest-quality output.

Datasets

  • RewardEdit20K: A new training dataset consisting of 20,000 triplets from InsPix2Pix, augmented with GPT-4o's multi-perspective scores and text feedback.
  • Real-Edit: A new, challenging evaluation benchmark featuring 80 high-quality real-world photos (from Unsplash) and 560 diverse instructions across seven categories (local, remove, add, texture, background, global, and style).
  • MagicBrush: An existing benchmark used for cross-dataset validation.

Key Insights and Ideas

  • "Mistakes as Teachers": Rather than filtering out "bad" data, the authors use it. By conditioning on low scores, the model learns to associate specific artifacts or failures with those scores, effectively learning what not to do when the "high score" condition is requested at inference.
  • Textual Feedback Matters: Ablation studies showed that providing text descriptions of failures (e.g., "unintended changes in the background") provides much stronger guidance than numerical scores alone.
  • Multi-Perspective vs. Scalar Reward: Previous works often used a single "aesthetic" or "preference" score. This paper demonstrates that breaking quality down into three distinct axes (following, preserving, quality) allows for much finer control over the diffusion process.

Key Results

The proposed method was applied to two baselines: InsPix2Pix and SmartEdit.

  • Real-Edit Benchmark: Reward-SmartEdit achieved a 69% accuracy in instruction following and a 74% accuracy in detail preservation, significantly higher than the original SmartEdit (64% and 66% respectively).
  • Human Evaluation: In head-to-head comparisons, humans preferred the Reward-SmartEdit results over the baseline across all three metrics, confirming that the GPT-4o-based training translates to real human-perceived quality.
  • Controllability: The authors showed that by manually lowering the reward condition at inference, they could intentionally generate lower-quality images, proving the model had successfully learned the "meaning" of the reward scales.

Limitations and Future Work

  • Spatial and Quantitative Reasoning: The model still struggles with complex instructions involving numbers ("add three birds") or precise spatial relations ("put a bench on the right side").
  • LVLM Reliability: While GPT-4o is a strong judge, it isn't perfect. The authors noted that human annotators still tend to be more critical of fine-grained details than the model.
  • Dataset Scope: The current work is primarily based on the InsPix2Pix distribution. The authors suggest applying this reward-generation method to even larger, more diverse datasets in the future.

Summary updated

BibTeX
@inproceedings{gu2025multi,
  author = {Xin Gu and Ming Li and Libo Zhang and Fan Chen and Longyin Wen and Tiejian Luo and Sijie Zhu},
  title = {{Multi-Reward as Condition for Instruction-based Image Editing}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=9RFocgIccP},
}
Figure