When you can differentiate the model
LIME and SHAP treat the model as a sealed box you can only query. For a neural network that throws away the most useful thing you have: the gradient.
A single backward pass gives the partial derivative of the output with respect to every input coordinate at once. For a 224 by 224 image that is 150,528 sensitivity numbers for roughly the cost of one forward pass, against the thousands of forward passes a perturbation method would need. The efficiency difference is not marginal, it is what makes attribution practical on images and text at all.
The price is that gradient methods are model-specific in the weak sense: they need a differentiable model and access to its backward pass. They will not explain a random forest or an external API.
What follows is the progression from the naive use of that gradient to the version with guarantees.

