Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Machine Learning for Finnace & Accounting Level Three · Lesson 8 of 10

Module Seven

📖 Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
8
Module 7: Interpretability, Fairness & Model Risk Management for Young Coders
⭐ Module 7 · Level Three

Interpretability, Fairness
& Model Risk

⚖️ Powerful models must also be trustworthy and fair

🎯 What you'll learn in this module

  • ✔ How SHAP, LIME, partial dependence, and counterfactuals explain model decisions
  • ✔ What fairness metrics mean — and how bias sneaks into credit decisions
  • ✔ The basics of model risk management frameworks (SR 11‑7)
  • ✔ How governance, documentation, and model inventory keep models accountable
  • ✔ What regulators expect: IFRS, GAAP, GDPR, Basel
  • ✔ How to detect and respond to drift in production
🔮
Why Interpretability Matters
The Big Idea

Imagine a bank rejects your loan application. You ask "why?" and the answer is: "the model said no." That's not acceptable — not legally, not ethically, and not for trust.

Interpretability means understanding why a model made a decision. In finance, it's not optional. Regulators require it, customers deserve it, and auditors need it. Even the best‑performing model is useless if nobody can explain what it's doing.

🏥 A doctor who says "take this pill, I can't explain why" isn't very trustworthy. A model without explanations is the same.
🧪
SHAP & LIME: Explaining Any Model
Explanations

SHAP (SHapley Additive exPlanations) is a technique that attributes a prediction to its input features, using game theory. It answers: "how much did each feature push this prediction up or down?"

LIME (Local Interpretable Model‑agnostic Explanations) builds a simple, interpretable model around one prediction to explain it locally. Both are powerful — you can use them on top of any black‑box model.

🤖 Complex model
→
🧪 SHAP / LIME
→
🔍 Feature explanations
🔬 If the model is a smoothie, SHAP tells you exactly how much of each fruit contributes to the flavour.
📈
Partial Dependence & Counterfactuals
Explanations

Partial dependence plots show how the prediction changes as one feature varies — while averaging out all others. Very useful for "what would happen if income went up by $10k?"

Counterfactual explanations take it further: "your loan would have been approved if your income were $5,000 higher." It gives people an actionable answer — not just a reason for rejection, but a path forward.

🎯 "You missed the shot because you aimed too low" is partial dependence. "Aim 2 cm higher and you'll hit the bullseye" is a counterfactual.
⚖️
Fairness Metrics & Bias in Credit Decisions
Fairness

Models can inherit historical bias. If past lending practices excluded certain groups, a model trained on that data will repeat the same patterns — even without meaning to.

Several fairness metrics help detect this:

Metric Question It Asks
Demographic Parity Are approval rates equal across groups?
Equal Opportunity Are qualified people equally likely to be approved?
Calibration Does a 5% PD mean 5% defaults for every group?

There's no perfect metric — fairness is a judgment call that depends on context and values. The important thing is to measure and debate openly.

🏀 A fair referee doesn't just count fouls — they ensure both teams get the same standard. Fairness metrics are how we check the referee.
📊
Model Risk Management (SR 11‑7)
Governance

A model isn't just a file — it's a decision‑making system. If it goes wrong, real money and real people are affected. Model risk management is the discipline of preventing that.

The US Federal Reserve's SR 11‑7 guidance outlines best practices: model development (documented), validation (independent), governance (clear ownership), and ongoing monitoring. Banks around the world follow similar rules.

🏗️ A building isn't done when it's built — it needs inspections, safety checks, and ongoing maintenance. Models are the same.
📚
Governance, Documentation & Model Inventory
Governance

Every model in production should be in a model inventory — a master list with: what it does, who owns it, what version is live, when it was last validated, and how often it should be re‑reviewed.

Each model needs documentation: purpose, training data, performance metrics, limitations, and assumptions. This documentation becomes the model's "passport" — without it, the model can't legally make consequential decisions in many jurisdictions.

📖 Every car has a manual. Every model should too — because when something goes wrong, you'll want to know exactly what's under the hood.
🏛️
Regulations: IFRS, GAAP, GDPR, Basel
Compliance

Financial ML doesn't exist in a legal vacuum. Four key areas to know:

IFRS & GAAP: accounting standards. If your model affects financial reports, it must follow these standards.

GDPR (and similar): data protection laws. Customers have rights about their data — including the right to explain "automated decisions" that affect them.

Basel II/III: banking regulations. Capital requirements depend on your risk models — so models must be validated and audited.

🚦 Regulations are traffic lights. They don't slow you down — they keep everyone safe on the road.
📉
Drift Detection & Monitoring in Production
Monitoring

Models degrade over time because the world changes. Data drift happens when the input data shifts (customer behavior changes). Concept drift happens when the underlying relationships change (e.g., a recession changes how income predicts default).

Monitoring catches this: track prediction distributions, feature statistics, and model accuracy over time. Set thresholds that trigger a review or retrain. A model that was world‑class in 2022 might be dangerous in 2024.

📻 A radio tuned perfectly in one location needs retuning when you drive somewhere else. Models drift the same way.
⚠️ Fairness paradox: Different fairness metrics often conflict with each other. You can't always satisfy all of them at once. That's not a bug — it's a fundamental tension that requires transparent discussion with stakeholders. Choose your metrics, justify them, document the tradeoffs.

🛠️ Hands-on activities (no boring stuff!)

1

Explain the score: Make up a loan‑approval model with 5 features (income, age, debt, job years, defaults). For one applicant, list how much each feature pushed the decision up or down. Then write a plain‑English explanation of the outcome.

2

Counterfactual challenge: A loan was rejected. Write 3 different counterfactuals ("you would have been approved if..."). Which one is most useful to the applicant? Which one is fair to suggest?

3

Fairness debate: Imagine a model approves 70% of Group A and 50% of Group B. What could cause this? Is it necessarily unfair? Write two paragraphs: one arguing it's fair (different risk profiles), one arguing it's not (historical bias).

4

Model inventory sketch: Design an entry for a "credit risk model" in a model inventory. Include: name, owner, version, last validation date, and known limitations. Would your bank accept it?

5

Drift detection plan: For a monthly cash‑flow forecasting model, plan what you'd monitor: inputs, outputs, and accuracy. What threshold would trigger a review? What would trigger a retrain?

6

Regulation match-up: Match each situation to the relevant regulation: (a) a customer asks how a loan decision was made, (b) a bank reports its financial position, (c) a bank needs capital reserves for credit risk. Explain each match in one sentence.

🏆

By the end of this module, you'll be able to: explain predictions with SHAP and LIME, check for bias with fairness metrics, understand model risk frameworks like SR 11‑7, document models for regulators, and monitor for drift in production.

🏆 Get Certified

🔒

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

🎓 Sign Up to Get Certified
🛠️ Practice Tools
Hands-on simulators & labs - subscription required.
→
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
→