Diffusion determines the recurrent graph