Peeking Inside the Black Box: An Introduction to Explainable AI

Harshita Sharma
Accredian
Published in
8 min readMar 21, 2023

Taking a look at the inner workings of AI and how Explainable AI is Enhancing Trust and Understanding

Animated Image © Matthieu Bourel

Introduction

Artificial intelligence has the potential to transform almost every aspect of our lives, from healthcare to transportation to education. But as AI becomes more advanced and widespread, it also raises important questions about how these intelligent systems make decisions. Can we trust their output? How do we know if they are making the right decisions? What happens when they make mistakes?

With great power comes great responsibility, and the lack of transparency in AI decision-making can lead to unintended consequences. This is where Explainable AI comes into play. It seeks to provide insight into the decision-making processes of AI systems. At its core, explainable AI is about making AI more transparent and accountable, so that people can understand how these systems arrive at their decisions.

But explainable AI is not just about accountability — it’s also about improving the performance and usability of AI systems. By making AI more transparent, we can identify and correct biases, improve accuracy, and make these systems more user-friendly.

In this article, we will explore Explainable AI , including its importance, its potential applications, and the challenges that must be overcome in order to realize its full potential.

What is Explainable AI?

For some intuition building let’s look at the following image of a fireboat.

Suppose a classifier model classifies the original image a fireboat, the job of an Explainable AI (XAI) is to explain ‘why?’

The image on the right is called a feature attribution mask. The purple pixels comprising the boat’s water cannons and jets of water are actually highlighted here as more important than the boat itself to your model’s prediction, explaining how the model generalises these kinds of boats. The next question you can ask is how it classifies normal boats?

Explainable AI refers to a set of techniques and approaches used to make machine learning models more interpretable and transparent. This means that rather than being viewed as a “black box” that produces outputs without explanation, AI models can be made more understandable to humans. This is important not only for ethical considerations, but also for making informed decisions based on AI-generated outputs.

It’s research field on ML interpretability techniques whose aims are to understand machine learning model predictions and explain them in human and understandable terms to build trust with stakeholders.

Relationship between Interpretability and Explainability

Two important concepts in XAI are explainability and interpretability, which are often used interchangeably but have distinct meanings.

Explainability refers to the ability to provide a clear and understandable explanation of how an AI model arrived at a particular decision or prediction. This can involve providing a human-readable explanation in natural language or generating visualizations that highlight the important features used by the model.

Interpretability on the other hand, refers to the ability to understand and interpret the internal workings of the AI model. This involves understanding the model’s structure, parameters, and the relationships between the inputs and outputs.

To illustrate the difference between explainability and interpretability, let’s consider a medical diagnosis model. If the model predicts that a patient has a particular disease, an explanation of how the model arrived at that decision would be considered explainability. This might involve highlighting the important symptoms or risk factors that led to the diagnosis.

AI screening of diabetic retinopathy [Lim et al.]

Interpretability, on the other hand, would involve understanding the internal workings of the model, such as the specific features or biomarkers that were used to make the diagnosis, and how they were weighted and combined to produce the final prediction.

As the complexity of models increases rapidly, it surfaces more challenges for XAI and all the individuals attached to it at different levels.

As the main aim of XAI is model understanding and providing human interpretable explanations to different stakeholders in order to build trust, we can divide these into 3 broad groups with different level of understanding and interests.

Engineers focus more on Model Understanding and improving performances, i.e. Interpretability , for Consumers and Regulators, Trust is their key interest and to ensure model decisions are in compliance with laws and do not amplify undesirable bias from underlying data sets, i.e. Explainablity

Complexity-Explainability Tradeoff-

The tradeoff between explanation and complexity is a key consideration in XAI. The more complex a model is, the more difficult it becomes to provide a simple and easy-to-understand explanation of its behavior. Simpler models may be easier to explain, but they may not have the necessary complexity to capture the intricacies of the data and make accurate predictions.

Complexity-Explainability Tradeoff

To strike a balance between explanation and complexity, XAI techniques aim to provide interpretable insights into the inner workings of complex models, without sacrificing too much accuracy or performance.

For example, Integrated Gradients is a technique that can be used to provide insights into the inner workings of deep neural networks, which are typically very complex and difficult to interpret. It works by computing the contribution of each input feature to the model’s prediction, which can be visualized as a heatmap over the input data.

Integrated Gradients Attribution Mask

Other XAI techniques include decision trees, rule-based systems, and model distillation, which aim to simplify complex models into more interpretable forms without sacrificing too much accuracy.

Interpretable ML methods-

In machine learning there’s no such thing as one size fits all. We need to understand the context and aim of the problem that we’re facing in order to choose a fitting model. That’s exactly the same case when it comes to selecting an interpretable ML model.

What makes a good explaination?

Each ML interpretability method comes with different guarantees and limitations, computational requirements and explanation output. When picking a method, it’s important to consider the models decisions within the context of the requirements.

There are a few general properties of explanations that can be used to guide a selection of ML interpretability methods-

  • Complete: The explanation should be complete as the model output
  • Accurate: It should be based on sound reasoning and data, reflecting the model’s actual decision-making process.
  • Meaningful: It should make sense to the stakeholders
  • Consistent: It should be consistent with other explanations generated by the model for similar cases.
Taxonomy of Interpretable Methods

Applications of XAI-

XAI has a wide range of application in various industries:

Healthcare:

In healthcare, XAI can be used to explain medical diagnoses and treatment recommendations made by AI models. An XAI system can explain why a particular treatment plan was recommended for a patient with a certain medical condition based on their medical history, symptoms, and test results.

Finance:

XAI can be used in the financial industry to explain credit scoring models and loan approval decisions. For instance, an XAI system can provide an explanation for why a loan was approved or denied based on factors such as credit score, income, debt-to-income ratio, and other relevant financial metrics.

Deloitte using the Trustworthy AI Framework

Autonomous Vehicles:

XAI can be used to explain the decision-making processes of autonomous vehicles. For example, an XAI system can explain why an autonomous car decided to slow down or change lanes in a certain situation based on its sensors, algorithms, and models.

Customer Service:

XAI can be used in customer service to provide personalized recommendations and explain the reasoning behind them. An XAI system can explain why a particular product or service was recommended to a customer based on their browsing history, purchase history, and other relevant data.

XAI in Autonomous Vehicles [Madhav & Tyagi]

Manufacturing:

XAI can be used in the manufacturing industry to explain quality control decisions and detect defects in products.

Legal Industry:

By making these models more interpretable, lawyers can understand how the AI is making its predictions, and can use this information to make more informed decisions about how to proceed with a case.

Future Trajectories-

Explainable AI is a rapidly evolving field of research, and there are several promising directions for future research. Some of these directions include:

  • Developing more interpretable deep learning models: Deep learning models are often seen as “black boxes,” making it difficult to understand their decision-making processes. Future research could focus on developing deep learning models that are more interpretable.
Deep Neural Network through XAI
  • Combining XAI with other techniques: XAI can be combined with other techniques, such as causal inference, to gain a deeper understanding of the underlying mechanisms of a system.
  • XAI for reinforcement learning: Reinforcement learning is used in many applications, such as robotics and game playing. However, it can be challenging to understand why a reinforcement learning algorithm makes a certain decision. Future research could focus on developing XAI techniques for reinforcement learning.
Reinforcement Learning will be better explained with predictive models

Conclusion-

In conclusion, explainable AI is becoming increasingly important as AI continues to impact various fields, including healthcare, finance, and the legal system.

The ability to understand and interpret AI predictions is critical for building trust and ensuring accountability.

As a result, there is a growing need for interpretable and explainable models that can provide clear insights into how decisions are made.

Final Thoughts and Closing Comments-

While there are various techniques and models available for XAI, there is still much work to be done to improve their effectiveness and applicability. Future research in this area will likely focus on developing more sophisticated and accurate models, as well as creating standardized methods for evaluating the interpretability of these models.

Ultimately, the goal of XAI is to create AI systems that can be trusted and easily understood by users, leading to more ethical and responsible AI adoption and therefore advancements in this area will open new opportunities and hence new problems with possible answers.

--

--