Skip to main content

Module 4: Explainable AI (XAI)

Site: OpenLearn Create
Course: Trustworthy and Democratic AI - Creating Awareness and Change
Book: Module 4: Explainable AI (XAI)
Printed by: Guest user
Date: Friday, 21 November 2025, 6:28 AM
LESSON 4.1: INTRODUCTION TO EXPLAINABLE AI


Explainable AI (XAI) is a field dedicated to making AI models and their decisions more transparent and interpretable. As AI systems increasingly influence critical areas like healthcare, finance, and criminal justice, understanding how these models arrive at their conclusions becomes essential for building trust, ensuring accountability, and making informed decisions. This module explores the concept of XAI, its significance, and the tools and methods used to make AI models more understandable. 

Explainable AI refers to methods and techniques that make AI models’ predictions and decisions understandable to humans. Many AI models, especially complex ones like deep neural networks, are considered “black boxes” because their decision-making processes are difficult to interpret. XAI aims to break open these black boxes, allowing users to understand and trust how AI models operate. Key terms: 

  • Interpretability: The degree to which a human can understand the cause of a decision. 
  • Transparency: How openly and clearly an AI model’s processes can be examined and explained.

LESSON 4.2: WHY EXPLAINABILITY MATTERS IN AI

The push for explainable AI stems from several crucial factors: 

  • Trust and Transparency: Clear explanations increase user trust in AI systems, especially when these systems are used in high-stakes areas like healthcare or criminal justice. 
  • Ethics and Accountability: XAI helps ensure that AI systems are fair and just, allowing stakeholders to hold models accountable for their predictions and decisions. 
  • Regulatory Compliance: Some regulations, such as the EU's GDPR, require AI-based decisions to be explainable, particularly when they affect individuals’ rights or personal data.
Watch the video lecture titled “Friends Don’t Let Friends Deploy Black-Box Models: The Importance of Intelligibility in Machine Learning” from the KDD conference 2019 in Anchorage.

 

LESSON 4.3.: XAI TOOLS AND METHODS


Types of XAI Techniques
There are various approaches to creating explainable AI, each suited to different models and application contexts. Here are some common types: 

  • Model-Specific vs. Model-Agnostic: Model-specific methods apply only to certain types of models (like decision trees), while model-agnostic methods (like LIME and SHAP) work across any model. 
  • Global vs. Local Explanations: Global explanations provide insight into an entire model’s behavior, while local explanations clarify individual predictions. 


Key XAI Tools and Methods

  • Local Interpretable Model-agnostic Explanations (LIME) is a widely used XAI tool that offers local explanations by building simpler, interpretable models (like linear models) around individual predictions. By providing explanations on a case-by-case basis, LIME helps users understand why a specific prediction was made, making it particularly useful for complex, “black-box” models.
    Example Use Case: In healthcare, LIME can help doctors understand why an AI model flagged a patient as high-risk for a certain disease by highlighting the features most relevant to that prediction.
     

  • SHapley Additive exPlanations (SHAP) values, derived from cooperative game theory, provide insights into the contribution of each feature to a model’s prediction. SHAP is particularly valued for its consistency and theoretical foundation, offering a unified measure of feature importance for both local and global explanations.
    Example Use Case: In finance, SHAP values can explain why a customer was denied a loan by revealing which factors (e.g., income, credit score) contributed most to the model’s decision. 

  • What-If Tool, developed by Google, allows users to interact with ML models and see how changes to input features affect predictions. This tool is useful for “what-if” scenarios that can reveal potential biases or vulnerabilities in a model’s decisions.

LESSON 4.4.: PRACTICAL STEPS FOR IMPLEMENTING XAI


To incorporate XAI into AI projects, practitioners should:

  1. Identify Stakeholder Needs: Determine who will use the model explanations and what level of detail they require. 
  2. Select Appropriate XAI Tools: Choose XAI techniques and tools that best suit the model type and application context. 
  3. Implement and Test: Use tools like LIME, SHAP, or the What-If Tool to test model predictions and identify any biased patterns. 
  4. Communicate Results Effectively: Tailor explanations to the audience—technical explanations may be appropriate for data scientists, while simplified summaries may work better for end-users or non-technical stakeholders.

LESSON 4.5: CHALLENGES AND FUTURE DIRECTIONS IN XAI IMPLEMENTATION 

Despite its benefits, XAI faces several challenges:

  • Trade-Offs Between Accuracy and Interpretability: Simpler, interpretable models may lack the predictive power of complex “black-box” models. Striking a balance between accuracy and interpretability is essential. 
  • Risk of Over-Simplification: In making models interpretable, there is a risk of oversimplifying explanations, which may lead to misinterpretations. 
  • Potential for Misuse: XAI tools may be used to justify biased models if explanations are manipulated or selectively presented to appear unbiased.
As XAI continues to evolve, new techniques are emerging to make AI systems even more transparent and accessible:



  • Interactive Explanations: Combining visualizations with interactive elements to allow users to explore different aspects of model behavior. 
  • Enhanced Fairness Metrics: Integrating fairness considerations directly into explainability tools to ensure that XAI supports bias mitigation. 
  • Real-Time Interpretability: Developing XAI methods that work in real-time, particularly for applications in healthcare, finance, and security.
 
Here are two video lectures on XAI for more advanced learners:


  1. Formal Explainability in Artificial Intelligence
  2. Smart-sized Benchmarking for Black-Box Optimization

LESSON 4.6: SITUATION AWARE EXPLAINABILITY (SAX)

In the scope of the AI4Gov project, our aim is to push the boundaries of XAI to  cope with the challenges existing in business processes (BP) and to produce reliable and faithful  explanations about decisions and outcomes of BP executions. Situation aware eXplainability (SAX) are evolutionary XAI techniques applied to BPs that aim at tackling the shortcomings of contemporary XAI techniques when applied to BPs as aforementioned. More specifically, a situation-aware eXplanation is a causal sound explanation that takes into account the process context in which the explanandum occurred, including relevant background knowledge, constraints, and goals. A situation-aware explanation can also help ensure that the explanation is relevant and informative to the user. 

To understand this definition, let’s unfold it to its ingredients: 

  • Context in Explanation
    Finding an adequate explanation requires, in many cases, understanding the situational conditions in which specific decisions were made during process enactments. Frequently, explanations cannot be derived from ``local'' inference (i.e., current undergoing task or decision in a business process) but require reasoning about situation-wide contextual conditions relevant to the current step as derived from some actions in the past. Context aims to make the explanation richer, including knowledge elements that were originally implicit or part of the surrounding system, yet affected the choices that have been made during process execution. 
  • Sound Explanations
    A sound explanation is an explanation that is both true and valid. The former dimension of being true means that the explanation accurately and faithfully represents the domain and the occurrences in that domain, implying that reliance on its insights and actions derived from it can be reliably projected onto the environment it is anticipated to explain. The latter dimension of being valid means that, intrinsically, its reasoning mechanism is guaranteed to ensure its output was logically derived from its premises. 
  • Causal Sound Explanation
    In addition to being sound, and to include contextual information, a situation-aware explanation should be causal. A causal sound explanation is an explanation that not only satisfies the criteria for sound explanation, but also provides an account of why the explanandum occurred. This includes the assurance that concluded explanations are entailed from the basic causal dependencies and temporal relationships that link between the different occurrences in the process domain. 
  • Causal Dependency
    We consider two occurrences as being causally dependent when the occurrence of the former is explaining WHY the latter has occurred. More concretely, per our view, being related in a way that manipulating the timely occurrence of the former also entails some changes in the timely occurrence of the latter, and not vice versa.
  • Temporal Relationship
    A temporal relationship is just an order relationship of the time axis between any two events such that we can determine which precedes the other in time 
Reference: (Fournier et al., 2023).

LESSON 4.7: CONSOLIDATING XAI KNOWLEDGE

Short overview of questions and answers to go through and consolidate the gained knowledge.

  1. What is the difference between model-specific and model-agnostic XAI techniques?
    Model-specific XAI techniques are designed to explain the predictions of particular types of models, such as decision trees or linear regression. These methods leverage the inherent characteristics of the model to provide insights into its decision-making process. Model-agnostic XAI techniques, on the other hand, can be applied to any type of model, regardless of its complexity or architecture. These techniques do not depend on the model's internal workings, allowing them to generate explanations for a wide range of machine learning models. Examples of model-agnostic techniques include LIME and SHAP.

  2. Why are local explanations important in XAI?
    Local explanations are important because they provide insights into the specific reasons behind an individual prediction made by a model. This granularity allows users to understand the model's behavior in particular cases, helping to identify biases, validate decisions, and build trust in the model. Local explanations are crucial in high-stakes situations, such as healthcare or finance, where understanding the reasoning behind a decision can have significant implications for individuals.

  3. Give an example of how LIME can be used in a high-stakes industry.
    In healthcare, LIME can be utilized to explain why a machine learning model flagged a patient as high-risk for a specific disease. For instance, if an AI system predicts that a patient is likely to develop diabetes, LIME can highlight the most influential features (such as age, BMI, and family history) that contributed to that prediction. This allows healthcare professionals to interpret the model's decision and consider the relevant factors when making clinical decisions or recommendations.

  4. Explain one challenge associated with implementing XAI in AI systems.
    One challenge of implementing XAI in AI systems is the trade-off between accuracy and interpretability. While simpler, interpretable models may provide clear insights into their decision-making processes, they often lack the predictive power of more complex models, such as deep learning algorithms. Striking the right balance is essential, as stakeholders may require both high accuracy in predictions and understandable explanations for how those predictions are derived.

  5. Why is it essential to balance accuracy and interpretability in XAI?
    Balancing accuracy and interpretability is essential because stakeholders need to trust and understand AI systems, especially in critical applications where decisions can significantly impact individuals' lives. If a model is highly accurate but lacks interpretability, users may be skeptical of its predictions and less likely to adopt it. Conversely, if a model is interpretable but not accurate, it may lead to poor decision-making. Achieving a balance ensures that AI systems are both effective in their predictions and transparent in their reasoning, fostering trust and accountability.

You're almost at the finish line! Module 4 is complete. Only Quiz 4 left to complete the course. Keep up the good work, you're doing great!