We report an ab initio multi-scale study of lead titanate using the Deep Potential (DP) models, a family of machine learning-based atomistic models, trained on first-principles density functional theory data, to represent potential and polarization surfaces. Our approach includes anharmonic effects beyond the limitations of reduced models and of the linear approximation for the polarization. The calculated enthalpy, spontaneous polarization, specific heat and dielectric susceptibility agree well with experiments on single crystals. In addition, we study how the free energy depends on the polarization with enhanced sampling methods, further supporting the first-order and orderdisorder character of the transition. The latter is evidenced by persistence of local dipoles above the transition temperature. The simulated free energy surface as a function of the global polarization leads to a Landau-Devonshire theory of the single domain crystal.