Explainable AI (XAI) is no longer optional for UK regulated industries. UK GDPR Article 22 grants data subjects the right to a meaningful explanation of automated decisions that significantly affect them — credit rejections, insurance pricing, hiring screening. FCA Consumer Duty 2023 requires firms to demonstrate fair customer outcomes, including from ML models. The FCA PS23/3 explicitly mentions model explainability as a risk mitigation requirement. Understanding why a model makes a decision is as important as the decision itself.
SHAP (SHapley Additive exPlanations) is the UK industry standard for post-hoc ML explainability. SHAP values decompose a model prediction into additive contributions from each feature, grounded in cooperative game theory. TreeSHAP computes exact Shapley values for gradient boosted trees in milliseconds — enabling real-time explanation generation for credit decisions. Global SHAP importance identifies the most influential features across the entire model; local SHAP values explain individual predictions. FCA model risk teams expect SHAP waterfall charts in model validation documentation.
LIME (Local Interpretable Model-agnostic Explanations) approximates complex model behaviour locally with a simple interpretable model. Better than SHAP for black-box models where SHAP computation is expensive (deep neural networks, large ensembles). Counterfactual explanations ('what would change the outcome?') are the most user-friendly format for UK GDPR Article 22 compliance: 'Your loan was declined. If your income increased by £8,000 per year, the decision would be approved.' Anchor explanations provide sufficient conditions: 'Whenever your credit score is above 680 and employment is permanent, you will be approved.'
Integrating XAI into UK production ML pipelines: SHAP values computed at inference time and stored alongside predictions for regulatory audit trail. Model card XAI section documenting top-10 global features and example local explanations. Fairness analysis using disaggregated SHAP values to detect whether model uses protected characteristic proxies. Codeworth delivers XAI as standard in every production UK ML model — SHAP dashboard, counterfactual generator, and FCA-ready model risk documentation.
Related Codeworth Services
Need Help with Implementation?
The Codeworth team is ready to implement these ideas in your project. Free consultation.
Discuss the ProjectCodeworth team specialist.