Many natural systems exhibit regime shifts where slowly changing environmental conditions suddenly shift the system to a new and sometimes very different state. As the tipping point is approached, the dynamics of complex and varied systems all simplify down to a small number of possible 'normal forms' that determine how the new regime will look. Indicators such as increasing lag-1 autocorrelation and variance provide generic early warning signals (EWS) by detecting how dynamics slow down near the tipping point. But they do not indicate what type of new regime will emerge. Here we develop a deep learning algorithm that can detect EWS in systems it was not explicitly trained on, by exploiting information about normal forms and scaling behaviour of dynamics near tipping points that are common to many dynamical systems. The algorithm detects EWS in 268 empirical and model time series from ecology, thermoacoustics, climatology, and epidemiology with much greater sensitivity and specificity than generic EWS. It can also predict the normal form that will characterize the oncoming regime shift. Such approaches can help humans better manage regime shifts. The algorithm also illustrates how a universe of possible models can be mined to recognize naturally-occurring tipping points.