During my study on Ricci Flow I faced some functional known as energy functional. For example Einstein-Hilbert functional is called an energy functional, also in Perelman's works $\mathcal{F}(g,f)=\int_M(R+|\nabla f|^2)e^{-f}d\mu$ is introduced as an energy functuional, where $M$ is a closed manifold, $g$ is Riemannian metric, $R$ is Ricci scalar, and $f$ is any function that in the physics literature is called dilaton.
I do not know why these functionals are attributed to the energy concept and why does $f$ show dilaton concept?
Can anyone help me? thanks for your attention!