Cybercrime in credit card transactions inflicts severe financial damage, with extreme class imbalances often biasing conventional models toward high false positive rates. This study compares and optimizes tree-ensemble algorithms XGBoost and LightGBM to develop a Fraud Detection model that is statistically accurate, computationally efficient, and minimizes real banking financial losses. Utilizing a dataset of 23,769 transactions with a 270:1 imbalance ratio, both models were optimized via the Tree-structured Parzen Estimator and validated using 5-Fold Stratified Cross-Validation. Performance was evaluated through classification metrics, computational efficiency, and the Expected Cost of Misclassification, while Explainable AI via SHAP values ensured model transparency. Results demonstrate LightGBM’s superiority, achieving perfect precision (1.000) and an F1-Score of 0.9714, effectively minimizing financial losses to Rp5,000,000. Although XGBoost trained faster, LightGBM’s 60-millisecond latency meets real-time standards, providing a robust, transparent risk mitigation system for banking operations. The implementation of this architecture significantly enhances the competitiveness of IT efficiency and banking risk governance in the digital era
Copyrights © 2026