---
id: 18572
lang: en
title: "Removing Gender and Age From Credit Scoring Isn't Enough: 9 Audit Traps With SHAP and LIME"
published_at: "2026-11-28 16:31:04"
source_name: "Хабр: Машинное обучение"
source_url: "https://habr.com/ru/articles/1113578/?utm_campaign=1113578&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18572"
categories: ["research", "business"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Removing Gender and Age From Credit Scoring Isn't Enough: 9 Audit Traps With SHAP and LIME

> **Краткая суть (BLUF):** A bank removed gender and age from its credit scoring model, but the approval gap between men and women persisted. Region, occupation and application channel carry the same information. Auditors check this with SHAP and LIME, methods that show which features influenced a decision, and both come with 9 traps. The author trained XGBoost 20 times on German Credit. Intersecting SHAP and LIME filters out spurious features, but on weak signals it misses real proxies.  • "Proxies" are features like region that stand in for gender and age • The approval gap shifts together with the approval threshold τ • Test: 20 XGBoost runs on the open UCI German Credit dataset

A typical story: a credit scoring team removes the "gender" and "age" columns from the table, compliance ticks the box, and the model goes into production. Yet women are still approved for loans less often than men with similar profiles. Region, occupation and application channel carry the same information, and gradient boosting finds those links on its own. To understand which features create the skew, auditors use SHAP and LIME, two popular methods that show which columns had the strongest influence on a model's decision. A Habr article describes 9 methodological traps in this approach and tests it in practice: the author trained XGBoost (a popular gradient boosting implementation) 20 times on the open UCI German Credit dataset and compared SHAP, LIME and their combined result.

## Why Dropping a Column Guarantees Nothing

The "fairness through unawareness" approach rests on simple logic: if the model cannot see gender, it cannot account for it. In practice, information about a protected attribute leaks into neighboring columns. Place of residence reflects housing segregation, employment sector is linked to gender, and application channel and device type correlate with age and income. Such columns are called proxies: they act as stand-ins for the removed feature.

The author makes an important caveat: the presence of a proxy does not prove discrimination. It is only a channel through which discrimination becomes possible, and it must be checked separately. Proxies do not arise from an engineer's error but from the statistical structure of the data itself.

Two more factors make the situation worse. The first is reject inference: the real outcome, whether the client repaid the loan, is known only for loans that were issued. If some group was rejected more often in the past, that history is already baked into the training labels. The second is that bias lives not in the model weights but in the combination of data, model and approval threshold. The same boosting model at different thresholds produces different gaps between groups, so the threshold must be recorded in the report.

## What Regulators Require

In the US, the ECOA law and the disparate impact doctrine (the disproportionate effect of decisions on different groups) apply. In the EU, GDPR Article 22 and the AI Act, which classifies creditworthiness assessment as a high-risk system, apply. This leads to two audit requirements: measure the difference in decisions across comparable applications, and identify which features drive it. The second requirement is usually where people turn to SHAP and LIME, and, according to the author, this is where the methodological traps appear.

The author suggests not merging three distinct audit questions into one. Each level has its own question, its own tool and its own limit on what it can tell you. For example, explaining an individual decision does not answer whether a systemic gap exists between groups.

## Experiment on German Credit

To test this, the author ran a controlled experiment: 20 XGBoost runs on the UCI German Credit dataset. Three variants were compared: SHAP, LIME and their combination through intersection. In the last case, a feature counts as significant only if both methods flagged it.

The result is sober. Intersection filters out extra features well, which reduces false alarms. But there is no free gain across all metrics at once: when the signal is weak, the intersection inherits the misses of the more conservative of the two methods. Put simply, you get fewer false positives but risk overlooking a real proxy.

## What to Do in Practice

- Do not treat removing protected columns as a measure of protection. Look for the features that replace them.
- Separate two tasks: measuring the gap in decisions and explaining where it comes from. They require different tools.
- Record the approval threshold in the audit report: the gap between groups changes with it.
- Remember that training labels may carry the history of past rejections.
- If you combine SHAP and LIME, account for the trade-off: fewer spurious features, but a higher chance of missing a weak signal.

The limitation is obvious: German Credit is a small teaching dataset, and its conclusions cannot automatically be transferred to a bank portfolio with millions of applications. But the methodological framework will be useful to any team preparing its scoring for regulatory or internal audit.

---
- **Первоисточник:** [Хабр: Машинное обучение](https://habr.com/ru/articles/1113578/?utm_campaign=1113578&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18572
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
