BackgroundLateral lymph node metastasis (LLNM) is a contributor for poor prognosis in papillary thyroid cancer (PTC). We aimed to develop and validate machine learning (ML) algorithms-based models for predicting the risk of LLNM in these patients.MethodsThis is retrospective study comprising 1236 patients who underwent initial thyroid resection at our institution between January 2019 and March 2022. All patients were randomly split into the training dataset (70%) and the validation dataset (30%). Eight ML algorithms, including the Logistic Regression, Gradient Boosting Machine, Extreme Gradient Boosting, Random Forest (RF), Decision Tree, Neural Network, Support Vector Machine and Bayesian Network were used to evaluate the risk of LLNM. The performance of ML models was evaluated by the area under curve (AUC), sensitivity, specificity, and decision curve analysis.ResultsAmong the eight ML algorithms, RF had the highest AUC (0.975), with sensitivity and specificity of 0.903 and 0.959, respectively. It was therefore used to develop as prediction model. The diagnostic performance of RF algorithm was dependent on the following nine top-rank variables: central lymph node ratio, size, central lymph node metastasis, number of foci, location, body mass index, aspect ratio, sex and extrathyroidal extensionConclusionBy combining clinical and sonographic characteristics, ML algorithms can achieve acceptable prediction of LLNM, of which the RF model performs best. ML algorithms can help clinicians to identify the risk probability of LLNM in PTC patients.