Integrated Gradients is a model-specific attribution method that quantifies the contribution of each input feature to a deep network's prediction by integrating the gradients of the output with respect to the input along a straight-line path from a chosen baseline to the actual input. This satisfies the completeness axiom, ensuring the sum of all feature attributions equals the difference between the model's output at the input and the baseline.
Glossary
Integrated Gradients

What is Integrated Gradients?
A deep learning interpretability method that computes feature contributions by accumulating gradients along a path from a neutral baseline to the input.
The method requires selecting a baseline representing the absence of signal, such as a zero vector for images or a historical average transaction for financial fraud anomaly detection. By accumulating gradients along the interpolation path, Integrated Gradients avoids the saturation problem of raw gradients and provides a theoretically grounded, audit-ready explanation for why a specific transaction was flagged.
Key Properties of Integrated Gradients
Integrated Gradients is a model-specific attribution method for deep networks that satisfies two fundamental axioms: Sensitivity and Implementation Invariance. It computes feature contributions by accumulating gradients along a straight-line path from a non-informative baseline to the actual input.
The Axiomatic Foundation
Integrated Gradients is the only path-based attribution method known to satisfy both the Sensitivity and Implementation Invariance axioms simultaneously.
- Sensitivity (a): If an input differs from the baseline in exactly one feature and produces a different prediction, that feature must receive non-zero attribution.
- Sensitivity (b): If the model's output is mathematically independent of a feature, that feature must receive zero attribution.
- Implementation Invariance: Two functionally equivalent networks—regardless of architecture—must produce identical attributions. This eliminates the gradient saturation problem that plagues simple gradient-based saliency maps.
The Path Integral Mechanism
The method computes attribution by integrating gradients along a straight-line path from a baseline input x' to the actual input x.
The core formula:
codeIG_i(x) = (x_i - x'_i) × ∫[α=0 to 1] ∂F(x' + α(x - x'))/∂x_i dα
Key components:
- Baseline (x'): A neutral reference point representing the absence of signal—typically a black image, zero embedding vector, or average transaction profile.
- Interpolation steps: The integral is approximated using Riemann summation across m steps (typically 20–300).
- Gradient accumulation: Gradients are computed at each interpolated point and averaged, capturing how the model's output changes as features scale from absent to present.
Completeness and Conservation
Integrated Gradients satisfies the Completeness axiom: the sum of all feature attributions equals the difference between the model's output at the input and the baseline.
Why this matters for fraud detection:
- The total attribution sum precisely accounts for the deviation from a 'normal' baseline transaction to the flagged anomalous transaction.
- No attribution is lost or created—every unit of the anomaly score is distributed among the input features.
- This enables auditable explanations: a compliance officer can verify that the sum of individual feature contributions exactly reconstructs the model's fraud score.
This property is a direct consequence of the fundamental theorem of calculus applied along the integration path.
Baseline Selection Strategy
The choice of baseline critically shapes the explanation. The baseline must represent 'absence of information' in the model's input space.
Common baselines for fraud models:
- Zero vector: For normalized numerical features, representing a null transaction.
- Global average: The mean transaction vector across the training distribution.
- Gaussian noise baseline: Multiple baselines drawn from a noise distribution, with attributions averaged to reduce baseline arbitrariness.
- Nearest-neighbor baseline: The closest non-fraudulent transaction in embedding space.
Best practice: Use multiple baselines and average the resulting attributions to mitigate the sensitivity of explanations to any single baseline choice. This is known as Expected Gradients.
Application to Tabular Fraud Data
While originally developed for image classifiers, Integrated Gradients adapts effectively to the tabular, high-dimensional feature spaces typical in financial fraud detection.
Implementation considerations:
- Feature scaling: All features must be normalized to a common range before integration to ensure the path is geometrically meaningful.
- Categorical features: Require embedding layers; the baseline is set to the embedding of a designated 'unknown' or 'absent' category.
- Temporal features: Time-based features (hour of day, days since last transaction) use a baseline representing a 'neutral' temporal state.
- Interaction effects: Integrated Gradients captures feature interactions implicitly through the gradient path, unlike additive methods that assume independence.
Example: For a flagged wire transfer, IG can reveal that the combination of high amount AND unusual beneficiary country—not either alone—drove the anomaly score.
Comparison with SHAP and LIME
Integrated Gradients occupies a distinct position in the explainability landscape, with specific trade-offs relative to model-agnostic alternatives.
IG vs. SHAP:
- IG is model-specific (requires gradient access); SHAP is model-agnostic.
- IG satisfies Implementation Invariance; Kernel SHAP does not.
- SHAP satisfies the Shapley axioms from game theory; IG satisfies path-based axioms.
- IG is computationally cheaper for deep networks than Kernel SHAP.
IG vs. LIME:
- IG provides global path consistency; LIME explanations are local linear approximations that may be unstable.
- IG requires no sampling of perturbed instances; LIME requires careful perturbation design.
- IG is deterministic given a fixed baseline; LIME involves randomness in sampling.
Frequently Asked Questions
Explore the mechanics of Integrated Gradients, a foundational attribution method for explaining deep neural network predictions in fraud detection and beyond.
Integrated Gradients is a model-specific attribution method that computes the contribution of each input feature to a deep network's prediction by integrating the gradients of the model's output with respect to the input along a straight-line path from a non-informative baseline to the actual input. The method satisfies two fundamental axioms: Sensitivity (if a feature changes the prediction, it gets non-zero attribution) and Implementation Invariance (attributions are identical for functionally equivalent networks). For a fraud model analyzing a transaction, the baseline might be a vector of zeros or historical averages. The integral of gradients accumulates how each feature—like transaction amount or account age—pushes the prediction away from the baseline, providing a theoretically grounded decomposition of the final anomaly score.
Integrated Gradients vs. Other Attribution Methods
A technical comparison of Integrated Gradients against other prominent feature attribution methods used for explaining deep learning model predictions in financial fraud detection.
| Feature | Integrated Gradients | SHAP | LIME | Saliency Maps |
|---|---|---|---|---|
Axiomatic Guarantee | Satisfies Sensitivity and Implementation Invariance | Satisfies Shapley axioms (efficiency, symmetry, dummy, additivity) | No axiomatic guarantees | No axiomatic guarantees |
Model Compatibility | Differentiable models only | Model-agnostic | Model-agnostic | Differentiable models only |
Baseline Requirement | Requires neutral baseline input | Uses background dataset for expectation | No baseline required | No baseline required |
Computational Cost | High (50-300 integration steps) | Very High (exponential coalitions; optimized via KernelSHAP) | Moderate (local surrogate training) | Low (single backward pass) |
Local vs. Global | Local (per-instance) | Local and global (via aggregation) | Local (per-instance) | Local (per-instance) |
Handles Feature Interactions | ||||
Output Completeness | Sum equals prediction difference from baseline | Sum equals prediction minus expected value | No completeness guarantee | No completeness guarantee |
Saturation Sensitivity | Avoids saturation problem via path integration | Avoids saturation via Shapley averaging | Susceptible to local fidelity issues | Susceptible to gradient saturation |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Integrated Gradients is a foundational axiom in the attribution landscape. The following concepts form the critical context for applying, comparing, and auditing this technique in high-stakes financial environments.
Axiomatic Attribution
Integrated Gradients uniquely satisfies the Sensitivity and Implementation Invariance axioms. Sensitivity dictates that if a feature changes the output, it must receive non-zero attribution; Implementation Invariance ensures functionally equivalent networks yield identical explanations. This mathematical rigor makes it a defensible choice for model risk management (MRM) audits.
Baseline Selection
The choice of baseline is the most critical hyperparameter. A black image or zero vector is standard in vision, but in fraud detection, a 'normal' transaction profile (e.g., average spending vector) is required. The integral path from this neutral baseline to the suspicious input defines the feature contribution, making domain-specific baseline engineering essential for valid reason codes.
Path Integral Computation
The method computes the path integral of gradients along a straight line from the baseline to the input. In practice, this is approximated using the Riemann sum:
IntegratedGrads_i(x) = (x_i - x'_i) × Σ (∂F(x' + α(x - x')) / ∂x_i) × Δα- The number of steps (
m_steps) balances fidelity against latency in real-time fraud scoring pipelines.
Gradient Saturation Problem
Standard saliency maps fail when the network's output saturates (gradients near zero) despite strong feature presence. Integrated Gradients solves this by aggregating gradients along the entire path, capturing feature impact even in flat regions of the loss landscape. This is vital for deep autoencoder architectures used in anomaly detection.
Comparison to SHAP
Both methods satisfy Shapley value axioms under specific conditions. Integrated Gradients is model-specific (requires gradient access) and computationally efficient for deep networks. SHAP is model-agnostic but often requires more sampling. For deep learning fraud models, Integrated Gradients provides a direct, white-box alternative to KernelSHAP's approximations.
Adversarial Robustness
Attribution methods are vulnerable to adversarial perturbations. An attacker can craft a transaction that appears normal but fools the gradient explanation. Techniques like SmoothGrad (averaging gradients over noisy inputs) can be combined with Integrated Gradients to harden explanations against adversarial machine learning evasion in production.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us