Learning outcomes
After this lesson, you will be able to:
- Distinguish interpretability, explainability, and an individual explanation without assuming that terminology is universally standardized.
- Compare interpretable-by-design models with post-hoc explanations.
- Describe the strengths and limitations of intrinsic interpretability and post-hoc methods.
- Choose an analysis approach based on the object, audience, purpose, and cost of error.
- Specify testable requirements for an explanation and state its limitations.
1. Three concepts that should not be conflated
In the previous lesson, we treated model interpretability as how accessible the model's design and behaviour are to human understanding. Research terminology is not fully standardized: authors use interpretability and explainability in different ways. In a practical project, it is more useful to define the terms operationally than to assume one universal vocabulary.2. Interpretable by design: understanding the model from within
An interpretable-by-design approach builds understandability into the model representation and computation. A person can inspect coefficients, rules, a small tree, or the shape of component functions and relate them to predictions.- Linear model: coefficients indicate the direction and scale of a feature's contribution, holding other quantities fixed. Correlation, scaling, and interactions still matter.
- Small decision tree: a path from root to leaf exposes a sequence of conditions. A deep tree quickly becomes difficult to read.
- Rule system: explicit conditions can be inspected and discussed with domain experts. Many overlapping rules make analysis harder.
- Constrained additive models: individual feature functions can be visualized, although interactions and fitting choices remain important.
Direct access to structure does not mean that every person will find the model understandable. Hundreds of coefficients, complex features, opaque preprocessing, and correlated inputs can make even a formally simple model difficult to interpret.
3. Post-hoc explainability: explaining an already-trained model
A post-hoc approach is applied after training. It adds an analytical layer around the original model: estimates feature attributions, approximates behaviour near an instance, generates counterfactual examples, or probes output sensitivity.- Feature attribution: estimates how input features relate to a selected output or reference point.
- Local surrogate: fits a simpler approximation to a complex model around a selected instance.
- Counterfactual explanation: searches for an alternative input under which the model would produce a specified outcome.
- Global post-hoc analysis: studies many instances to form an approximate picture of model behaviour.
Well-known method families include LIME and SHAP. SHAP values must be read relative to the selected background distribution and a specific model output. Depending on the explainer and its settings, contributions may be expressed on a raw-score, log-odds, or probability scale; these scales must not be conflated. With correlated features, the way feature dependence is handled (for example, interventional versus conditional assumptions) affects how contributions are allocated. SHAP additivity applies to the selected output representation and baseline under the method's assumptions; it does not establish causality or guarantee that an explanation is valid outside the analysed region.
A post-hoc explanation can be useful even when the model remains complex. But the explanation is itself an object that requires validation.
4. Comparing the two approaches
| Criterion | Interpretable by design | Post-hoc explainability |
|---|---|---|
| Source of understandability | The model's own structure and computations | An additional analysis method |
| What is inspected | The model and its particular prediction | An approximation, attribution, or alternative scenario |
| Strength | Direct link between design and behaviour | Can analyse a broad range of complex models |
| Main risk | The structure may be too large or complex for people | The explanation may not faithfully reflect the original model |
| What to validate | Completeness of understanding, features, and computations | Faithfulness, stability, scope, and sensitivity to settings |
This is not a binary choice. A project may use an interpretable model as its primary system, post-hoc methods for diagnostics, and independent tests to validate both. A partially transparent architecture may also be combined with additional explanations.
5. A running example: credit risk
Suppose a bank estimates the probability of late payment using debt burden, payment history, income, and employment duration. For one application, the model returns a risk score of 0.72; an internal threshold of 0.60 triggers additional review.- Option A — interpretable by design. The bank uses a compact logistic regression. An analyst inspects coefficients, category encoding, transformations, and how they produce the score of 0.72. In logistic regression, coefficient βⱼ is the change in log-odds for a one-unit increase in a feature, holding other inputs fixed; exp(βⱼ) is the corresponding odds ratio. It is not a change of βⱼ percentage points in probability: the probability effect depends on the starting score and other feature values.
- Option B — complex model plus post-hoc analysis. The bank uses gradient boosting and calculates SHAP values for the application. The chart shows feature contributions relative to a selected background distribution.
- Questions for both options. Does the explanation reflect actual model behaviour? Does it remain meaningful under reasonable input and setting changes? Does an aggregate score hide important feature interactions?
Even if debt burden has the largest attribution in option B, this does not prove that reducing debt will causally lead to approval. Explaining a prediction does not replace causal analysis, examination of bank policy, or a human review process.
6. Choosing an approach: question before method
Before selecting a model or XAI method, record five things:- Object: model design, one prediction, behaviour across a group, or the entire decision process?
- Audience: developer, analyst, domain expert, customer, or auditor?
- Purpose: debugging, hypothesis testing, audit, communication, or decision support?
- Risk: what is the cost of a wrong or misleading explanation?
- Validation criterion: what experiment or independent test could check the result?
For high-stakes decisions requiring detailed audit, direct interpretability may be preferable even if a predictive metric is slightly lower. If a complex model is necessary, post-hoc analysis can help, but its limitations should be documented. The decision is contextual; it is not captured by the rule that a simple model is always better.
7. Validating explanation quality
Do not evaluate only the appearance or readability of a chart:- Faithfulness: does the explanation correspond to the model's actual computations? For example, does the prediction change as expected under a controlled feature change?
- Stability: does the meaning remain similar under small, valid changes to inputs, samples, or settings?
- Locality and scope: is it clear which instance, range, or group the conclusion applies to?
- Audience comprehension: can the recipient read the explanation correctly without making a stronger claim than the evidence supports?
- Reproducibility: are the model version, data, method settings, and background assumptions recorded?
8. Practice: choose and defend an explanation strategy
Assignment
Choose one scenario: credit risk, medical triage, demand forecasting, or support-ticket classification. Write a concise analysis plan.
- Describe the model and the decision that depends on its output.
- Formulate one global and one local question.
- Choose an interpretable-by-design, post-hoc, or combined strategy and justify it.
- Identify two limitations of the chosen approach.
- Propose at least two tests: one for faithfulness and another for stability or comprehension.
- Write a warning for explanation users: what conclusion must not be drawn from this result?
Assessment criteria
- Terms are defined operationally rather than used as synonyms.
- The choice reflects the task, audience, and cost of error.
- Limitations and tests are specific and verifiable.
- No causal claim is inferred from feature importance alone.
9. Summary and transition
Interpretable-by-design approaches rely on the model's own structure; post-hoc explainability adds an analysis method to an already-trained model. The first offers direct access to logic, but a simple structure may become hard to understand at scale. The second extends the toolkit to complex models, but its explanations may be approximate and assumption-dependent. Both require a defined audience, purpose, and validation procedure.In the next lesson, we will move from concepts to models whose structure can be inspected directly, starting with linear models.