Learning outcomes

After this lesson, you will be able to:

Lesson challengeIf a complex model produces a high risk score and an XAI method creates an intuitive feature chart, has the model become interpretable? No. An understandable explanation of an output and understandability of the model itself are related, but different properties.

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.
InterpretabilityThe extent to which a person can understand a model directly through its representation, structure, parameters, or computations, for a particular task and audience.
ExplainabilityThe ability to produce and communicate an account of a model's behaviour or an individual output, potentially using an additional analysis method.
ExplanationA particular result or reasoned answer to a question about which factors, rules, or computations relate to a prediction or model behaviour.
Throughout this course, we use a practical distinction: an interpretable-by-design model supports direct inspection of its logic; post-hoc explainability uses an additional method to explain an already-trained model. This is a useful convention, not a universal law of terminology.

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.

Practical test: can we trace how the model's own representation and computations produce an output, without replacing them with a separate approximation?

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

CriterionInterpretable by designPost-hoc explainability
Source of understandabilityThe model's own structure and computationsAn additional analysis method
What is inspectedThe model and its particular predictionAn approximation, attribution, or alternative scenario
StrengthDirect link between design and behaviourCan analyse a broad range of complex models
Main riskThe structure may be too large or complex for peopleThe explanation may not faithfully reflect the original model
What to validateCompleteness of understanding, features, and computationsFaithfulness, 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.

Two routes to understanding a modelThe left route inspects a model's own structure and computations. The right route applies an additional analysis method to a trained model. Both produce an explanation that still needs validation.Two routes to understanding a modelInterpretable by designStructure · parameters · rulesModel → predictionPost-hoc explanationAttribution · surrogate · counterfactualTrained model → analysisValidate: faithfulness · stability · scope
Direct model inspection and post-hoc analysis are different sources of explanation. Neither removes the need to test quality and limits.

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.
  1. 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.
  2. 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.
  3. 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:
  1. Object: model design, one prediction, behaviour across a group, or the entire decision process?
  2. Audience: developer, analyst, domain expert, customer, or auditor?
  3. Purpose: debugging, hypothesis testing, audit, communication, or decision support?
  4. Risk: what is the cost of a wrong or misleading explanation?
  5. 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?
Remember: a stable explanation is not necessarily faithful; an understandable explanation is not necessarily complete; feature attribution does not establish causation.

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.

  1. Describe the model and the decision that depends on its output.
  2. Formulate one global and one local question.
  3. Choose an interpretable-by-design, post-hoc, or combined strategy and justify it.
  4. Identify two limitations of the chosen approach.
  5. Propose at least two tests: one for faithfulness and another for stability or comprehension.
  6. 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.