  The rapid growth of research in exploiting machine learning to predict
chaotic systems has revived a recent interest in Hamiltonian Neural Networks
(HNNs) with physical constraints defined by the Hamilton's equations of motion,
which represent a major class of physics-enhanced neural networks. We introduce
a class of HNNs capable of adaptable prediction of nonlinear physical systems:
by training the neural network based on time series from a small number of
bifurcation-parameter values of the target Hamiltonian system, the HNN can
predict the dynamical states at other parameter values, where the network has
not been exposed to any information about the system at these parameter values.
The architecture of the HNN differs from the previous ones in that we
incorporate an input parameter channel, rendering the HNN parameter--cognizant.
We demonstrate, using paradigmatic Hamiltonian systems, that training the HNN
using time series from as few as four parameter values bestows the neural
machine with the ability to predict the state of the target system in an entire
parameter interval. Utilizing the ensemble maximum Lyapunov exponent and the
alignment index as indicators, we show that our parameter-cognizant HNN can
successfully predict the route of transition to chaos. Physics-enhanced machine
learning is a forefront area of research, and our adaptable HNNs provide an
approach to understanding machine learning with broad applications.
