Fitting coupled potential energy surfaces is a critical
step in
simulating electronically nonadiabatic chemical reactions and energy
transfer processes. Analytic representation of coupled potential energy
surfaces enables one to perform detailed dynamics calculations. Traditionally,
fitting is performed in a diabatic representation to avoid fitting
the cuspidal ridges of coupled adiabatic potential energy surfaces
at conical intersection seams. In this work, we provide an alternative
approach by carrying out fitting in the adiabatic representation using
a modified version of the Frobenius companion matrices, whose usage
was first proposed by Opalka and Domcke. Their work involved minimizing
the errors in fits of the characteristic polynomial coefficients (CPCs)
and diagonalizing the resulting companion matrix, whose eigenvalues
are adiabatic potential energies. We show, however, that this may
lead to complex eigenvalues and spurious discontinuities. To alleviate
this problem, we provide a new procedure for the automatic discovery
of CPCs and the diagonalization of a companion matrix by using a special
neural network architecture. The method effectively allows analytic
representation of global coupled adiabatic potential energy surfaces
and their gradients with only adiabatic energy input and without experience-based
selection of a diabatization scheme. We demonstrate that the new procedure,
called the companion matrix neural network (CMNN), is successful by
showing applications to LiH, H3, phenol, and thiophenol.