ObjectiveTo explore the effectiveness of machine learning classifiers based on dynamic contrast-enhanced magnetic resonance imaging (DCE-MRI) in predicting the expression levels of CD3+, CD4+, and CD8+ tumor-infiltrating lymphocytes (TILs) in patients with advanced gastric cancer (AGC).MethodsThis study investigated 103 patients with confirmed AGC through DCE-MRI and immunohistochemical staining. Immunohistochemical staining was used to evaluate CD3+, CD4+, and CD8+ T-cell expression. Utilizing Omni Kinetics software, radiomics features (Ktrans, Kep, and Ve) were extracted and underwent selection via variance threshold, SelectKBest, and LASSO methods. Logistic regression (LR), support vector machine (SVM), random forest (RF), and eXtreme Gradient Boosting (XGBoost) are the four classifiers used to build four machine learning (ML) models, and their performance was evaluated using 10-fold cross-validation. The model’s performance was evaluated and compared using the area under the receiver operating characteristic curve (AUC), accuracy, sensitivity, specificity, positive predictive value, and negative predictive value.ResultsIn terms of CD3+, CD4+, and CD8+ T lymphocyte prediction models, the random forest model outperformed the other classifier models in terms of CD4+ and CD8+ T cell prediction, with AUCs of 0.913 and 0.970 on the training set and 0.904 and 0.908 on the validation set, respectively. In terms of CD3+ T cell prediction, the logistic regression model fared the best, with AUCs on the training and validation sets of 0.872 and 0.817, respectively.ConclusionMachine learning classifiers based on DCE-MRI have the potential to accurately predict CD3+, CD4+, and CD8+ tumor-infiltrating lymphocyte expression levels in patients with AGC.