MiLDEdit: Reasoning-Based Multi-Layer Design Document Editing

Zihao Lin, Wanrong Zhu, Jiuxiang Gu, Jihyung Kil, Christopher Tensmeyer, Lin Zhang, Shilong Liu, Ruiyi Zhang, Lifu Huang, Vlad I Morariu, Tong Sun

TL;DR

MiLDEdit introduces a reasoning-based framework for multi-layer design document editing (like posters and flyers) by pairing an RL-trained multimodal reasoner with a pluggable image editor. Alongside the framework, the authors introduce MiLDEBench, the first benchmark specifically designed for transparent-background, layer-aware document editing, significantly outperforming flat image editing baselines in layout preservation and instruction following.

What Problem Does This Paper Address?

Most state-of-the-art image editing models operate under a major assumption: that the image is a flat, single-layer canvas. However, real-world graphic designs—such as posters, advertisements, and presentation slides—are inherently multi-layered structures combining backgrounds, text, decorations, and foreground images.

When a user provides a natural language instruction like "transform the poster into a classic detective story theme," flat image editors struggle. They often suffer from a critical trade-off: they either follow the instructions but completely destroy the original layout, or they preserve the layout by failing to make meaningful edits.

To edit design documents faithfully, an AI must possess layer-aware reasoning. It needs to determine which layers are relevant to the user's intent, what specific modifications each layer requires, and how to execute those changes without disrupting the unedited parts of the document.

Figure 1: Our benchmark MiLDEBench is the first targeting to transparent-background, multi-layer design document editing.

Methods

The authors propose MiLDEdit, a two-stage framework that decouples the complex task of multi-layer editing into parallelized reasoning and localized editing:

  1. Reasoning Stage (The Brain): A Vision-Language Model (VLM) reasoner (built on Qwen2.5-VL) evaluates the entire document alongside individual layers. It is trained using Group Relative Policy Optimization (GRPO), a reinforcement learning technique. For each layer, the reasoner outputs a structured chain-of-thought format: <think>...</think><decision>...</decision><prompt>...</prompt>. The decision is a binary choice (Edit or No-Op), and the prompt is a highly targeted, layer-conditioned instruction.
  2. Editing Stage (The Brawn): A frozen, pluggable image editor (such as Flux-1-Kontext) receives only the layers flagged for editing. It uses the layer's alpha channel as a binary mask to constrain modifications. Finally, the edited layers are seamlessly recomposed with the untouched layers using standard alpha blending in their original z-order hierarchy.

Datasets

Because no dataset existed for this specific task, the authors created MiLDEBench, a human-in-the-loop corpus built on top of 20K transparent-background templates from the public Crello dataset.

  • Statistics: It contains 50K natural-language editing instructions and 87K layer-aligned edit steps.
  • Intent Diversity: It features two streams of prompts: Document-based (direct domain transfers like summer to winter) and Persona-based (tailoring the design to specific user archetypes, e.g., a historian or a marketer).
  • Evaluation Protocol (MiLDEEval): To evaluate performance, they introduce MiLDEScore, a unified metric aggregating four dimensions: instruction following, layout consistency, aesthetics, and text rendering, controlled by an instruction-following sigmoid gate to penalize models that achieve high consistency by simply doing nothing.

Key Insights and Ideas

  • The Flat Canvas Bottleneck: Flat image editors inherently corrupt un-targeted regions. Even when provided with oracle (ground-truth) detailed global prompts, flat models still suffer from severe layout degradation. Decoupling edits into localized layer operations is architecturally necessary.
  • Text-Centric Reasoning Fails Visual Grounding: Simply adding "thinking" steps to standard flat image editors yields marginal improvements. Current text-centric LLM reasoning can plan textual intent but fails to ground edits within complex, multi-layered visual hierarchies.
  • RL Supercharges Layer Selection: Training the VLM reasoner with GRPO using a task-specific reward function (format validity + layer decision accuracy + prompt BLEU score) dramatically improves layer selection. It prevents the model from over-editing or missing crucial layers.
Evaluation metrics showing performance across different editing complexities and model sizes.

Key Results

  • State-of-the-Art Performance: MiLDEdit (7B reasoner + Flux) achieved a MiLDEScore of 25.90, outperforming the best open-source flat baseline (Bagel) by 82.78% and performing competitively with closed-source giants like GPT-Image-1 (25.60).
  • Unmatched Layout Preservation: MiLDEdit maintained a Layout Consistency score of 93.24%, vastly superior to closed-source models like GPT-Image-1 (36.24%) and Nano Banana (58.42%), which frequently scrambled the document structure.
  • Superior Layer Selection: The GRPO-trained 7B reasoner achieved 80.46% Layer Decision Accuracy, outperforming zero-shot GPT-4 by 13.6%.

Limitations and Future Work

  • Content-Only Focus: The current framework is strictly content-aware and does not support geometry-level manipulations (e.g., resizing, moving, reshaping, or swapping the positions of text and image layers).
  • Independent Layer Processing: Because layers are edited in parallel, MiLDEdit can occasionally introduce cross-layer conflicts, such as unintended text-image overlaps after final recomposition. Incorporating joint reasoning or post-recomposition verification is a clear next step.
  • Decomposition Dependency: The pipeline assumes clean, transparent layers are available. When tested on flat images using an automatic layer decomposition model (Qwen-Image-Layered), performance degraded if the model over-decomposed the canvas into too many redundant layers.

Summary updated

BibTeX
@article{lin2026mildedit,
  author = {Zihao Lin and Wanrong Zhu and Jiuxiang Gu and Jihyung Kil and Christopher Tensmeyer and Lin Zhang and Shilong Liu and Ruiyi Zhang and Lifu Huang and Vlad I Morariu and Tong Sun},
  title = {{MiLDEdit: Reasoning-Based Multi-Layer Design Document Editing}},
  journal = {Accepted by TMLR},
  year = {2026},
  url = {https://openreview.net/forum?id=G3l9DAz5uH},
}
Figure