Can chemical reactions be encoded into algorithms and understood by computers?

Professor Alexei Lapkin, from the University of Cambridge in the UK, is a chemical engineer using robotics and artificial intelligence to change the way we design and produce chemical products

TALK LIKE A CHEMICAL ENGINEER

ALGORITHM – a set of rules or steps to follow in a particular order to solve a problem or complete a process, notably in computing

BAYESIAN OPTIMISATION – a statistical technique which can help to solve problems where the exact relationship between inputs and outputs is not initially known

CRADLE-TO-CRADLE – approach to product design which considers the entire life cycle of the item, from manufacture through use to recycling or repurposing

MACHINE LEARNING – the family of techniques whereby algorithms are trained to identify patterns in data

PROCESS INTENSIFICATION (PI) – the development of new apparatus and techniques which bring dramatic improvements in manufacturing of an existing product; ‘dramatic’ has been roughly enumerated as at least 100 times better (smaller size, higher throughput, etc.) compared to the starting point

From the mid-twentieth century, scientists have understood that some systems, both artificial and natural, are inherently and irreducibly complex. Since around the same time, engineers and mathematicians have been developing the field of machine learning to solve problems beyond the abilities of more traditional analysis, based on the concept of reduction to smaller problems. At the Department for Chemical Engineering and Biotechnology at the University of Cambridge, Professor Alexei Lapkin is one of a team of chemical engineers using complex systems theory and machine learning to save time, money and energy in industrial production.

WHAT ARE COMPLEX SYSTEMS AND HOW ARE THEY RELEVANT TO CHEMICAL ENGINEERING?

Scientists in many fields have to consider systems of interacting components and the use of equations to represent them. In general, these systems (or equations) can be split into two categories: those that can be described as a sum of simpler component systems (or equations), and those which are indivisible. The former tend to behave predictably, whilst the latter can show unpredictable, and even chaotic, behaviour.

In chemical engineering, the presence of many chemical reactions occurring simultaneously constitutes a complex system. Another example is the behaviour of industry as a whole, where complexity arises from interactions between many individual companies, environmental and economic regulatory agencies, consumers and so on – the ‘actors’ or ‘agents’. The unpredictability of complex systems represents a challenge, since chemical engineers need to be able to reliably produce the required quantities of their products safely, on time and within the acceptable price.

WHAT IS PROCESS DEVELOPMENT IN CHEMICAL ENGINEERING?

Chemical engineering involves confronting the challenge of translating cutting-edge science into everyday products. “The connecting step is to estimate the size of the market for the product,” Alexei explains. “From this we can work out how much of the molecule we need to produce, which sets the parameters of the challenge.”

Process development is the next stage. Alexei explains, “We figure out how to manufacture the desired molecule at the right production rate, without causing any environmental problems, and at the right price.” In recent years, a combination of increasing consumer demand and developing technology has led to a growth in the academic discipline of process intensification (PI), first introduced by the former British industrial giant Imperial Chemical Industries (ICI).

The idea behind PI is that by intensifying a process of making molecules, it may be possible to achieve reduction in physical size of a chemical plant, or reduction in the amount of energy it consumes. This can be done by exploiting new methods – that is, exploiting the results of recent scientific discoveries to improve chemical reactions and chemical separations. This can also be achieved by designing new machines – designing how the intensified chemical plants work.

HOW ARE NEW APPROACHES TO PROCESS DEVELOPMENT DIFFERENT TO CONVENTIONAL METHODS?

At the root of every chemical engineering challenge is always a new and exciting discovery at the molecular level. In conventional process development, the next step after discovery is to be able to synthesise the target molecule repeatedly and consistently within a laboratory setting. Then, the properties of the product are systematically studied before the synthesis process is scaled up so that the desired material can be produced at the required production rate to satisfy the market demand. “Following this approach, it takes many years to get to an optimal manufacturing process,” says Alexei.

Alexei and his team are advocates of a different approach, whereby multiple steps in the research and development practice are performed simultaneously. This has an added benefit of being able to identify opportunities to intensify the manufacturing methods and machines used. “In our research, we tend to consider steps of researching molecules, their

reactions, separation of the desired product, understanding how much the process would cost, as well as its potential environmental impact, all at the same time,” says Alexei. This collection of multiple pieces of information and of interactions between many components of the overall system creates a perfect environment for the application of advanced mathematics. “Our breakthroughs came through interacting with mathematicians and explaining the features of our discipline to them,” Alexei recalls.

HOW CAN MACHINE LEARNING BE USED IN PROCESS DEVELOPMENT?

The rapid increase in computing power over recent decades has pushed machine learning to the forefront of many scientific disciplines. However, the nature of chemical engineering means that machine learning must be used in a very particular way. “In fields such as image recognition, say for self-driven vehicles, methods can be trained on huge quantities of data, but, with chemical processes, we only have modest-size datasets,” Alexei explains. “Therefore, we focus only on those methods that are good at learning from relatively small sets of data”.

“We came up with a strategy of how to encode chemical information such that computer algorithms understand it,” Alexei says. “We can then use different methods developed in the machine learning community, for example the method of Bayesian optimisation, to connect inputs to outputs”.

CAN MACHINES BE TRAINED TO PERFORM JOBS LIKE SCIENTISTS?

A machine that conducts its own chemistry experiments might sound like science fiction, but this ambition is beginning to be realised in the labs of engineers such as Alexei. “In our own lab, we built a machine that performs experiments on its own; it measures results, compares these with previous experiments, and considers what experiments to do next.”

“The machine computes the probability of a successful outcome for each of these possible experiments, and then chooses which one to actually run,” Alexei adds. “The machine can repeat this process hundreds of times, which can take weeks off the time needed to complete a development project.”

HOW CAN IMPROVED PROCESS DEVELOPMENT MAKE MEDICINE FAIRER?

“By learning how to encode chemistry into algorithms, we hope to make chemical development significantly faster and more accessible,” says Alexei. Part of this greater accessibility lies in lower costs, which can then be passed on to consumers.

Reference
https://doi.org/10.33424/FUTURUM222

Undergraduate students learning how to build designs for 3D printing of chemical process equipment during their experimental project; such a project is an integral part of the degree in chemical engineering and biotechnology.
Alexei and his team use a low-cost liquid mixing and testing robot built by the group of Professor Leroy Cronin (University of Glasgow) to work on design of formulations.
Alexei’s lab uses a new type of ‘chemistry machine’, built by a local company based in Royston – Vapourtec. The team develops complex automated experimental systems on the basis of such machines.
Sometimes work can take you far afield; Alexei worked on a project in Argentina to help a local company scale-up extraction of the starting compound for synthesis of the antimalarial, artemisinin.
Hiking during the research group’s annual retreat.

Working on a HAZOP study within a European project with research and industry partners in Porto.

Alexei and his research group having a Christmas meeting during COVID.

TALK LIKE A CHEMICAL ENGINEER

ALGORITHM – a set of rules or steps to follow in a particular order to solve a problem or complete a process, notably in computing

BAYESIAN OPTIMISATION – a statistical technique which can help to solve problems where the exact relationship between inputs and outputs is not initially known

CRADLE-TO-CRADLE – approach to product design which considers the entire life cycle of the item, from manufacture through use to recycling or repurposing

MACHINE LEARNING – the family of techniques whereby algorithms are trained to identify patterns in data

PROCESS INTENSIFICATION (PI) – the development of new apparatus and techniques which bring dramatic improvements in manufacturing of an existing product; ‘dramatic’ has been roughly enumerated as at least 100 times better (smaller size, higher throughput, etc.) compared to the starting point

From the mid-twentieth century, scientists have understood that some systems, both artificial and natural, are inherently and irreducibly complex. Since around the same time, engineers and mathematicians have been developing the field of machine learning to solve problems beyond the abilities of more traditional analysis, based on the concept of reduction to smaller problems. At the Department for Chemical Engineering and Biotechnology at the University of Cambridge, Professor Alexei Lapkin is one of a team of chemical engineers using complex systems theory and machine learning to save time, money and energy in industrial production.

WHAT ARE COMPLEX SYSTEMS AND HOW ARE THEY RELEVANT TO CHEMICAL ENGINEERING?

Scientists in many fields have to consider systems of interacting components and the use of equations to represent them. In general, these systems (or equations) can be split into two categories: those that can be described as a sum of simpler component systems (or equations), and those which are indivisible. The former tend to behave predictably, whilst the latter can show unpredictable, and even chaotic, behaviour.

In chemical engineering, the presence of many chemical reactions occurring simultaneously constitutes a complex system. Another example is the behaviour of industry as a whole, where complexity arises from interactions between many individual companies, environmental and economic regulatory agencies, consumers and so on – the ‘actors’ or ‘agents’. The unpredictability of complex systems represents a challenge, since chemical engineers need to be able to reliably produce the required quantities of their products safely, on time and within the acceptable price.

WHAT IS PROCESS DEVELOPMENT IN CHEMICAL ENGINEERING?

Chemical engineering involves confronting the challenge of translating cutting-edge science into everyday products. “The connecting step is to estimate the size of the market for the product,” Alexei explains. “From this we can work out how much of the molecule we need to produce, which sets the parameters of the challenge.”

Process development is the next stage. Alexei explains, “We figure out how to manufacture the desired molecule at the right production rate, without causing any environmental problems, and at the right price.” In recent years, a combination of increasing consumer demand and developing technology has led to a growth in the academic discipline of process intensification (PI), first introduced by the former British industrial giant Imperial Chemical Industries (ICI).

The idea behind PI is that by intensifying a process of making molecules, it may be possible to achieve reduction in physical size of a chemical plant, or reduction in the amount of energy it consumes. This can be done by exploiting new methods – that is, exploiting the results of recent scientific discoveries to improve chemical reactions and chemical separations. This can also be achieved by designing new machines – designing how the intensified chemical plants work.

HOW ARE NEW APPROACHES TO PROCESS DEVELOPMENT DIFFERENT TO CONVENTIONAL METHODS?

At the root of every chemical engineering challenge is always a new and exciting discovery at the molecular level. In conventional process development, the next step after discovery is to be able to synthesise the target molecule repeatedly and consistently within a laboratory setting. Then, the properties of the product are systematically studied before the synthesis process is scaled up so that the desired material can be produced at the required production rate to satisfy the market demand. “Following this approach, it takes many years to get to an optimal manufacturing process,” says Alexei.

Alexei and his team are advocates of a different approach, whereby multiple steps in the research and development practice are performed simultaneously. This has an added benefit of being able to identify opportunities to intensify the manufacturing methods and machines used. “In our research, we tend to consider steps of researching molecules, their

reactions, separation of the desired product, understanding how much the process would cost, as well as its potential environmental impact, all at the same time,” says Alexei. This collection of multiple pieces of information and of interactions between many components of the overall system creates a perfect environment for the application of advanced mathematics. “Our breakthroughs came through interacting with mathematicians and explaining the features of our discipline to them,” Alexei recalls.

HOW CAN MACHINE LEARNING BE USED IN PROCESS DEVELOPMENT?

The rapid increase in computing power over recent decades has pushed machine learning to the forefront of many scientific disciplines. However, the nature of chemical engineering means that machine learning must be used in a very particular way. “In fields such as image recognition, say for self-driven vehicles, methods can be trained on huge quantities of data, but, with chemical processes, we only have modest-size datasets,” Alexei explains. “Therefore, we focus only on those methods that are good at learning from relatively small sets of data”.

“We came up with a strategy of how to encode chemical information such that computer algorithms understand it,” Alexei says. “We can then use different methods developed in the machine learning community, for example the method of Bayesian optimisation, to connect inputs to outputs”.

CAN MACHINES BE TRAINED TO PERFORM JOBS LIKE SCIENTISTS?

A machine that conducts its own chemistry experiments might sound like science fiction, but this ambition is beginning to be realised in the labs of engineers such as Alexei. “In our own lab, we built a machine that performs experiments on its own; it measures results, compares these with previous experiments, and considers what experiments to do next.”

“The machine computes the probability of a successful outcome for each of these possible experiments, and then chooses which one to actually run,” Alexei adds. “The machine can repeat this process hundreds of times, which can take weeks off the time needed to complete a development project.”

HOW CAN IMPROVED PROCESS DEVELOPMENT MAKE MEDICINE FAIRER?

“By learning how to encode chemistry into algorithms, we hope to make chemical development significantly faster and more accessible,” says Alexei. Part of this greater accessibility lies in lower costs, which can then be passed on to consumers.

“As we reduce the cost of drug development and drug manufacture, we can reduce the retail price of medicines, which in turn makes medicines accessible to a greater number of people,” he explains. The COVID-19 pandemic has focused minds everywhere on the need to distribute medicines worldwide in a fair way, and chemical engineering is going to have to play a key role in addressing this challenge.

HOW CAN IMPROVED PROCESS DEVELOPMENT BENEFIT THE CLIMATE?

“By making sure every industrial process is highly optimised, we can reduce energy consumption, and thus reduce our impact on the climate,” Alexei explains. In recent years, more and more companies have incorporated cradle-to-cradle philosophies into their products, and academics such as Alexei are concerned with the same set of issues.

“We include measures of cleanness in all process development projects – not only in terms of the processes themselves but also the raw materials,” Alexei says. Increasingly, engineers specialising in sustainability are looking to imitate the natural world. One new approach, known as industrial ecology, looks to avoid wasting by-products of chemical processes by using them as feedstocks for other processes.

HOW DOES THIS WORK BRIDGE THE GAP BETWEEN ACADEMIA AND INDUSTRY?

“Some of our algorithms and tools have been adopted by companies as well as by other scientists,” Alexei says. “One of our industry partners has patented a method of developing products that we helped them to develop.” At the same time, Alexei himself has moved into the business world. “We have spun out two start-up companies, in the areas of digital manufacturing tools and clean chemistry.”

“In chemical engineering, and in our group in particular, the fundamental sciences are mixed with issues of safety, ecology, business and management,” Alexei adds. “We also have a lot of fun, which I think is a success for the group!” A career in chemical engineering might allow you to not only work across several academic disciplines, but also to bridge the gap between academia and industry.

PROFESSOR ALEXEI LAPKIN
Professor of Sustainable Reaction Engineering, University of Cambridge, UK

FIELD OF RESEARCH: Chemical Engineering

RESEARCH PROJECT: Combining chemical robotics and statistical methods to develop complex functional products

FUNDER: Engineering and Physical Sciences Research Council (EPSRC)

PROFESSOR ALEXEI LAPKIN
Professor of Sustainable Reaction Engineering, University of Cambridge, UK

FIELD OF RESEARCH: Chemical Engineering

RESEARCH PROJECT: Combining chemical robotics and statistical methods to develop complex functional products

FUNDER: Engineering and Physical Sciences Research Council (EPSRC)

ABOUT CHEMICAL ENGINEERING

WHAT DOES A TYPICAL DAY AS A CHEMICAL ENGINEER INVOLVE?

“As a chemical reaction engineer, a lot of time is spent on preparing the automated systems which run each set of experiments, and on understanding all the prior knowledge of the specific chemistry to ensure experiments are safe to do and meaningful,” says Alexei. “The raw materials have to be prepared, and all the sub-systems checked. Whilst the experiment is running, we may need to check that it is progressing smoothly. If it isn’t, we have to figure out why.”

“Apart from running the experiments, there is the analysis of results, which in our case involves a lot of work checking on and refining machine learning methods. Finally, there is the time spent reading new and exciting scientific articles from our peers, and describing our own results in the form of scientific manuscripts and conference presentations.”

WHAT WILL BE THE CHALLENGES FACING THE NEXT GENERATION OF CHEMICAL ENGINEERS?

The transition from fossil fuels to sustainable energy sources – sometimes known as the green transition – has become a frontier of science and engineering, as well as a major topic of political debate. Chemical engineers have a key role in this transition, both by improving efficiency of production lines, and by developing the new materials needed to drive the expansion in renewable energy. The energy transition is part of a broader move towards sustainability. “We need to replace many of the materials in use today with alternatives that are better performing and less harmful to the environment,” explains Alexei. “We need to scale manufacture of nanomaterials and composites that will go into new construction materials, as well as into new types of medicines.”

EXPLORE A CAREER IN CHEMICAL ENGINEERING

• As well as taking part in Cambridge Science Festival each year, Alexei’s department takes sixth form students on science placements. Explore the department’s website to find out what studying chemical engineering involves.

• Alexei recommends the resources made available by the Institution of Chemical Engineers (IChemE). These include a section explaining the variety of things that chemical engineers do.

• According to the UK National Careers Service, average salaries for chemical engineers start at £30,000 and rise to around £65,000 with experience.

• A background in chemical engineering may also allow you to move into more managerial roles, banking and finance (where chemical engineers help to assess environmental risk factors), or to work as a consultant.

PATHWAY FROM SCHOOL TO CHEMICAL ENGINEERING

• As well as chemistry, other particularly beneficial A-level qualifications for chemical engineering are maths, physics and biology.

• A list of universities offering chemical engineering courses can be found on the UCAS website.

• Even without an undergraduate chemical engineering degree, you may still be able to transfer from chemistry or engineering once you reach postgraduate level.

• It is also a good idea to search for apprenticeships using the UK government website.

HOW DID ALEXEI BECOME A CHEMICAL ENGINEER?

WHAT WERE YOUR INTERESTS WHEN YOU WERE GROWING UP?

As a young child, I enjoyed Meccano and other construction games. Growing slightly older, I became more interested in chemistry, in general, and in my home chemistry set, in particular. Other interests included the natural world – I attended an after-school entomology class – and learning classical music to be able to play cello.

WHO INSPIRED YOU TO BECOME A SCIENTIST?

I was lucky to have a very good mentor in my after-school chemistry club. He promoted science as a career where I could choose what to do and how to do it, without needing to answer to a boss at the end of the day. Of course, now that I am a professional scientist, I realise that my work is overseen by society and must be scrutinised by my peers – and they can be tough judges!

WHAT KEEPS YOU MOTIVATED IN YOUR WORK?

It can be hard to stay motivated through the hard grind which makes up a lot of scientific work. We cherish the rare Eureka moments – when a solution appears, a difficult experiment runs successfully, or a positive outcome is obtained from an experiment. It is also very gratifying on those occasions when you can present your best results at a big meeting and get positive feedback from your peers in other research groups.

WHAT ARE YOUR PROUDEST CAREER ACHIEVEMENTS SO FAR?

These days, I take great pride in the achievements of my research group – a large part of my role is to feed initial ideas into the group and then let the younger generation take over and move the ideas forward.

ALEXEI’S TOP TIPS

01 To be a professional scientist, you need to be comfortable operating at the edge of knowledge – the learning never stops!

02 Learn to re-formulate problems into simpler, generic terms avoiding topical jargon, as well as to link knowledge from different neighbouring disciplines. This will help you to become good at finding solutions to problems.

03 Science is not a normal job – it is a vocation! Your mind will keep working on problems even when you leave the office, so it is good to find activities which allow you to focus on something completely different.

Do you have a question for Alexei?
Write it in the comments box below and Alexei will get back to you. (Remember, researchers are very busy people, so you may have to wait a few days.)