The integration of railway stations into urban environments necessitates a detailed examination of their vitality and influencing factors. This study assesses urban vitality around four major railway stations in Beijing utilizing a variety of analytical models including Ordinary Least Squares, Geographically Weighted Regression, Multi-Scale Geographically Weighted Regression, and machine learning approaches such as XGBoost 2.0.3, Random Forest 1.4.1.post1, and LightGBM 4.3.0. These analyses are grounded in Baidu heatmaps and examine relationships with spatial form, functional distribution, and spatial configuration. The results indicate significant associations between urban vitality and variables such as commercial density, average number of floors, integration, residential density, and housing prices, particularly in predicting weekday vitality. The MGWR model demonstrates enhanced fit and robustness, explaining 84.8% of the variability in vitality, while the Random Forest model displays the highest stability among the machine learning options, accounting for 76.9% of vitality variation. The integration of SHAP values with MGWR coefficients identifies commercial density as the most critical predictor, with the average number of floors and residential density also being key. These findings offer important insights for spatial planning in areas surrounding railway stations.