Differentiating unstable diffusions