Explainability in Machine Learning

Machine learning is becoming an integral part in how the modern world functions. The collection of data has increased exponentially alongside advances in digital technology, and the power of machine learning is evolving too. Machine learning models learn and improve from these huge banks of data that are now available. Models are becoming more powerful, and in many cases are performing tasks more effectively and efficiently than human counterparts. As machine learning techniques are adopted by more and more organisations and businesses, explainability becomes increasingly important. 

Models are being used to automate tasks and discover emerging trends and patterns in data. These algorithms are learning directly from the data instead of being created by a human developer. This means the system will evolve and develop without direct human interaction. So understanding why the model makes a decision may be initially unclear, especially to stakeholders without experience in data science.  This can be particularly difficult with more complex machine learning techniques such as deep learning. The multi-layered neural structure of deep learning models makes transparency around decision-making even more complex.  

Like any decision-making tool in an organisation, a degree of  accountability is needed. Machine learning models are already being leveraged to automate resource-intensive administrative work and make complex business decisions. In sectors where decisions will be scrutinised, the ability to explain why a machine learning model has come to its decision is vital. For example, machine learning in finance is used in a variety of ways. Algorithms can be used to automate and streamline loan decisions, or even to automate stock training based on market fluctuations. In both of these examples, explainability is integral to the process.  

This guide explores the topic of explainability in machine learning, including what it is, why it’s important, and different techniques for achieving model explainability. 

What is explainability in machine learning?

Explainability in machine learning is the process of explaining to a human why and how a machine learning model made a decision. Model explainability means the algorithm and its decision or output can be understood by a human. It is the process of analysing machine learning model decisions and results to understand the reasoning behind the system’s decision. This is an important concept with ‘black box’ machine learning models, which develop and learn directly from the data without human supervision or guidance.  

Traditionally, a human developer would write the code for a system or model. With machine learning, the system evolves from the data itself. The algorithm will undergo machine learning optimisation to best perform a particular task or action through learning from experience with data. Once the machine learning model is deployed, it can be difficult to understand exactly why the system has made a particular decision, because the underlying functionality has been developed by the system itself. 

At its core, machine learning models learn relationships between input and output data, and are used to classify new data or predict trends. These trends and relationships within the dataset will be identified by the model itself. This means the deployed model will be making decisions based on patterns and relationships which may be unknown by human developers. The process of explainability helps human specialists understand the algorithm behind the decision. The model can then also be explained to non-technical stakeholders too. 

There are a range of different tools and techniques for achieving machine learning explainability, which differ in approach and the type of machine learning model. Traditional types of machine learning may be easier to understand and explain, but understanding more complex models such as deep neural networks can be incredibly difficult. Model explainability for artificial intelligence or deep learning models is therefore an important area of focus as the technology evolves. 

Why is model explainability important?

Machine learning models are increasingly replacing traditional software or processes in a range of settings. The ability to explain a decision is a vital part of any business or organisation. The hands-off nature of machine learning model development and evolution means it’s difficult to clearly explain a model’s decision making. This lack of clarity means a model may be misunderstood or mistrusted in the wider organisation. In turn, the effectiveness of the model to improve the organisation will be impacted. 

Model explainability is vital in environments that are regulated or audited. In many business settings, decisions can and will be challenged by external parties. For example, machine learning in banking may automate the screening of loan or mortgage applicants. The reason why a loan applicant was rejected is important internally and externally, as financial decisions are often scrutinised. 

Machine learning in healthcare is another example of an environment that requires model explainability. Machine learning is an emerging tool in health diagnostic settings. Models are developed to screen patient data for known illness and disease, providing an avenue for early intervention at scale. Model explainability in this circumstance is vital, as any decision will be scrutinised internally and externally.  

Machine learning explainability is a core part of any model governance process. Model explainability means that management-level stakeholders are fully informed when making decisions about machine learning deployment. Machine learning models will only truly be effective if properly embedded within the wider organisation. This ensures the data flow and model resources are maintained, as with all parts of the organisation’s systems. 

Deployed models will need to be as accountable as any other area of an organisation. Many stakeholders will not have statistics expertise or knowledge of data science, but will still scrutinise decisions made by models. Machine learning explainability means non-technical members of the organisation can still understand the machine learning process. 

Model explainability is important because it: 

  • Means models are understood by non-data specialists in the organisation. 
  • Provides accountability in environments that are regulated or scrutinised. 
  • Helps identify emerging bias or issues with the model. 
  • Makes sure models are effectively understood and deployed in the right setting. 
  • Improves trust of the model’s decisions. 

Three types of model explainability techniques

There are a range of techniques and tools designed to provide model explainability and insight. Explainability tools differ in technique but are also different depending on the type of data and the type of model. Different approaches to explainability are also generally taken at the various steps of the machine learning lifecycle. For example, a model explainability approach may be different depending on whether the model is being trained or has been deployed. 

Generally, machine learning explainability tools are classified between three main areas: 

  • Local model explainability 
  • Cohort model explainability 
  • Global model explainability 

Local model explainability

Local or individual model explainability is an approach taken to answer specific questions about individual model decisions. A client or stakeholder may have a query about why a given decision was made by the model, or a decision may be flagged during an audit. In the case of a model used in the financial sector, a customer may challenge why their mortgage application was rejected by the model. Local explainability is often used in very specific circumstances, and will usually be used on models after deployment.  

Local model explainability as an approach is useful for understanding which specific features impacted a specific decision. Local model explainability is important for models that are deployed in regulated organisations. Organisations could be audited or must justify why a business decision was made by the model.  

Machine learning models should be constantly monitored to detect model drift such as machine learning concept drift. Models can become inaccurate over time for a range of reasons. A local model explainability tool can be used to deep drive into specific features if a specific error or outlier is detected. This approach will help organisations understand the features that most caused the issue, to allow ongoing improvement and optimisation.  

Cohort model explainability

Whereas individual or local model explainability approaches will be used on specific model decisions, cohort model explainability is applied to subsets of data. This approach is mainly used during the model production phase, specifically in the model validation step before deployment. This crucial step is a measure of the model’s generalisation before deployment, to gauge its accuracy with new or unseen data. 

Cohort model explainability is used to answer questions on potential model bias highlighted with a subset of input data. Cross validation may show that the model is less accurate with a specific subset of input data. This might be because of innate bias in the training dataset, or overfitting on a specific subset of data. Cohort model explainability will help organisations understand the specific features that may be causing this drop in accuracy with this subset. The approach can be used to measure and compare model accuracy between different cohorts or subsets of the data. 

Global model explainability

Global model explainability techniques will focus on the features that have the most impact on all of the model’s outcomes or decisions. Whereas local model explainability will focus on individual decisions, global model explainability takes a holistic approach. This approach can be used to answer top line questions on how the model performs overall after deployment. For example, a question about how the model makes an average prediction could be answered using a global model explainability approach. For this reason it’s a common approach to answering questions posed by stakeholders with no prior data science experience. It provides a global or top-level understanding for how the model functions and makes decisions.  

Global model explainability is also an approach used during the training phase of the machine learning life cycle. Data scientists managing the training process can use this approach to understand the model in more detail, highlighting the features which have the biggest impact on the average model decision. There may also be instances when a data scientist has created multiple iterations of the same model. Each one could rely on a different selection of features to complete the given task. Global model explainability can identify the major features of each of the models, and can identify and resolve over reliance on specific features which may cause bias. 

Machine learning deployment for every organisation

Seldon moves machine learning from POC to production to scale, reducing time-to-value so models can get to work up to 85% quicker. In this rapidly changing environment, Seldon can give you the edge you need to supercharge your performance.

With Seldon Deploy, your business can efficiently manage and monitor machine learning, minimise risk, and understand how machine learning models impact decisions and business processes. Meaning you know your team has done its due diligence in creating a more equitable system while boosting performance.

Deploy machine learning in your organisations effectively and efficiently. Talk to our team about machine learning solutions today.

Contents