Integrated Gradients ReLU Path
Integrate gradients along a baseline path and verify the exact completeness identity.
Free theory articleIntegrate gradients along a baseline path and verify the exact completeness identity.
Concept & interpretation
Integrated Gradients (IG) is a technique for attributing the prediction of a neural network to its input features. This module demonstrates the integration path along a single ReLU activation function and verifies the exact completeness identity.
Experiment
Open the Interactive Module to explore how the baseline and input affect the attributions.
- Set Weights to Positive, Bias to -1, Baseline to Origin, and Input to Positive. Verify the attributions match the worked example above: 0.6666666666666666 and 1.3333333333333333.
- Change Weights to Mixed. The pre-activation 2(1) - 1(1) - 1 = 0 means the function never becomes strictly positive. The active path fraction is 0, yielding attributions of 0 and output difference of 0.
- Switch Weights back to Positive, and change Baseline to Left. Observe how the integration path changes, activating at a different point and altering the individual attributions to 1.0 and 1.0, though they still sum to the total difference of 2.