For Ito SDE $$ dx = f(x,t)dt + g(x,t)dw$$
It transforms initial distribution $p(x_0)$ to distribution $p(x_T)$ at time $T$. My question is whether or not there exists a "reverse" sde $dx = f'(x,t)dt + g'(x,t)dw$ such that if the initial distribution is $q(x_0)=p(x_T)$, the transformed distribution at time $T$ under the sde is $q(x_T)=p(x_0)$. Under which assumption, such "reverse" sde exists and what are $f',g'$?
My naive guess is $$ dx = [f(x,T-t) + g(x,T-t)g^T(x,T-t)\nabla log q(x_T|x_0)]dt + g(x,T-t)dw $$ But I am not sure about correctness and under what assumptions such "reverse" sde exists.
Update: My previous question only requires end marginals. It should be $ q(x_{T-t})=p(x_t) $.
I think your question was motivated by the recent wave of (denoising) diffusion models in generative modelling in ML. Here are some links I found useful for the math background of the reverse time SDE.
https://ludwigwinkler.github.io/blog/ReverseTimeAnderson/
https://www.sciencedirect.com/science/article/pii/0304414982900515