Closed black-puppydog closed 6 years ago
The denominator should be the mean squared feature activation, so (6) is missing the sum. The formula you wrote above is correct. Thanks for finding all these bugs!
Thanks for being here to answer all my questions :)
Formula (6) in the paper makes alpha come out to be a vector (assuming an element-wise reciprocal) since
pow
is specifically applied element-wise. But in the code, you compute this: https://github.com/paulu/deepfeatinterp/blob/76b72e0a3b683a8cdeb13ed35b932680dc159ed1/demo1.py#L118and later-on this: https://github.com/paulu/deepfeatinterp/blob/76b72e0a3b683a8cdeb13ed35b932680dc159ed1/demo1.py#L127 with delta being the beta from the paper.
I think this would correspond more to this:
alpha = beta / (1/d sum(pow(w, 2))) = beta d / ||w||²
Excuse the ugly formulas, apparently, github markdown doesn't understand proper ones...