Aims. This study was designed to develop a model for predicting bone mineral density (BMD) loss of the femur after total hip arthroplasty (THA) using artificial intelligence (AI), and to identify factors that influence the prediction. Additionally, we virtually examined the efficacy of administration of bisphosphonate for cases with severe BMD loss based on the predictive model. Methods. The study included 538 joints that underwent primary THA. The patients were divided into groups using unsupervised time series clustering for five-year BMD loss of Gruen zone 7 postoperatively, and a machine-learning model to predict the BMD loss was developed. Additionally, the predictor for BMD loss was extracted using SHapley Additive exPlanations (SHAP). The patient-specific efficacy of bisphosphonate, which is the most important categorical predictor for BMD loss, was examined by calculating the change in predictive probability when hypothetically switching between the inclusion and exclusion of bisphosphonate. Results. Time series clustering allowed us to divide the patients into two groups, and the predictive factors were identified including patient- and operation-related factors. The area under the receiver operating characteristic (ROC) curve (AUC) for the BMD loss prediction averaged 0.734. Virtual administration of bisphosphonate showed on average 14% efficacy in preventing BMD loss of zone 7. Additionally, stem types and preoperative triglyceride (TG), creatinine (Cr),