Explainable Pathomics Feature Visualization via Correlation-aware Conditional Feature Editing

Yuechen Yang, Junlin Guo, Ruining Deng, Junchao Zhu, Zhengyi Lu, Chongyu Qu, Yanfan Zhu, Xingyi Guo, Yu Wang, Shilin Zhao, Haichun Yang, Yuankai HuoarXiv 2026

TL;DR

Pathomics provides rich, quantitative features for digital pathology, but visualizing how these highly correlated features alter cell appearance remains a challenge. Standard conditional generative models assume feature independence, creating geometrically impossible combinations (like increasing area while holding perimeter constant) that lead to unrealistic image artifacts. To solve this, the authors introduce Manifold-Aware Diffusion (MAD), a framework that uses a Variational Autoencoder (VAE) to constrain feature edits to a realistic biological manifold before generating high-fidelity cell nuclei images.

What Problem Does This Paper Address?

In digital pathology, "pathomics" extracts hundreds of mathematical descriptors (shape, texture, intensity) from tissue images to create explainable biomarkers. However, many of these features (e.g., "second-order moment") are highly abstract and difficult for clinicians to interpret intuitively.

An ideal solution would allow clinicians to adjust a feature slider and immediately see how a cell's shape changes. While conditional diffusion models excel at image generation, they typically assume that input features are independent. In biology, pathomics features are deeply intertwined—you cannot change a nucleus's area without affecting its perimeter. Forcing a standard diffusion model to edit one feature while keeping correlated features fixed results in "conflicting conditions," pushing the model off the valid biological manifold and yielding either distorted artifacts or no visual change at all.

Pathomics features exhibit intrinsic correlations, creating geometric conflicts when edited independently.

Methods

The authors propose Manifold-Aware Diffusion (MAD), which decouples learning the structure of the feature space from the image generation process. The framework operates in two main stages:

  1. Feature Manifold Learning ($\beta$-VAE): A disentangled Variational Autoencoder is trained purely on extracted pathomics feature vectors. It maps high-dimensional features (75-D) down to a smooth, low-dimensional latent space ($z \in \mathbb{R}^{16}$) that captures valid biological correlations.
  2. Conditional Image Generation (Diffusion U-Net): A conditional Denoising Diffusion Probabilistic Model (DDPM) is trained to synthesize single-nucleus images based on pathomics feature embeddings.

During inference, when a user requests a change to a specific target feature, MAD performs latent-guided optimization within the VAE's latent space. Instead of changing the target feature in isolation, gradient descent updates the latent code $z$. Because the optimization happens on the VAE-learned manifold, adjusting the target feature automatically and realistically scales all correlated features. The optimized feature vector is then passed to the diffusion model to generate the final image.

The MAD training and inference pipeline, showing latent optimization on the learned feature manifold.

Datasets

The framework was trained and evaluated on two datasets:

  • Real Nuclei Dataset: Constructed from 1,556 whole-slide images of kidney tissue (human and rodent) across multiple staining protocols (H&E, PAS, PASM). Nuclei were segmented using an ensemble of Cellpose, StarDist, and CellViT, resulting in a curated dataset of 28,809 nucleus-centered $64 \times 64$ images. A 75-dimensional feature vector was extracted for each nucleus using the Pyspatial toolkit.
  • Geometric Simulation Dataset: A synthetic control dataset consisting of 4,000 images of single ellipses with a fixed aspect ratio ($a/b = 2$). This setup enforces a strict, known mathematical relationship between area and perimeter, alongside an entirely independent random intensity value, providing a ground truth benchmark for correlation preservation.

Key Insights and Ideas

  • Decoupling is Key: Trying to force a diffusion model to learn both complex image synthesis and strict geometric feature dependencies simultaneously is inefficient. Separating the two tasks via a VAE-diffusion pipeline ensures the generation model only receives physically plausible prompts.
  • The "Conflicting Condition" Trap: Standard conditional models like Stable Diffusion fail at fine-grained feature editing because they try to obey impossible prompts (e.g., make the cell huge but keep the perimeter tiny). They compromise by either ignoring the prompt or generating out-of-distribution blurs.
  • Smooth Trajectories: PCA and interpolation analysis confirmed that the VAE successfully compressed the 75 pathomics features into a highly structured space where just six principal components account for ~90% of the variance. This confirms that pathomics features naturally lie on a low-dimensional manifold.

Key Results

MAD was compared against StyleGAN2 (with post-hoc latent optimization) and baseline diffusion models (Stable Diffusion with LoRA, and MAD without the VAE component).

  • Feature Control Accuracy: MAD achieved exceptional control accuracy with a Mean Absolute Error (MAE) of 0.255 and an $R^2$ of 0.938 between target and generated features. In contrast, Stable Diffusion and the no-VAE baseline yielded negative $R^2$ values, meaning they failed to accurately reflect the requested edits.
  • Image Validity: MAD maintained a 99.97% Segmentation Success Rate (SSR), proving it consistently generates realistic, single-nucleus structures. StyleGAN2 struggled with image quality under tight feature constraints, dropping to an SSR of 75.12%.
  • Correlation Preservation: In geometric simulations, when editing Area, MAD successfully adjusted the Perimeter ($R^2 = 0.991$) while keeping the independent Intensity feature stable (MAE = 0.206).
Qualitative comparison showing MAD successfully modifying target features while preserving texture and staining consistency.

Limitations and Future Work

The primary bottleneck of MAD is inference speed. Because the framework relies on an iterative latent-guided optimization loop at test time (500 steps), it takes approximately 17 seconds per feature edit. This latency prevents it from being used as a fluid, real-time interactive UI tool for clinicians.

The authors note that future work will focus on implementing amortized inference strategies (such as training an encoder to predict the optimized latent shifts instantly) to accelerate the process. Additionally, they plan to expand evaluation to more complex cell types, including neoplastic, inflammatory, and epithelial cells.

Summary updated

BibTeX
@misc{yang2026explainable,
  author = {Yuechen Yang and Junlin Guo and Ruining Deng and Junchao Zhu and Zhengyi Lu and Chongyu Qu and Yanfan Zhu and Xingyi Guo and Yu Wang and Shilin Zhao and Haichun Yang and Yuankai Huo},
  title = {{Explainable Pathomics Feature Visualization via Correlation-aware Conditional Feature Editing}},
  year = {2026},
  eprint = {2602.05397},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05397},
}
Figure