← Latest papers
📊 statistics

Ablation Study of Class Imbalance Techniques for Credit Default Prediction with SHAP-based Explainability Analysis

This study demonstrates that on credit default prediction tasks, XGBoost's built-in `scale_pos_weight` parameter significantly outperforms the traditional SMOTE resampling technique in recall, highlighting that the optimal strategy for handling class imbalance depends on the specific classifier used rather than a universal resampling method.

Original authors: Atharv Tiwari

Published 2026-07-30
📖 6 min read🧠 Deep dive

Original authors: Atharv Tiwari

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to find a single thief hiding in a crowd of 100 people. Ninety-two of them are innocent, and only eight are guilty. If you just guess "everyone is innocent," you'd be right 92% of the time! But you'd catch zero thieves. In the world of computer science, this is called the "class imbalance" problem. It happens when a computer model is trained on data where one outcome (like a loan being paid back) happens way more often than the other (a loan defaulting). Because the computer sees so many "good" examples, it gets lazy and just predicts "good" for everyone, failing to spot the rare "bad" ones.

For years, the standard fix for this has been a technique called SMOTE. Think of SMOTE as a photocopier for the rare cases. If you only have eight photos of thieves, SMOTE creates fake, synthetic photos of new thieves by mixing and matching details from the real ones, hoping to give the computer enough practice to learn the pattern. But there's another way. Some computer models, specifically a powerful type called XGBoost, have a built-in "volume knob" for mistakes. Instead of making up fake data, you can just tell the computer, "Hey, if you miss a thief, that's a huge mistake! If you miss an innocent person, that's a small mistake." This forces the model to pay extra attention to the rare cases without ever touching the original data.

The big question is: Is it better to make up fake practice data (SMOTE), or just turn up the volume on the mistakes (the built-in knob)? A new study by Atharv Tiwari from Punjab Engineering College puts these two approaches head-to-head to see which one actually catches more thieves in the real world of credit scoring.


The Great Credit Card Showdown

In this study, the researcher set up a massive experiment using a real-world dataset of over 300,000 loan applications. In this crowd, 92% of people paid their loans back, and only 8% defaulted. It was the perfect setup to test how well different computer models could spot the 8% without getting distracted by the 92%.

The researcher didn't just pick one model; they tested three different "detectives":

  1. Logistic Regression: The old-school, reliable detective who follows strict rules.
  2. Random Forest: A team of detectives who each look at the clues differently and vote on the answer.
  3. XGBoost: A super-smart detective that learns from its mistakes one by one, getting sharper with every round.

Each detective was given three different training strategies:

  • The "Do Nothing" Strategy: Just throw the raw data at them and see what happens.
  • The "Volume Knob" Strategy: Use the model's built-in settings to penalize missing a defaulter heavily (no fake data).
  • The "Photocopier" Strategy: Use SMOTE to create fake defaulters to balance the training data.

The Shocking Result

The results were a bit like a plot twist in a mystery movie. The "Do Nothing" strategy failed miserably for everyone, catching almost no defaulters (less than 2.2% recall). That was expected. But the battle between the "Volume Knob" and the "Photocopier" was where things got interesting.

When the researcher used XGBoost, the built-in "Volume Knob" strategy crushed the competition. It managed to catch 64.8% of the actual defaulters. The "Photocopier" strategy (SMOTE), which has been the go-to solution for decades, only caught 43.3%. That is a massive gap of 21.5 percentage points. The researcher ran strict statistical tests (called McNemar's test) and confirmed this wasn't a fluke; the difference was so huge it was statistically certain (p<106p < 10^{-6}).

However, the story changed completely when they switched to Random Forest. For this model, the "Volume Knob" barely worked (catching only 7.8% of defaulters), while the "Photocopier" (SMOTE) did much better, catching 41.2%.

This suggests that there is no single "magic bullet" for fixing imbalanced data. What works for one type of computer model might fail for another. The study suggests that for the specific, powerful XGBoost model, simply telling the model to care more about the rare mistakes is far superior to feeding it a diet of synthetic, fake data.

Why the Photocopier Failed (and the Knob Won)

So, why did making up fake data hurt the XGBoost model? The researcher explains that when you have a complex dataset with 192 different features (like income, age, and credit history), creating a fake person by mixing two real people can result in a "monster" that doesn't exist in reality. It's like trying to blend a picture of a cat and a dog to make a new animal; the result might look weird and confuse the computer. The model ends up learning from noise instead of real patterns.

The built-in "Volume Knob" avoids this trap entirely. It doesn't touch the data or create fake examples. It just changes the math behind the scenes to say, "Don't miss the rare ones!" This kept the training clean and allowed XGBoost to perform at its best.

The "Why" Behind the "Who"

To make sure this winning model wasn't just a black box making random guesses, the researcher used a tool called SHAP (which stands for SHapley Additive exPlanations). Think of SHAP as a magnifying glass that shows exactly which clues the detective used to make a decision.

The analysis revealed that the model was behaving logically. The most important clue was the external bureau score (a credit score from other banks). This makes perfect sense: if someone has a history of paying back other lenders, they are likely to pay you back too. The model also looked at the ratio of the loan amount to the repayment amount and the borrower's age. Crucially, the model's reasoning was transparent and defensible, which is a big deal for banks that need to explain their decisions to regulators.

The Bottom Line

The study concludes that before you start generating thousands of fake data points to fix an imbalance, you should try the simpler, built-in tools your model already has. For XGBoost, the built-in weighting was not just easier to use; it was significantly more effective, catching nearly 22% more defaulters than the traditional method.

However, the researcher warns that this isn't a universal rule. Because Random Forest performed better with the "Photocopier" method, you can't assume one technique works for every model. The best approach depends entirely on which "detective" you are using. In the regulated world of banking, where catching defaulters is vital but explaining decisions is mandatory, this finding offers a clearer, more efficient path forward: try the simple knob first, but always check if it fits your specific model.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →