Background Congenital heart disease (CHD) is a structural deformity of the heart present at birth. Pulmonary hypertension (PH) may arise from increased blood flow to the lungs, persistent pulmonary arterial pressure elevation, or the use of cardiopulmonary bypass (CPB) during surgical repair. Inhaled nitric oxide (iNO) selectively reduces high blood pressure in the pulmonary vessels without lowering systemic blood pressure, making it useful for treating children with postoperative PH due to heart disease. However, reducing or stopping iNO can exacerbate postoperative PH and hypoxemia, necessitating long-term administration and careful tapering. This study aimed to evaluate, using machine learning (ML), factors that predict the need for long-term iNO administration after open heart surgery in CHD patients in the postoperative ICU, primarily for PH management. Methods We used an ML approach to establish an algorithm to predict 'patients with long-term use of iNO' and validate its accuracy in 34 pediatric postoperative open heart surgery patients who survived and were discharged from the ICU at Kagoshima University Hospital between April 2016 and March 2019. All patients were started on iNO therapy upon ICU admission. Overall, 16 features reflecting patient and surgical characteristics were utilized to predict the patients who needed iNO for over 168 hours using ML analysis with AutoGluon. The dataset was randomly classified into training and test cohorts, comprising 80% and 20% of the data, respectively. In the training cohort, the ML model was constructed using the important features selected by the decrease in Gini impurity and a synthetic oversampling technique. In the testing cohort, the prediction performance of the ML model was evaluated by calculating the area under the receiver operating characteristics curve (AUC) and accuracy. Results Among 28 patients in the training cohort, five needed iNO for over 168 hours; among six patients in the testing cohort, one needed iNO for over 168 hours. CPB, aortic clamp time, in-out balance, and lactate were the four most important features for predicting the need for iNO for over 168 hours. In the training cohorts, the ML model achieved perfect classification with an AUC of 1.00. In the testing cohort, the ML model also achieved perfect classification with an AUC of 1.00 and an accuracy of 1.00. Conclusion The ML approach identified that four factors (CPB, in-out balance, aortic cross-clamp time, and lactate) are strongly associated with the need for long-term iNO administration after open heart surgery in CHD patients. By understanding the outcomes of this study, we can more effectively manage iNO administration in postoperative open heart surgery in CHD patients with PH, potentially preventing the recurrence of postoperative PH and hypoxemia, thereby contributing to safer patient management., Competing Interests: Human subjects: Consent was obtained or waived by all participants in this study. Kagoshima University's Ethics Committee for Epidemiological Research issued approval 190250epi. Animal subjects: All authors have confirmed that this study did not involve animal subjects or tissue. Conflicts of interest: In compliance with the ICMJE uniform disclosure form, all authors declare the following: Payment/services info: All authors have declared that no financial support was received from any organization for the submitted work. Financial relationships: All authors have declared that they have no financial relationships at present or within the previous three years with any organizations that might have an interest in the submitted work. Other relationships: All authors have declared that there are no other relationships or activities that could appear to have influenced the submitted work., (Copyright © 2024, Niiyama et al.)