Many tools for explaining image classifiers rest on one test: hide the pixels an explanation calls important and see how far the model's confidence falls. The trouble is that a black or gray box is not a natural image. The classifier may lose confidence because it has never seen such boxes, not because the hidden pixels mattered. Faithfulness Under the Distribution (FUD) quantified the problem. An off-the-shelf out-of-distribution detector flags blacked-out images with nearly 90% accuracy. FUD's fix is to fill the hole with a diffusion model, a generator that turns noise into images by repeated denoising. It steers the fill away from the predicted class so the generator cannot paint the evidence back in. This works, but it takes seconds per image and only runs at the diffusion model's fixed resolution.
We propose a cheaper and more constrained version of the same idea, built on an implicit neural representation. This is a network that stores an image as a continuous function from coordinates $(x,y)$ to color, rather than as a pixel grid. CoordFill inpaints by predicting the weights of a small coordinate network and evaluating it only inside the hole. Our observation is that those few generated weights act as a low-dimensional chart of plausible fills. To remove class evidence, we take a few gradient steps on the weights rather than on the pixels. The fill can then only move within the family of textures the inpainter considers natural, so it cannot turn into adversarial noise. The guidance signal comes from classifiers that are separate from the model being explained, which keeps the evaluation from being gamed.
Core Claim
Deletion and insertion scores computed with weight-steered implicit infilling should match the distribution-faithfulness of diffusion-based FUD. Concretely, they should give near-chance out-of-distribution detectability and monotonic confidence curves. They should do so at a fraction of the cost and at native resolution. Steering in weight space should also produce fills that suppress class evidence without being adversarial. Pixel-space steering should fail this test, and unguided fast inpainting should fail it in the opposite direction by re-hallucinating evidence.
The role of the continuous representation is specific. It gives a small, mask-restricted parameter space in which "remove evidence" can be optimized safely. It also lets us evaluate high-resolution images, such as fine-grained pets and histopathology slides, without resampling them down to 224×224.
Research Program
The method has three parts.
Fine-tuning the inpainter. We start from CoordFill. It has a parameter-generation network that reads a downsampled context image and emits the weights $\phi$ of a small coordinate network, and that network is queried only at masked coordinates. We fine-tune it on ImageNet training images using the mask shapes that attribution methods actually produce: top-$k$ scattered pixels, superpixel sets and patch grids. Its original training masks came from free-form inpainting.
Steering the generated weights. Given an image $x$, a mask $m$ and the evaluated class $y$, we refine the generated weights by minimizing the following objective, using a handful of steps:
$$ \mathcal{L}(\phi) = \max\big(0,\ \log p_g(y \mid x_\phi) - \tau_y\big) + \lambda \,\|\phi - \phi_0\|^2 . $$
The symbols are as follows. $x_\phi$ is the image with the hole filled by the coordinate network with weights $\phi$. $\phi_0$ is the weight vector the inpainter originally predicted. $p_g$ is a guide ensemble of classifiers that are disjoint from the model under evaluation. $\tau_y$ is the guide's average log-probability for class $y$ on images of other classes. $\lambda$ controls how far the weights may drift from the inpainter's prior.
The hinge only penalizes fills that carry more evidence for $y$ than a typical non-$y$ image does. This addresses a weakness of FUD's unbounded corrective term $-\nabla_x \log P(y\mid x)$. An unbounded term can inject evidence against $y$, which would artificially steepen every deletion curve.
Using the infiller in standard protocols. The resulting infiller plugs into insertion and deletion curves and into Shapley-style or occlusion attributions. We also use it to test a live disagreement in the field. Missingness Bias Calibration (MCal) fits an affine correction on the logits and argues that missingness bias is a surface artifact of the output layer. FUD and ROAR, which retrains a model from scratch on ablated data, instead treat the bias as a deep problem in the input and internal representations. To compare the two views, we measure the classifier's penultimate-layer features under each removal scheme. The distance between those features and the features of clean images tells us whether calibrating the logits leaves the internal representations off-distribution in ways that change which attribution methods rank first.
The prior work plays three different roles here. FUD and DISCO motivate the approach. DISCO shows that a 1.6M-parameter local implicit function can pull adversarially perturbed images back toward natural ones, but it does not handle missing regions or explanations. CoordFill supplies the mechanism. Goodhart's Law Applies to NLP's Explanation Benchmarks constrains the design: models can learn to detect fixed perturbation signatures, which is why guidance must come from classifiers other than the one being explained.
The work differs from the path-based methods MA-GIG and DDPath. Those methods fix the integration path inside Integrated Gradients. We fix the removal operator used by perturbation explanations and their evaluations.
Baselines
Black-box and mean masking. This is the do-nothing reference point. FUD reports that it produces Kendall's τ "often below 0.30 on ResNet-50," PSNR of 10.49, and near-90% detectability by an out-of-distribution detector. Our method must clearly improve on all three.
FUD. This is the strongest existing method. FUD reports τ "consistently above 0.80" on ResNet-50 and detectability "closer to random guessing" across 1,000 ImageNet-1k validation images with ResNet-50 and ViT-B/16. We will rerun FUD on the identical 1,000 images, with identical masks and attribution maps. We will report wall-clock time on the same GPU. Beating FUD means matching its τ within noise and its detectability, while running at least an order of magnitude faster. At native resolutions where FUD must resample, we will additionally check whether method rankings agree with ROAR.
MCal. We pair MCal with zero masking and train its affine head on the same ablated ImageNet training split we use to fine-tune the inpainter. Our method beats MCal only if it shows higher agreement with ROAR rankings and with planted-evidence ground truth. Equal logit calibration alone does not count.
Ablations. Three ablations isolate the key ingredient. The first is unguided CoordFill, which tests whether guidance matters at all. The second steers pixels directly with the same objective and step budget, which tests whether weight space matters. The third uses the evaluated model itself as the guide, which tests gaming. All variants share the same fine-tuned inpainter and the same number of optimization steps.
For path attribution, the reference number is DDPath-IG's ResNet-50 ImageNet insertion score of 45.1, against 33.8 for plain Integrated Gradients. We report insertion under our infiller alongside that figure, but we do not claim to beat DDPath as an attribution method.
Why not just…?
Why not just use a fast unguided inpainter such as LaMa? At 224×224, LaMa or unguided CoordFill may be fast enough. The open question is whether they reintroduce class evidence into deleted regions, which would flatten deletion curves. This is a real threat to our claim that guidance is needed. The unguided-CoordFill ablation settles it. If unguided fills already reach FUD-level τ and planted-evidence accuracy, we will report that the steering step is unnecessary. The contribution would then shrink to a native-resolution, mask-adapted fast infiller.
Why not just calibrate the logits with MCal? MCal reduces missingness bias on MedQA from 0.161 to 0.000944. It does not touch the input or the hidden activations, and it needs access to the logits. Calibrated logits could still rank attribution methods wrongly if internal features are off-distribution. Our ROAR-agreement and planted-evidence tests measure exactly this. If MCal matches us on both, the input-space view loses this argument, and we will report that outcome.
Why not just run FUD with fewer diffusion steps? A truncated sampler is the natural cheap version of FUD. We include FUD at reduced step counts that match our wall-clock budget and plot τ and detectability against runtime. Our method is only interesting if it dominates that curve.
Why not just blur the masked region? Blur avoids sharp edges, but it leaves low-frequency evidence in place and is itself an unnatural signature that models can learn to detect. We include blur in the detectability and planted-evidence tests rather than arguing the point.
Proposed Experiments
Distribution faithfulness. We follow the FUD protocol on 1,000 ImageNet-1k validation images with ResNet-50 and ViT-B/16. Attributions come from Integrated Gradients, Grad-CAM and SmoothGrad. We report τ, detectability by an out-of-distribution detector, PSNR and seconds per image.
Planted evidence. We train classifiers on Oxford-IIIT Pet and Oxford 102 Flower where, in some classes, a small synthetic mark fully determines the label. This gives ground truth for which attribution is correct. Each removal operator is scored by whether its deletion curve ranks the mark-aligned attribution first.
Adversarial transfer. This is the most important check. For fills steered by the guide ensemble, we measure the confidence drop on the evaluated model and on held-out architectures, and compare against pixel-steered fills. Natural evidence removal should transfer across models. Adversarial suppression should not.
Agreement with ROAR at native resolution. On Oxford-IIIT Pet at native resolution, we compare method rankings from each cheap operator against ROAR rankings retrained at 10–90% removal. ROAR is affordable on this small dataset. We repeat the comparison on BreakHis and CheXpert at native resolution, where diffusion-based FUD must downsample.
No reported result was found on Lacuna for CoordFill applied to classifier-explanation evaluation, or for attribution metrics on BreakHis or CheXpert at native resolution. Those numbers will be new.
References
- Faithfulness Under the Distribution: A New Look at Attribution Evaluation
- CoordFill: Efficient High-Resolution Image Inpainting via Parameterized Coordinate Querying
- Missingness Bias Calibration in Feature Attribution Explanations
- A Benchmark for Interpretability Methods in Deep Neural Networks
- DISCO: Adversarial Defense with Local Implicit Functions
- Goodhart's Law Applies to NLP's Explanation Benchmarks
- Manifold-Aligned Guided Integrated Gradients for Reliable Feature Attribution
- Denoising Diffusion Path: Attribution Noise Reduction with An Auxiliary Diffusion Model