Removing Gender and Age From Credit Scoring Isn't Enough: 9 Audit Traps With SHAP and LIME
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.
AI-processed from Хабр: Машинное обучение; edited by Hamidun News
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.
- Nov 28, 2026Thousands of Nvidia B300 Chips Hit the Resale Market After US Curbs Remote Access for China
- Nov 28, 2026Russia's Economy Ministry wants to decide who is liable if an AI agent buys the wrong thing for you
- Nov 28, 2026Google links to exact YouTube timestamps in 48.4% of citations, and manual subtitles didn't help
- Nov 28, 2026OpenAI Files Countersuit Against Apple Amid $6.4 Billion Jony Ive Studio Acquisition
Key Questions Answered
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.
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.
What are the key details on 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.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
