Inferensys

Glossary

Integrated Gradients

An axiomatic attribution method that assigns importance scores to input features by accumulating the gradients of a model's output along a straight-line path from a neutral baseline to the actual input.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
AXIOMATIC FEATURE ATTRIBUTION

What is Integrated Gradients?

A foundational interpretability method that assigns importance scores to input features by accumulating gradients along a straight-line path from a baseline to the actual input, satisfying key axioms like sensitivity and implementation invariance.

Integrated Gradients is an attribution method that quantifies the contribution of each input feature to a neural network's prediction by computing the path integral of gradients along a straight line from a non-informative baseline input (e.g., a zero vector) to the actual input. This aggregation of gradients satisfies the Sensitivity axiom, ensuring that if a feature differs from the baseline and influences the output, it receives a non-zero attribution.

The method's Implementation Invariance guarantees that functionally equivalent networks yield identical attributions, a critical property for auditing complex RF models. For wireless signals, the baseline is often a zero-signal or noise floor, and the path traces the emergence of a specific modulation or emitter fingerprint, providing a pixel-level saliency map on the IQ sample or spectrogram.

AXIOMATIC ATTRIBUTION

Key Properties of Integrated Gradients

Integrated Gradients is defined by a set of mathematical axioms that distinguish it from other attribution methods. These properties ensure the feature importance scores are both theoretically sound and practically reliable for debugging and auditing neural networks.

01

Sensitivity (Completeness)

The sum of all feature attributions equals the difference between the model's output at the input and the output at the baseline. This conservation property ensures no importance is created or destroyed during the attribution process.

  • If a feature differs from the baseline and changes the output, it receives non-zero attribution
  • If the input and baseline produce identical outputs, all attributions are zero
  • Provides a global accounting of prediction responsibility
02

Implementation Invariance

Two functionally equivalent networks—networks that produce identical outputs for all possible inputs—always receive identical attributions. This property is critical for model auditing because it guarantees the explanation reflects the mathematical function learned, not the arbitrary structural choices of the implementation.

  • Attributions are invariant to architectural differences
  • Eliminates gaming of explanations through network restructuring
  • Ensures consistency across different framework implementations
03

Linearity

If a model is a linear combination of two sub-models, the attribution is the same linear combination of the individual attributions. This compositional property enables attribution for ensemble models and simplifies analysis of modular architectures.

  • Supports attribution for stacked or ensembled models
  • Preserves mathematical relationships between model components
  • Enables decomposition of complex predictions into sub-component explanations
04

Symmetry Preservation

Two input variables that play identical roles in the network and have identical values receive identical attributions. This fairness axiom prevents the attribution method from arbitrarily favoring one symmetric feature over another.

  • Guarantees equal treatment of functionally equivalent features
  • Critical for applications where feature parity is legally mandated
  • Prevents spurious attribution asymmetries in symmetric architectures
05

Path Integral Formulation

Attributions are computed by accumulating gradients along a straight-line path from a baseline input to the actual input. This path integral satisfies the fundamental theorem of calculus for multivariate functions and is the mechanism that enforces the Sensitivity axiom.

  • The baseline represents an informationless reference point (e.g., black image, zero signal)
  • Gradients are sampled at interpolated points: baseline + α × (input - baseline)
  • The number of interpolation steps controls the approximation accuracy
06

Baseline Selection Sensitivity

The choice of baseline fundamentally shapes the attribution. A baseline should represent the absence of signal for the domain. For RF applications, common baselines include zero-valued IQ samples, thermal noise, or a carrier-only signal.

  • Poor baseline choice produces misleading attributions
  • Domain expertise is required to define a meaningful neutral reference
  • Multiple baselines can be averaged to improve robustness
INTERPRETABILITY

Frequently Asked Questions

Common questions about applying Integrated Gradients to explain neural network decisions on raw radio frequency data.

Integrated Gradients is a model-agnostic feature attribution method that assigns an importance score to each input feature by accumulating the gradients of the model's output with respect to the input along a straight-line path from a chosen baseline to the actual input. The method satisfies two fundamental axioms: Sensitivity, which requires that a feature receiving a non-zero attribution must differ from the baseline and impact the output, and Implementation Invariance, which ensures that functionally equivalent networks produce identical attributions. For an RF input tensor x and baseline x', the integrated gradient for the i-th feature is computed as:

code
IG_i(x) = (x_i - x'_i) × ∫_{α=0}^{1} ∂F(x' + α(x - x')) / ∂x_i dα

In practice, the integral is approximated using a Riemann sum over m steps, typically 50-200, interpolating between the baseline and the input. The choice of baseline is critical: for IQ samples, a zero baseline (all zeros) represents an absence of signal, while a noise baseline drawn from the receiver's thermal noise floor provides a more physically meaningful reference point for identifying which time-frequency bins contributed to a modulation classification decision.

ATTRIBUTION METHOD COMPARISON

Integrated Gradients vs. Other Attribution Methods

A feature-level comparison of Integrated Gradients against SHAP, LIME, and Grad-CAM for explainability in RF machine learning models.

FeatureIntegrated GradientsSHAPLIMEGrad-CAM

Axiomatic Foundation

Axioms: Sensitivity, Implementation Invariance

Axioms: Efficiency, Symmetry, Additivity (Shapley)

No formal axioms; local fidelity

No formal axioms; class-discriminative localization

Baseline Requirement

Model Agnostic

Computational Cost

Moderate (50-300 steps)

High (exponential sample complexity)

Low to Moderate (perturbation-based)

Low (single backward pass)

Attribution Granularity

Per-pixel/sample

Per-pixel/sample

Per super-pixel/segment

Coarse spatial grid (14x14 to 28x28)

RF Applicability

Raw IQ sample attribution

Feature-level RF fingerprint importance

Local surrogate for any RF classifier

Spectrogram/Time-Frequency heatmaps only

Saturation Sensitivity

Low (path integral avoids zero gradients)

Low (Shapley values handle interactions)

High (local surrogate may miss global patterns)

High (zero-gradient regions produce no activation)

Implementation Complexity

Moderate (custom gradient path)

High (requires many model evaluations)

Low (off-the-shelf surrogate models)

Low (hook final convolutional layer)

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.