5 ms·
> Automatic Differentiation doesn't incur more truncation error than symbolically differentiating the function and then calculating the symbolic derivative's va
by oxinabox 6y ago
> Automatic Differentiation doesn't incur more truncation error than symbolically differentiating the function and then calculating the symbolic derivative's value.
Yes. The article even says that.
_"The AD system is (as you might have surmised) not incurring truncation errors. It is giving us exactly what we asked for, which is the derivative of my_sin. my_sin is a polynomial. The derivative of the polynomial is:
[article lists the hand-derived derivative]"_
The reason symbolic might help is symbolic AD is often used in languages that don't represent things with numbers, but with lazy expressions.
I will clarify that.
(edit, I have updates that bit and I think it is clearer. Thanks)
> The article seems to calculate sin(x) in a lossy fashion and then attribute to the error to AD. That's not how it works.
The important bit is that the accurasy lost from a accurate derviative of a lossy approximation is greater than accurasy lost from a lossy approximation to an accurate derivative.
Is there a bit I should clarify more about that?
I tried to emphisize that at the end before the bit mentioning symbolic.
- joe_the_user 6y agoI would suggest saying front and center, more prominently, that AD incurs the truncation errors that the equivalent symbolic derivative would incur. Since you're talking about AD, you should be giving people a good picture of what it is (since it's not that commonly understood). 'Cause you're kind of suggesting otherwise even if somewhere you're eventually saying this. I mean, Griewank saying "Algorithmic differentiation does not incur truncation error" does deserve the caveat "unless the underlying system has truncation errors, which it often does". But you can give that caveat without bending the stick the other way. The important bit is that the accurasy lost from a accurate derviative of a lossy approximation is greater than accurasy lost from a lossy approximation to an accurate derivative. I understand you get inaccuracy from approximating the sin but I don't know what you're contrasting this to. I think real AD libraries deal with primitives and with combinations of primitive so for such a library, the derivative of sin(x) would be "symbolically" calculated as cos(x) since sin is primitive (essentially, all the "standard functions" have to be primitives and create things from that. I doubt any library would apply AD to it's approximation of a given function). I haven't used such libraries but I am in the process of writing an AD subsystem for my own little language.