What Does a Semilocal Machine-Learning Correction Actually Learn? Size-Dependent Errors across Four Parent Functionals
Machine-learning (ML) corrections to density functional approximations (DFAs) offer a route to improving electronic-structure predictions while retaining the efficiency of semilocal functionals. An important question is whether such corrections learn transferable improvements or instead compensate for errors specific to the parent functional. Here, we address this question by applying the semilocal ML correction of Wang \textit{et al.} [J.~Chem.~Phys.~\textbf{158}, 154107 (2023)] to PBE, B3LYP, SCAN, and r$^2$SCAN, while keeping the network architecture, loss function, training set, and optimization protocol unchanged. We find that the learned correction develops a systematic size-dependent contribution to atomization energies for all four parents, with $|r|\geq0.9999$ along the $n$-alkane series, where r is the Pearson coefficient of the linear fit. Its magnitude and sign depend systematically on the parent: the correction partially compensates the size-dependent errors of PBE and B3LYP, but introduces substantial size-dependent contributions for SCAN and r$^2$SCAN, whose parent errors show little size dependence. In contrast, ionization potentials, electron affinities, and isomerization energies are largely unaffected. Spatial decomposition further reveals distinct origins of this extensive contribution, with bonding regions dominating for B3LYP, SCAN, and r$^2$SCAN and core regions dominating for PBE. These results show that the global-energy ML correction is strongly dependent on the error structure of its parent DFA, highlighting size-dependent error accumulation as a critical consideration in the assessment and development of ML-enhanced density functionals.