FullGrad is an axiomatic attribution method that decomposes a neural network's prediction into a sum of feature-wise importance scores by aggregating two distinct gradient signals: the gradient of the output with respect to the input pixels and the gradient with respect to the bias parameters at every layer. This dual-pathway approach ensures that the sum of all attributed scores exactly equals the model's output difference from a zero baseline, strictly satisfying the completeness axiom.
Glossary
FullGrad

What is FullGrad?
FullGrad is a feature attribution method that satisfies the completeness axiom by aggregating the gradient of the model's output with respect to both the input features and the biases at every layer of the network.
By incorporating bias gradients, FullGrad captures the importance of features that influence the network through additive, non-multiplicative pathways—information that standard input-gradient methods like Saliency Maps or Integrated Gradients inherently miss. The final attribution map is constructed by element-wise multiplying the input with its gradient and summing this with the spatially upsampled bias contributions from all intermediate layers, producing a dense, full-resolution explanation that accounts for the entire signal flow through the network.
Key Features of FullGrad
FullGrad is an attribution method that satisfies the completeness axiom by aggregating gradients with respect to both input features and the bias parameters at every layer of a neural network, providing a mathematically complete decomposition of the output.
Completeness via Bias Aggregation
FullGrad satisfies the completeness axiom by decomposing the model output into a sum of contributions from the input and all intermediate bias terms. Unlike input-gradient-only methods, FullGrad captures the additive bias contributions at each neuron, ensuring that the sum of all attributions exactly equals the model's prediction difference from a zero baseline. This eliminates the missing attribution problem found in methods like vanilla saliency maps.
FullGrad Decomposition Formula
The FullGrad attribution for an input x is computed as:
- Input contribution:
(x ⊙ ∇ₓf(x))— element-wise product of input and input gradient - Bias contributions:
∇_b f(x) · bfor every bias parameter b across all layers - Total attribution: Sum of input contribution and all bias contributions
This formulation ensures that every parameter with a gradient contributes to the explanation, not just the input layer.
Bias as a Structural Prior
FullGrad leverages the bias parameters inherent in most neural network architectures as a structural prior for attribution. Since biases represent learned offsets that shift neuron activations independently of inputs, their gradients capture the model's input-independent reasoning. This is particularly important for networks with batch normalization, where the beta parameter serves an analogous role to bias and must be included in the FullGrad decomposition.
Comparison with Integrated Gradients
While both FullGrad and Integrated Gradients satisfy completeness, they differ fundamentally:
- Integrated Gradients: Requires a baseline input and interpolates along a path, accumulating input gradients
- FullGrad: Requires no baseline; instead aggregates bias gradients across all layers
- Computational cost: FullGrad requires a single backward pass, while Integrated Gradients typically needs 20–300 forward/backward passes
- Axiom satisfaction: FullGrad satisfies completeness, sensitivity, and linearity without needing a baseline choice
Implementation in PyTorch
A FullGrad implementation requires capturing gradients with respect to both inputs and all bias parameters:
- Use
torch.autograd.gradwithretain_graph=Trueto compute gradients for each parameter group - Register hooks on bias parameters and batch normalization layers to extract
∇_b f(x) - For Conv2D layers, the bias gradient is spatially broadcast to match the feature map dimensions
- The final saliency map is the sum of the input-gradient product and all spatially resized bias-gradient products
Sanity Check Evaluations
FullGrad passes critical sanity checks that many attribution methods fail:
- Model parameter randomization test: FullGrad attributions change significantly when model weights are randomized, confirming sensitivity to learned parameters
- Data randomization test: Attributions differ when trained on shuffled labels, proving dependence on true data-label relationships
- Cascading randomization: FullGrad remains sensitive even when layers are randomized sequentially from top to bottom, unlike Guided Backpropagation which fails this test
FullGrad vs. Other Attribution Methods
A feature-level comparison of FullGrad against other gradient-based and perturbation-based attribution methods, evaluating their adherence to the completeness axiom, bias sensitivity, and computational requirements.
| Feature | FullGrad | Integrated Gradients | Grad-CAM |
|---|---|---|---|
Satisfies Completeness Axiom | |||
Captures Bias Contributions | |||
Requires Baseline Input | |||
Gradient-Dependent | |||
Layer-Specific Attribution | |||
Computational Cost | 1 backward pass | 20-300 forward passes | 1 backward pass |
Applicable to Non-CNN Architectures | |||
Output Resolution | Input pixel-level | Input pixel-level | Coarse heatmap |
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.
Frequently Asked Questions
Concise answers to the most common technical questions about the FullGrad attribution method, its completeness property, and how it differs from other gradient-based explanation techniques.
FullGrad is a feature attribution method that satisfies the completeness axiom by aggregating the gradient of the model's output with respect to both the input features and the biases at every layer of a neural network. Unlike standard input-gradient methods that only compute the partial derivative with respect to the raw input pixels, FullGrad captures the contribution of every network parameter. It works by performing a forward pass to cache the bias terms and intermediate feature maps, then a backward pass to compute the gradient of the output with respect to the input and each bias. The final attribution map is the sum of the input-gradient multiplied element-wise by the input, plus the bias-gradients broadcast and summed across their corresponding spatial locations. This ensures that the sum of all attribution scores exactly equals the model's output difference from a zero baseline, providing a theoretically complete decomposition of the prediction.
Related Terms
FullGrad sits within a family of gradient-based attribution methods that satisfy the completeness axiom. Explore related techniques that aggregate, modify, or extend gradient signals to produce faithful explanations of neural network predictions.

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