Preliminary study of auto-differentiation algorithm in beam dynamics with stochastic process | Synapse