Abstract
<jats:p>Despite the huge development of machine learning (ML) models to predict molecular properties, ML predictors for the molecular first hyperpolarizability tensors (β) are scarce, and solvation effects are rarely taken into account in the model. In this work, we develop and compare three ML approaches to predict the β tensor of water molecules embedded in an explicit liquid water environment: (1) Convolutional Neural Networks applied to electric field maps (EM-CNNs), (2) Message Passing Graph Neural Networks (MP-GNNs), and (3) Symmetry-Adapted Gaussian Process Regression (SA-GPR). Using a dataset of 150,000 β values computed at the quantum chemistry level for the non-resonant Second Harmonic Generation (SHG) process, we optimize each model’s hyperparameters and evaluate their precision and usability. All three approaches can accurately predict the β tensors for water molecules in a liquid environment. SA-GPR provides an efficient solution for relatively small training datasets, whereas the Neural Network architectures achieve near-reference accuracy (R2 > 0.997) for the largest datasets. Among them, MP-GNNs provide the highest accuracy while requiring fewer trainable parameters than the EM-CNN architecture. We further apply the best-performing model (EquiNNx ) to study its usability to predict Second Harmonic Scattering (SHS) intensities of bulk liquid water. The ML models can successfully capture the molecular first hyperpolarizability fluctuations and correlations essential for interpreting SHS of aqueous solutions. These approaches are generalizable to other embedded molecules, and other embedding solvents.</jats:p>