It is well known from experimental results that a single atom of cobalt supported on g-C 3 N 4 is an efficient photocatalyst for the reduction of CO 2 to CO, with a better photocatalytic activity than g-C 3 N 4 . In this work, we investigate the performance as catalysts for the CO 2 reduction of single atoms of cobalt and Co 2 O 2 clusters supported on graphitic carbon nitride (g-C 3 N 4 ). Employing density functional theory plus Hubbard (DFT + U) calculations, we investigate in detail the reduction mechanisms to CO and HCOOH for the first time. We find that deposition of cobalt on g-C 3 N 4 decreases the work function of g-C 3 N 4 to 6.6 eV and provides a better candidate for the reduction reaction. In addition, we find that the preferred product of CO 2 reduction on Co@g-C 3 N 4 is CO, with a rate-determining barrier of 0.97 eV, while on Co 2 O 2 @g-C 3 N 4 , CO 2 reduces to formate with a rate-determining barrier of 0.44 eV. We determine the creation of CO 2 from COOH to only take place on Co 2 O 2 @g-C 3 N 4 , with a (relatively high) barrier of 2.27 eV. In order to obtain more easily the transition state energies of the reactions mentioned above, we applied machine learning methods to search for high-importance descriptors for these quantities, in the case of single transition metal atoms supported on C 3 N 4 . Interestingly, our results show that our quantities of interest are closely related to the adsorption energies of products and normalized valence electrons of the products of the elementary reactions as well as those of the metal atoms. The former of these two sets of features can be straightforwardly obtained via DFT, while the latter energies are extensively tabulated. Our results offer guidance for the design of catalysts and photocatalysts for CO 2 reduction on single-metal atoms supported on C 3 N 4 .