cs.CVMar 4, 2026

Mask-Guided Attention Regulation for Anatomically Consistent Counterfactual CXR Synthesis

Authors: Zichun Zhang, Weizhi Nie, Honglin Guo, Yuting Su

Organizations: Tianjin University

Abstract

Counterfactual generation for chest X-rays (CXR) aims to simulate plausible pathological changes while preserving patient-specific anatomy. However, diffusion-based editing methods often suffer from structural drift, where stable anatomical semantics propagate globally through attention and distort non-target regions, and unstable pathology expression, since subtle and localized lesions induce weak and noisy conditioning signals. We present an inference-time attention regulation framework for reliable counterfactual CXR synthesis. An anatomy-aware attention regularization module gates self-attention and anatomy-token cross-attention with organ masks, confining structural interactions to anatomical ROIs and reducing unintended distortions. A pathology-guided module enhances pathology-token cross-attention within target lung regions during early denoising and performs lightweight latent corrections driven by an attention-concentration energy, enabling controllable lesion localization and extent. Extensive evaluations on CXR datasets show improved anatomical consistency and more precise, controllable pathological edits compared with standard diffusion editing, supporting localized counterfactual analysis and data augmentation for downstream tasks.

Figures & tables

Explore similar work

CardsList
  1. Positional Segmentor-Guided Counterfactual Fine-Tuning for Spatially Localized Image Synthesis

    Mar 22, 2026Tian Xia, Matthew Sinclair, Andreas Schuh +8Counterfactual Image GenerationImage Generation

  2. Spatially Gated Diffusion for Localized Counterfactual Chest Radiograph Editing

    Sep 30, 2026Kamran Ullah Afaq, Basit RazaMedical ImagingText-Guided Image Editing