A cost minimisation and Bayesian inference model predicts startle reflex modulation across species