Credit-card fraud detection is difficult because fraud is extremely rare, the underlying patterns are non-linear, and naive feature engineering easily introduces data leakage that inflates offline results. This paper presents a fair, controlled comparison of five machine-learning and deep-learning models -- Logistic Regression, Random Forest, XGBoost, LightGBM, and a Multi-Layer Perceptron (MLP) -- on a public dataset of 8,914,963 transactions with a 0.15% fraud rate. We engineer 36 features in six groups and construct all behavioural (velocity) features causally, using left-closed rolling windows so that no future information leaks into a prediction. Every model is trained and evaluated under identical conditions with cost-sensitive learning, and we argue that the Precision-Recall Area Under the Curve (PR-AUC), rather than ROC-AUC, is the honest metric under extreme imbalance. XGBoost attains the best performance (PR-AUC 0.8901), decisively outperforming the deep-learning model and confirming that gradient-boosted trees dominate on tabular fraud data. Using SHAP and an ablation study we interpret the model, identify a coherent refund-abuse mechanism, and show that velocity features contribute marginally (+0.0051 PR-AUC) once transaction-context features are present. Finally, we deploy the best model as an explainable real-time service.
sokpheng ly (Tue,) studied this question.