NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Prototype Networks That Separate Part Shape, Part Color, and Lighting

Interpretable image classifiers of the "this looks like that" type explain a decision by pointing at image patches that resemble stored example parts ("this wing looks like that prototype wing"). Each stored part, called a prototype, is a raw feature vector. That vector mixes three things: the part's shape, the part's true color, and whatever lighting and camera settings happened to be present in the training photo it came from. When lighting changes, the match score changes, and the explanation silently changes with it. This proposal borrows the central trick of 3D reconstruction from internet photos, where a scene's geometry is shared across all images and each image gets a small private code that absorbs its lighting and exposure. We apply that trick to prototype classifiers. Every prototype stores a shape part and an intrinsic-color part, and these are shared across all images of a class. Every input image gets a low-dimensional appearance code that accounts for its global illumination and sensor response. The final linear layer sees separate shape-match and color-match scores for each prototype.

The claim is that part of the accuracy-interpretability trade-off in prototype networks comes from this entanglement, not from interpretability as such. Separating the factors should make prototype matches stable under lighting shifts. It should keep color cues that are genuinely discriminative, such as bird plumage, which invariance-by-augmentation would destroy. It should also produce explanations that say which factor drove the decision. In two sentences: give each image a small lighting code, as NeRF-in-the-Wild does for photo collections, and store each prototype as separate shape and intrinsic-color vectors, so that matches compare parts after the lighting has been factored out. The resulting classifier should be more stable and more faithful than entangled prototype networks, and it should report in a checkable way whether it relied on shape or on color.

Where the idea comes from and what it is not

The mechanism comes from NeRF in the Wild. That paper models a landmark's density as a function of position only, so geometry is shared across all photos, and it gives each photo a learned appearance embedding that only the color branch sees. The network is forced to explain exposure and weather through the small per-image code rather than by warping geometry. AAGS carries the same split to Gaussian splatting and predicts the per-image code with a convolutional appearance extractor instead of optimizing it. We reuse that feed-forward extractor idea, because a classifier must handle unseen test images without per-image optimization. The operative principle in both papers is a bottleneck: shared parameters plus a low-capacity per-image code. The code can only absorb global, image-wide variation, so local structure must live in the shared parameters. In our setting, the shared parameters are the class prototypes.

The gap is motivated by the prototype literature. This looks like that introduced ProtoPNet, which compares patch features to learned prototypes, projects each prototype onto a real training patch, and classifies linearly from similarity scores. Is ProtoPNet Really Explainable? showed that vanilla prototypes activate on different physical parts across images, with a consistency of 15.1% on CUB-200-2011. They also shift under small perturbations. That paper's shallow-deep feature alignment raised consistency to 70.6% and accuracy up to 88.5%. However, its anchor is shallow convolutional features, which are themselves sensitive to contrast and illumination, so it constrains spatial correlation without separating photometric factors. Deformable ProtoPNet handles pose by letting prototype sub-parts move, reaching 87.8% on CUB. Its sub-parts are still entangled feature vectors, so it addresses spatial geometry but not appearance. FunnyBirds supplies the evaluation machinery: a 3D renderer where parts can be removed without masking artifacts. It found that prototypes often latch onto background. Revisiting FunnyBirds constrains how we measure: scoring prototypes with summed similarity maps instead of bounding boxes moved single-deletion correctness from 0.24 to 0.73, so we adopt the similarity-map protocol throughout.

Several papers in the file already disentangle geometry from environmental condition, but none do so inside an inspectable decision. MDFL splits condition-invariant and condition-specific features for place recognition, then pools them into an opaque global descriptor. MoDE splits road geometry, weather, and dynamic objects for driving, but its experts are black boxes. StyleGAN knows Normal, Depth, Albedo, and More shows that intrinsic geometry and albedo are linearly separable in a generator's latent space, which is evidence that the factorization we want exists in learned features. It requires inverting each real image into the generator's latent space and is not a classifier. DISC detects spurious environmental concepts and repairs them with diffusion-generated mixup. It works on the data rather than the architecture, and it leaves the classifier opaque. Our proposal differs from all of these in placing the factorization at the level of individual prototype matches that a human reads.

Core Claim

For a patch feature $z$ at some location in image $x$ and a prototype $p=(p_s, p_c)$, the model computes a shape feature $s(z)$ and an illumination-corrected color feature $c(z; a)$, where $a=E(x)$ is the image's low-dimensional appearance code from a small extractor $E$. The two scores are

$$\text{sim}_s = \phi(\lVert s(z)-p_s\rVert), \qquad \text{sim}_c = \phi(\lVert c(z;a)-p_c\rVert),$$

where $\phi$ is ProtoPNet's log-similarity function. The final linear layer receives both scores for every prototype, with non-negative weights, following the score-aggregation idea of Huang et al.

The correction $c(z;a)$ is a per-image affine transform of a color head's output. It is conditioned only on $a$, which is global and has, say, 4 to 8 dimensions. The shape head $s$ never sees $a$. Two further constraints close the obvious leaks. First, the shape head is trained to be unchanged under global photometric transforms, applied only to its branch. Second, $a$ is penalized for carrying class information, using an adversarial label predictor in the spirit of the mutual-information separation used by MDFL and MoDE. Prototype projection is kept: $p_s$ and $p_c$ are projected onto the same real training patch, with the color part expressed in that image's corrected space. This keeps every prototype visually inspectable.

The testable prediction has three parts. Under lighting and exposure shifts, prototype activations should stay stable and accuracy should hold. Color-discriminative accuracy should be kept rather than traded away. And the learned reliance on color versus shape should track the actual causal structure of the dataset.

Research Program

The first stage builds the model on top of an EvalProtoPNet-style backbone and training schedule, so that any gain is attributable to the factorization. The second stage builds the evaluation instrument: an extension of the FunnyBirds renderer. It adds controlled global lighting changes (light direction, color temperature, exposure). It also adds species pairs that differ only in part color, which makes color truly causal. It adds pairs that differ only in part shape as well. This extension is our own construction; the file does not report that the released renderer exposes these controls, so it is engineering work to be budgeted. In this renderer we can compute exact faithfulness checks. Recoloring a part should move that prototype's color score and leave its shape score alone. Changing the lighting should move neither score. Deleting a part should remove both scores.

The third stage runs real-data experiments on CUB-200-2011 and Stanford Cars. These give a built-in sanity check. Bird species are partly defined by plumage color. Car models come in many paint colors, so paint should not be a class cue there. A faithful model should therefore place substantially more linear-layer weight on color scores for CUB than for Cars without being told to. We also test the known weakness of the design. A single global code cannot explain a cast shadow on one wing. We therefore compare against a variant with a coarse 2×2 grid of appearance codes and measure whether local shadows in the rendered set break the global version.

Baselines

The naive reference is vanilla ProtoPNet from This looks like that. It reports 78.0% on CUB with VGG19 against 75.1% for the plain VGG19, 84.8% for its combined ensemble, and 91.4% for the combined model on Stanford Cars. It shows how much entanglement costs when nothing is done about it.

The strongest existing competitor is EvalProtoPNet from Is ProtoPNet Really Explainable?. It reports accuracy up to 88.5% on CUB and a consistency score of 70.6% with ResNet34. It is the strongest because it targets exactly the instability and inconsistency we target and already has the best reported accuracy among the prototype models in the file. Deformable ProtoPNet, at 87.8% on CUB, is the second strong competitor, since it handles the spatial side of geometry. We will retrain both with the same backbone, input resolution, number of prototypes per class, epoch budget, and hyperparameter search budget as our model, rather than copying their numbers. We will report our reproductions next to the published figures.

Beating EvalProtoPNet means three things together. Clean CUB accuracy must be within about one point of our reproduction, and consistency must be at least as high. Accuracy and prototype-activation stability must be clearly higher on the lit and relit test sets. Color-intervention and lighting-intervention faithfulness must be higher on the extended FunnyBirds set. On FunnyBirds, the reference point for single-deletion correctness under the similarity-map protocol is ProtoPNet's 0.73 from Revisiting FunnyBirds. No reported result was found on Lacuna for EvalProtoPNet or Deformable ProtoPNet on FunnyBirds, so we will measure these ourselves.

Three ablations isolate the key ingredient. The first removes the per-image appearance code but keeps the separate shape and color prototypes. This tests whether factorized scores alone help. The second keeps the code but lets the shape head see it. This tests whether the one-way bottleneck matters. The third removes the adversarial class penalty on the code. This tests whether the code becomes a hidden shortcut that leaks class information past the interpretable layer, which is the leakage concern raised in the concept-bottleneck literature.

Why not just…?

Why not just train ProtoPNet with heavy color jitter and relighting augmentation? This is the most serious alternative, and we treat it as a primary baseline, with the same augmentation strength we use on our shape branch. Augmentation buys invariance by making all color information unreliable. Where color is causal, as in bird species or in our color-only FunnyBirds pairs, that should cost accuracy. Where it does not cost accuracy, the explanation still cannot say whether color mattered. The color-only species pairs settle this directly. If jittered ProtoPNet matches our model on those pairs and on relit stability, the factorization is not needed for robustness. The remaining contribution would then rest only on factor-separated explanations, and we would say so.

Why not just rely on EvalProtoPNet's shallow-deep alignment, which already stabilizes prototypes? Its alignment target is shallow convolutional features, and those respond strongly to contrast and illumination. Its reported stability is measured under small perturbations, not lighting changes. The relit FunnyBirds set and photometrically shifted CUB test sets measure whether that stability carries over. If it does, our advantage shrinks to the explanation format.

Why not just preprocess images into intrinsic components, such as albedo and normals, and run ProtoPNet on those? StyleGAN knows Normal, Depth, Albedo, and More shows that such components are recoverable, but only after an imperfect and expensive latent inversion for each image. Any decomposer's errors would also become invisible parts of the explanation. We will include a cheaper version as a baseline: feed-forward albedo and shading estimates from an off-the-shelf decomposer, with ProtoPNet trained on the albedo image. If it matches us, a fixed front end is enough.

Why not just use DISC to find and cure appearance shortcuts? DISC reports worst-group gains of 7.5% on MetaShift, but it repairs only the spurious concepts its concept bank names, and it uses diffusion-generated data. We will run it on the relit test sets only if compute allows. Our argument is architectural: lighting variation not named in advance should still be absorbed by the code.

Proposed Experiments

The decisive experiment uses the extended FunnyBirds renderer. We train under a narrow lighting range and test under disjoint lighting conditions. We report classification accuracy on color-only and shape-only species pairs. We report the change in each prototype's shape and color scores under recoloring, relighting, and part deletion, using similarity maps. We also report the standard FunnyBirds correctness, completeness, and background-independence scores.

The success signature has four parts. First, lighting changes should leave both scores nearly unchanged. Second, recoloring should move only color scores. Third, color-only pairs should stay accurate where jittered ProtoPNet fails. Fourth, the first ablation, without the appearance code, should lose most of the lighting stability, because that pins the gain on the per-image code.

On real data, we report CUB and Stanford Cars accuracy on clean test sets and on test sets with global exposure and white-balance shifts, together with the consistency and stability metrics of Huang et al. on CUB part annotations. The Cars-versus-CUB color-weight ratio is reported as a faithfulness check that requires no labels.

The idea fails in either of two cases. If jittered ProtoPNet matches us everywhere, including on color-only pairs, the factorization adds nothing. If our clean CUB accuracy falls more than a point or two below the EvalProtoPNet reproduction, the factorization is paying for interpretability with accuracy, which is the trade-off it was meant to remove.