Explainability and Interpretability
Key points
- Interpretability: humans understand the model itself (linear models, decision trees, rules); explainability: explaining individual predictions of complex models
- LIME: local approximation of complex models using simple interpretable surrogates; model-agnostic but only locally valid
- SHAP: game-theory-based feature contribution scores; solid theoretical foundation but computationally expensive
- Counterfactual explanations: 'what would change the outcome?' — actionable, intuitive, preserves model confidentiality
- Attention weights show where the model looked, not necessarily why it decided; use cautiously as explanations
- GDPR Article 22: right to meaningful information about automated decision logic; EU AI Act adds transparency for high-risk AI
- US sector-specific: ECOA and FCRA require specific, actionable adverse action reasons for credit decisions using AI
- Use multiple explanation methods and compare; disagreement signals unreliable explanations requiring further investigation
Explainability and Interpretability
Understanding how AI models make decisions is critical for governance, regulatory compliance, and public trust. The AIGP exam requires candidates to distinguish between interpretability and explainability, understand key techniques, and recognise the trade-offs involved.
Core Concepts
Interpretability
Interpretability refers to the degree to which a human can understand the cause of a model's decision by examining the model itself. An interpretable model is one whose internal structure is simple enough for humans to inspect and reason about directly. Linear regression is interpretable because each feature has a coefficient that shows its weight in the prediction. A decision tree is interpretable because the decision logic can be followed as a series of if-then rules. Rule-based systems are interpretable because the rules are explicit and human-readable.
The advantage of interpretable models is transparency by design. The disadvantage is that interpretable models are generally less powerful than complex models. In many applications, a deep learning model will significantly outperform a linear model, creating a tension between interpretability and performance.
Explainability
Explainability refers to the ability to provide explanations of a model's individual predictions, even when the model's internal structure is too complex to inspect directly. With explainability, you may not understand the model as a whole, but you can understand why it made a specific decision in a specific case. Post-hoc explanation techniques apply to any model, including complex deep learning models, making them valuable for high-performance systems that cannot be made inherently interpretable.
Transparency
Transparency encompasses both interpretability and explainability but extends further to include the entire decision pipeline. A fully transparent AI system provides data transparency (what data was used, how it was collected, how it was processed), model transparency (how the model works and what it optimises for), process transparency (how decisions were made about developing, testing, and deploying the system), and decision transparency (why a specific output was produced for a specific input, in terms the affected individual can understand).
Inherently Interpretable Models
Linear Models
Linear models predict outcomes as a weighted sum of input features. Each feature has a coefficient that directly represents its contribution to the prediction. A positive coefficient means the feature increases the predicted value; a negative coefficient decreases it. The magnitude shows how much influence the feature has. In regulated domains such as credit scoring in the United States, linear models have historically been preferred because they produce explanations that satisfy legal requirements for adverse action notices.
Decision Trees
Decision trees represent decisions as a series of branching rules. At each node, the model tests a condition (for example, "is income greater than £30,000?") and branches accordingly. The path from root to leaf traces the complete decision logic. Decision trees are visually intuitive and mimic how humans often make decisions. However, large trees with many branches become difficult to interpret, and trees are prone to overfitting on training data.
Rule-based Systems
Rule-based systems consist of explicit, human-readable rules that are either handcrafted by domain experts or extracted from data. They are fully transparent and easy to audit, making them suitable for regulatory environments. However, creating and maintaining a comprehensive rule set is labour-intensive, rule conflicts can arise, and coverage gaps are inevitable for complex domains.
Post-hoc Explanation Techniques
LIME (Local Interpretable Model-agnostic Explanations)
LIME explains individual predictions by approximating the complex model's behaviour in the local neighbourhood of a specific input. The process works by generating small variations of the input, obtaining the complex model's predictions for each variation, fitting a simple interpretable model (typically a linear model) to these local predictions, and using the simple model's coefficients as the explanation. The strength of LIME is that it works with any model (it is model-agnostic) and produces intuitive explanations. The limitation is that it is a local approximation; the explanation is valid near the specific input but may not reflect the model's global behaviour.
SHAP (SHapley Additive exPlanations)
SHAP draws on cooperative game theory to calculate each feature's contribution to a prediction. It treats the prediction as a "game" where each feature is a "player" and the SHAP value represents each feature's fair contribution to the outcome. SHAP values have several desirable properties: they are locally accurate (the feature contributions sum to the prediction), they satisfy the consistency property (if a feature's contribution increases in a revised model, its SHAP value never decreases), and they handle feature interactions. The main disadvantage is computational expense, particularly for models with many features, and the assumption of feature independence, which may not hold in practice.
Counterfactual Explanations
Counterfactual explanations answer the question "what would need to change to get a different outcome?" Rather than explaining why a decision was made, they explain what an individual could change to reverse it. For example: "Your loan application was denied. If your income were £5,000 higher or your outstanding debt were £3,000 lower, it would have been approved." Counterfactual explanations are particularly valuable because they are actionable (they tell people what to do), they are intuitive (people naturally think in counterfactual terms), and they do not require disclosing the model's internals, preserving trade secrets while still providing meaningful information to affected individuals.
Attention Weights
In Transformer-based models (including LLMs), attention weights show which parts of the input the model focused on when generating each part of the output. Attention maps can be visualised to show which input tokens influenced a particular output token. However, a critical caveat is that attention weights show where the model looked, not necessarily why it made a particular decision. Research has shown that attention weights do not always correlate reliably with feature importance, so they should be used cautiously as explanations.
Legal Requirements for Explainability
GDPR
GDPR Article 22 gives individuals the right not to be subject to decisions based solely on automated processing that produce legal or similarly significant effects. When such automated decisions are made, the data controller must provide "meaningful information about the logic involved." The exact scope of this requirement remains debated. Does it require a full explanation of the algorithm, or only a general description of the decision factors? In practice, regulators have expected more than a generic description but less than full algorithmic transparency.
EU AI Act
The EU AI Act requires high-risk AI systems to be designed to be sufficiently transparent for deployers to interpret and use the system's outputs appropriately. Instructions for use must include information about the system's level of accuracy, robustness, and cybersecurity, and any known limitations. For GPAI models with systemic risk, additional transparency obligations include publishing training data summaries and model evaluation results.
Sector-specific Requirements
In the United States, the Equal Credit Opportunity Act and Fair Credit Reporting Act require lenders to provide specific reasons for adverse credit decisions. When AI is used in credit decisions, the explanations must be specific and actionable ("your debt-to-income ratio is too high") rather than generic ("based on our assessment criteria"). This effectively requires a level of explainability that generic deep learning models may struggle to provide without post-hoc explanation techniques.
Trade-offs and Governance Decisions
Fidelity vs Interpretability
There is a fundamental trade-off between how faithfully an explanation represents the model's actual reasoning (fidelity) and how understandable that explanation is to a human (interpretability). A perfect-fidelity explanation of a billion-parameter neural network would be unintelligible to any human. A perfectly interpretable explanation may oversimplify the model's reasoning to the point of being misleading. Governance requires choosing the right balance for the context: high-fidelity explanations for technical auditors, more interpretable explanations for affected individuals.
Multiple Explanation Methods
Best practice is to use multiple explanation methods and compare their outputs. If LIME and SHAP agree on the most important features for a particular prediction, confidence in the explanation increases. If they disagree, that signals that the explanations may be unreliable and further investigation is needed.
Explanation as a Governance Tool
Explainability serves governance beyond regulatory compliance. It enables developers to debug models and identify unexpected behaviour. It helps auditors verify that the model is not relying on discriminatory features. It builds trust with affected individuals and the public. And it supports meaningful human oversight by giving operators the information they need to exercise judgment.