Abstract Background Current evidence suggests that atrial high rate episodes (AHRE)/subclinical atrial fibrillation (AF) are associated with increasing risk of clinical AF, and subsequently, ischaemic stroke and other adverse cardiovascular events. Purpose To construct a high-performance model by machine learning (ML) for the prediction of AHRE detected by a cardiac implantable electronic device (CIED) capable of atrial sensing in a European cohort. Methods We utilized data from a prospective cohort of patients with CIED. AHRE was defined as an episode lasting at least 5 minutes with atrial rate ≥ 175 beats per minute. We divided the cohort into training and internal validation cohorts in 7:3 and used 5-fold cross-validation in the training cohort to assess model performance and prevent model overfitting. Pre-selected features were imported into eight common ML algorithms to predict AHRE, including light gradient boosting machine (LightGBM), random forest (RF), logistic regression, support vector machine, multiple perceptron, eXtreme gradient boosting machine (XGBoost), Gaussian naïve Bayes, and K nearest neighbours. The importance ranking of the features was interpreted by calculating the SHapley Additive exPlanationation (SHAP) value for each feature within the optimal model. Results A total of 500 consecutive patients with CIEDs (mean age 70.2±13.3; 39.2% female) were included. Of these, 164 patients (32.8%) were found to have AHRE. Among all ML models, RF was the best performing model, which obtained the highest AUC (0.738), recall (0.673) and F1-score (0.584) in the internal validation cohort. The results of SHAP showed that antiplatelet, statin, age, white blood cell count, and cardiomyopathy were the first five important features, indicating that the RF model had good interpretability and reliability. Conclusion Our study is the first to demonstrate in a European cohort the effectiveness and feasibility of ML algorithms in predicting AHRE in patients detected by CIEDs. The best RF models require further external validation to assess generalizability to other cohorts.Figure 1Figure 2