The AI assurance market in the UK is experiencing rapid growth, with an estimated 524 firms generating £1.01 billion in Gross Value Added (GVA) according to market research published in the UK Government’s ‘Assuring a responsible future for AI’ report. This includes 84 specialised AI assurance companies, a significant rise from just 17 identified in 2023. These specialised firms, primarily microbusinesses and SMEs, contribute £0.36 billion GVA and stand to play a pivotal role in high-risk sectors such as financial services, life sciences, and pharmaceuticals.
The expression ‘explainable artificial intelligence’ (XAI) is often used to refer to various interpretability methods for machine learning models and their output or predictions. IBM defines XAI as “a set of processes and methods that allows human users to comprehend and trust the results and output created by machine learning algorithms”. These techniques are particularly useful in the financial services sector, where transparency and accountability are critical.
With this post, I aim to provide an intuitive overview of model-agnostic interpretation methods that could in principle be deployed in finance for different use cases, such as credit risk analysis, algorithmic trading, and fraud detection. Model-agnostic methods do not rely on a model’s internal structure, so they can be applied to any model regardless of its architecture. These methods may help provide either ‘global’ insights into overall model behaviour or ‘local’ explanations for individual results.
Global model-agnostic methods provide insights into the overall behaviour of a model. These methods may be used to profile complex models, uncover biases, and potentially assess compliance with regulatory requirements. Below are some examples of global model-agnostic methods and their potential applications.
Partial Dependence Plots (PDPs)
PDPs illustrate the relationship between an input feature and the model’s predicted outcome, averaging out the effects of other input features. In credit risk analysis, for example, PDPs could reveal how certain borrower characteristics affect loan default predictions and, in turn, loan eligibility. Suppose a lender is developing a machine learning model to predict the likelihood of loan default for loan applicants. The model uses various borrower characteristics as input features including net worth, income, employment status, credit history, and postcode. The lender may use PDPs to understand how these features influence the model’s predictions and uncover any potential biases, particularly in relation to geographic location. To this end, a PDP may be generated as follows
If the PDP shows significantly higher default probabilities for applicants from deprived areas, for example, this could indicate a bias in the model. Further analysis can be conducted to determine if this is due to the model over-relying on geographic location to predict outcomes. If biases are detected, the lender can choose to take steps to mitigate them, such as: adjusting or adding input features to better capture the intended risk factors, retraining the model with a different training dataset or using techniques like reweighting to offset any undue influence of geography, or implementing policies to ensure fair treatment of applicants from deprived areas.
Accumulated Local Effects (ALE) plots
ALE plots address some limitations of PDPs by accounting for feature interactions by considering the distribution of other features within specific intervals of the feature of interest. In credit risk analysis, ALE plots could help profile how different borrower characteristics interact to affect creditworthiness. Back to the loan default prediction model example, an ALE plot may be generated as follows:
Permutation feature importance
This method measures the importance of each feature by evaluating the decrease in model performance when the feature’s values are randomly shuffled. In fraud detection, permutation feature importance could identify key indicators of fraudulent activity, helping to prioritise features for closer monitoring. In credit risk analysis, it could highlight borrower characteristics that are most critical for accurate loan default predictions. Still using the same example, here’s how the process might work:
Global surrogate models
These are interpretable models (e.g. decision trees) trained to approximate the predictions of a more complex model (such as a deep neural network). For algorithmic trading, global surrogate models could make trading strategies and heuristics more transparent. In credit risk analysis, they could provide a simpler, interpretable approximation of a complex risk assessment model that makes it easier to understand and validate. Referring again to the example, a global surrogate model could be generated and used as follows:
Prototypes and criticisms
Prototypes are typical or representative examples of a certain class or characteristic, while criticisms are examples that are not well-captured by the model. In fraud detection, prototypes may represent typical fraudulent and non-fraudulent transactions, while criticisms may be edge cases. For algorithmic trading, prototypes may illustrate typical market conditions for different trading strategies, and criticisms may highlight atypical conditions. In credit risk analysis, prototypes could help understand typical profiles of creditworthy and non-creditworthy borrowers, while criticisms can highlight unusual cases. For example, creditworthy prototypes may be identified using clustering algorithms to find typical combinations of borrower characteristics found in low default probability borrowers. Criticisms may instead be identified using methods like anomaly detection to find low default probability borrowers that least resemble the prototypes in terms of borrower characteristics.
Local model-agnostic methods focus on explaining an individual result or prediction by providing a rationale for the specific instance. Here are some examples of local model-agnostic methods and their potential applications.
Local Interpretable Model-agnostic Explanations (LIME)
LIME approximates a model locally with an interpretable model to explain individual predictions. In fraud detection, LIME can explain why a specific transaction was flagged as suspicious. In credit risk analysis, LIME can provide insights into a loan default prediction for a specific borrower or prospective borrower. For example, LIME may be applied as follows:
SHAP (SHapley Additive exPlanation)
SHAP, based on the game theory concept of Shapley values, can offer a theoretically sound explanation of how each input feature contributes to a model’s output. SHAP may have similar use cases as LIME. While SHAP is a more complex and computationally intensive algorithm, it can be intuitively used to explain a specific loan default prediction in our example scenario as follows:
Counterfactual explanations
These explanations show how small a change in input features could alter a model’s output. In algorithmic trading, counterfactual explanations could help traders understand how slight changes in market conditions could impact whether or not a trade is executed at a given point in time. In credit risk analysis, counterfactual explanations may provide a loan applicant who is refused a loan with suggested actions that would make them eligible for the loan. For example, suppose that the loan applicant is refused the loan due to the model predicting a loan default probability that exceeds an accepted risk threshold for loan eligibility. In this scenario, counterfactual explanations could be provided as follows:
Individual Conditional Expectation (ICE) plots
ICE plots show the relationship between a feature and the predicted outcome for individual instances. For algorithmic trading, ICE plots could illustrate how market indicators influence trading decisions for individual trades. In credit risk analysis, ICE plots could provide personalised insights into how a loan applicant’s borrower characteristics affect their loan eligibility. An ICE plot for a loan applicant, for example, may generated as follows:
Anchors
Anchors provide rules-based explanations for individual predictions. For algorithmic trading, anchors can explain specific trading decisions by articulating implicit rules or heuristics. In credit risk analysis, anchors can offer rules-based explanations for an applicant’s loan approval or denial. At a high level, anchors may be generated from the following steps (potentially iterating over steps 1-2 and using reinforcement learning techniques to generate improved candidates at each new iteration):
Many of these interpretability methods are computationally intensive, making them difficult to apply to large datasets without relying on high-performance hardware. Current research has been testing high-performance solutions that can be easily rolled out across the financial services. For example, a recent case study from Nvidia showed promising results using graphics processing units (GPUs) to accelerate SHAP for risk management, assessment and scoring of credit portfolios in traditional banks, as well as in fintech platforms for peer-to-peer (P2P) lending and crowdfunding. This was a major undertaking that saw Nvidia collaborate with Hewlett Packard Enterprise, more than 20 universities, and the European supervisory and financial service community, including the Gaia-X Financial AI Cluster (FAIC) project.
Given the current trajectory, there seems to be no reason why XAI should not be adopted at scale in the financial services sector in the not-so-distant future.
For a deeper dive into machine learning interpretability methods from a purely technical perspective, I highly recommend Christoph Molnar's Interpretable Machine Learning: A Guide for Making Black Box Models Explainable (2nd ed., 2022), which I also referenced while writing this post.
Alessio is an associate, patent attorney in the engineering team. He draws upon his computer engineering academic background and experience in industry to deliver commercially astute, technically informed advice on software patentability and patent prosecution strategy. He has worked on a variety of different portfolios for clients ranging from SMEs to multinational corporations. Alessio maintains specialised, state-of-the-art knowledge in high-growth areas of applied artificial intelligence.
Email: alessio.incitti@mewburn.com
Our IP specialists work at all stage of the IP life cycle and provide strategic advice about patent, trade mark and registered designs, as well as any IP-related disputes and legal and commercial requirements.
Our peopleWe have an easily-accessible office in central London, as well as a number of regional offices throughout the UK and an office in Munich, Germany. We’d love to hear from you, so please get in touch.
Get in touch