How do I deal with extreme class imbalance in a fraud detection Machine Learning model?
I’m building a model where only 0.1% of transactions are fraudulent. My <machine learning> classifier is 99.9% accurate just by predicting "No Fraud" every time, which is useless. Should I use oversampling, or are there specific loss functions that can force the model to care about the minority class?
2025-01-05 in Machine Learning by Susan Montgomery
| 13048 Views
All answers to this question.
Stop looking at "Accuracy" immediately. For fraud, you need to focus on the Precision-Recall Curve and the AUPRC. Accuracy is a lie when classes are this imbalanced. I recommend using Cost-Sensitive Learning rather than simple oversampling like SMOTE. By increasing the "penalty" for missing a fraud case in your loss function, the model is forced to prioritize those rare events. In a 2023 project, we found that SMOTE often created "synthetic" data that didn't actually exist in reality, leading to high false positives. Cost-weighting kept the data real but changed the model's priorities.
Answered 2025-01-08 by Diane Crawford
Have you tried using Anomaly Detection algorithms like Isolation Forest instead of a standard supervised classifier?
Answered 2025-01-10 by Arthur Moore
-
Isolation Forest is a great alternative approach for machine learning when you don't have enough "bad" examples to train on. It works by identifying what is "abnormal" rather than trying to define what "fraud" looks like. However, if you have at least a few thousand fraud cases, a balanced Random Forest or an EasyEnsemble classifier usually performs better. These methods down-sample the majority class for each bootstrap sample, ensuring the model sees a balanced view of the world during every step of the training process.
Commented 2025-01-11 by Howard Taylor
Focus on the "Recall." It’s much more expensive to miss a fraudster than it is to manually verify a few extra "suspicious" legitimate customers.
Answered 2025-01-12 by Benjamin Lee
-
Exactly, Benjamin. In fraud detection, the business cost of a "False Negative" is much higher than a "False Positive." Your metrics should reflect that reality.
Commented 2025-01-13 by Susan Montgomery
Write a Comment
Your email address will not be published. Required fields are marked (*)

