Inspired by works of Castéras (Pac J Math 276:321–345, 2015), Li and Zhu (Calc Var Partial Differ Equ 58:1–18, 2019), Sun and Zhu (Calc Var Partial Differ Equ 60:1–26, 2021), we propose a heat flow for the mean field equation on a connected finite graph G=(V,E). Namely
∂_tϕ(u)=Δu−Q+ρ\frac{e^u}{∫_V e^u dμ}
u(⋅,0)=u_0,
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)=es. 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 equation
Δu_∞−Q+ρ\frac{e^{u_∞}}{∫_V e^{u_∞}dμ}=0.
Though 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.