Concept Lancet: Image Editing with Compositional Representation Transplant

Jinqi Luo, Tianjiao Ding, Kwan Ho Ryan Chan, Hancheng Min, Chris Callison-Burch, René Vidal

Introduction

In the rapidly evolving field of diffusion-based image editing, achieving a perfect balance between preserving the original image structure and accurately reflecting a target prompt remains a significant hurdle. Most existing methods rely on manual tuning of "edit strength"—a hyperparameter that dictates how much of a new concept is injected into the latent space. If the strength is too high, the image's layout and background are often destroyed; if it is too low, the edit fails to manifest.

Concept Lancet (CoLan) introduces a zero-shot, plug-and-play framework designed to automate this process with surgical precision. By treating images as sparse combinations of visual concepts, CoLan identifies the exact magnitude required for an edit, ensuring that the transformation is both effective and minimally invasive.

The Problem: The Fickle Nature of Edit Strength

The core difficulty in text-to-image editing lies in the variability of source images. For instance, transforming a "cat" into a "dog" requires different intervention levels depending on whether the cat is a close-up subject or a small detail in a complex landscape. Current state-of-the-art models typically use heuristic weights, leading to a tedious trial-and-error process for users. CoLan addresses this by mathematically "unmixing" the source image to determine the presence and scale of specific concepts before performing a replacement.

The CoLan Methodology

The framework operates through a four-stage pipeline that transitions from semantic parsing to mathematical transplant:

1. Concept Dictionary Synthesis

Upon receiving a source image and an edit prompt, a Vision-Language Model (VLM) parses the scene into a dictionary of relevant visual concepts (e.g., "cat," "grass," "sitting"). This step ensures the model has a semantic map of the image's components.

2. Concept Vector Extraction

To create robust mathematical representations, CoLan moves beyond single-word embeddings. Using a Large Language Model (LLM), the system generates dozens of "stimuli"—descriptive sentences—for each concept. These stimuli are embedded into the latent space and averaged using a technique called Representation Reading. This process produces a "concept vector" that is grounded in diverse contexts, making it more stable than standard embeddings.

3. Sparse Decomposition

The source image's latent representation is decomposed into a sparse linear combination of the extracted concept vectors. This step identifies which "atoms" from the dictionary are present in the image and, crucially, to what degree (their coefficients).

4. Concept Transplant

The actual edit is performed by replacing the source concept vector (e.g., "cat") with the target concept vector (e.g., "dog") while maintaining the exact coefficients calculated during decomposition. This "transplant" ensures the new subject fits perfectly into the existing compositional structure of the image without disrupting the surrounding context.

Data and Evaluation

The researchers introduced CoLan-150K, a large-scale conceptual representation dataset containing 5,078 concepts and over 152,000 stimuli. This represents a significant advancement over previous dictionaries, which were often limited to fewer than 50 vectors. For evaluation, the model was tested on PIE-Bench, covering a wide array of editing tasks including replacement, addition, and removal.

Key Insights

  • Compositional Understanding: By treating an image latent as a weighted sum of semantic parts, CoLan gains an inherent understanding of the image's composition, allowing for more precise manipulation.
  • Robustness through Stimuli: The use of multiple descriptive sentences to define a vector reduces sensitivity to specific phrasing and creates a more "grounded" direction in the latent space.
  • Unified Editing Framework: CoLan demonstrates that adding or removing objects are essentially variations of the replacement task. Removing an object is a replacement with a "null" concept, while adding involves identifying a logical counterpart to replace.

Results and Performance

CoLan serves as a versatile "plug-in" for popular editing backbones such as P2P-Zero and InfEdit. Experimental results show:

  • Improved Consistency: On the P2P-Zero backbone, CoLan improved consistency metrics (StruDist and LPIPS) by nearly 50% compared to standard vector addition.
  • High Effectiveness: The model achieved state-of-the-art performance in edit effectiveness, accurately reflecting target prompts without manual tuning.
  • Computational Efficiency: The sparse decomposition step is remarkably fast, accounting for only 0.4% to 3.8% of the total editing time, making it practically "free" in terms of overhead.

Limitations and Future Outlook

While CoLan excels at semantic replacement, it faces challenges with spatial manipulations (e.g., moving an object) due to its reliance on region-specific attention controls. Additionally, numerical or counting edits remain difficult because current diffusion latents do not always encode quantity linearly. Future research will focus on integrating CoLan with global layout controls to address these complex spatial and numerical transformations.

Summary updated

BibTeX
@inproceedings{luo2025concept,
  author = {Jinqi Luo and Tianjiao Ding and Kwan Ho Ryan Chan and Hancheng Min and Chris Callison-Burch and René Vidal},
  title = {{Concept Lancet: Image Editing with Compositional Representation Transplant}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02654},
}
Figure