AUTHOR=Chen Chunmei , Wu Jundong , Xu Bo , Li Weiwen , Zhong Chengming , Yan Zhibing , Zhong Qipeng , Li Ronggang , Shao Mingtao , Dong Yan , Fang Yutong , Li Yong , Zhang Qunchen TITLE=Machine learning algorithms for individualized prediction of prognosis in breast cancer liver metastases and the prognostic impact of primary tumor surgery: a multicenter study JOURNAL=Frontiers in Endocrinology VOLUME=Volume 16 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/endocrinology/articles/10.3389/fendo.2025.1656191 DOI=10.3389/fendo.2025.1656191 ISSN=1664-2392 ABSTRACT=BackgroundThe prognosis of patients with breast cancer liver metastasis (BCLM) is generally poor, and there are no specific treatment guidelines. Accurate prognostic tools are needed to estimate survival and support individualized management.MethodsThe study cohort consisted of 4,817 patients diagnosed with BCLM from the SEER database spanning 2010 to 2020. Candidate predictors were screened using univariate and multivariate Cox regression. Five machine-learning algorithms—Random Forest (RF), Logistic Regression, XGBoost, Decision Tree, and Gradient Boosting—were trained to predict 6-month, 1-, 3-, and 5-year overall survival (OS) and breast cancer–specific survival (BCSS). Labels at each horizon were handled with inverse probability-of-censoring weighting, and performance was assessed with IPCW-AUC, accuracy, F1 score, calibration, and decision curve analysis. External validation included 124 BCLM patients from two Chinese hospitals. To evaluate the effect of primary tumor surgery (PTS), we modeled PTS as a time-dependent exposure and performed time-dependent Cox analyses with time-varying effects, Simon–Makuch curves, piecewise Cox modeling, 2-month landmark analysis, and E-value calculations.ResultsRF was the top performer for both OS and BCSS across horizons (training AUCs = 0.840–0.899; internal test AUCs = 0.763–0.787), with good calibration and net benefit. External validation showed consistent discrimination (AUCs 0.779–0.815). SHAP analyses highlighted chemotherapy, age, subtype, and surgery as dominant contributors. In time-dependent analyses, PTS was associated with reduced risks of death (OS: HR 0.80, 95% CI 0.72–0.88) and breast cancer–specific mortality (BCSS: HR 0.77, 95% CI 0.69–0.86); findings were directionally consistent in piecewise and landmark analyses, and E-values (≥1.81) supported robustness to moderate unmeasured confounding.ConclusionWe developed and externally validated robust RF-based models for predicting OS and BCSS in BCLM. Our results indicate that PTS is associated with longer survival and lower breast cancer-specific mortality in carefully selected patients, supporting consideration within individualized, multidisciplinary decision-making.