Integrated Hessians is an attribution method that explains a neural network's prediction by decomposing it into both first-order feature effects and second-order feature interactions. While Integrated Gradients captures the independent contribution of each feature, Integrated Hessians uses the Hessian matrix—the gradient of the gradient—to quantify how pairs of features jointly influence the output, satisfying a higher-order completeness axiom.
Glossary
Integrated Hessians

What is Integrated Hessians?
Integrated Hessians extends the axiomatic Integrated Gradients method to the second order, capturing feature interactions and model curvature for a more complete attribution.
The method integrates the Hessian along a straight-line path from a baseline input to the actual input, ensuring implementation invariance. This reveals non-linear interaction effects that first-order methods miss, such as the synergistic relationship between two pixels in an image or two words in a sentence, providing a more faithful decomposition of a deep model's complex decision surface.
Key Features of Integrated Hessians
Integrated Hessians extends Integrated Gradients by incorporating the Hessian matrix to capture feature interactions and curvature, providing a more complete attribution for highly non-linear models.
Second-Order Interaction Capture
Unlike first-order methods that assume independent features, Integrated Hessians explicitly models feature interactions by integrating the Hessian matrix along the path from baseline to input.
- Captures pairwise interactions between features that first-order methods miss
- Essential for models where features combine non-additively (e.g., XOR patterns)
- Decomposes the model output into main effects and interaction effects
- Provides a complete functional decomposition satisfying the completeness axiom
Mathematical Foundation
The method computes attributions by integrating both the gradient (first derivative) and the Hessian (second derivative) along a straight-line path.
- Path integral: ∫ (∇f + H·(x - x')) dα from α=0 to α=1
- The Hessian matrix H captures local curvature and feature coupling
- Interaction between features i and j is quantified by the off-diagonal Hessian entries ∂²f/∂xᵢ∂xⱼ
- Satisfies the completeness axiom: sum of all attributions equals f(x) - f(baseline)
Interaction Completeness
Integrated Hessians provides a full decomposition of the model output into individual feature contributions and all pairwise interaction terms.
- Main effects: Attributions for individual features acting alone
- Interaction effects: Attributions for pairs of features acting jointly
- The sum of all main and interaction effects exactly reconstructs the output difference
- Enables auditing of synergistic and antagonistic feature relationships
- Critical for domains like genomics where gene-gene interactions drive outcomes
Comparison to Integrated Gradients
While Integrated Gradients provides only first-order attributions, Integrated Hessians reveals the full interaction structure.
- Integrated Gradients: Captures main effects only; assumes feature independence
- Integrated Hessians: Captures main effects + all pairwise interactions
- Trade-off: Higher computational cost due to Hessian computation (O(n²) vs O(n))
- Use Integrated Gradients for quick feature ranking; use Integrated Hessians when interactions matter
- Both methods share the same axiomatic properties (completeness, sensitivity, implementation invariance)
Implementation Considerations
Computing the full Hessian for high-dimensional inputs is computationally expensive, requiring optimization strategies.
- Hessian-vector products avoid materializing the full n×n matrix
- Use stochastic sampling along the integration path to reduce computation
- Leverage automatic differentiation frameworks (PyTorch, JAX) for efficient second-order gradients
- Sparsity assumptions: Often only top-k interactions are practically significant
- Approximation techniques like Hessian diagonal can trade accuracy for speed
Practical Applications
Integrated Hessians is particularly valuable in domains where feature interactions drive predictions.
- Healthcare: Identifying drug-drug interactions and gene-environment effects
- Finance: Modeling non-linear interactions between market factors in risk models
- NLP: Understanding how word pairs jointly influence sentiment or entailment
- Computer vision: Explaining how image regions interact to form object representations
- Scientific ML: Validating that models learn known physical interaction laws
Frequently Asked Questions
Explore the mechanics and applications of Integrated Hessians, a second-order attribution method that captures feature interactions and curvature in deep neural networks.
Integrated Hessians is a second-order feature attribution method that extends Integrated Gradients to capture feature interactions and the curvature of a model's decision boundary. While first-order methods like Integrated Gradients decompose a prediction into the independent contributions of individual features, Integrated Hessians decomposes the prediction into both main effects and pairwise interaction terms.
It works by computing the Hessian matrix—the matrix of second-order partial derivatives of the model's output with respect to the input—and integrating it along a straight-line path from a baseline input to the actual input. The diagonal elements of this integrated Hessian represent the main effects (analogous to Integrated Gradients), while the off-diagonal elements quantify how pairs of features interact to influence the prediction. This provides a complete decomposition of the model's output, satisfying the completeness axiom by accounting for all first-order and second-order contributions.
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
Explore the foundational concepts and extensions that contextualize Integrated Hessians within the broader landscape of gradient-based interpretability and second-order attribution.
Hessian Matrix
The square matrix of second-order partial derivatives of a scalar-valued function. In neural networks, it captures the local curvature of the loss landscape with respect to the input features.
- Encodes pairwise feature interactions
- Diagonal elements represent the rate of change of gradients
- Off-diagonal elements quantify how one feature's gradient changes with another feature
Feature Interactions
The phenomenon where the effect of one input variable on a model's prediction depends on the value of another variable. Integrated Hessians explicitly quantifies these non-additive effects.
- Captured by off-diagonal Hessian terms
- Essential for explaining models with multiplicative or logical operations
- Missed entirely by first-order attribution methods like vanilla Integrated Gradients
Axiomatic Attribution
The mathematical framework that defines desirable properties for feature attribution methods. Integrated Hessians extends these axioms to the domain of interaction attribution.
- Completeness: Total attributions sum to the output difference
- Implementation Invariance: Identical functions yield identical attributions
- Interaction Completeness: The sum of all pairwise interactions plus main effects equals the total output
Path Methods
A class of attribution techniques that define feature importance by integrating derivatives along a continuous path in the input space. Integrated Hessians generalizes this to second-order path integration.
- Straight-line paths are the default for simplicity
- Alternative paths can encode domain-specific priors
- The choice of baseline anchors the explanation context
Shattered Gradient Problem
A phenomenon in deep networks where the raw gradient with respect to the input resembles white noise, providing no coherent saliency map. Integrated Hessians partially mitigates this by examining second-order structure.
- Caused by highly non-convex loss surfaces
- Averaging over paths reduces noise
- Hessian-based analysis can reveal structure invisible to gradients alone

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