potentialpaper

Matching-Based Few-Shot Semantic Segmentation Models Are Interpretable by Design

Pasquale De Marinis, Uzay Kaymak, Rogier Brussee, Gennaro Vessio, Giovanna Castellano

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. Matching-based few-shot segmentation models are interpretable by design: AffEx reads their matching scores to attribute each prediction to the support pixels it relied on, outperforming existing explainability methods in nearly every setting.

Abstract. Few-Shot Semantic Segmentation (FSS) models achieve strong performance in segmenting novel classes with minimal labeled examples, yet their decision-making processes remain largely opaque. Explainable AI has matured on standard computer vision tasks, but not on FSS, where an explanation would tell a practitioner which support pixels the prediction rested on and which examples to provide next. We argue that matching-based FSS models are interpretable by design: their query--support similarity scores, once normalized and processed, attribute the prediction to individual support pixels. Our approach, Affinity Explainer (AffEx), makes this intrinsic interpretability explicit by extracting attribution maps directly from matching scores at multiple feature levels, without requiring gradients or external perturbations. We extend the standard causal metrics for evaluating explanations to the FSS domain and propose additional metrics to better capture the practical utility of explanations in few-shot scenarios. Experiments on two FSS benchmarks, covering seven architectures that range from classical matching-based models to recent pipelines built on vision foundation models (DINOv2/v3, SAM, SAM2) and a prototype-based head, show that AffEx outperforms adapted standard attribution methods at nearly every evaluation point, and that the gain comes from the matching mechanism itself. On pipelines whose segmentation stage transforms the matching output, the same evaluation doubles as a diagnostic of where the decision is made, and on the prototype-based head AffEx subsumes the prototype-style read-out as a special case. Qualitatively, the attribution maps expose how each architecture resolves the support set, and we show how they guide model diagnosis. Code is available at https://github.com/pasqualedem/AffinityExplainer.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]—[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:47 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

I have read the authors' rebuttal and the subsequent reviewer discussions. My initial pre-rebuttal assessment raised three concerns (based on reviewers' comments): (1) the paper's novelty and positioning relative to prototype-based interpretable-by-design methods; (2) whether AffEx's scope is limited to the matching stage rather than the full segmentation pipeline; and (3) whether the evaluation, including the new mIoULoss@p metrics, was adequately justified and broad enough.

On positioning (Rev#M83E): the authors added a controlled experiment building a PANet-style prototype head on DCAMA's own encoder, showing analytically and empirically that AffEx and prototype read-out are the same quantity at different levels of aggregation, and that AffEx still wins at the discriminative early-curve regime. Rev. M83E found this "a step in the right direction" but still felt the comparison to true prototype-part architectures (not just a head swap) remained incomplete, and kept a final rating of 3 (borderline reject).

On scope beyond matching (Rev# HzER): the authors extended AffEx to four modern VFM-based FSS/in-context models (INSID3, SANSA, GF-SAM, Matcher) and showed that AffEx's relative performance against the Gaussian-mask baseline cleanly separates matching-dominated from decoder-dominated pipelines. Rev#HzER considered this a substantial and valuable addition and raised their score from borderline accept to accept (5), explicitly recommending the new analysis be moved into the main paper.

On the evaluation metrics (Rev#M83E and Rev#ynLC): the authors provided a quantitative saturation analysis justifying the p=0.01/0.05 cutoffs and also clarified the architecture-dependent rule for when the masked vs unmasked AffEx variant applies. Both reviewers acknowledged this materially improved clarity; ynLC raised their score to 4 (borderline accept).

The rebuttal addressed two of the three initial concerns (VFM scope, metric justification/masking mechanics) to the reviewers' satisfaction, and partially addressed the third (positioning), with one reviewer still wanting a more comprehensive comparison against self-contained prototype architectures rather than a single controlled ablation.

In summary, the contribution (formalizing an existing but underused intrinsic-interpretability property of matching-based FSS models, with a supporting causal evaluation protocol) is judged sound and of interest to the community, and the post-rebuttal evidence outweighs the remaining scope concern. I recommend Accept, contingent on the authors incorporating the VFM analysis, the metric-saturation justification and the masking-rule clarification into the camera-ready main paper as promised.

Final justification

The metareview has been updated in the post-rebuttal phase with the justification, taking into account the reviews, author response and discussion with reviewers.

Area Chair mvZq · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

I have read the authors' rebuttal and the subsequent reviewer discussions. My initial pre-rebuttal assessment raised three concerns (based on reviewers' comments): (1) the paper's novelty and positioning relative to prototype-based interpretable-by-design methods; (2) whether AffEx's scope is limited to the matching stage rather than the full segmentation pipeline; and (3) whether the evaluation, including the new mIoULoss@p metrics, was adequately justified and broad enough.

On positioning (Rev#M83E): the authors added a controlled experiment building a PANet-style prototype head on DCAMA's own encoder, showing analytically and empirically that AffEx and prototype read-out are the same quantity at different levels of aggregation, and that AffEx still wins at the discriminative early-curve regime. Rev. M83E found this "a step in the right direction" but still felt the comparison to true prototype-part architectures (not just a head swap) remained incomplete, and kept a final rating of 3 (borderline reject).

On scope beyond matching (Rev# HzER): the authors extended AffEx to four modern VFM-based FSS/in-context models (INSID3, SANSA, GF-SAM, Matcher) and showed that AffEx's relative performance against the Gaussian-mask baseline cleanly separates matching-dominated from decoder-dominated pipelines. Rev#HzER considered this a substantial and valuable addition and raised their score from borderline accept to accept (5), explicitly recommending the new analysis be moved into the main paper.

On the evaluation metrics (Rev#M83E and Rev#ynLC): the authors provided a quantitative saturation analysis justifying the p=0.01/0.05 cutoffs and also clarified the architecture-dependent rule for when the masked vs unmasked AffEx variant applies. Both reviewers acknowledged this materially improved clarity; ynLC raised their score to 4 (borderline accept).

The rebuttal addressed two of the three initial concerns (VFM scope, metric justification/masking mechanics) to the reviewers' satisfaction, and partially addressed the third (positioning), with one reviewer still wanting a more comprehensive comparison against self-contained prototype architectures rather than a single controlled ablation.

In summary, the contribution (formalizing an existing but underused intrinsic-interpretability property of matching-based FSS models, with a supporting causal evaluation protocol) is judged sound and of interest to the community, and the post-rebuttal evidence outweighs the remaining scope concern. I recommend Accept, contingent on the authors incorporating the VFM analysis, the metric-saturation justification and the masking-rule clarification into the camera-ready main paper as promised.

Final justification

The metareview has been updated in the post-rebuttal phase with the justification, taking into account the reviews, author response and discussion with reviewers.

Reviewer HzEROpenReview ↗
Rating
5/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes AffEx, an explainability method for matching-based few-shot semantic segmentation models. The method extracts attribution maps directly from the support-query affinity scores computed during inference, with the goal of identifying which regions of the support images contribute most to the query segmentation. The authors also adapt insertion/deletion-style metrics to the FSS setting by perturbing the support set rather than the query image, and evaluate the approach on standard FSS benchmarks using DCAMA and DMTNet.

Strengths and weaknesses

Strengths

  1. The paper addresses an underexplored direction: interpretability in few-shot semantic segmentation. While many FSS works focus mainly on improving segmentation accuracy, understanding how support examples influence the query prediction is an interesting complementary axis.

  2. The proposed approach is well aligned with the structure of matching-based FSS models. Since these models already compute support-query affinities, using these affinities to derive explanations is a direct direction. This makes the method simple and easy to apply to architectures that expose matching scores.

  3. The paper makes a useful effort to adapt insertion/deletion-style metrics to the few-shot segmentation setting. Even if I have some doubts about the broader relevance of the benchmark, I appreciate the attempt to define a more systematic evaluation protocol for explainability in FSS.

  4. The paper is generally easy to follow. The main idea, the construction of the attribution maps, and the evaluation protocol are explained clearly.

Weaknesses

I am very familiar with few-shot segmentation, but not with explainability/interpretability. For this reason, I am somewhat cautious in judging the contribution from the XAI perspective. Nevertheless, I have several concerns.

  1. The central idea of the paper is intuitive, which is in principle a positive aspect. However, in this case, it also makes the method feel somewhat obvious. In few-shot segmentation, the model explicitly computes support-query affinities, and it is natural to expect that the support regions with higher matching activations are those that most influence the prediction. Having worked extensively on few-shot segmentation, I had always regarded this as a quite "obvious" property of matching-based methods rather than a surprising insight. Therefore, I do not find the method itself particularly strong as a methodological contribution. The main value may instead lie in formalizing this intuition and proposing an evaluation protocol, although I am not fully convinced of the relevance or impact of this benchmark. Since I am less familiar with the explainability literature, I do not want to overstate this criticism, but from the FSS perspective the idea feels quite direct.

  2. The method is validated only on two models: DCAMA, from 2022, and DMTNet, from 2024, which is based on ResNet. These models are not representative of the current state of few-shot semantic segmentation. The field has recently moved substantially toward vision-foundation-model-based approaches, including methods based on DINO, SAM, and Stable Diffusion [1,2,3,4,5,6]. As a result, I find the experimental section weak and not sufficiently comprehensive. Some of the conclusions may be outdated, given the limited choice of evaluated models.

  3. Related to the previous point, I am not fully convinced that feature-matching activations explain the final outcome of the full segmentation task. They certainly provide useful insight into which support regions are most attended to during the matching stage. However, many recent FSS methods use an additional segmentation module on top, often SAM/SAM2, which is promptable and can produce object masks that are not necessarily tightly determined by the exact matched points or regions. In this context, AffEx seems to explain the feature-correlation stage rather than the full end-to-end segmentation outcome. The analysis could perhaps be interpreted more as a study of cross-image feature correlations at the vision-encoder level (which could be extended across different backbones), rather than as an explanation of the complete few-shot segmentation pipeline.

References

[1] Matcher: Segment Anything with One Shot Using All-Purpose Feature Matching [2] Bridge the Points: Graph-based Few-shot Segment Anything Semantically [3] SEGIC: Unleashing the Emergent Correspondence for In-Context Segmentation [4] A Simple Image Segmentation Framework via In-Context Examples [5] SANSA: Unleashing the Hidden Semantics in SAM2 for Few-Shot Segmentation [6] Unlocking the Power of SAM 2 for Few-Shot Segmentation

Questions

I would appreciate a broader discussion of how the proposed framework relates to more recent few-shot segmentation pipelines, especially those based on vision foundation models such as DINO, SAM/SAM2, and Stable Diffusion [1,2,3,4,5,6]. The current evaluation focuses on DCAMA and DMTNet, but the field has recently moved toward architectures where matching, prompting, and segmentation are often separated into different modules. Could the authors clarify whether AffEx is intended to explain only the feature-matching stage, or whether it can also provide faithful explanations of the final segmentation output in these more modern pipelines?

Limitations

yes

Final justification

I thank the authors for the detailed rebuttal. I found the new analysis on recent VFM-based few-shot/in-context segmentation models particularly valuable, and it substantially changes my assessment of the paper.

My main concern in the original review was that the evaluation was limited to DCAMA and DMTNet, both based on ResNet and both relatively old in the current FSS landscape, which made the scope of the paper feel too narrow. It was unclear whether the proposed framework would provide useful insights for more modern few-shot segmentation pipelines. The rebuttal directly addresses this concern. In particular, I strongly appreciate the new experiments on recent models such as INSID3, SANSA, GF-SAM, and Matcher.

I find the resulting analysis very interesting for the community. The observation that AffEx is best on dense-matching models such as INSID3 and SANSA, while the Gaussian-mask baseline often wins on prompt-from-mask models such as GF-SAM and Matcher, provides a much clearer picture of what the proposed explanation framework measures. In my view, this makes the contribution stronger: AffEx is not only an attribution method for matching-based FSS, but also a useful tool for understanding whether a model is matching-dominated or whether the final prediction is mainly driven by a later mask decoder.

I think this analysis should be included in the main manuscript. Without these experiments, the paper risks appearing narrowly focused on older FSS architectures, which would negatively limit the perceived relevance and scope of the work. With these experiments, the paper provides more modern and useful insights into how state-of-the-art few-shot/in-context segmenters use support information, and how reference images or support regions contribute to the final prediction.

Overall, I find that quantifying how much the matching stage versus the segmentation/prompting stage contributes to the final prediction is valuable and interesting. The rebuttal substantially improves the quality and significance of the paper in my view. For these reasons, I increase my score from Borderline Accept to Accept, and I strongly encourage the authors to include this new VFM-based analysis in the main paper.

Formatting concerns

No.

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the positive assessment and the pointer to recent VFM-based FSS.

We agree the intuition that high matching implies high influence is natural to an FSS expert, and we see this as a strength of the contribution. If the explanation is obvious, it is because the model is transparent by design: the very quantity the model uses to decide, the matching scores, is also a faithful explanation of its decision. Our point is that this transparency has real, practical consequences. Post-hoc explainers are approximate and, as we show, unreliable on these models, and a domain that cannot tolerate that unreliability, for example medical or high-stakes segmentation where a practitioner must be able to check which annotated support evidence drove a prediction before acting on it, needs explanations that are exact and grounded in the model's own computation, which is exactly what AffEx provides. In this light, the applicability of AffEx to a model is a measure of that model's transparency: a matching-based FSS model to which AffEx applies is one whose decisions can be audited pixel-by-pixel against the support set, which is precisely the property that makes such models deployable in high-stakes settings. The impact of the paper is to establish that an entire, practically important family of segmentation models is interpretable by design, and to quantify how faithfully. Concretely the contribution is to formalize the mechanism as a proper attribution function with a support-centric view, to show empirically that it beats adapted post-hoc explainers, which provides the evidence for the transparency claim, and to provide a causal FSS evaluation protocol. The property is also not entirely trivial: the raw scores must be softmax-normalized and aggregated across levels, and our ablation shows removing the softmax costs 12.58/5.09 mIoULoss@pp points on DCAMA.

The reviewer raises a fair point about newer, foundation-model pipelines (DINO/SAM/SD). AffEx does not by itself explain the full end-to-end output of every such model, but it remains relevant to a large part of them. Our formulation frames a matching-based model as Encoder, Match, Seg (Sec. 3.1), and to the best of our knowledge most recent vision-foundation-model FSS pipelines still contain an explicit dense matching stage that fits this template and that AffEx can read directly: the Correspondence Matrix in Matcher [1, Fig. 1], the Pixel-wise Correlation in [2, Fig. 2], the correspondence discovery in SEGIC [3, Fig. 2], the In-Context Fusion of [4], the Dense Feature Matching of [5], and the Memory Encoder and memory attention of the SAM2-based [6]. In each, the support-query matching is exposed as a dense per-support-pixel signal, exactly what AffEx attributes. In some of these pipelines the Seg stage is heavier (a promptable SAM/SAM2 decoder, or extra reasoning such as the graph-based methodology of [2]); in others it is light, for instance a nearest-neighbour vote. Where present, this heavier stage is outside AffEx's scope, since AffEx explains the matching that produces the evidence, while the decoder that turns it into the final mask lies beyond what it reads, and we acknowledge this as a limitation: when Seg substantially transforms the matching output, as the graph methodology in [2] does, AffEx captures the matching contribution while that transformation remains outside its explanation. Even so, AffEx interprets a large, and often decisive, part of these models, and it is naturally complementary to a decoder-side explainer, so combining the two would yield a comprehensive explanation of such pipelines; we will add this discussion to the paper.

AffEx's score under our causal metrics is not only a measure of the explanation: on these pipelines it also quantifies how much of the model's decision is carried by the matching stage versus reshaped by Seg. When AffEx scores well, the support-pixel attribution faithfully predicts the output, so the matching signal is decisive and the Seg stage largely preserves it; when AffEx scores poorly, the Seg stage is substantially transforming the matching output, decoupling the final mask from the correspondence. The same metric therefore doubles as a per-model ablation of the Match-versus-Seg contribution, a diagnostic of where each pipeline's decision is actually made. Our metric ranks the dense-matching models (INSID3, SANSA) as matching-dominated, where AffEx beats even the Gaussian-Noise-Mask baseline, and the prompt-from-mask models (Matcher, GF-SAM) as Seg-dominated, where AffEx faithfully attributes the matching yet cedes the causal metric to the Gaussian-Noise-Mask baseline because their SAM/SAM2 decoder consumes the whole mask region rather than the discriminative subset.

In response to this review, we evaluated AffEx on four recent VFM-based models, including those the reviewer cites. The table below reports mIoULoss@1% / @5% (lower is better, times 100, 1000 episodes/fold). The applicable methods are Random, Gaussian-Noise-Mask, LIME, and AffEx (in its Unmasked and default forms); the eight gradient-based baselines are inapplicable on every model below, because of non-differentiable SAM/SAM2 mask generation, Hungarian matching, and agglomerative or graph clustering. Bold marks the best (lowest) value per row.

Model Dataset Shot Random Gaussian LIME Unmasked AffEx AffEx
INSID3 PASCAL-5i5^i 1 60.4 / 47.2 45.3 / 25.2 48.1 / 26.2 33.7 / 4.8 33.0 / 4.4
INSID3 PASCAL-5i5^i 5 69.0 / 68.1 67.9 / 46.6 66.3 / 52.4 44.6 / 10.6 43.8 / 8.9
INSID3 COCO-20i20^i 1 59.1 / 46.7 36.6 / 12.6 44.3 / 22.0 26.9 / 4.2 23.8 / 3.1
INSID3 COCO-20i20^i 5 64.8 / 63.7 57.5 / 26.3 62.3 / 52.2 28.6 / 7.1 25.9 / 6.3
SANSA PASCAL-5i5^i 1 72.5 / 68.3 56.6 / 28.1 63.9 / 49.8 40.1 / 12.8 37.9 / 10.0
SANSA PASCAL-5i5^i 5 74.3 / 69.8 66.4 / 25.4 68.2 / 45.4 17.6 / 4.1 16.2 / 3.8
SANSA COCO-20i20^i 1 64.5 / 58.9 41.1 / 17.5 51.7 / 31.9 35.6 / 13.7 29.3 / 7.5
SANSA COCO-20i20^i 5 68.5 / 63.4 53.6 / 15.9 64.3 / 45.1 18.2 / 4.6 16.0 / 3.2
GF-SAM PASCAL-5i5^i 1 40.8 / 14.1 11.4 / 1.7 44.5 / 26.9 35.5 / 5.2 34.7 / 4.8
GF-SAM PASCAL-5i5^i 5 36.2 / 5.7 11.0 / 3.4 62.7 / 53.3 28.8 / 4.5 28.2 / 4.4
GF-SAM COCO-20i20^i 1 46.8 / 14.3 15.5 / 3.0 42.5 / 27.9 32.2 / 6.7 29.6 / 6.2
GF-SAM COCO-20i20^i 5 39.3 / 5.2 15.4 / 4.6 59.2 / 48.1 21.5 / 4.5 21.1 / 5.3
Matcher PASCAL-5i5^i 1 51.5 / 29.9 28.4 / 6.1 43.8 / 32.0 42.7 / 16.3 41.6 / 15.8
Matcher PASCAL-5i5^i 5 60.1 / 27.6 32.2 / 5.3 56.2 / 42.9 33.6 / 7.4 33.1 / 7.3
Matcher COCO-20i20^i 1 46.2 / 33.9 28.8 / 5.8 40.4 / 26.9 35.8 / 9.7 35.5 / 7.3
Matcher COCO-20i20^i 5 58.0 / 35.3 32.5 / 7.6 52.8 / 41.3 30.3 / 5.9 29.5 / 5.3

Each cell is mIoULoss@1% / @5% (lower is better). On the dense-matching models (INSID3, SANSA) AffEx is best and beats even the Gaussian-Noise-Mask baseline in every fold; on the prompt-from-mask models (GF-SAM, Matcher) the Gaussian-Noise-Mask baseline usually wins because the SAM/SAM2 decoder consumes the whole mask region (Seg-dominated), yet AffEx stays faithful and beats Random and Unmasked AffEx.

Read this way, the fact that Gaussian-Noise-Mask is the strongest explainer on Matcher and GF-SAM is itself informative: it shows these models carry a strong support-mask prior, leaning on the whole annotated region rather than a discriminative subset, which is why perturbing the entire mask is most damaging. Which explanation the causal metric rewards is itself a statement about the model, and this is why we view the framework, AffEx together with the baseline attributions and the causal metrics, as the contribution: the same framework describes a model's behaviour in complementary ways, reliance on the matching mechanism (INSID3, SANSA) versus reliance on the Seg stage (Matcher, GF-SAM, where the whole support mask drives the prompt-based decoder), turning the best-performing explainer into a diagnostic of how the model uses its support.

This approach is also not limited to older CNNs. The INSID3 [Cuttano et al., CVPR 2026] rows of Table 1 are a modern, DINOv3-based, training-free in-context segmentation model (a hybrid matching and prototype method): it computes a genuine dense support-query correspondence sim∈RHs×Ws×Hq×Wq\mathrm{sim}\in\mathbb{R}^{H_s\times W_s\times H_q\times W_q} that drives the prediction via a nearest-neighbour vote, and AffEx applies directly to its matching branch, where it is best on every fold and beats even the Gaussian-Noise-Mask baseline. Qualitatively, AffEx cleanly attributes the foreground support pixels and assigns near-zero importance to a support image containing only a tiny, distant instance of the class. The method is also non-differentiable, since it contains a discrete agglomerative-clustering step, so gradient-based attribution is inapplicable to it whereas AffEx, which needs no gradients, applies directly: a concrete case where our method interprets a model that saliency and IG-style methods cannot.

Reviewer ynLCOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
2/4
Clarity
2/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper studies explainability in few-shot segmentation (FSS), a topic that has so far received relatively little attention. The authors focus on attribution-matching-based FSS models and observe that the matching scores used for segmentation can also be interpreted as explanations. Building on this observation, they propose two variants of AffEx for extracting explanations from these models. To evaluate explanation quality, the paper adapts existing explainability metrics to the FSS setting and introduces several new ones. The proposed approach is compared against a range of established XAI methods on multiple FSS benchmarks.

Strengths and weaknesses

Explainability in few-shot segmentation (FSS) has received considerably less attention than predictive performance, making this a worthwhile problem to study. The paper nicely motivates why explainability in FSS deserves separate consideration and how it differs from explainability in conventional segmentation settings. Beyond the proposed method, I found the evaluation framework and the proposed metrics to be a useful contribution, as they provide a basis for more systematic evaluation of explainability methods in FSS. The most interesting aspect of the paper is the observation that attribution-matching-based FSS models already contain information that can be interpreted as explanations. Using this information directly, rather than relying entirely on post-hoc explanation techniques, is a neat idea and, to my knowledge, represents a novel contribution. I also appreciated that the evaluation includes comparisons against several established XAI baselines.

The main conceptual weakness concerns the motivation and interpretation of the masked AffEx variant. The authors argue (line 163) that the attribution maps produced by the attribution matching process lack class-specific information and that support masks provide information that is essential for interpreting the model’s behavior. Since this claim serves as the primary motivation for introducing the masked variant, I believe it requires stronger justification. In its current form, I am not convinced that the unmasked attribution maps are necessarily missing information relevant to explaining the model’s decision process.

My skepticism stems in particular from the way attribution signs are assigned in the masked variant. The sign assignment introduced by the masking procedure appears to reflect a human bias of foreground and background rather than a quantity directly grounded in the model. For example, in the motorbike case shown in Figure 2, the presence of a motorcyclist seems intuitively related to the concept of a motorbike and may therefore reasonably receive a strong attribution score. However, after the masking-based sign assignment, the motorcyclist receives a negative attribution, implying a weaker relation than other background regions. It is therefore unclear whether the masked variant remains faithful to the model’s internal reasoning or instead imposes an external semantic interpretation. In fact, this example could be interpreted as evidence that the unmasked version more faithfully reflects the model’s behavior, weakening the argument that the support-mask-based modification is necessary for obtaining meaningful explanations.

A related issue arises in the comparison between the masked and unmasked AffEx variants. The paper generally interprets the stronger quantitative performance of the masked variant as evidence that incorporating support-mask information leads to more meaningful explanations. However, the masked variant differs from the unmasked one not only through the foreground/background sign assignment but also through the application of a smoothed mask. Since the original mask takes only the values +1 and -1, smoothing introduces a gradual transition around object boundaries. When this smoothed mask is applied to the attribution map, attribution values near boundaries are attenuated, while pixels further inside the object retain larger magnitudes. As a result, the attribution map itself becomes effectively smoother and more concentrated towards the object interior. Because the proposed metrics are based on highly ranked attribution pixels, this transformation may itself lead to improved scores by favoring pixels in central object regions over boundary pixels. Consequently, it is unclear whether the observed performance advantage of the masked variant should be attributed to the proposed use of support-mask information or to the smoothing effect induced by the mask. A comparison against an equally smoothed version of the unmasked AffEx would help clarify this point.

I also found parts of the method section difficult to follow, in particular Section 3.2. The exposition first introduces the overall attribution function, then discusses aggregation over regions of interest, and only afterwards derives the underlying pixel-level attribution formulation. This ordering makes the derivation difficult to follow, as readers are required to reason about aggregated quantities before understanding how the underlying pixel-level attributions are computed. The relationship between the formulation in the text and the aggregation step illustrated in Figure 1 is also not immediately obvious.

I also found several smaller presentation issues. Equation (2) does not clearly define the function MM_θ , and the axis over which the softmax normalization (Eq. 6) is applied should be stated explicitly. Figure 1 would benefit from a clearer visual distinction between components of the matching-based segmentation model and the AffEx method itself, as well as a more explicit explanation of the different color codings and intermediate representations. Finally, Figure 2 should clarify how attribution maps from different methods are normalized to a common value range.

Questions
  • The motivation for the masked AffEx variant relies on the claim that the original attribution maps lack class-specific information and that support masks provide information essential for interpreting the model’s behavior (line 163). I would appreciate additional justification for this claim. In particular, why should the information introduced by the support masks be considered more faithful to the model’s reasoning than the original attribution maps?
  • The masking procedure introduces a foreground/background sign assignment that changes the interpretation of attribution values. What is the rationale for viewing this sign assignment as reflecting the model’s behavior rather than imposing an external semantic interpretation? For example, how should one interpret cases such as the motorbike example in Figure 2, where semantically related background regions receive negative attribution scores?
  • The masked AffEx variant applies a smoothed version of the binary support mask before computing the final attribution scores. Since this operation attenuates attribution values near object boundaries and emphasizes pixels in object interiors, it seems possible that part of the performance gain arises from the smoothing itself rather than from the use of support-mask information. An ablation applying a comparable smoothing operation to the unmasked AffEx would help clarify this point. Have the authors investigated this effect?
Limitations

yes

Final justification

The masked-vs-unmasked elaborations in the authors' rebuttal provided more clarity on the masking mechanics.

Formatting concerns

none

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for this careful reading. We agree the AffEx versus Unmasked AffEx distinction was under-explained, and this is largely a presentation problem in Fig. 1: the reviewer's concern is well-founded given how Fig. 1 currently reads, but the underlying choice follows from the model architecture. We clarify below and will revise Fig. 1.

The choice between the two forms depends on where the model applies the support mask. AffEx takes as input the matching scores σj\sigma^j, and what matters is whether the support mask is already fused into σj\sigma^j or is applied by the model after the point we read:

  • If the model applies the mask after the scores we read (typically during the aggregation that maps scores back to Hq×WqH_q\times W_q), then σj\sigma^j does not yet encode the mask, so applying it in AffEx adds information and reproduces the model's own next step.
  • If the model applies the mask before the scores we read (for example by masking the support features prior to matching), then σj\sigma^j already encodes the mask, so the masking is not needed.

This is how the two models in the paper behave:

  • DCAMA: the exposed attention is softmax(Q K⊤)\mathrm{softmax}(Q\,K^\top), a pure query-support feature affinity, and the support mask is the value, applied only in out=pattn⋅Ms\mathrm{out}=p_{\mathrm{attn}}\cdot M_s during aggregation, so it is not yet present in the scores we read and applying it reproduces the model's own downstream step.
  • DMTNet: the support features are masked before correlation (feat←feat⋅Ms\mathrm{feat}\leftarrow\mathrm{feat}\cdot M_s), so the correlation we read already encodes the mask and applying it again is almost invariant, as the results confirm.

Table 1 corroborates this directly. For DMTNet, AffEx and Unmasked AffEx are nearly identical (COCO 1-shot 10.54 vs 10.97; PASCAL 5-shot 13.29 vs 13.34), exactly what one expects if the mask is already in the scores so that re-applying it is a near no-op, whereas for DCAMA they differ markedly (COCO 1-shot 17.19 vs 19.84; PASCAL 5-shot 11.56 vs 13.78), as expected since there the mask has not yet been applied. The form is therefore architecture-determined, and the asymmetry in Table 1 confirms this understanding; we will state the rule explicitly and, per model, report the form that matches where the mask is applied.

This is the same point that answers the reviewer's question about the class-specific claim at line 163, and it is why the mask makes the explanation more faithful. Whenever the model has not yet applied the support mask (the mask-after case, e.g. DCAMA), the matching scores AffEx reads are class-agnostic: they measure support-query feature similarity regardless of whether a support pixel belongs to the target object or its background. There the support mask is exactly the information the model itself uses to turn that class-agnostic similarity into a class-specific decision, so incorporating it through the sign does not impose an external semantic on the explanation but reproduces the model's own next step, which is why it is more faithful to the model's reasoning. For mask-before models such as DMTNet the scores already encode the mask, so they are already class-specific and the masking is not needed. We will reword line 163 accordingly: the mask supplies the target-class selection the model performs, rather than a generic notion of class-specificity.

The motorbike example in Fig. 2 is a case of this rule, and the reviewer's intuition there is correct. That episode is a DMTNet example, and DMTNet fuses the support mask before matching, so the masking is not needed and the relevant map is the unmasked one, in which the motorcyclist receives a strong attribution, precisely as the reviewer expects for a semantically related region; the negative value the reviewer noted belongs to the default AffEx, which is appropriate to mask-after models (DCAMA, and the DINOv3 model we now add) rather than to DMTNet. The sign is thus determined by the architecture and reflects the model's own computation, and we will label per model which form AffEx takes and refine the qualitative text accompanying this example, which over-attributed the effect to the motorcyclist misleading the foreground match. In fact our class-agnostic-to-class-specific reasoning is best illustrated by the Horse example, a similar case of a horse with a rider that is instead a DCAMA, mask-after episode: there the raw matching score for the rider is high because the rider is semantically related (class-agnostic similarity), and the mask makes it class-specific by assigning it a neutral-to-negative sign, marking the rider as background for the horse class, which is the intended, faithful behaviour.

The reviewer also asks whether the masked variant's advantage might come from the smoothing rather than the sign, since the masked variant differs from the unmasked one by both. To isolate the two we ran exactly the control the reviewer asked for, all at one matched setting (DCAMA, PASCAL-5i5^i 1-way 5-shot, [email protected]): the raw unmasked map, a smoothed-unmasked map that applies the same Gaussian blur with no mask and no sign, and AffEx, which adds the sign. Adding the blur to the unmasked map alone changes the loss by only about +0.1, i.e. no improvement, whereas adding the sign lowers it by about 0.8. The advantage therefore comes from the sign, and the blur contributes essentially nothing. This is consistent with the appendix ablation of the mask processing within the signed variant (binary 12.01, smoothing 13.90, dilation plus smoothing 11.56), which likewise shows the processing itself to be a minor, primarily qualitative factor.

Finally, on presentation, we will:

  1. reorder Sec 3.2 to introduce the pixel-level attribution before the region aggregation;
  2. define MMθ\mathrm{MM}_\theta in Eq. (2) explicitly (the matching mechanism: dense cross-attention for DCAMA, feature correlation for DMTNet);
  3. state that the softmax in Eq. (6) is taken over the support dimension K×Hs×WsK\times H_s\times W_s;
  4. revise Fig. 1 to visually separate the matching-model components from AffEx, explain the color coding, and make explicit that AffEx reads the matching scores σj\sigma^j at the point they are produced, which is before the mask-weighted aggregation back to Hq×WqH_q\times W_q (the current figure suggests the mask is already fused into AffEx's input, which is what makes the default AffEx look redundant);
  5. state in Fig. 2 that all attribution maps are min-max normalized per map to a common [0,1][0,1] range.
Reviewer M83EOpenReview ↗
Rating
3/6
Confidence
4/5
Quality
2/4
Clarity
3/4
Significance
2/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This work introduces Affinity Explainer (AffEx), which extracts attribution maps directly from the matching scores of Few-Shot Semantic Segmentation (FSS) models. The motivation is to address the largely opaque decision-making processes and underexplored interpretability in FSS. AffEx leverages the core similarity computation between support and query features to make this intrinsic interpretability explicit, without requiring gradients or external perturbations. AffEx is evaluated on FSS benchmark datasets using extended and newly proposed interpretability metrics and compared to explanations from different post hoc methods.

Strengths and weaknesses

General review: The general scope of this work, inherent interpretability in deep learning, is an active research area but less studied in the context of few-shot segmentation, and therefore of interest to the community. The proposed methodology is clearly presented and intuitive. I also like the figures of the manuscript, they are clear, well-presented and informative. Nevertheless, there are fundamental limitations with this work, which I elaborate in terms of quality, clarity, significance, and originality below. But these limitations can be summarised by the following points: (1) The awareness of existing literature is low, particularly the lack of discussion on the similarity to existing prototypical methods designed for interpretability by design. (2) The evaluation has unclear aspects that makes interpretation of the results difficult.

Quality: The motivation and theoretical contribution is sound, but the evaluation is unclear. The standard insertion and deletion metrics are introduced and adapted for the setting. But then, they state "Since model confidence is often uncalibrated and highly model-dependent, [..]". This is unclear to me. These metrics are fairly standard and used to compare the quality of explanations, why must a new metric be introduced? Also, on the established metric, the performance increase is unclear, and the presentation of Table 2 is confusing. Why are the best and second best not made bold in many cases? What is the purpose of the diff and the IAUC conf. instead of using the established metrics? Also, for the DMTNet, Unmasked AffEx (ours) is highlighted as second best even when it is not. For the new metric in Table 1, the performance is good, but it is unclear why this metric is needed, and it is also unclear why 0.01 and 0.05 was chosen. Can't you show several values and the summarise across several percentages? Furthermore, there are many standard established that could expand the evaluation without inventing new metrics, like localisation, robustness, and complexity [1].

Clarity: I mostly find the clarity of the manuscript to be good. The writing is understandable and I like the visualisations. But there is room for improvement. Particularly the explanation of the metrics, their limitations and interpretation.

Originality: The originality of this work is unclear. The related work extensively covers post-hoc explanations, but does not cover models that are interpretable by design. This is unfortunate, because there are many similarities between existing interpretable by design methods and the proposed methodology. Using latent space affinities in combination with prototypes is fairly established in interpretable by design models, and the proposed methodology have many similarities with methods like ProtoPnet [2] and its many variants like [3,4], which have also been extended to segmentation [5]. It is unclear to me how the methodology differs from such approaches, and therefore the originally is also unclear.

Significance: I assess that the potential impact of this work on the community is low. The performance of Affinity Explainer is unclear, and the similarities to the existing literature is also not properly discussed.

  • [1] Hedström et al., Quantus: An Explainable AI Toolkit for Responsible Evaluation of Neural Network Explanations and Beyond, JMLR 2023
  • [2] Chen et al., This Looks Like That: Deep Learning for Interpretable Image Recognition, NeurIPS 2019
  • [3] Nauta et al., Pip-net: Patch-based intuitive prototypes for interpretable image classification, CVPR 2023
  • [4] Donnelly et al., Deformable protopnet: An interpretable image classifier using deformable prototypes, CVPR 2022
  • [5] Sacha et al., Protoseg: Interpretable semantic segmentation with prototypical parts, WACV 2023
Questions
  • Can you describe the difference between Affinity Explainer and methods like [2-5] and position the method within the field of interpretable by design models?
  • Why it is necessary to go beyond the established insertion and deletion metrics?
  • Can methods like [2-5] could be relevant baselines for this application? If yes, what is the performance of the baselines?

If these questions are answered satisfactory I could increase my rating.

Limitations

Yes

Final justification

I thank the authors for an active rebuttal phase. Some of my concerns have been addressed, and I have raised my score from a 2 to a 3. The positioning of the papers is improved, as well as the clarity. However, the evaluation is still lacking. The inclusion of the of the prototypical-approach is a step in right direction, but a more comprehensive evaluation is necessary to provide a proper comparison and to better position the paper in relation to existing methods. Nevertheless, I think the core idea is interesting and I encourage the author to continue improving the manuscript.

Formatting concerns

No concerns.

6 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the constructive review and for pointing us to the interpretable-by-design and prototype-part literature. Our submission already discusses some interpretable few-shot work, and we will gladly expand this in the camera-ready to include the prototype-part references the reviewer suggests, giving a more complete view of the interpretability literature and letting us state the contrast with AffEx more precisely.

On how AffEx differs from prototype-part methods and where it sits in the field: ProtoPNet [2], PIP-Net [3], Deformable ProtoPNet [4], and the segmentation extension ProtoSeg [5] share with AffEx the premise that latent-space similarity can be read as an explanation, but they differ from it in three fundamental ways.

  1. Trained-in versus read-out: these models bake interpretability into a bespoke architecture (prototype layers plus dedicated losses that must be learned), whereas AffEx trains nothing and simply reads the matching scores σj\sigma^j that a standard, independently trained matching-based FSS model already computes; "interpretable by design" here refers to the existing matching architecture that the model already has.
  2. Learned class prototypes versus the given support set: their prototypes are learned from the training classes and are independent of the specific test input; in FSS, however, test classes are unseen at training time and are defined only by the support set given at inference. AffEx explains with respect to exactly that support set, attributing to the pixels of the actual few-shot examples, which is the question that matters in this regime (which support pixels drove this prediction, and how one should revise the support).
  3. Pooling versus dense correspondence: prototype methods, like the prototype-based FSS models our Related Work already contrasts with matching-based ones, compress support and parts into pooled vectors and discard support-spatial detail, so they can highlight query regions resembling a prototype but provide no attribution over the individual pixels of the support set; matching-based models instead retain a dense support-query correspondence σj∈RHq×Wq×K×Hs×Ws\sigma^j\in\mathbb{R}^{H_q\times W_q\times K\times H_s\times W_s}, which is exactly what AffEx exploits for support-pixel-level attribution.

We will add a paragraph making this explicit.

We appreciate the suggestion to compare against [2-5] and considered it carefully. The main difficulty is that ProtoPNet and ProtoSeg are self-contained models rather than post-hoc attribution methods that can be applied to a given FSS network: using them in place of a baseline explainer would mean swapping DCAMA or DMTNet for a different model, so the resulting numbers would characterize a different model rather than explain the one under study, and would not be directly comparable on our task. Their prototype pooling also summarizes the support into pooled vectors, which does not expose the per-support-pixel attribution that our metrics score. For these reasons we see AffEx and prototype-part interpretability as complementary, addressing different model families and different explanatory questions (query-centric part activation versus support-centric pixel attribution), and following the reviewer's suggestion we will make this relationship explicit in Related Work.

We should have been clearer in the paper that we are not proposing to replace insertion and deletion. Our metrics are built on the standard insertion and deletion metrics, IAUC and DAUC, adapted to FSS by perturbing the support set instead of the query, and we report IAUC and DAUC directly as well, for completeness. The measure we emphasize, mIoULoss@pp, is a two-point summary of the same insertion curve: the model at the top-pp support pixels against the model at the full support, with IAUC integrating the same construction over all pp. We report the two-point version because, in the FSS regime, it answers a single concrete question: how much segmentation accuracy do we lose if the model is given only the pp% of support pixels the explainer deems most useful, instead of the full support mask? A faithful attribution identifies a tiny discriminative subset that already recovers almost the full prediction, so mIoULoss@pp is small. We keep both because in the FSS regime they play complementary roles and the full sweep is largely wasted work. The informative signal lives in the first few percent of pixels: the model decides the segmented region from a handful of discriminative support pixels, and once those are inserted the prediction is essentially fixed, so the remainder of the insertion/deletion curve is flat and says nothing more about which support pixels the model relies on. That early regime is exactly what mIoULoss@pp isolates, and @0.01 and @0.05 sample this initial part of the curve where the segmentation is already determined. It is also far cheaper: mIoULoss@pp needs only two model inferences per episode, whereas a faithful IAUC/DAUC curve needs one inference per insertion step (n=75n{=}75 here), an order of magnitude more compute, almost all of it spent on the flat tail that no longer changes the segmentation. That flat remainder in fact dominates the area under the curve, so it shadows the informative initial part, and the small oscillations along the late tail are of the same order as the gaps between explainers, so they can shadow the actual differences between methods in the aggregated IAUC/DAUC. This is why we did not bold the IAUC/DAUC columns in Table 2, where the ranking is not robust, and reserved the emphasis for the early-curve metrics ([email protected], and mIoULoss@pp in Table 1) that isolate the discriminative regime; we understand this was not made explicit and could cause confusion, and we will clarify it in the paper.

On the presentation of Table 2, we thank the reviewer for catching this. For DMTNet under [email protected], the best method is actually XRAI (COCO 68.42, Pascal 69.78), which we failed to highlight; this was simply a mistake on our part in marking the best value. We will correct the highlighting, keep the emphasis on the early-curve [email protected] column, and state this convention in the caption, clarifying there the role of Diff and of [email protected] alongside the standard IAUC/DAUC.

Reviewer M83E · CommentOpenReview ↗

Response from Reviewer M83E

Thank you for the detailed and extensive response to my comments. Below are my responses:

On how AffEx differs from prototype-part methods: Thank you for clarifying.

Comparison to other methods: I appreciate the response, but I do not agree with the assessment. Both this work and the majority of self-contained models rely on some type of encoder combined with a head module that tackles the task at hand. A natural framing would be to keep the same encoder while using different heads for the different methods. This means that this work could still rely, for example, on DCAMA, which has a similar backbone to many self-contained models, and provide a comparison. Furthermore, prototype-based methods can provide pixel attribution in many ways, and this is commonly done. The simplest approach is to upsample feature maps before the pooling operation, but more sophisticated approaches also exist, such as [1, 2]. This would allow for evaluation using the same metrics.

On the metrics: Thank you for the explanation. I understand the rationale for considering only the initial parts of the curve, and I can also see how this is beneficial for improving computational efficiency, which would allow for a more robust evaluation. However, it is still unclear why the exact values of 0.01 and 0.05 were chosen. This seems arbitrary and is not justified. For instance, the curves could be visualised to provide qualitative insights. Alternatively, a more quantitative approach could be taken to determine when the curves flatten. Having a user-defined parameter in the evaluation with limited justification makes comparisons less transparent and reduces reproducibility.

[1] Carmichael et al., Pixel-Grounded Prototypical Part Networks, Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision 2024.

[2] Gautam et al., Enhancing Self-Explaining Models by Prototypical Relevance Propagation, arXiv preprint arXiv:2108.12204 2021.

Authors · CommentOpenReview ↗

Comparison to other methods

We thank the reviewer for the suggestions and agree that keeping the same encoder while varying the head makes the comparison concrete, so we ran it.

We built a prototype-based FSS head on DCAMA's encoder: the same frozen Swin-B backbone and weights (DCAMA is trained head-only on it). The head is PANet's [Wang et al., ICCV 2019], the classical prototype-based FSS method: the support features are masked-average-pooled into foreground and background prototypes, and each query position is classified by cosine similarity to them, with per-level linear projections and a temperature as the only trained parameters. This pooling is the step that carries the prototype idea into FSS: in the cited classifiers prototypes are parameters learned from the training classes, while in FSS the class is defined only by the support set given at inference, so the prototype must be computed from it. The object of the explanation moves with it: a classifier with learned prototypes is naturally explained on the image being classified, while in FSS the question is which pixels of the given examples defined the class, so the attribution must also cover the support images. Trained on PASCAL-5i with the same regime used for DCAMA, the head reaches 46.6 validation mIoU, in line with PANet. We then evaluated it with the same metrics, episodes and protocol as Table 1.

On this head the reviewer's suggestion and AffEx meet exactly. The model is prototype-based as-is: nothing in its architecture, training or prediction path is modified for the evaluation. But since the prototype is a weighted average of normalized support features, the foreground logit factorizes exactly as

cos⁡(q~,P^)=∑m⋅(q~⋅v~)∥∑m⋅v~∥\displaystyle \cos(\tilde{q}, \hat{P}) = \frac{\sum m \cdot (\tilde{q} \cdot \tilde{v})}{\Vert \sum m \cdot \tilde{v} \Vert}

with the sum over the support pixels, mm the mask value and v~\tilde{v} the normalized feature of the pixel: a mask-weighted mean of pairwise query-support similarities, divided by a constant independent of query position and support pixel. The upsampling the reviewer describes admits two readings on this head, and we evaluated both. Upsampling the pixel-to-prototype similarity, as prototype-part methods do with their activation maps, gives the prototype read-out in the table: each support pixel scored by its similarity to the foreground prototype. Reading the pairwise terms, one step before the pooling sums them, gives AffEx: the model computes the sum, the explanation looks at the summands. The two are the same quantity at two levels of aggregation: the read-out is what remains of the pairwise matrix once the query axis is replaced by the support average.

Results (PASCAL-5i, [email protected] / @0.05, lower is better; DCAMA columns from Table 1):

Explanation method Prototype head 1-shot Prototype head 5-shot DCAMA 1-shot DCAMA 5-shot
Random 44.5 / 37.3 49.8 / 36.1 48.7 / 34.6 55.2 / 33.4
Gaussian-Noise-Mask 39.7 / 22.6 42.4 / 19.8 33.6 / 16.0 35.7 / 15.9
LIME 28.1 / 11.3 28.9 / 15.8 40.0 / 14.0 36.7 / 13.4
Prototype read-out 25.0 / 11.6 20.3 / 19.2 - -
Unmasked AffEx 22.9 / 10.4 17.7 / 16.6 22.9 / 7.9 13.8 / 5.7
AffEx 21.8 / 9.9 17.5 / 17.3 20.2 / 6.8 11.6 / 5.9
  1. On the prototype head, AffEx is the best attribution at the early point in both shot settings, and the prototype read-out is close behind but consistently worse (25.0 vs 21.8 at 1-shot, 20.3 vs 17.5 at 5-shot). The gap isolates the value of conditioning on the query: the read-out never looks at it, while AffEx weights support pixels by their similarity to the query pixels the prediction uses.
  2. Across heads sharing the same encoder, AffEx behaves consistently: 21.8 / 9.9 on the prototype head vs 20.2 / 6.8 on DCAMA's attention head at 1-shot. This supports reading AffEx as a general read-out of the matching stage, with the prototype case as the special case where matching is against a pooled vector.
  3. One exception: at 5-shot with p=0.05 LIME comes out best (15.8 vs 17.3). The effect is specific to the prototype head and does not appear on the matching architectures (on DCAMA, 5.9 vs 13.4); at the early point, where methods are most separated, the ordering is unambiguous on both heads.

The parallelism also runs both ways: on the support-pooled head the relevance propagation of PRP [2] becomes applicable, propagated through the pooling down to the support pixels, and the same propagation applies on top of AffEx, tracing the affinity maps through the encoder in place of upsampling. We see AffEx as the foundation of interpretability for matching-based models, on which methods like [1, 2] can be applied as refinements; we deliberately did not apply them, to support the by-design claim and keep the read-out as simple as possible. We will discuss [1, 2] and add the derivation above in the revision.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…