PiPS: Post-Hoc Prototypical Explanations for Interpretable Semantic Segmentation

Miłosz Adamczyk, Tymoteusz Zapala, Piotr Borycki, Przemysław SpurekarXiv 2026

TL;DR

PiPS (Post-hoc interpretable Prototypical Segmentation) is the first fully post-hoc method that brings the intuitive "looks like this" explanation paradigm to semantic segmentation. By applying a clever mathematical rotation to the latent space of a frozen, pre-trained model, PiPS extracts highly localized visual prototypes without altering the network's architecture or degrading its predictive accuracy by even a fraction of a percent.

What Problem Does This Paper Address?

Deep neural networks excel at semantic segmentation—assigning a class label to every single pixel in an image—but they operate as complete black boxes. In safety-critical fields like autonomous driving or medical diagnostics, knowing that a group of pixels represents a pedestrian or a tumor isn't enough; we need to know why.

To solve this, researchers previously turned to prototype-based reasoning, which explains a model's decision by pointing to similar visual examples from the training data (e.g., "this pixel group belongs to a car because it looks like this wheel from the training set").

However, existing prototype methods for semantic segmentation are strictly ante-hoc: they require modifying the network's architecture and retraining it from scratch. This introduces two massive roadblocks:

  1. It is computationally prohibitive for modern, large-scale foundation models.
  2. Forcing the network to learn a "prototype-friendly" latent space degrades its performance, creating a painful trade-off between accuracy and interpretability.

PiPS eliminates this trade-off entirely.

Methods

PiPS operates strictly post-hoc, meaning it acts as a plug-in on top of any already-trained, frozen segmentation model. The authors achieve this through three core mechanisms:

  1. Orthogonal Coordinate Rotation: Instead of changing the network's feature extractor, PiPS introduces a trainable parameter matrix ($A$) to construct an mathematically orthogonal transformation matrix ($M$). This matrix rotates the coordinate space of the dense feature maps right before the final classification layer. Crucially, the classifier's weights are rotated dually, ensuring that the final output logits remain completely unchanged.
  2. Spatially-Formulated Purity Loss: To make the rotated channels human-interpretable, the authors train matrix $A$ using a novel purity loss. This loss minimizes the spatial entropy of the feature maps, forcing individual latent channels to focus tightly on highly localized, compact spatial regions (visual concepts) rather than being scattered across the image.
  3. Segment-Constrained Attribution: During inference, the method restricts feature evaluation strictly to the predicted class boundaries. This prevents background noise from contaminating the explanation and pinpoints the exact peak activation area to extract a clean visual patch.
Overview of the PiPS training pipeline, showing how pre-trained features are passed through an invertible transformation matrix optimized via a purity objective.

Datasets

The authors evaluated PiPS across two distinct modalities:

  • PASCAL VOC 2012: A challenging 2D image dataset featuring dense, multi-object scenes with severe occlusions and high intra-class variations.
  • ShapeNet Parts: A 3D point cloud dataset containing 16 semantic categories, used to demonstrate the framework's versatility beyond standard 2D images.

Key Insights and Ideas

  • Breaking the Trade-off: The fundamental "aha moment" of the paper is that interpretability doesn't have to come at the cost of accuracy. By decoupling the explanation mechanism from the primary prediction pipeline using invertible orthogonal rotations, you can restructure the latent space for humans without confusing the model.
  • Localization is Key for Dense Tasks: Unlike image-level classification where global concepts suffice, segmentation requires strict spatial boundaries. Forcing latent channels to minimize spatial entropy naturally surfaces distinct object parts (like a bus wheel or a bird's beak).
  • Cross-Modal Applicability: Because the method relies on geometric properties of the latent space rather than image-specific priors, it seamlessly adapts to 3D architectures like Point Transformers.

Key Results

Quantitative Performance

PiPS achieves 100% preservation of the base model's original predictive performance. As shown in the paper's evaluation on PASCAL VOC 2012, ante-hoc methods like ProtoSeg and ScaleProtoSeg cause a noticeable drop in mean Intersection over Union (mIoU). PiPS maintains the exact baseline accuracy of DeepLabV3:

Method Backbone mIoU Performance Kept
Original Baseline DeepLabV2 77.69% 100%
ProtoSeg (Ante-hoc) DeepLabV2 71.98% ❌ Degraded
ScaleProtoSeg (Ante-hoc) DeepLabV2 71.80% ❌ Degraded
Original Baseline DeepLabV3 85.70% 100%
PiPS (Ours) DeepLabV3 85.70% 100%

Qualitative Quality

Compared to post-hoc attribution methods like SegGradCam (which produce blurry, diffused saliency maps), PiPS delivers a clean, part-by-part decomposition of objects, mapping specific regions of a test image directly to distinct training exemplars.

Figure 1: Comparison of explanation methods on a multi-object scene (bus and person) from PASCAL VOC 2012. PiPS (Ours) delivers a disentangled, part-by-part decomposition of the object, explicitly visualizing the local features that influenced the model’s decision by comparing them against training data. Every two rows correspond to a specific prototypical part (showing the top-2 channels for each predicted class). Green bounding boxes highlight the activation of a given part within the reference training images, while red boxes in the leftmost column pinpoint the corresponding parts in the original target test image (the second column displays segmentation masks).ScaledProtoSeg yields similarly looking results and outputs a fixed number of prototypical parts arbitrarily chosen regardless of the actual number of classes present. Similarly, SegGradCam produces general-purpose saliency maps rather than explicit part activations, but provides exactly one attribution map per detected class.

A user study ($N=26$) utilizing a 5-point Likert scale confirmed that humans find the prototypes generated by PiPS to be highly coherent and visually representative of the target features.

Limitations and Future Work

The primary limitation of PiPS stems from its mathematical reliance on coordinate rotation: it requires the network to have a linear or $1 \times 1$ convolutional classification head.

While this covers many classic and widely deployed architectures (like the DeepLab family), it means PiPS cannot be directly applied to modern segmentation networks that utilize highly non-linear or query-based decoders (such as Mask2Former or certain vision-language models) without further adaptation. The authors note that extending post-hoc prototypical explanations to these complex decoder structures remains an open and promising direction for future research.

Summary updated

BibTeX
@misc{adamczyk2026pips,
  author = {Miłosz Adamczyk and Tymoteusz Zapala and Piotr Borycki and Przemysław Spurek},
  title = {{PiPS: Post-Hoc Prototypical Explanations for Interpretable Semantic Segmentation}},
  year = {2026},
  eprint = {2609.16909},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.16909},
}
Figure