FeatInv: Spatially resolved mapping from feature space to input space using conditional diffusion models
Nils Neukirch, Johanna Vielhaben, Nils Strodthoff
TL;DR
FeatInv introduces a probabilistic, spatially conditioned inversion from feature space to input space using a ControlNet-style diffusion model, enabling faithful reconstruction across CNNs and ViTs by conditioning on spatial feature maps $c_f$. The method preserves fine-grained spatial structure via unpooled feature maps, achieving high cosine-similarity and Top5 accuracy with competitive FID scores across backbones, and demonstrating robustness to OOD, adversarial, and corrupted data. Two applications—FeatInv-Viz for visualizing concept steering and analysis of the composite nature of feature space—showcase the practical interpretability and diagnostic potential of the approach. While scalable and versatile, limitations include domain restrictions to natural images and the need for dedicated training per backbone/layer, suggesting paths for broader deployment and extension.
Abstract
Internal representations are crucial for understanding deep neural networks, such as their properties and reasoning patterns, but remain difficult to interpret. While mapping from feature space to input space aids in interpreting the former, existing approaches often rely on crude approximations. We propose using a conditional diffusion model - a pretrained high-fidelity diffusion model conditioned on spatially resolved feature maps - to learn such a mapping in a probabilistic manner. We demonstrate the feasibility of this approach across various pretrained image classifiers from CNNs to ViTs, showing excellent reconstruction capabilities. Through qualitative comparisons and robustness analysis, we validate our method and showcase possible applications, such as the visualization of concept steering in input space or investigations of the composite nature of the feature space. This approach has broad potential for improving feature space understanding in computer vision models.
