Novel method for feature importance using ReverseMode + ForwardMode autodiff?

nielsls
Sun, 05 Nov 2023 20:23:31 +0000
Machine Learning

Using a combination of reverse- and forward-mode autodiff I have come across a highly efficient method for attributing the change in a differentiable scalar-valued function f: R^N->R^1 (e.g. a neural network) to the input factors.

As far as I can tell, the method of attributing the change in a neural network to the input factors is called Integrated Gradients. However, to do this TensorFlow does slow, cumbersome Riemann integration.

Instead, for a sufficiently differentiable (!) network it may be done by doing nested forwardmode autodiff on: k(t) = grad(f)(x + tv) at t = 0 where x is the baseline and x + v is the observation to be explained.

For details see my write-up higherorder_pnl_explain.pdf
(note: my field is finance where instead of a neural network we try to explain the change in a pricing function for a financial instrument - but the math is the same :)).

I’m pretty sure this is novel within finance but is it also novel within ML?
Or did the TensorFlow guys just not bother doing forward-mode autodiff?

Thought/comments very welcome!

ping @ChrisRackauckas

5 posts - 2 participants