BackgroundTexture features, derived from both the entire tumor area and the region of the tumor-to-brain interface, are crucial indicators for distinguishing tumor types and their degrees of malignancy. However, the discriminative value of texture features from both regions for identifying glioblastomas and metastatic tumors has not been thoroughly explored. The aim of this study is to develop and validate a diagnostic model that combines texture features from the entire tumor area and a 10mm tumor-to-brain interface region, in an attempt to identify more stable and effective texture features. MethodWe retrospectively collected enhanced T1-weighted imaging data from 97 patients with glioblastoma(GBM) and single brain metastasis(SBM) between 2010 and 2024. Machine learning is used to establish multiple diagnostic models for discriminating GBM and SBM based on texture features of the entire tumor and 10mm tumor-to-brain interface regions. Results underwent evaluation through 5-fold cross-validation analysis, calculating the area under the receiver operating characteristic curve (AUC) for each model. The performance of each model was compared using the Delong test, and the interpretability of the optimized model was further augmented by employing Shapley additive explanations (SHAP). ResultsThe AUCs for all pipelines in the validation dataset were compared using FeAture Explorer (FAE) software. Among the models established by Relief and autoencoder (AE), the AUC was highest using the “one-standard error” rule. ’10mm_glrlm_GrayLevelNonUniformity’ was considered the most stable and predictive feature. The best models in the training set, test set, and validation set were not the same. In the test set, the Relief19AE model had the highest AUC of 0.869 and an accuracy of 0.857. ConclusionThe texture feature model that combines the overall tumor and the tumor-brain interface is beneficial for distinguishing glioblastoma from solitary metastatic tumors, and the texture features of the tumor interface exhibit higher heterogeneity.