Abstract:The discrimination of tectonic settings for rhyolites holds significant importance in geodynamic research. However, traditional graphical methods, constrained by low-dimensional parameter spaces and the influence of post-emplacement alteration, struggle to effectively resolve complex magmatic genetic mechanisms, leading to uncertainties in tectonic discrimination results. In recent years, machine learning (ML) techniques have been widely applied in Earth sciences, with intelligent identification of tectonic settings based on multi-dimensional geochemical feature analysis and pattern mining emerging as a critical research direction. This study utilizes the global rhyolite geochemical database (GEOROC) to establish a systematic dataset comprising 5,874 high-quality rhyolite samples, incorporating 46 parameters including major, trace, and rare earth element (REE) concentrations and ratios. Nine ML classifiers were developed, encompassing ensemble tree models (XGBoost, LightGBM, CatBoost), support vector machines (SVM), and deep learning architectures (MLP, TabPFN), with hyperparameters optimized via the Optuna algorithm to enhance model performance. Experimental results demonstrate that the Transformer-based TabPFN model achieved optimal performance without hyperparameter tuning, attaining a test-set accuracy of 88.37% and AUC value of 98.39%, highlighting its superiority in geochemical data learning. The optimized LightGBM model exhibited an improved average accuracy of 87.98%, confirming the efficacy of hyperparameter optimization. Interpretability analyses using SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) identified critical discriminators including Cs, Hf, and Th/Ta ratios, whose contributions correlate closely with geodynamic processes such as subduction-related fluid activity, mantle partial melting, and crust-mantle interactions. Meanwhile, trace elements traditionally overlooked in conventional studies (e.g., Ga, Co) exhibited significant classification power, suggesting the potential value of multi-element synergy analysis in tectonic discrimination. This research demonstrates that integrating high-dimensional geochemical data with interpretable ML models substantially enhances tectonic setting identification accuracy, providing a novel methodology for determining the tectonic affinity of felsic magmatic rocks and advancing regional geodynamic evolution studies.