TL;DR
This paper introduces ISLock, a novel training-free method for editing images generated by autoregressive (AR) models. It tackles the challenge of maintaining structural consistency in AR image editing by proposing an "Anchor Token Matching" strategy that implicitly aligns structural blueprints without explicit attention manipulation.
What Problem Does This Paper Address?
Recent advances in text-to-image generation have been dominated by diffusion models, which offer powerful editing capabilities. However, autoregressive (AR) models, which generate images token by token, are emerging as strong alternatives due to their potential for localized editing and integration with large language models. Despite their promise, existing editing techniques designed for diffusion models fail to translate effectively to AR models. This is because AR models have a fundamentally different structural control mechanism: their sequential generation process leads to spatial poverty in attention maps and a tendency for structural errors to accumulate, disrupting object layouts and global consistency. The paper aims to bridge this gap by developing a training-free editing strategy specifically for AR models that preserves structural integrity.
Methods
The core of ISLock is the Anchor Token Matching (ATM) protocol. Instead of directly injecting attention maps from a reference image (which can cause distortions in AR models), ATM selectively matches tokens during the autoregressive decoding process. It identifies candidate tokens whose hidden representations are most similar to "anchor tokens" from the original, unedited sequence. This process implicitly aligns the structural blueprints of the original and edited images.
To further refine this, ISLock incorporates two key components:
- Dynamic Windows: The size of the candidate token pool considered for matching is dynamically adjusted throughout the generation process. Early stages prioritize structural fidelity with a larger pool, while later stages focus more on semantic coherence with a smaller pool.
- Adaptive Constraint Relaxation (AdaCR): This mechanism balances structural preservation with generative autonomy. It uses a similarity threshold to decide whether to enforce structural alignment or allow for more diverse edits, enabling users to tune the trade-off between similarity to the original image and generation diversity.
Datasets
The paper evaluates ISLock on a curated subset of the PIE-Bench dataset, which is a standard benchmark for image editing. They focus on five categories compatible with their AR editing paradigm: object replacement, object addition, object removal, style transfer, and attribute modification. They use LlamaGen to generate initial images from original prompts before applying ISLock for editing.
Key Insights and Ideas
- AR models have unique structural control: Unlike diffusion models where coarse structure is locked early, AR models build structure sequentially, making them susceptible to error propagation.
- Direct attention injection is problematic for AR: Transplanting attention maps from reference images disrupts the intrinsic attention dynamics of AR models, leading to coherence loss and artifacts.
- Self-attention maps hold structural information in AR: While cross-attention maps between text and image tokens are weak, the self-attention maps among image tokens themselves contain rich structural information.
- Implicit alignment is key: ISLock's success lies in implicitly guiding the model's attention through token matching, rather than explicitly forcing it. This allows for structure preservation while maintaining generative autonomy.
- Early tokens are crucial for structure: Perturbing early tokens in the AR generation sequence has a much larger impact on global structure than later perturbations, highlighting the importance of controlling the initial stages of generation.
Key Results
ISLock demonstrates strong performance across various editing tasks, including object addition, removal, replacement, attribute modification, and style transfer. Qualitatively, it effectively preserves structural consistency and background fidelity while achieving localized and precise modifications. Quantitatively, ISLock achieves a significantly lower Structure Distance score (31.79) compared to baselines like NPM (113.95) and PnP-AR (103.94), indicating superior structural preservation. It also maintains favorable background fidelity, performing comparably to leading inversion-free instruction-based methods. ISLock achieves high CLIP similarity scores, demonstrating its ability to align edited content with target text prompts.
Limitations and Future Work
The paper acknowledges that while ISLock achieves competitive performance, diffusion-based methods, being specifically optimized for their architecture, may outperform it in some aspects. The authors suggest that ISLock pioneers a new technical pathway for AR image manipulation, implying that further research and development in this area are promising. The dynamic window and AdaCR techniques offer flexibility, but further exploration into optimal parameter tuning for these components could yield even better results. The generalizability of ISLock to other AR base models is also highlighted as a positive aspect, suggesting potential for broader application.
Summary updated