Stimulus-correlated spike-triggered averaging (source code)

= Stimulus-correlated spike-triggered averaging

For a single linear filter followed by a rate nonlinearity and a Gaussian stimulus-history vector $s$ with covariance $C$, Gaussian integration by parts gives $\mathbb E[s\,g(k^Ts)]\propto Ck$. Thus a <spike-triggered average> estimates $Ck$, rather than $k$ directly, when the stimulus is correlated. Covariance correction, with regularization if necessary, can recover the filter direction. For an even nonlinearity the proportionality factor can vanish; then a one-filter average is insufficient.