Development and internal validation of a clinical prediction model for hemodialysis-related headache using LASSO and Boruta feature selection Authors: Benyin Yuan, Haiyan Xue, Junjie You, Huaxing Huang Published: 2026 ABSTRACT AbstractA common neurological symptom in dialysis patients is hemodialysis-related headache (HRH), which can result in premature hemodialysis termination and cause patients to decline hemodialysis. Predictors of headache have not been identified. One of our objectives is to create a nomogram that can accurately predict headaches in hemodialysis patients. Between 1 January 2023 and 31 October 2024, we retrospectively enrolled single-center patients with end-stage renal disease (ESRD, CKD-G5D) — diagnosed according to the 2012 KDIGO Clinical Practice Guideline for Chronic Kidney Disease–who received regular hemodialysis at the First People’s Hospital of Nantong. Headache was the outcome of the nomogram. The 289 patients were randomly split 7:3 into training (n = 202) and validation (n = 87) cohorts. Predictors were selected using sequential LASSO and Boruta algorithms. Multivariable logistic regression was employed to develop predictive models, which were subsequently presented as nomograms. The efficacy of the nomograms was evaluated using receiver operating characteristic (ROC) curves, calibration graphs, and decision curve analysis (DCA). The performance of the validation cohort was calculated to validate the model internally. A total of 289 patients were included in the investigation. Headache symptoms were reported by 103 patients (35.64%). Model performance was internally validated using 500 bootstrap resamplings for optimism correction in the full cohort. The nomogram included the following predictors: sex, age, weight, difference in pulse pressure, serum sodium concentration, and serum phosphorus concentration. Bootstrap-corrected calibration and discrimination showed good performance verification. In contrast, the area under the curve (AUC) values for the training and validation cohorts were 0.909 (95% CI 0.8662–0.9522) and 0.873 (0.8002–0.946), respectively. This nomogram may assist clinicians in identifying patients at higher risk, but external validation in independent multicenter cohorts is needed.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-56670-8.Keywords: Hemodialysis, Headache, Machine learning, Predictive model, Boruta feature selectionSubject terms: Diseases, Medical research, Nephrology, Risk factors Introduction Hemodialysis is the most frequently employed kidney replacement therapy (KRT) for end-stage renal disease (ESRD) patients; it accounts for approximately 89% of all dialysis procedures1–3. In 2018, a survey report encompassing 182 national populations indicated that the median use of hemodialysis was 298.4 per million4. Nurses must be familiar with the complications that patients may experience during hemodialysis, such as headache, hypotension, muscle cramping, imbalance syndrome, nausea and vomiting, and dyspnea. It is imperative to prevent complications. Early detection and intervention for life-threatening complications can save patients’ lives. While certain hemodialysis complications do not threaten the lives of patients, intradialytic symptoms can result in adverse outcomes, such as a reduced dialysis dose, decreased quality of life, melancholy, and mortality5,6. By addressing these issues, patient quality of life can be enhanced, and patient lifetime can be extended. In maintenance hemodialysis (MHD) patients, dialysis (HRH) pain is a prevalent neurological symptom7–12. Hemodialysis-related headache (HRH) is defined as a headache that commences during dialysis, subsides within 72 h of the conclusion of dialysis, and ceases following successful transplantation, as per the International Headache Society, Third Edition (ICHD III) criteria13. Previous research has indicated that when assessed using the ICHD II criteria (2004), 6.6–70% of patients experience HRH7–11,14. Conversely, a recent study demonstrated that when the ICHD III criteria are used, the incidence of HRH is 41.6%12. The pathophysiological mechanism of dialysis headache remains unclear. These headaches are known to be associated with the type of dialysate used8; changes in urea, sodium, and magnesium levels and arterial blood pressure7,9,14; and calcitonin gene-related peptide (CGRP) and substance P levels during dialysis15. Compared with bicarbonate, acetate is associated with a greater risk of dialytic headache. The blood–brain barrier may be a significant factor in the development of this type of headache. In certain patients, cerebral edema may result in headaches because of the concentration gradient that develops between the brain and blood during dialysis and the subsequent passage of free water across the blood–brain barrier9,16. Dialysis headache has a significant deleterious effect on patient health perceptions, and therefore, HRH should be further investigated and prevented. Patient quality of life is significantly affected by this HRH17. Currently, most studies investigate the origins of HRH by comparing clinical characteristics between HRH patients and controls rather than by using regression analysis to identify independent contributing factors18. Consequently, conducting a more comprehensive evaluation of the primary factors contributing to HRH is imperative. Clinicians must create a model that can be used to predict headaches. Such a model should enable clinicians to estimate the individual risk of hemodialysis-related headache and implement targeted interventions accordingly. Currently, data evaluating potential risk factors for headache in hemodialysis patients are scarce, despite the high prevalence of dialysis headache18. In recent years, the application of machine learning algorithms to construct prediction models has become more prevalent because of the proliferation of artificial intelligence19. Nonvariable screening models are not only unsuitable for clinical practice but also incur significant computational costs during operation and subsequent maintenance; additionally, they are poor at reproducing results in various health care settings. Consequently, we employed the Boruta feature screening method to further screen variables after conducting LASSO regression to eliminate risk factors. We then iteratively processed random fluctuations in random forest importance scores and interactions between factors to identify significant headache predictors. This method has been used for feature selection in diabetes mellitus (DM) investigations20,21. The aim of this single-center retrospective cohort study was to collect clinical data from adult patients undergoing hemodialysis treatment to develop a predictive model for headache using machine learning algorithms. An additional aim of this study was to identify the primary factors that influence headaches. The developed nomogram will assist clinicians in the early identification of high-risk populations and in implementing interventions that will enhance patient quality of life. Patients and methods Study design and participants A single-center retrospective cohort analysis was conducted using a cohort of hemodialysis patients who were hospitalized in the nephrology unit of the First People’s Hospital of Nantong from January 1, 2023, to October 31, 2024. Each patient underwent dialysis (HD) three times weekly for an average of three to four hours. The inclusion criteria were as follows: 1. patients between the ages of 18 and 80 years; 2. maintenance hemodialysis for ≥ 3 months; 3. hemodialysis treatment completed with the use of an arteriovenous fistula; 4. blood flow of 200–300 mL/min; and 5. attended regular follow-up appointments and provided access to critical medical data records. The same dialysate, with a sodium concentration of 140 mmol/L, a potassium concentration of 2 mmol/L, and a calcium concentration of 1.5 mmol/L (elemental calcium) was administered to all participants. The dialysate temperature was strictly maintained at 37.0 °C throughout all hemodialysis sessions. The exclusion criteria were as follows: preexisting primary or secondary headache disorder occurring outside hemodialysis or during ≥ 50% of non‑dialysis periods, unavailability of medical information, change in dialysis modality, and trauma/infection not related to hemodialysis within one month. Only patients with complete data for all the variables were included. Therefore, there were no missing data for the final study cohort, and complete-case analysis was inherently applied. The patient selection and analysis process is shown in the flowchart in Fig. 1. Diagram of the research pathway. Ethics and informed consent The study conformed to the tenets of the Declaration of Helsinki. This study was approved by the Medical Ethics Review Committee of Nantong First People’s Hospital (ethics approval number 2024KT435). Data collection and variable definitions Clinical information was obtained through electronic medical records, and the urea reduction ratio (URR) and single-pool urea clearance (spKt/V) were determined using formulations that have been previously published22,23. A total of 40 parameters, including fundamental characteristics, dialysis-related data, and blood laboratory test data, were obtained from the hemodialysis management system. The complete dataset of 289 patients was randomly divided into training (n = 202) and validation (n = 87) sets at a 7:3 ratio with set.seed(123) for reproducibility. Headache events were 72 in the training cohort and 31 in the validation cohort. The parameters included fundamental characteristics such as sex, age, height (m), weight, smoking history, and combined hypertension or diabetes. Blood flow, hemodialysis duration, dialysis duration, blood volume, ultrafiltration volume, predialysis systolic blood pressure, predialysis diastolic blood pressure, predialysis heart rate, and dialysis adequacy measures (Kt/V urea, URR) were included in the dialysis-related data. The difference in pulse pressure was defined as the predialysis systolic blood pressure minus the predialysis diastolic blood pressure (PP = SBP—DBP). All blood pressure measurements were performed in the sitting position before the initiation of each hemodialysis session. Neutrophil, lymphocyte, monocyte, eosinophil, and platelet counts and hemoglobin, serum calcium, serum sodium, serum potassium, serum magnesium, serum ferritin, high-sensitivity C-reactive protein, albumin, alkaline phosphatase, bilirubin, bile acids, lactate dehydrogenase, glutamyl transpeptidase, uric acid, β2 microglobulin, and prealbumin concentrations were included in the blood laboratory test results. Headache was the primary outcome measure for this investigation. A single dedicated neurologist assessed headache status once at study entry using a standardized structured questionnaire and a retrospective review of dialysis records. The neurologist evaluated all hemodialysis sessions during the study period to determine whether patients fulfilled the ICHD-3 criteria for HRH. No additional clinicians were involved in outcome adjudication; thus, inter‑rater reliability assessments were not applicable. The diagnostic criteria of the International Classification of Headache Disorders, Third Edition (ICHD-3 beta)24 were used to classify patients’ headaches. Subsequently, the final criteria of the International Classification of Headache Disorders, Third Edition (ICHD-3)13 were used to reclassify the headaches. The diagnosis of HRH strictly followed the ICHD‑3 criterion of 6.7.5, requiring all three of the following: 1. headache during ≥ 50% of hemodialysis sessions; 2. headache that developed during hemodialysis; and 3. headache that resolved within 72 h after dialysis completion. Regarding the categorical variable coding, sex was coded as male = 0 and female = 1; hypertension was coded as 0 = absent and 1 = present; diabetes mellitus was coded as 0 = absent and 1 = present; smoking history was coded as 0 = never and 1 = ever or current smoker; and the outcome (hemodialysis-related headache) was coded as 0 = no and 1 = yes. Identification of best predictors All feature selection procedures, including univariate logistic regression, LASSO regression, and the Boruta algorithm, were performed exclusively using the training cohort to avoid data leakage and overfitting. To guarantee that the prediction model contained only the most pertinent and resilient variables, we implemented a rigorous feature selection methodology to incorporate the most relevant predictors into model construction. Consequently, the final significant predictors were obtained by utilizing the Boruta algorithm25 following the application of the least absolute shrinkage and selection operator (LASSO) algorithm26. Statistical analysis Continuous data are expressed as the mean ± standard deviation or median (interquartile range) and were compared using Student’s t test or the Mann‒Whitney U test. Categorical variables are presented as counts (percentages) and were compared using the χ2 test or Fisher’s exact test. The dataset comprised 289 total patients, with 103 headache events (35.64%), which were randomly split into training cohort (n = 202, 72 headache events) and validation cohort (n = 87, 31 headache events) at a 7:3 ratio. (i) All 40 initial variables were entered into univariate screening. (ii) Variables with P < 0.05 according to univariate logistic regression were retained for further analysis in the training cohort (n = 202, 72 headache events). (iii) The significant variables were then included in LASSO regression for dimensionality reduction. (iv) The optimal penalty parameter lambda was determined using tenfold cross-validation with lambda.min. (v) Variables with nonzero coefficients after LASSO were retained. (vi) The retained variables were further selected using the Boruta algorithm to confirm the final predictors. Multivariate logistic regression was performed to construct the prediction model. The model was evaluated using ROC curves, calibration curves, the Hosmer–Lemeshow test (χ2 statistic and P-value), Brier score with 95% bootstrap confidence interval (CI), DCA, and clinical impact curves. Events per variable (EPV) were calculated at each modeling step using events in the training cohort (n = 72). The initial EPV was 72/40 ≈ 1.8 for 40 candidate variables; the EPV increased to 8.0 for 9 variables after univariate screening and was 12 for the final 6 predictors, which still met the basic requirement for prognostic model development (EPV > 10). The final EPV (> 10) met the basic requirements for prognostic model development 27,28. Overfitting was minimized using LASSO–Boruta feature selection and 500 bootstrap resamplings. All analyses were performed using R software (version 4.2.1). The following packages were used: glmnet (version 4.0-2) for LASSO regression, Boruta (version 7.0.0) for feature selection, rms (version 6.2-0) for nomogram construction, pROC (version 1.18.0) for ROC and AUC analyses, and ggplot2 (version 3.4.0) for graph visualization. Logistic regression was implemented using the glm function (family = binomial). Two-sided P < 0.05 was considered to indicate statistical significance. Results Patient characteristics In this single-center retrospective cohort study, from January 1, 2023, to October 31, 2024, we collected data from 289 patients who underwent hemodialysis at the Nephrology Clinic of the First People’s Hospital of Nantong. Intradialytic headache was experienced by 103 patients (35.64%) but not by 186 patients (64.36%). The demographic characteristics of the patients are detailed in Table 1. Baseline characteristics were well balanced between the training and validation cohorts (Table S1). Table 1Baseline characteristics of patients.CharacteristicsTotal(N = 289)Non-headache (N = 186)Headache (N = 103)PSex < 0.0010151 (52.25%)74 (39.78%)77 (74.76%)1138 (47.75%)112 (60.22%)26 (25.24%)Age (years)53.00 [42.00;66.00]59.00 [47.00;69.00]45.00 [35.50;53.50] < 0.001Weight63.50 [59.30;70.40]66.55 [59.85;75.90]60.90 [58.55;64.40] < 0.001Height (m)1.70 [1.66;1.75]1.70 [1.67;1.73]1.70 [1.65;1.75]0.867BMI (kg/m2)22.94 [19.91;26.02]22.96 [19.91;26.23]22.73 [19.90;25.70]0.829Hypertension0.3890118 (40.83%)72 (38.71%)46 (44.66%)1171 (59.17%)114 (61.29%)57 (55.34%)Diabetes0.0150206 (71.28%)142 (76.34%)64 (62.14%)183 (28.72%)44 (23.66%)39 (37.86%)Smoking0.0700165 (57.09%)114 (61.29%)51 (49.51%)1124 (42.91%)72 (38.71%)52 (50.49%)Dialysis age (years)2.00 [1.00;5.00]2.00 [1.00;5.00]2.00 [1.00;5.00]0.942Ultrafiltration settings2.00 [1.20;2.80]2.00 [1.00;2.70]2.20 [1.30;2.90]0.081Systolic blood pressure (mmHg)129.00 [123.00;139.00]133.00 [125.00;145.00]125.00 [115.00;135.00] < 0.001Predialysis Diastolic Blood Pressure (mmHg)77.00 [66.00;88.00]75.00 [64.00;82.75]85.00 [74.50;92.50] < 0.001Pulse pressure difference53.51 (18.52)59.83 (17.81)42.11 (13.77) < 0.001Heart Rate (beats/min)75.00 [69.00;83.00]75.00 [69.00;83.00]76.00 [70.00;83.50]0.977spKt.V1.31 [1.19;1.52]1.30 [1.16;1.52]1.34 [1.23;1.52]0.150URR66.53 [62.58;71.87]66.64 [62.31;72.99]66.45 [63.80;71.18]0.762Blood flow (ml/min)240.00 [210.00;250.00]250.00 [220.00;250.00]230.00 [210.00;250.00]0.156Neutrophils (10^9/L)3.80 [3.00;4.80]3.80 [3.00;4.60]4.00 [3.10;5.45]0.074Lymphocytes (10^9/L)1.20 [1.00;1.50]1.15 [0.90;1.50]1.20 [1.10;1.50]0.105Monocyte (10^9/L)0.46 [0.36;0.57]0.45 [0.37;0.58]0.46 [0.36;0.56]0.772Eosinophils (10^9/L)0.18 [0.11;0.29]0.18 [0.11;0.28]0.17 [0.11;0.30]0.957Platelets (10^9/L)169.00 [133.00;212.00]168.50 [133.25;209.75]169.00 [133.00;214.00]0.898Hemoglobin (g/L)103.30 (17.35)104.75 (16.52)100.68 (18.55)0.065Calcium (mmol/L)2.18 [2.07;2.32]2.17 [2.06;2.31]2.21 [2.08;2.33]0.540Sodium (mmol/L)140.80 [135.80;145.20]138.75 [132.35;141.60]145.10 [141.50;149.40] < 0.001Potassium (mmol/L)4.64 [4.13;5.24]4.61 [4.13;5.20]4.71 [4.18;5.31]0.315Magnesium (mmol/L)0.85 [0.81;0.90]0.86 [0.80;0.93]0.84 [0.81;0.86]0.001Phosphorus (mmol/L)1.28 (0.24)1.35 (0.22)1.17 (0.24) < 0.001Serum iron (pg/mL)115.00 [53.70;231.00]116.50 [49.27;230.25]109.00 [60.35;226.50]0.921High sensitivity C protein2.18 [0.36;10.03]2.17 [0.29;10.74]2.20 [0.70;9.54]0.732Albumin (g/L)37.30 [34.50;39.70]37.30 [34.70;39.70]37.20 [34.20;39.40]0.501Prealbumin (g/L)298.00 [227.00;355.00]303.50 [225.25;356.75]293.00 [233.00;334.50]0.367Alkaline phosphatase (U/L)80.00 [65.00;97.00]78.50 [64.00;96.00]81.00 [66.50;98.50]0.363Bilirubin (μmol/L)4.90 [3.90;6.40]4.90 [3.80;6.50]5.00 [4.20;6.10]0.760Bile acid (μmol/L)5.09 [3.14;7.63]4.76 [2.85;7.34]5.66 [4.11;8.53]0.041Lactate dehydrogenase (U/L)78.00 [20.00;185.00]78.00 [19.00;197.00]78.00 [24.00;100.00]0.379Glutamyl transpeptidase (U/L)19.00 [13.00;27.00]19.00 [13.00;28.75]19.00 [12.00;26.00]0.301Uric acid (mg/dL)417.93 (113.88)415.69 (110.75)421.97 (119.77)0.662β2 microglobulin (mg/L)21.25 [19.49;22.69]21.34 [19.61;22.70]21.18 [19.22;22.66]0.629Urine creatinine5.69 [4.36;7.12]5.43 [4.16;6.59]6.85 [4.68;7.45] < 0.001BMI, Body Mass Index; Kt/V, dialysis effectiveness index ; spKt.V, single-pool. Baseline characteristics of patients. BMI, Body Mass Index; Kt/V, dialysis effectiveness index ; spKt.V, single-pool. Risk factors associated with headache Univariate logistic regression was performed in the training cohort (n = 202), and 9 variables significantly associated with intradialytic headache were identified (P < 0.05; Table 2). These 9 significant variables were carried forward for dimensionality reduction and feature optimization. Table 2Univariate logistic regression of risk factors associated with hemodialysis-related headache in the training cohort (n = 202).CharacteristicsBSEOR (95% CI)ZPSex−1.7130.340490.180(0.090–0.344)−5.031 < 0.001Age (years)−0.0770.013140.926(0.901–0.949)−5.861 < 0.001Weight−0.0700.016670.933(0.901–0.962)−4.173 < 0.001BMI (kg/m2)0.0050.029711.005(0.948–1.065)0.1740.862Hypertension−0.5290.297110.589(0.328–1.054)−1.7810.075Diabetes0.3750.317451.455(0.778–2.709)1.1820.237Smoking0.4850.295741.624(0.910–2.909)1.6390.101Dialysis age (years)0.0160.040881.017(0.936–1.101)0.4030.687Ultrafiltration settings0.1750.128541.191(0.928–1.539)1.3620.173Systolic blood pressure (mmHg)−0.0540.011940.948(0.925–0.969)−4.497 < 0.001Predialysis Diastolic Blood Pressure (mmHg)0.0480.011961.049(1.025–1.075)3.994 < 0.001Pulse pressure difference−0.0710.011920.931(0.908–0.952)−5.998 < 0.001Heart Rate (beats/min)0.0030.012341.003(0.979–1.028)0.2430.808spKt.V0.2550.534651.291(0.448–3.693)0.4770.633URR−0.0090.02050.991(0.952–1.032)−0.4280.669Blood flow (ml/min)−0.0090.0060.991(0.979–1.002)−1.5560.12Neutrophils (10^9/L)0.1340.084071.143(0.972–1.358)1.5930.111Lymphocytes (10^9/L)0.1300.259781.139(0.670–1.936)0.5010.616Monocyte (10^9/L)−0.6280.867620.534(0.094–2.863)−0.7240.469Eosinophils (10^9/L)−0.5180.650760.595(0.137–1.870)−0.7970.426Platelets (10^9/L)−0.0040.002490.996(0.991–1.000)−1.660.097Hemoglobin (g/L)−0.0070.008630.993(0.976–1.010)−0.8030.422Calcium (mmol/L)−0.1170.215080.889(0.693–1.136)−0.5460.585Sodium (mmol/L)0.0970.023241.102(1.055–1.156)4.191 < 0.001Potassium (mmol/L)0.0530.180921.054(0.736–1.502)0.2910.771Magnesium (mmol/L)−6.0172.141390.002(0.000–0.149)−2.810.005Phosphorus (mmol/L)−3.0370.734890.048(0.011–0.192)−4.133 < 0.001Serum iron (pg/mL)0.0010.000971.001(0.999–1.003)0.9150.36High sensitivity C protein−0.0010.008320.999(0.981–1.015)−0.1550.877Albumin (g/L)−0.0280.033750.973(0.910–1.040)−0.8220.411Prealbumin (g/L)−0.0010.001580.999(0.996–1.002)−0.7420.458Alkaline phosphatase (U/L)0.0030.004221.003(0.995–1.012)0.7320.464Bilirubin (μmol/L)0.0130.07561.013(0.871–1.174)0.1670.868Bile acid (μmol/L)0.0240.028591.024(0.967–1.085)0.8280.408Lactate dehydrogenase (U/L)−0.0030.001690.997(0.994–1.001)−1.6270.104Glutamyl transpeptidase (U/L)−0.0120.008970.988(0.968–1.002)−1.3760.169Uric acid (mg/dL)0.0010.00131.001(0.999–1.004)0.7990.424β2 microglobulin (mg/L)−0.0190.029850.981(0.919–1.037)−0.6420.521Urine creatinine0.2690.09681.308(1.085–1.588)2.7770.005BMI,Body Mass Index; Kt/V, dialysis effectiveness index ; spKt.V, single-pool Kt/V;URR,Urea reduction ratio ; Univariate logistic regression of risk factors associated with hemodialysis-related headache in the training cohort (n = 202). BMI,Body Mass Index; Kt/V, dialysis effectiveness index ; spKt.V, single-pool Kt/V;URR,Urea reduction ratio ; To avoid overfitting and select robust predictors, LASSO logistic regression was applied to the 9 candidate variables, with headache status as the dependent variable. The LASSO coefficient profiles of all the candidate features are shown in Fig. 2A, where the coefficients are gradually compressed to zero with increasing penalty strength; each row represents one variable. Feature selection using LASSO regression and the Boruta algorithm. (A) LASSO coefficient profiles of clinical variables. Each row represents one variable. (B) Tenfold cross-validation to select the optimal lambda λ (lambda.min) in LASSO. (C) Final predictors confirmed by Boruta feature selection. The optimal penalty parameter λ was determined by tenfold cross-validation based on the area under the ROC curve (AUC). The cross-validation results are shown in Fig. 2B, and λ.min (the λ value with minimum cross-validation error) was selected to retain the most predictive variables. Using this threshold, LASSO regression filtered the initial 9 variables down to a refined set. To confirm stable and clinically meaningful predictors, the Boruta feature selection algorithm was then applied to the LASSO-retained variables. After iterative random forest sampling and importance testing, six independent predictors were ultimately identified: sex, age, weight, difference in pulse pressure, serum sodium concentration, and serum phosphorus concentration (Fig. 2C). In our cohort, serum sodium levels ranged from 132 to 149 mmol/L (median [IQR]: 140 [136–144] mmol/L), all within the normal physiological range of 130–150 mmol/L. Multivariate logistic regression was then performed using these six variables. Variance inflation factor (VIF) analysis confirmed that there was no multicollinearity (all VIFs < 5). The final multivariate model was constructed using the forced-entry method (Table 3). Table 3Multivariate logistic regression analysis of risk factors for headache.VariablesBSEOR (95% CI)ZPSex−1.4740.451930.229 (0.091–0.543)−3.2610.001Age−0.0560.016230.945 (0.914–0.974)−3.4520.001Weight−0.0570.020950.944 (0.903–0.981)−2.7430.006Pulse pressure difference−0.0580.015740.943 (0.912–0.971)−3.7120Sodium (mmol/L)0.0340.016771.034 (1.004–1.081)2.0230.043Phosphorus (mmol/L)−2.4620.998120.085 (0.011–0.570)−2.4660.014OR, odds ratio; CI, confidence interval; VIF, variance inflationfactor.The intercept (constant term) of the multivariable logistic regression model was β₀ = − 8.56. Multivariate logistic regression analysis of risk factors for headache. OR, odds ratio; CI, confidence interval; VIF, variance inflationfactor. The intercept (constant term) of the multivariable logistic regression model was β₀ = − 8.56. Nomogram for estimating headache risk Patients were divided into training (n = 202) and validation (n = 87) cohorts at a 7:3 ratio using simple random sampling based on the unique random identification number for each patient (Supplementary file 1). The probability of intradialytic headache in hemodialysis patients was estimated using an individualized nomogram based on the risk factors selected by LASSO regression, Boruta feature selection, and binary logistic regression (Fig. 3). A nomogram was used to score each factor on a scale of 0–100, reflecting its regression coefficient regarding the probability of a headache. The cumulative score was determined by summing the scores associated with each factor to determine the probability of a headache for an individual. This calculation involved the creation of a vertical line from each factor axis that intersected the point axis on the nomogram. The total score generated was compared to the total score table to determine the probability. Boruta feature selection and multiple logistic regression-based clinical nomograms were used to predict the likelihood of HRH. Each variable corresponds to a specific point on the “Points” scale; summing these points yields the “Total Points” scale, which is then mapped to the predicted probability on the “Diagnostics Possibility” scale. [Note: The Sodium axis is plotted from 0 to 160 mmol/L for technical plotting purposes only; all patients in the cohort fall within the physiological range of 132–149 mmol/L. The clinically relevant range (130–150 mmol/L) is highlighted here, and point assignments are only meaningful within this range.] Validation of the nomogram models The optimal cutoff value for the predicted probability was determined using the Youden index (Youden = sensitivity + specificity − 1) in the training cohort. The same cutoff was applied in the validation cohort to ensure consistency. No predefined risk stratification was used; risk was presented as a continuous probability. The training cohort model (Fig. 4A) had an AUC of 0.909 (95% CI 0.8662–0.9522; De Long method), while the testing cohort model (Fig. 4B) had an AUC of 0.873 (0.8002–0.946; De Long method). The model showed good calibration in both the training and validation cohorts. The model was adequately corrected, as indicated by the Hosmer–Lemeshow goodness-of-fit test for the training cohort (χ2 = 9.7175, P = 0.2854) and the validation cohort (χ2 = 12.1, P = 0.1468). Five hundred bootstrap resampling iterations were performed separately in the training cohort and validation cohort to generate calibrated curves. The Brier score was 0.110 (95% bootstrap CI 0.082–0.138) in the training set and 0.141 (95% bootstrap CI 0.105–0.177) in the validation set, indicating low overall prediction error (Fig. 5A, B). The calibration curve demonstrated a robust correlation between the predicted and actual probabilities of occurrence. The calibration of the model was assessed, with an intercept of 0.01, a slope of 1.04, an integrated calibration index (ICI) of 0.02, and an E-statistic of 0.05. Evaluation and internal validation of the nomogram. The good discriminating ability of the model was demonstrated by (A) the AUC (AUC = 0.909) for the training group and (B) the AUC (AUC = 0.873) for the validation group. Calibration curves were used to assess the consistency of HRH predicted risk with actual risk. Calibration curves for the training and validation groups are shown in (A) and (B), respectively. Clinical utility of the nomogram The test variable was the predicted probability of the calibration plot, and the state variable was the incidence of headache during dialysis. These variables were used to evaluate the clinical utility of the nomogram. As illustrated in Fig. 6, we developed a clinical decision curve (DCA) for the nomogram model. The threshold probability is represented on the X-axis, while the net benefit is on the Y-axis. No headaches were reported by any of the patients, as indicated by a narrow solid black line, whereas headaches were reported by all patients as solid gray lines. For this investigation, the clinical benefits of the predictive model are illustrated by the red curve. The decision curve indicated that the model is advantageous over a relatively extensive threshold probability range. Furthermore, the clinical effect curves (Fig. 7A, B) demonstrated that this prediction model is effective in clinical applications, as the two curves nearly coincide when applied to a population of 1000 individuals. Clinical decision curves for the nomogram models. Decision curves for the training set and validation set are shown in (A) and (B), respectively. Clinical impact curve. Clinical impact curves for the training set and validation set are shown in (A) and (B), respectively. The red line indicates the number of individuals the model considers high risk based on different probability factors. The blue line shows how many high-risk individuals, as determined by the model, have an outcome event that falls below specific probability requirements. To conduct a more thorough assessment, we compared the ROC curves of the predicted nomograms with those of models that employed a single predictor. The plausibility of the model is illustrated in Fig. 8, which shows that the area under the curve of the nomogram was greater than that of the model when sex, age, weight, pulse pressure difference, serum sodium concentration, and serum phosphorus concentration were independently used. These findings indicate that the AUCs of the single‑predictor models were consistently smaller than those of the full nomogram (Fig. 8), underscoring the robust performance of the model. Additional nomogram model scores indicated that individuals who experienced headaches had substantially higher scores than those who did not (Fig. 9). Comparison of AUCs between the nomogram and single‑predictor models. Nomogram model scores. (A) Distribution in the training set; (B) distribution in the validation set. Discussion Dialysis remains the primary means of survival for more than one million individuals worldwide. The lives of hundreds of thousands of patients with end-stage renal disease have been prolonged as a result of the prevalent use of dialysis29. Although hemodialysis is essential for preserving the lives of patients, it does not resolve all the problems associated with renal dysfunction. Consequently, hemodialysis patients experience various complications30,31. Hypotension, muscle cramping, nausea and vomiting, headache, chest pain, back pain, fever, and trembling are among the most prevalent adverse effects of hemodialysis. Approximately 28–73% of hemodialysis patients may experience dialysis headache9,14,32. Currently, predictive models are receiving increasing attention in various clinical fields, including sepsis, malignant tumors, and Kawasaki disease. Additionally, there is a growing body of pertinent literature in these fields33–36. Nevertheless, there is currently a dearth of predictive models for headache development following hemodialysis. Consequently, our objective was to create a predictive model for headache development during dialysis to assist in clinical decision-making and offer personalized treatment strategies. The clinical and laboratory data of 289 hemodialysis patients were retrospectively analyzed and included 40 indicators, including readily available laboratory, anthropological, and dialysis-related data. Through a series of statistical methods, we identified sex, age, weight, pulse pressure difference, serum sodium concentration, and serum phosphorus concentration as independent risk factors for headache among dialysis patients. After we developed a simple and accurate nomogram, the model was internally validated and demonstrated promising efficacy and clinical applicability. In agreement with prior discoveries, 35.64% of our cohort experienced headaches37. The pathophysiological mechanism of hemodialysis-related headache remains obscure; however, numerous predisposing factors, such as serum sodium and magnesium levels, caffeine deficiency, tension, and changes in blood pressure during hemodialysis, have been identified38. Women and young adults have been previously identified as having a high incidence of primary headaches, including migraine and tension-type headache39. Furthermore, Quan Gan et al. demonstrated that low body weight and low PP may serve as prospective risk factors for HRH37. In addition, the influence of changes in serum sodium on HRH is not well understood, even though two studies have indicated that patients with HRH have higher predialysis serum sodium levels (p = 0.003)9 or potentially greater disparities in predialysis and postdialysis sodium levels (p > 0.05)14. In particular, a reduction in the dialysate sodium concentration may induce or exacerbate headaches during HD. Finally, modest to moderate hypophosphatemia is typically asymptomatic, whereas severe hypophosphatemia is linked to severe complications, including rhabdomyolysis, impaired bone mineralization, respiratory failure, central nervous system dysfunction, and hemolytic anemia40,41. Notably, several factors with established mechanistic relevance to HRH—including serum magnesium concentration, intradialytic blood pressure variability, inflammatory markers such as C-reactive protein (CRP), nutritional parameters such as albumin, and dialysis adequacy indices—were not retained as final predictors in the present model. This does not imply a true lack of biological association with HRH. Instead, the exclusion of these variables may be attributed to the rigorous sequential feature selection (LASSO + Boruta) used to minimize multicollinearity and overfitting, the use of predialysis static variables rather than real-time intradialytic measurements, and potential constraints related to sample size and parsimonious model selection. Our final model therefore reflects the most robust, independent, and routinely available predictors rather than capturing all pathophysiologically relevant factors. As supported by recent evidence, clinical outcomes in maintenance hemodialysis are determined by interactions among metabolic, hemodynamic, and inflammatory processes rather than by isolated risk factors42,43. The final predictors (sex, age, weight, pulse pressure difference, serum sodium concentration, and serum phosphorus concentration) should therefore be interpreted within an integrated systemic framework. As highlighted by Yaprak et al.42 and Arslan43, body composition and cardiometabolic status further modulate overall risk in hemodialysis patients. Notably, the sodium axis in the nomogram is designed for the range of values encountered in our study, and the full 0–160 mmol/L scale is included only for technical plotting purposes, with no clinical relevance assigned to values outside the physiological range. Pulse pressure reflects systemic hemodynamic stress and vascular stiffness, which impair cerebral perfusion and increase neural vulnerability during hemodialysis. Serum sodium drives osmotic shifts across the blood–brain barrier, triggering cerebral edema and headache—the core neurovascular mechanisms of HRH. Serum phosphorus reflects systemic metabolic dysregulation associated with chronic kidney disease–mineral and bone disorder (CKD-MBD), which is closely linked to inflammation and endothelial dysfunction. These variables do not operate independently; instead, they constitute an interconnected network of systemic physiological disturbances that underpin hemodialysis-associated complications, positioning hemodialysis-related headache (HRH) within a broader pathophysiological framework. To the best of our knowledge, this study is the first to develop a predictive model for headache in hemodialysis patients. Previous studies, including those by Xiong et al.18 and Gan et al.37, have reported quantitative analyses of risk factors for hemodialysis-related headache18,37. A nomogram was developed to assist clinicians in predicting the risk of headache. The risk prediction capability of the nomogram was 0.909 and 0.873 for the training and validation sets, respectively. The primary benefits of this study are threefold: first, we used straightforward and objective clinical data to develop prediction models; second, the variables used to construct the prediction models are easily accessible, which significantly enhances the universality of the model and simplifies its implementation in clinical settings; and third, our nomograms demonstrated significant calibration, consistency, and differentiation. Importantly, the developed model predicts the cross‑sectional risk of being an HRH‑positive patient rather than per‑session headache risk during individual dialysis treatments. ICHD-3 criterion 6.7.5 defines HRH as a transient, session-dependent phenotype; our model reflects the overall likelihood that a patient suffers from HRH as a consistent problem, which is more clinically relevant for risk stratification and long-term preventive management. From a clinical perspective, this nomogram provides a simple, practical tool for identifying patients at elevated risk of hemodialysis-related headache using only routinely available predialysis variables. For patients classified as high risk, clinicians can implement targeted preventive strategies, including closer monitoring of intradialytic blood pressure and hemodynamic stability, individualized adjustment of the dialysate sodium concentration, optimization of serum phosphorus control, and careful management of interdialytic weight gain. By enabling early risk stratification, this model supports proactive, patient-centered care and may help reduce the incidence and severity of HRH, thereby improving treatment tolerance and quality of life among patients undergoing maintenance hemodialysis. The number of events per variable (EPV) was 1.8 for the initial 40 candidate variables, which was relatively low but increased to 12 for the final 6 predictors after rigorous feature selection.This final EPV (> 10) supports the stability of the model. Bootstrap optimism correction was applied to reduce overfitting and adjust the apparent AUC, as recommended for prediction model research27,28. Several limitations of the present study should be acknowledged. First, this was a single‑center retrospective study with a relatively small sample, which may limit its generalizability to broader or more diverse hemodialysis populations. Prospective external validation in independent multicenter cohorts is a critical next step to confirm model stability and generalizability before wider clinical implementation. Second, external validation of the nomogram was not performed in independent cohorts. Third, intradialytic dynamic variables, including blood pressure changes, ultrafiltration rate trajectories, and the dialysate‑to‑serum sodium gradient, which are considered mechanistically important for hemodialysis‑related headache, were not included in the model. Fourth, the dialysate sodium concentration was fixed at 140 mmol/L for all patients; therefore, the model cannot evaluate the effect of varying dialysate sodium levels. Fifth, patient‑reported outcome measures, such as headache intensity, the ICHD-3 phenotype, and the use of prophylactic or abortive medications, were not available in this study. Conclusion We developed an HRH risk prediction model based on a single-center retrospective cohort to provide a valuable reference for identifying and preventing headache risk; however, external multicenter validation is needed to further confirm its clinical generalizability. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 2 Supplementary Material 3 Supplementary Material 4 Author contributions Benyin Yuan (BYY) and Haiyan Xue (HYX) wrote the first draft of the manuscript and contributed equally to data collection and statistical analysis. Junjie You (JJY) and Huaxing Huang (HXH) supervised the study, revised the manuscript, and served as corresponding authors. Funding The present study was supported by the Nantong Health Commission Project (MS2025018). Data availability A completed TRIPOD 2021 checklist for the development and internal validation of a clinical prediction model is provided as Supplementary File 2. Data is provided within the manuscript or supplementary information files. Declarations Competing interests The authors report no conflicts of interest in this work. Ethics approval and consent to participate The research involving human subjects was reviewed and approved by the Medical Ethics Review Committee of Nantong First People’s Hospital (ethical approval number 2024KT435), in strict adherence to the principles of the Declaration of Helsinki, and informed consent was obtained from all subjects. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Benyin Yuan and Haiyan Xue have contributed equally to this work. Contributor Information Junjie You, Email: 972482570@qq.com. Huaxing Huang, Email: huasumg@163.com. References Associated Data Supplementary Materials Supplementary Material 1 Supplementary Material 2 Supplementary Material 3 Supplementary Material 4 Data Availability Statement A completed TRIPOD 2021 checklist for the development and internal validation of a clinical prediction model is provided as Supplementary File 2. Data is provided within the manuscript or supplementary information files.