The definition of the global reference Cartesian coordinate system used in this work. The optimized cis isomer is used as the reference, where the X-axis is defined along the NN double bond, the Y-axis is defined perpendicular to the molecular plane, and the Z-axis is defined perpendicular to the X-and Y-axes simultaneously. These three directions are also used to define cavity field polarization directions. (b)-(d) The permanent and transition dipole components along the reaction pathway from the cis isomer to the conical intersection configuration and to the trans isomer, projected along the (b) X direction, (c) Y direction, and (d) Z direction. Results are obtained from the KRR (open circles) and ab initio CASSCF calculations (solid lines). Fig. presents the dipoles along the reaction pathway from the cis isomer to the trans isomer, obtained with the KRR method (open circles) and the CASSCF calculations (solid lines). As one can see, the gradients of these dipoles (slope of the curves in Fig. ) could get very large, depending on the nuclear configurations, and it is often a drastic approximation to ignore those gradient components in the polariton nonadiabatic simulations. We can see that the machinelearned dipoles consist well with the CASSCF results in all (X, Y, Z) directions. We have also performed additional tests to check the accuracy of our machinelearned dipoles. Fig. in the Supporting Information shows the distribution of the test errors in the learning procedure for the machine-learned dipoles. Note that there are small discrepancies between our machine-learned model and the actual CASSCF data around the CI configuration (with CNNC angle ∼ 94 • ), where the characters of the |g⟩ and |e⟩ states exchange with each other, along with the exchange of their permanent dipoles. There is a "sudden" flip of the permanent dipoles of the |g⟩ and |e⟩ states before and after the CI, which is indicated in the CASSCF-calculated results. However, since the machine-learned dipoles are continuous functions of the nuclear coordinates (Eq. 49), the change of the permanent dipoles obtained with the KRR for each adiabatic electronic state becomes "smooth" around the CI. Considering the NAC between the |g⟩ and |e⟩ states is very large near the CI region and plays a major role when the system arrives at that region in the dynamics process, the discrepancies between the machine-learned dipoles and the CASSCF dipoles near the CI region will not significantly impact to the dynamics inside the cavity, which will be discussed in next sections.