Inferensys

Glossary

FullGrad

An attribution method that satisfies the completeness axiom by aggregating the input-gradient with the gradients of all intermediate network biases, providing a full decomposition of the output.
Enterprise console with connected nodes and monitoring panels for orchestrated systems.
COMPLETE GRADIENT DECOMPOSITION

What is FullGrad?

FullGrad is an axiomatic attribution method that decomposes a neural network's output into contributions from both the input features and all intermediate network biases, satisfying the completeness axiom by construction.

FullGrad is a feature attribution method that satisfies the completeness axiom by aggregating the standard input-gradient with the gradients of all intermediate bias parameters throughout the network. Unlike methods that only consider the input-gradient, FullGrad captures the entire signal by summing the bias-gradient contributions from every neuron, providing a mathematically complete decomposition of the model's output into input-feature importance scores.

By incorporating bias gradients, FullGrad addresses the gradient saturation problem where input-gradients alone fail to highlight features that strongly activate the correct class. The method computes the final attribution map as the sum of the element-wise product of the input and its gradient, plus the spatially broadcast sum of all bias gradients, ensuring no predictive signal is lost in the explanation.

COMPLETE ATTRIBUTION

Key Features of FullGrad

FullGrad is an attribution method that satisfies the completeness axiom by aggregating the input-gradient with the gradients of all intermediate network biases, providing a full decomposition of the output.

01

Completeness Axiom Satisfaction

FullGrad is one of the few attribution methods that provably satisfies the completeness axiom. The sum of all feature attributions exactly equals the model's output difference from a baseline. This is achieved by decomposing the output into the input-gradient contribution and the bias-gradient contributions from every neuron in the network. Unlike methods that approximate or violate completeness, FullGrad provides a mathematically exact accounting of the prediction.

02

Full Decomposition Mechanism

The core innovation of FullGrad is its aggregation of bias gradients. Standard gradient methods only use the gradient with respect to the input. FullGrad recognizes that the bias parameters in each layer also contribute to the output. By computing the gradient of the output with respect to every bias term and summing these contributions, FullGrad captures the full sensitivity of the network. This provides a more complete and faithful attribution map.

03

Comparison with Integrated Gradients

Both FullGrad and Integrated Gradients satisfy the completeness axiom, but through different mechanisms:

  • Integrated Gradients requires a baseline input and integrates gradients along a path
  • FullGrad requires no baseline and uses only a single forward-backward pass
  • FullGrad is computationally more efficient as it avoids the numerical integration step
  • The bias-gradient terms in FullGrad act as a spatial prior, naturally smoothing the saliency map without explicit noise injection
04

Implementation Invariance

FullGrad satisfies the implementation invariance axiom. Two functionally equivalent networks with different internal architectures will produce identical attributions. This is because the method relies on the functional relationship between inputs and outputs, not on specific activation patterns. The bias gradients capture the network's sensitivity structure regardless of how the computation is organized internally.

05

Practical Computation

Computing FullGrad requires:

  • A standard forward pass to compute the output
  • A backward pass to compute gradients with respect to the input and all bias parameters
  • Summation of the input-gradient map with the bias-gradient maps spatially broadcast to match input dimensions
  • The result is a single saliency map with the same spatial dimensions as the input

This is implemented efficiently in frameworks like PyTorch using automatic differentiation hooks.

06

Sensitivity-n Axiom

FullGrad adheres to the Sensitivity-n axiom: if the model's output is mathematically independent of a feature, that feature receives zero attribution. The bias-gradient terms ensure that all contributing pathways through the network are accounted for. Features that do not influence any neuron's bias contribution or the direct input gradient are correctly assigned zero importance, preventing false positive attributions.

FULLGRAD EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the FullGrad attribution method, its completeness axiom, and how it differs from other gradient-based techniques.

FullGrad is a neural network attribution method that decomposes the model's output into a sum of contributions from the input features and all intermediate network biases. It works by aggregating two signals: the standard input-gradient (the gradient of the output with respect to the input, multiplied by the input itself) and the bias-gradients from every layer in the network. For a convolutional network, the bias-gradient at a given layer is computed by taking the gradient of the output with respect to that layer's bias parameter and broadcasting it spatially across the feature map. The final saliency map is the sum of the input-gradient contribution and all upsampled bias-gradient maps, providing a full decomposition of the output score that satisfies the completeness axiom by construction.

AXIOMATIC COMPARISON

FullGrad vs. Other Attribution Methods

Comparison of FullGrad against other gradient-based attribution methods on key mathematical axioms and practical properties.

PropertyFullGradIntegrated GradientsGradient × Input

Satisfies Completeness Axiom

Satisfies Implementation Invariance

Satisfies Sensitivity-n

Captures Bias Contributions

Requires Baseline Input

Computational Cost

1 backward pass

20-300 backward passes

1 backward pass

Typical Attribution Noise

Low

Low

High (Shattered Gradients)

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.