Inferensys

Glossary

AOPC

AOPC (Area Over the Perturbation Curve) is a faithfulness metric that evaluates an attribution map by measuring the drop in a model's prediction probability as the most salient nucleotides are sequentially perturbed.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
AREA OVER THE PERTURBATION CURVE

What is AOPC?

AOPC is a faithfulness metric that evaluates the quality of a feature attribution map by measuring the degradation in model performance as the most salient input features are sequentially removed or perturbed.

Area Over the Perturbation Curve (AOPC) is a quantitative metric for evaluating the faithfulness of an attribution map. It measures the drop in a model's prediction probability as the most salient nucleotides—those assigned the highest importance scores—are sequentially perturbed or masked. A steep, sustained drop yields a high AOPC, indicating that the attribution map accurately identifies the genomic features truly driving the model's decision logic.

The metric is calculated by iteratively removing the top k features, recording the model's output at each step, and computing the area over the resulting curve of prediction probability versus the fraction of perturbed features. In genomic sequence models, this often involves replacing high-attribution nucleotides with a baseline token. AOPC is closely related to other faithfulness metrics like the infidelity measure and is a core component of ROAR benchmarking frameworks.

FAITHFULNESS METRIC

Key Characteristics of AOPC

Area Over the Perturbation Curve (AOPC) is a foundational metric for evaluating the faithfulness of genomic attribution maps. It quantifies how well an interpretability method identifies the nucleotides truly driving a model's prediction by measuring the degradation in performance as salient features are sequentially removed.

01

Core Mechanism: Sequential Perturbation

AOPC operates by iteratively masking the most salient nucleotides identified by an attribution map and recording the model's prediction probability at each step. The process involves:

  • Ranking all input positions by their attribution scores (highest to lowest)
  • Perturbing the top-k most salient features (e.g., replacing them with a baseline token or reference allele)
  • Recording the drop in the target class probability after each perturbation
  • Plotting the probability curve as a function of the fraction of perturbed features The area over this curve represents the total explanatory power of the attribution method.
Top-k
Perturbation Strategy
MoRF
Standard Removal Order
02

MoRF vs. LeRF: Two Evaluation Paradigms

AOPC can be computed under two complementary perturbation orders that test different aspects of attribution quality:

  • MoRF (Most Relevant First): Removes features in descending order of attribution. A steep drop in probability indicates the method correctly identified the most critical nucleotides. This is the standard AOPC calculation.
  • LeRF (Least Relevant First): Removes features in ascending order of attribution. The probability should remain stable until the least relevant features are exhausted, confirming that low-attribution regions are truly non-essential. A high-quality attribution map exhibits a large AOPC under MoRF and a small AOPC under LeRF, demonstrating both sensitivity and specificity.
MoRF
Tests Sensitivity
LeRF
Tests Specificity
03

Mathematical Formulation

Formally, AOPC is defined as the area over the perturbation curve for the top-L most relevant features:

AOPC(L) = (1/L) * Σ_{k=1}^{L} [f(x) - f(x_{MoRF}^{(k)})]

Where:

  • f(x) is the model's prediction probability for the original input sequence
  • x_{MoRF}^{(k)} is the input with the top-k most relevant features perturbed
  • L is the total number of perturbation steps evaluated

A higher AOPC value indicates a more faithful attribution map, as removing the identified features causes a larger cumulative drop in prediction confidence. The metric is often normalized by the total number of features to enable comparison across sequences of different lengths.

f(x)
Original Prediction
Σ
Cumulative Summation
04

Perturbation Strategies for Genomic Sequences

The choice of perturbation baseline critically impacts AOPC evaluation in genomic models:

  • Zeroing/Mean Imputation: Replacing nucleotides with a zero embedding vector or the mean activation. Simple but may create out-of-distribution inputs that artificially degrade performance.
  • Reference Nucleotide Substitution: Replacing the salient base with a fixed reference (e.g., 'A' or 'N'). Common in variant effect prediction contexts.
  • Dinucleotide Shuffling: Preserving local nucleotide composition while destroying motif syntax. More conservative and maintains sequence statistics.
  • Gaussian Noise Injection: Adding calibrated noise to the embedding at salient positions. Tests robustness without creating artificial sequence artifacts. The selected strategy must balance biological plausibility with the need to isolate the contribution of specific features.
Shuffling
Conservative Baseline
Zeroing
Aggressive Baseline
05

Relationship to Other Faithfulness Metrics

AOPC belongs to a family of perturbation-based faithfulness metrics that evaluate attribution maps through causal intervention:

  • AOPC measures the area over the probability curve, providing a summary statistic of degradation across all perturbation steps.
  • Log-odds Score: Evaluates the average log-odds difference between original and perturbed predictions, often used as a variant of AOPC.
  • ROAR (RemOve And Retrain): Extends AOPC by retraining the model after feature removal, testing whether the attributions identify features the model genuinely relies on rather than spurious correlations.
  • Infidelity Measure: Quantifies the expected error between the perturbation in input space and the corresponding perturbation in the attribution map itself. AOPC is often preferred for its intuitive interpretation and direct connection to the model's decision boundary.
ROAR
Retraining Extension
Infidelity
Complementary Metric
06

Limitations and Sanity Checks

Despite its widespread use, AOPC has known limitations that must be addressed through rigorous sanity checks:

  • Out-of-Distribution (OOD) Artifacts: Perturbed sequences may fall outside the training distribution, causing prediction drops unrelated to feature importance. Mitigation: Use conservative baselines like dinucleotide shuffling.
  • Correlated Feature Masking: In genomic sequences, adjacent nucleotides often contribute jointly to motif recognition. Removing one may not degrade performance if its neighbor compensates.
  • Model Parameter Randomization Test: A critical sanity check where model weights are progressively randomized. A valid attribution method should produce different (degraded) AOPC scores on randomized models.
  • Data Randomization Test: Training on permuted labels should yield attributions with poor AOPC, confirming the metric captures learned rather than arbitrary patterns.
OOD
Primary Limitation
Sanity
Required Validation
AOPC METRIC

Frequently Asked Questions

Explore the mechanics, applications, and limitations of Area Over the Perturbation Curve (AOPC), the standard metric for evaluating the faithfulness of genomic sequence attribution maps.

Area Over the Perturbation Curve (AOPC) is a faithfulness metric that evaluates an attribution map by measuring the drop in a model's prediction probability as the most salient nucleotides are sequentially perturbed. The process works by ranking input nucleotides from highest to lowest importance based on an attribution method, then iteratively replacing them with a neutral baseline value. At each step, the model's output probability for the target class is recorded. Plotting the number of perturbed features against the prediction probability yields a perturbation curve. The AOPC is calculated as the area over this curve, representing the total decrease in model confidence. A higher AOPC indicates a more faithful attribution map, as it confirms that the features identified as important are genuinely causal to the prediction.

FAITHFULNESS METRIC COMPARISON

AOPC vs. Other Faithfulness Metrics

Comparative analysis of Area Over the Perturbation Curve against alternative faithfulness evaluation methods for genomic attribution maps.

FeatureAOPCInfidelity MeasureROARSensitivity Analysis

Core Mechanism

Sequential perturbation of top-ranked features; measures prediction drop curve

Expected error between input perturbation and attribution perturbation

Iterative retraining after removing top-attributed features

Variance decomposition of output uncertainty across input features

Perturbation Strategy

Progressive masking or substitution of salient nucleotides

Significant perturbation with linear approximation

Hard removal of features followed by full model retraining

Statistical sampling of input distributions

Requires Retraining

Computational Cost

Low (single forward pass per perturbation step)

Low to moderate (requires gradient computation)

Very high (multiple full training cycles)

Moderate (requires multiple sampling iterations)

Captures Feature Interactions

Sensitive to Model Parameter Randomization

Granularity

Nucleotide-level to region-level

Nucleotide-level

Region-level

Nucleotide-level to region-level

Primary Output

Area under probability drop curve (scalar)

Infidelity score (scalar)

Retrained model accuracy degradation

Variance attribution per feature

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.