Inferensys

Glossary

Insertion Metric

An evaluation metric that measures the quality of an attribution map by incrementally adding pixels from most to least important into a blurred baseline and recording the increase in model probability.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
ATTRIBUTION EVALUATION

What is Insertion Metric?

The Insertion Metric is a quantitative evaluation criterion that measures the quality of a feature attribution map by incrementally adding pixels from most to least important into a blurred baseline and recording the increase in model probability.

The Insertion Metric evaluates an attribution map's fidelity by starting with a neutral, blurred baseline image and progressively introducing original pixels in descending order of their attributed importance. A higher-quality explanation will cause the model's prediction probability to rise more rapidly, as the most salient features are restored first. The area under the resulting probability curve serves as the final score.

This metric is the complementary counterpart to the Deletion Metric, which measures the drop in probability when pixels are removed. Together, they form a standard evaluation protocol for saliency maps and other feature attribution methods, directly testing whether the identified important regions are sufficient to reconstruct the model's original decision.

EVALUATION PROTOCOL

Key Characteristics of the Insertion Metric

The Insertion Metric provides a quantitative measure of an attribution map's quality by observing how quickly a model's confidence recovers as informative pixels are reintroduced into a blurred baseline.

01

The Core Insertion Mechanism

The metric operates by starting with a baseline input, typically a heavily blurred or zeroed-out image. Pixels are then incrementally added in order of their attributed importance—from the most important to the least important. At each step, the model's softmax probability for the target class is recorded. A high-quality attribution map will cause the probability curve to rise steeply, indicating that the most salient pixels were correctly identified and inserted first.

02

Area Under the Curve (AUC) Quantification

The final score is typically calculated as the Area Under the Insertion Curve (AUC). This summarizes the entire insertion trajectory into a single scalar value.

  • Higher AUC: Indicates a superior attribution map that correctly ranks salient pixels, leading to rapid probability recovery.
  • Lower AUC: Suggests the attribution method failed to distinguish critical features from noise. The AUC provides a direct, comparative benchmark for evaluating different attribution algorithms on the same model and input.
03

Complementary Relationship with Deletion

The Insertion Metric is the direct counterpart to the Deletion Metric. While deletion measures the drop in probability as important pixels are removed, insertion measures the recovery as they are added back. Together, they form a comprehensive evaluation framework:

  • Deletion Curve: Should show a sharp decline.
  • Insertion Curve: Should show a sharp incline. A faithful explanation will simultaneously score well on both metrics, proving it has correctly isolated the information necessary for the prediction.
04

Baseline Sensitivity and Design

The choice of the baseline input is a critical hyperparameter. Common baselines include:

  • Gaussian Blur: Replaces pixel information with local averages, destroying high-frequency details.
  • Constant Value: Sets all pixels to zero (black) or a mean channel value.
  • Noise: Fills the image with random Gaussian noise. The baseline must represent a true absence of information. An unrepresentative baseline can artificially inflate or deflate the metric, making it essential to document the baseline strategy when reporting scores.
05

Information Curve Analysis

Beyond the final AUC, the shape of the insertion curve itself provides diagnostic information. A logarithmic curve that rises instantly suggests the attribution map is highly concentrated on a few critical pixels. A linear curve indicates a more diffuse attribution. Analyzing the curve's gradient at different fractions of inserted pixels helps engineers understand the sparsity and precision of the explanation, revealing whether the model relies on a small, interpretable region or a broad texture pattern.

06

Softmax vs. Logit Evaluation

The metric can be applied to different output layers of the model. While softmax probability is standard for classification, evaluating the logit score (pre-softmax) can be more sensitive to changes in model confidence. Using logits avoids the saturation effect of the softmax function, where probability approaches 1.0 and stops changing. For fine-grained comparisons between attribution methods, monitoring the raw logit insertion curve often reveals distinctions that are compressed in probability space.

ATTRIBUTION EVALUATION

Insertion Metric vs. Deletion Metric

Comparing the two complementary perturbation-based protocols for quantitatively evaluating the faithfulness of feature attribution maps.

PropertyInsertion MetricDeletion Metric

Core Mechanism

Incrementally adds most salient pixels to a blurred baseline

Incrementally removes most salient pixels from the original input

Starting State

Heavily blurred or zeroed baseline image

Original unmodified input image

Progression Direction

Least information to most information

Most information to least information

Ideal Attribution Behavior

Sharp, monotonic increase in probability as pixels are inserted

Sharp, monotonic decrease in probability as pixels are removed

Summary Score

Area Under the Insertion Curve (AUIC)

Area Under the Deletion Curve (AUDC)

Higher Score Indicates

More faithful attribution map

More faithful attribution map

Sensitivity to Baseline Choice

Measures Completeness

INSERTION METRIC

Frequently Asked Questions

Answers to common questions about the Insertion Metric, a key evaluation technique for assessing the quality and faithfulness of feature attribution maps in machine learning models.

The Insertion Metric is a quantitative evaluation criterion that measures the quality of a feature attribution map by incrementally adding pixels from most to least important into a blurred baseline image and recording the increase in the model's target class probability. The process begins with a completely blurred, information-free baseline. Pixels are then reintroduced in the order dictated by the attribution map—the most 'important' pixels first. A high-quality attribution map will cause the model's probability to rise quickly as a small number of truly salient pixels are inserted. The metric is computed as the Area Under the Curve (AUC) of the probability curve as a function of the fraction of pixels inserted. A higher AUC indicates a better explanation, as it means the attribution method correctly ranked the most predictive features. This metric directly evaluates the sufficiency of the top-ranked features for making a correct prediction.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.