Objective: To test the potential utility of applying machine learning methods to regional cerebral (rcSO2) and peripheral oxygen saturation (SpO2) signals to detect brain injury in extremely preterm infants. Study design: A subset of infants enrolled in the Management of Hypotension in Preterm infants (HIP) trial were analysed (n= 46). All eligible infants were <28 weeks’ gestational age and had continuous rcSO2measurements performed over the first 72 h and cranial ultrasounds performed during the first week after birth. SpO2data were available for 32 infants. The rcSO2and SpO2signals were preprocessed, and prolonged relative desaturations (PRDs; data-driven desaturation in the 2-to-15-min range) were extracted. Numerous quantitative features were extracted from the biosignals before and after the exclusion of the PRDs within the signals. PRDs were also evaluated as a stand-alone feature. A machine learning model was used to detect brain injury (intraventricular haemorrhage-IVH grade II–IV) using a leave-one-out cross-validation approach. Results: The area under the receiver operating characteristic curve (AUC) for the PRD rcSO2was 0.846 (95% CI: 0.720–0.948), outperforming the rcSO2threshold approach (AUC 0.593 95% CI 0.399–0.775). Neither the clinical model nor any of the SpO2models were significantly associated with brain injury. Conclusion: There was a significant association between the data-driven definition of PRDs in rcSO2and brain injury. Automated analysis of PRDs of the cerebral NIRS signal in extremely preterm infants may aid in better prediction of IVH compared with a threshold-based approach. Further investigation of the definition of the extracted PRDs and an understanding of the physiology underlying these events are required.