HorizonWeaver: Generalizable Multi-Level Semantic Editing for Driving Scenes

Mauricio Soroco, Francesco Pittaluga, Zaid Tasneem, Abhishek Aich, Bingbing Zhuang, Wuyang Chen, Manmohan Chandraker, Ziyu Jiang

TL;DR

HorizonWeaver is a novel framework designed for instruction-guided editing of complex, dense driving scenes, enabling precise local and global modifications while strictly preserving safety-critical background elements. By introducing semantics-enriched "LangMasks" and a robust multi-loss training pipeline, it significantly outperforms general-purpose image editors and boosts downstream autonomous driving perception tasks like Bird's-Eye View (BEV) map segmentation by 33% IoU.

What Problem Does This Paper Address?

Testing autonomous vehicles (AVs) safely requires exposing them to a massive variety of realistic driving scenarios, including rare weather conditions and complex traffic layouts. While generative AI offers a scalable way to synthesize these environments, general-purpose instruction-guided image editors (trained on artistic or object-centric data) routinely fail when applied to driving scenes.

The authors identify three core bottlenecks unique to driving scene editing:

  1. Multi-Level Granularity: Driving scenes require simultaneous local edits (e.g., swapping a specific vehicle) and global edits (e.g., changing weather from sunny to snowy) without breaking the overall layout.
  2. Strict Content Preservation: Safety-critical elements like lane markings, traffic signs, and road geometry must remain completely unaltered during an edit to avoid introducing harmful distortions.
  3. Ubiquitous Domain Shifts: Existing driving datasets are geographically limited. Models trained on them struggle to generalize to new cities, unseen urban layouts, or distinct climate regimes.

Methods

HorizonWeaver tackles these challenges through a three-pronged approach spanning data curation, model architecture, and training objectives.

LangMasks for Fine-Grained Editing

In a crowded intersection, a text prompt like "change the color of the car to gray" is inherently ambiguous. To resolve this, HorizonWeaver introduces LangMasks. Instead of using separate text prompts and binary masks, it embeds CLIP text features of local instructions directly into the channel dimension of a binary mask corresponding to the target object's bounding box. To process this enriched representation, the authors expand the input layer of a pretrained VAE encoder, training it end-to-end with the diffusion model.

Figure 1. In each example, from left to right are the input image, LangMasks, and output image. Masks for global edits are blank. The careful design of HorizonWeaver across data (Section 3.2), model (Section 3.3), and training (Section 3.4) addresses three critical challenges in driving scene editing: 1) mult-level granularity (rows 2, 3); 2) rich high-level semantics (rows 1, 2); 3) ubiquitous domains shifts (Tab. 1).
Figure 3. LangMask Generation and Training. Left: To provide fine-grained instructions with rich semantics, we insert CLIP text features into binary masks (Section 3.3). Right: To support Lang- Masks, we copy and expand the VAE. It is trained end to end with the editing model.

Advanced Training Suite

The training pipeline combines supervised and unsupervised losses to balance instruction following with content preservation:

  • Supervised Fine-Tuning ($\mathcal{L}_{\text{sft}}$) & Identity Loss ($\mathcal{L}_{\text{id}}$): Enforces pixel-level and perceptual reconstruction accuracy in unedited regions.
  • Language-Guided Cycle Consistency ($\mathcal{L}_{\text{cycle}}$): Enforces reversibility (editing from source to target and back should yield the original image), which acts as a powerful regularizer against background drift.
  • Language-Guided CLIP Loss ($\mathcal{L}_{\text{clip}}$): Maximizes similarity to the target instruction while penalizing similarity to the original source description, preventing the model from collapsing into a lazy identity mapping.
Figure 4. Training language-guided driving scene image edit- ing. Our training pipeline supports both supervised training for paired images and unsupervised training for unpaired ones (e.g. downstream unseen real scenarios). We include three training ob- jectives: supervised fine-tuning Lsft (Section 3.4.1), cycle consis- tency Lcycle (Section 3.4.2), and Lclip (Section 3.4.3).

Datasets

The authors curated a comprehensive dataset of 255K images covering 13 object categories using two distinct pipelines:

  • Real-World Paired Data: Built from multi-season logs of Boreas, nuScenes, and Argoverse2. The authors pair frames captured from nearly identical camera poses across different traversals to capture natural variations in weather and traffic while keeping the viewpoint fixed.
  • Pseudo-Paired Data: Generated using advanced Vision-Language Models (VLMs) and image editors to create synthetic variations for global weather changes and local object manipulations (insert, delete, modify, replace), followed by automated quality control filtering.

For evaluation, the model was tested on Boreas (for compound editing) and nuPlan to rigorously assess out-of-distribution generalization.

Figure 2. Dataset Construction. Real-world data (Sec. 3.2.1) are paired by camera pose and annotated using an image descriptor pipeline and passed to an LLM to produce instructions. Pseudo-data (Sec 3.2.2) for Local edits crop an annotated object before VLM filtering;

Key Insights and Ideas

  • Spatial-Semantic Fusion is Essential: Fusing text features directly into spatial masks (LangMasks) resolves semantic ambiguity in dense environments without needing complex, multi-stage architecture overhauls.
  • Cycle Consistency Prevents "Hallucination Drift": Generative diffusion models frequently alter unmentioned background elements (like building facades or road textures). Forcing the model to be able to "undo" its edit via cycle consistency effectively anchors the background structure.
  • Generative Editing Translates to Real Perception Gains: The ultimate validation of synthetic data is its utility for downstream models. HorizonWeaver's edits are photorealistic and structurally sound enough to significantly improve the robustness of safety-critical perception networks.

Key Results

  • Quantitative Performance: On the unseen nuPlan dataset, HorizonWeaver achieved up to a 45.5% reduction in L1 distance, a 12.1% improvement in CLIP similarity, and a 24.1% boost in DINO similarity compared to state-of-the-art baselines like UltraEdit and Qwen.
  • User Preference: In a user study with 26 participants, HorizonWeaver was overwhelmingly preferred, capturing a 61.1% preference rate—outperforming the runner-up method by 46.4 percentage points.
  • Downstream AV Impact: Augmenting a quarter of the nuScenes dataset with HorizonWeaver-edited images boosted downstream Bird's-Eye View (BEV) map segmentation performance by 33% mean IoU (improving from 0.1859 to 0.2477).

Limitations and Future Work

The framework relies heavily on LLMs for generating editing instructions and VLMs for quality-control filtering. This dependency can occasionally introduce hallucinations or noisy pseudo-pairs into the training data. The authors note that future work will focus on incorporating human-in-the-loop verification strategies and more advanced algorithmic filters to completely eliminate these semantic artifacts.

Summary updated

BibTeX
@inproceedings{soroco2026horizonweaver,
  author = {Mauricio Soroco and Francesco Pittaluga and Zaid Tasneem and Abhishek Aich and Bingbing Zhuang and Wuyang Chen and Manmohan Chandraker and Ziyu Jiang},
  title = {{HorizonWeaver: Generalizable Multi-Level Semantic Editing for Driving Scenes}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=2nJWCDn2VP},
}
Figure