Neurodevelopmental spectrum disorders like autism (ASD) are diagnosed, on average, beyond age 4 y, after multiple critical periods of brain development close and behavioral intervention becomes less effective. This raises the urgent need for quantitative, noninvasive, and translational biomarkers for their early detection and tracking. We found that both idiopathic (BTBR) and genetic (CDKL5- and MeCP2-deficient) mouse models of ASD display an early, impaired cholinergic neuromodulation as reflected in altered spontaneous pupil fluctuations. Abnormalities were already present before the onset of symptoms and were rescued by the selective expression of MeCP2 in cholinergic circuits. Hence, we trained a neural network (ConvNetACh) to recognize, with 97% accuracy, patterns of these arousal fluctuations in mice with enhanced cholinergic sensitivity (LYNX1-deficient). ConvNetACh then successfully detected impairments in all ASD mouse models tested except in MeCP2-rescued mice. By retraining only the last layers of ConvNetACh with heart rate variation data (a similar proxy of arousal) directly from Rett syndrome patients, we generated ConvNetPatients, a neural network capable of distinguishing them from typically developing subjects. Even with small cohorts of rare patients, our approach exhibited significant accuracy before (80% in the first and second year of life) and into regression (88% in stage III patients). Thus, transfer learning across species and modalities establishes spontaneous arousal fluctuations combined with deep learning as a robust noninvasive, quantitative, and sensitive translational biomarker for the rapid and early detection of neurodevelopmental disorders before major symptom onset.