where ∆ is the standard graph Laplacian, ρ is a real number, Q : V → R is a function satisfying V Qdµ = ρ, and φ : R → R is one of certain smooth functions including φ(s) = e s . We prove that for any initial data u 0 and any ρ ∈ R, there exists a unique solution u : V × [0, +∞) → R of the above heat flow; moreover, u(x, t) converges to some function u ∞ : V → R uniformly in x ∈ V as t → +∞, and u ∞ is a solution of the mean field equationThough G is a finite graph, this result is still unexpected, even in the special case Q ≡ 0. Our approach reads as follows: the short time existence of the heat flow follows from the ODE theory; various integral estimates give its long time existence; moreover we establish a Lojasiewicz-Simon type inequality and use it to conclude the convergence of the heat flow.