7 min read
XAI marks the spot: what it is, why it matters and how it’s applied
Artificial Intelligence (AI) is reshaping industries like healthcare, finance, and law. But there’s a significant challenge: transparency. Many AI systems, especially deep learning models, operate as “black boxes”. They give us results without revealing how they got there. And when AI is used in high-stakes scenarios – diagnosing diseases, approving loans, or influencing legal outcomes – understanding how a decision was made is critical.
Explainable AI (XAI) is tackling this issue, making AI systems more interpretable. Our Global Head of Data x AI, Nathan Marlor, explores what XAI is, why it matters, and how it’s applied.
What’s Explainable AI?
Simply put, Explainable AI (XAI) aims to clarify how AI systems make decisions.
Imagine receiving feedback on something important, like a medical diagnosis or a loan application, but without any explanation for the outcome. It can be frustrating, and the same is true for AI when it makes decisions without offering insight into its reasoning. Understanding why an AI made a decision builds trust and allows us to make more informed choices.
Why Does XAI Matter?
AI isn’t just about recommending movies or targeting ads anymore – it’s being used in high-stakes scenarios that can have life-changing consequences – making understanding why an AI made a particular decision essential. Here’s why explainability is crucial:
- Trust: People are more likely to trust AI if they understand how it arrives at decisions
- Accountability: Organisations must explain AI-driven decisions to regulators, customers, and stakeholders, especially in high-stakes areas
- Bias detection: AI systems can unintentionally pick up biases from data. XAI helps identify and fix those biases before they lead to unfair treatment
- Model improvement: Understanding AI decisions allows developers to debug, improve, and fine-tune models effectively
Real-life Applications of XAI:
- Healthcare: AI models must explain which symptoms or patient data led to a diagnosis, helping doctors trust and act on AI-assisted results
- Finance: In credit scoring, XAI ensures that decisions like loan approvals are fair, transparent, and compliant with regulations
- Legal systems: AI is used in predictive policing and sentencing, and XAI ensures these decisions are transparent, fair, and free from bias
Challenges in Implementing Explainable AI
While the need for explainable AI is clear, implementing it in practice is not without challenges. Let’s explore some of the obstacles that organisations face when trying to make their AI systems more interpretable.
Complexity of models: Modern AI models, especially deep learning networks, are inherently complex due to their architecture and the vast amount of data they process. Simplifying these models without losing performance is a significant challenge
Trade-off between accuracy and interpretability: The trade-off between accuracy and interpretability depends on the context. Simpler models are easier to understand, but complex models offer higher accuracy for tasks like medical diagnoses – the right balance depends on the application
Lack of standardisation: There is no universally accepted standard for what constitutes an “explanation” in AI. This lack of standardisation makes it difficult to compare methods and ensure that explanations are meaningful to end-users
Data privacy concerns: Providing explanations may require revealing sensitive data or proprietary algorithms, raising concerns about data privacy and intellectual property
Regulatory compliance: Different industries have varying regulations regarding explainability. Navigating these regulations requires specialised knowledge and can complicate implementation
XAI Techniques: Breaking Down AI Decisions
To make AI systems more transparent, we often need to understand decisions at two levels: local explanations focus on individual predictions, while global explanations reveal the overall patterns driving a model’s behaviour across multiple predictions.
Different tools excel at providing these insights – let’s explore three popular techniques: LIME, SHAP, and Counterfactual Explanations.
LIME: Explaining AI One Decision at a Time
One of the most popular tools in XAI is LIME (Local Interpretable Model-agnostic Explanations). LIME helps explain a specific decision by building a simpler model to mimic the AI’s behaviour locally around that decision.
Imagine tweaking the input – adjusting someone’s income or debt level in a loan application – and watching how the AI’s prediction changes. By observing these changes, it builds a simple, interpretable model (like a linear regression) that shows which features were most influential in the AI’s decision.
However, LIME is limited in that it provides local explanations, meaning it can only explain individual predictions – it doesn’t give insight into how the model behaves on a global scale.
SHAP: A Broader Approach
SHAP (SHapley Additive exPlanations) offers a more comprehensive method for interpreting AI decisions by providing both local and global insights. SHAP assigns a Shapley value to each feature, quantifying how much it contributed to a prediction.
Unlike simpler methods, SHAP accounts for interactions between features, providing more precise insights. For instance, SHAP can show not only how income affects a loan decision but also how it interacts with other factors like debt and employment history.
Though SHAP can be computationally intensive, especially with large datasets, its strong theoretical foundation makes it one of the most reliable tools for understanding both individual decisions and overall trends in AI models.
Counterfactual Explanations: Exploring “What If?” Scenarios
Counterfactual explanations offer an intuitive way to understand AI decisions by asking “what if” questions – they explore what changes could have led to a different outcome.
For example, in a loan rejection case, a counterfactual explanation might suggest, “If your income had been £10,000 higher, your loan would have been approved.” This offers actionable insights by highlighting specific changes that could alter future decisions.
However, generating counterfactuals can be computationally demanding, especially for complex models with many features. Additionally, some counterfactuals may be unrealistic or impractical, such as suggesting a large and unattainable income increase, which can limit their real-world usefulness.
Let’s Get Technical
Ready to go deeper? Let’s explore the technical mechanics behind XAI and the challenges of explaining complex, non-linear models like deep neural networks.
The Deep Dive into Neural Networks
Deep neural networks (DNNs) are remarkable for their ability to model highly complex, non-linear relationships between inputs and outputs -they achieve this by stacking multiple layers of neurons, where each layer applies non-linear transformations to the input data. The source of this non-linearity lies in activation functions such as ReLU (Rectified Linear Unit) or sigmoid, which allow the network to capture intricate patterns that simpler models, like linear regression, might overlook.
However, this added complexity comes with its own set of challenges. As input features – such as income or credit score in a loan application – move through these layers, their individual contributions to the final decision become intertwined with other features.
For example, income might not have much impact on its own, but when considered in combination with employment history, it could significantly affect the decision. This intricate feature interaction is what gives DNNs their power but also makes them highly opaque and difficult to interpret.
Decoding the Layers
In traditional models such as decision trees, it’s relatively easy to trace a prediction back to a specific input or rule. The logic is explicit, and the decision-making process is transparent. In contrast, DNNs operate on a network of weighted connections between neurons, where each neuron aggregates information from several others across multiple layers. This results in a decision-making process that is spread out, or “distributed,” across the entire network.
The learning process, called backpropagation, adds another layer of complexity. During backpropagation, DNNs adjust the weights of their neurons to minimise prediction errors. These adjustments are incremental but happen millions of times across many layers, making it difficult to trace how a single input feature influences the final output. Each neuron’s influence is diluted across the network, making the decision-making process appear abstract and unintuitive.
The Cost of Clarity
Beyond the complexity of interpretation, there’s also a computational cost associated with explainability techniques. Deep learning models are already resource-intensive to train and deploy, but adding explainability methods such as LIME or SHAP increases these demands.
For example, SHAP, which assigns importance scores to features, requires running the model multiple times with different feature subsets to calculate the contribution of each feature. While this provides detailed insights, it can be time-consuming and computationally expensive, particularly for large datasets or complex models.
This creates a practical challenge: balancing the need for transparency with the limitations of real-world computational resources. Organisations must weigh the trade-offs between achieving a high level of interpretability and maintaining the efficiency and speed required for real-time applications.
Let’s wrap it up
AI is transforming how we make decisions, but without explainability, its usage could be limited. Explainable AI helps us bridge that gap – making black-box systems more transparent and trustworthy. Whether through LIME’s local approximations, SHAP’s comprehensive global insights, or counterfactuals offering actionable feedback, XAI is key to building AI systems that we can truly understand and rely on.
About the author
Nathan Marlor leads the development and implementation of data and AI strategies at Version 1, driving innovation and business value. With experience at a leading Global Integrator and Thales, he leveraged ML and AI in several digital products, including solutions for capital markets, logistics optimisation, predictive maintenance, and quantum computing. Nathan has a passion for simplifying concepts, focussing on addressing real-world challenges to support businesses in harnessing data and AI for growth and for good.
If you’d like to learn more about Data X AI at Version 1, or talk to one of our experts, you can reach out to us here.