Skip to main content

How CPI is using explainable AI to tackle the Pharmaceutical industry’s toughest challenges

This image is missing an alt tag
 

CPI is helping to make medicine manufacturing faster, cheaper and easier to scale.
With XpertFactory, teams can now harness secure, explainable AI to optimise performance, cut costs,and drive more sustainable production.

 
For decades, the pharmaceutical industry has relied on large-scale, one-size-fits-all manufacturing, a system that’s reliable but rigid.
Developing, testing and commercialising new medicines can take up to 15 years, with each step slowed by complex regulation, high costs and limited process flexibility.
CPI exists to change that. Acting as an innovation catalyst, it brings together pharmaceutical companies, universities, regulators and technology providers to rethink how medicines are made.
Its aim is to accelerate the journey from drug discovery to market and get life-saving treatments to patients faster and more affordably
 

Bringing agility to a slow-moving industry

Traditional, high-volume manufacturing has served the pharmaceutical industry well for decades, but it’s no longer fit for purpose. As the population ages, healthcare costs rise and demand for personalised medicines continues to grow, the industry needs to move faster, waste less and adapt more easily. 

CPI1

The future lies in flexible, modular production systems that can be easily reconfigured, are less energy intensive, and use lower quantities of active ingredients. One of the most promising breakthroughs is continuous direct compression (CDC), a method where tablets are manufactured in a continuous flow of mini-batches rather than single, large ones. This approach has the potential to reduce production times from weeks to days, lower manufacturing costs by 30-50% and cut energy consumption by nearly 70%.

Yet despite these advantages, uptake of CDC has been relatively slow. To help accelerate adoption, CPI and its partners at the UK’s Medicines Manufacturing Innovation Centre have combined a fully-operational, industry-certified CDC line with advanced digital twin modelling to demonstrate its commercial viability. 

Digital modelling is a key aspect of the demonstrator, says Kamal Abu Hassan, Senior Scientist at CPI. “Digital twins allow manufacturers to model, simulate and investigate their production processes in a virtual environment,” he explains. “We can test how small changes such as tweaking formulations and reaction conditions will affect yield before we commit any raw materials, helping to reduce risk, cost and time.” But while digital twins generated useful insights into the process, the team quickly realised the AI models underpinning them were powerful but opaque. Teams could see what went in and what came out, but not why. In a high-stakes, regulated industry like pharmaceuticals, that lack of transparency poses a serious barrier.

“Digital modelling is a key aspect of the demonstrator. Digital twins allow manufacturers to model, simulate and investigate their production processes in a virtual environment. Now we can test how small changes such as tweaking formulations and reaction conditions will affect yield before we commit any raw materials, helping to reduce risk, cost and time"

Kamal Abu Hassan, Senior Scientist at CPI


From Black Box to Glass Box

As the CDC demonstrator matured, it became clear that traditional AI models weren’t enough. They were difficult to deploy and offered little explanation for their results – making them hard to trust.

The models were fast and accurate, but the reasoning behind their results wasn’t always clear,” Kamal explains. “We needed a system where every result could be explained, validated and audited. It wasn’t enough to have the right answer; we had to understand how it was reached. XpertFactory has delivered that clarity.”

CPI2

XpertFactory – XpertRule’s manufacturing platform uses symbolic machine learning that allows users to build AI models that are not only accurate but fully explainable. By visualising the relationships between process variables and the parameters influencing outputs, teams could finally see why results were made – turning opaque algorithms into explainable, auditable logic.

“XpertFactory makes it easy to see which variables affected each output and exactly how the model reached its conclusion,” says Kamal. “That transparency into the decision paths gives the whole team confidence in the results.”

By turning opaque ‘black box’ models into auditable ‘glass box’ logic, XpertFactory bridged the gap between innovation and real-world application. It also opened the door to wider collaboration, enabling anyone – from lab scientists to process engineers – to interrogate the data, ask practical questions and act on the results with confidence.

“The models were fast and accurate, but the reasoning behind their results wasn’t always clear. We needed a system where every result could be explained, validated and audited. It wasn’t enough to have the right answer; we had to understand how it was reached. XpertFactory has delivered that clarity.”

Kamal Abu Hassan, Senior Scientist at CPI


Explainable AI in action

Once XpertFactory was implemented, the results were immediate. Using input-output data from existing models, the team was able to replicate the same predictive accuracy while making every outcome fully transparent and traceable.

The platform mapped the precise cause-and-effect relationships as decision trees, defining the exact ‘if-then” pathways behind every result. These clear visual models were easy to validate with subject matter experts, turning complex data science into explainable, auditable intelligence.

CPI3

Just as importantly, XpertFactory resolved a major deployment challenge that had previously limited progress. Earlier models were tied to proprietary runtime software that couldn’t run on production devices. The team had experimented with open-source alternatives, but these introduced security risks.

XpertFactory solved both issues. By exporting the model logic as self-contained decision rules, the team could integrate AI directly into existing process tools securely and without additional software. For the first time, teams could deploy models at scale across operational environments without compromising control or compliance.

"Our goal was to move beyond black-box modelling and give CPI full transparency into their models,” says Darren Falconer, Technical Director at XpertRule Software. “By applying our glass-box approach, we delivered not only accurate predictions, but clear insight into which inputs drive which outputs, making the models explainable, auditable and deployment-ready.”

The next step was accessibility. Using XpertFactory, teams can now test ‘what-if’ scenarios, query models in plain language and receive trustworthy, actionable answers. “We can now ask practical questions and get meaningful insights. It’s no longer just about data, but direction,” says Kamal. “It’s made advanced AI something everyone can use, not just modellers or IT experts.”

"Our goal was to move beyond black box modelling and give CPI full transparency into their models. By applying our glass box approach, we delivered not only accurate predictions, but clear insight into which inputs drive which outputs, making the models explainable, auditable and deployment-ready.” 

Darren Falconer, Technical Director at XpertRule Software


From proof of concept to industry impact

With XpertFactory’s explainable AI models now fully embedded in the CDC and digital twin demonstrator, CPI and its partners are preparing to scale the approach into industry. The goal is to turn these research-led models into deployable tools that could reshape the wider pharmaceutical supply chain.

“Our ambition is to see these proof of concepts translated into commercial products that are adopted by – and benefit – not only large pharmaceutical manufacturers but also SMEs. That’s where the real impact will come, when explainable AI helps companies build better, faster and more efficient manufacturing processes.”

Kamal Abu Hassan, Senior Scientist at CPI

The team is already exploring how to extend the platform, including the use of AI agents and natural language interfaces to allow users to query production models directly. As more data is added, these systems will be able to answer higher-level strategic questions, such as how much energy could be saved under different production scenarios, or how optimising formulation might cut material use or cost.

Those insights have the potential to make pharmaceutical manufacturing not only faster and more flexible, but also more sustainable and cost-efficient.

“Working with XpertRule has been a great collaboration,” Kamal concludes. “Their experts have shown us how explainable AI can make both an immediate and lasting difference, not just in model performance, but in how people engage with AI to drive better results.”

The partnership between CPI and XpertRule shows that when AI is explainable, it’s actionable. With XpertFactory, manufacturing teams no longer have to choose between accuracy and understanding. They can have both – and it’s transforming how innovation can be trusted.

“Working with XpertRule has been a great collaboration. Their experts have shown us how explainable AI can make both an immediate and lasting difference, not just in model performance, but in how people engage with AI to drive better results.” 

Kamal Abu Hassan, Senior Scientist at CPI


cpi-xr

 

Download a copy