Thomas M.
Dixon
a,
Jeanine
Williams
b,
Maximilian
Besenhard
c,
Roger M.
Howard
d,
James
MacGregor
e,
Philip
Peach
e,
Adam D.
Clayton
a,
Nicholas J.
Warren
a and
Richard A.
Bourne
*a
aInstitute of Process Research and Development, School of Chemistry & School of Chemical Process Engineering, University of Leeds, Leeds, LS2 9JT, USA. E-mail: R.A.Bourne@leeds.ac.uk
bSchool of Chemistry, University of Leeds, Leeds, LS2 9JT, USA
cDepartment of Chemical Engineering, University College London, Torrington Place, London WC1E 7JE, UK
dPfizer Worldwide Research and Development, Groton, CT, USA
eDepartment of Analytical Research and Development, Pfizer Limited, Ramsgate Road, Sandwich CT13 9NJ, UK
First published on 14th June 2024
The need to efficiently develop high performance liquid chromatography (HPLC) methods, whilst adhering to quality by design principles is of paramount importance when it comes to impurity detection in the synthesis of active pharmaceutical ingredients. This study highlights a novel approach that fully automates HPLC method development using black-box single and multi-objective Bayesian optimization algorithms. Three continuous variables including the initial isocratic hold time, initial organic modifier concentration and the gradient time were adjusted to simultaneously optimize the number of peaks detected, the resolution between peaks and the method length. Two mixtures of analytes, one with seven compounds and one with eleven compounds, were investigated. The system explored the design space to find a global optimum in chromatogram quality without human assistance, and methods that gave baseline resolution were identified. Optimal operating conditions were typically reached within just 13 experiments. The single and multi-objective Bayesian optimization algorithms were compared to show that multi-objective optimization was more suitable for HPLC method development. This allowed for multiple chromatogram acceptance criteria to be selected without having to repeat the entire optimization, making it a useful tool for robustness testing. Work in this paper presents a fully “operator-free” and closed loop HPLC method optimization process that can find optimal methods quickly when compared to other modern HPLC optimization techniques such as design of experiments, linear solvent strength models or quantitative structure retention relationships.
HPLC methods separate analytes in a mixture based on their affinity for a stationary and a mobile phase. The technique is believed to separate between 60–80% of all existing compounds,5 making it the most used separation technique for the identification of impurities in the pharmaceutical industry.6 In addition, the method can be easily integrated as an online technique for monitoring reactions in flow.7 There is a demand for robust HPLC methods that give baseline resolution in the shortest amount of time, but the method development process can take several days for even the most experienced analytical chemists.
There have been many advancements in the efficiency of HPLC method optimization. Design of experiments (DOE) and modelling based method development tools are among the most popular.8,9 Software packages such as DryLab,10 ACD/LC Simulator11 and ChromSword12 aim to automate method development by selecting experiments based on different variations of DOE and offer tools such as peak tracking. Given data from a DOE, the retention time of each peak under different method conditions is fitted to a model. Using these models, a range of different method conditions can be simulated and the chromatogram quality assessed.13,14 Those conditions that match the desired qualities computationally are then run on the HPLC to give the optimal method. These models range from simple quadratics to linear solvent strength (LSS) models, which can be evaluated computationally to optimize parameters such as gradient steepness, isocratic hold times, pH or temperature. This methodology has also been used to automate robustness testing, ensuring baseline resolution in the chromatogram is maintained even with slight alterations in method conditions. Many examples have used this approach to optimize HPLC method conditions.15–21
Recent advancements in elution time prediction include in silico quantitative structure retention relationships (QSRR), that use machine learning models to map molecular fingerprints and molecular descriptors to retention times, so that molecules with unknown retention properties can be estimated using only their structures.22,23 This novel data driven optimization allows for information about ideal separation conditions to be obtained without needing to do any prior screening.
The main disadvantages with model-based approaches include the human processing time to label peaks and verify the models. The effectiveness of these models to simulate any secondary separation mechanisms or size exclusion effects can also lead to incorrect predictions.24 QSRR also requires large amounts of balanced datasets which are not always available. Although these methods can provide some automation, their functionality is not fully automated or closed-loop.
Operator-free optimization has shown to be successful in flow chemistry, where systems have been developed to be able to autonomously self-optimize input conditions such as residence time, equivalents and temperature to find optimal conditions for objectives such as yield, space-time yield and purity.25–32 These systems make use of optimization algorithms, which are most commonly used to optimize expensive-to-evaluate functions, where a considerable amount of computer processing or long experiment times are required. This can result in optimizing input conditions in fewer experiments compared to other machine learning techniques.33 As chemical reactions can take a significant amount of time to run, it makes them an ideal candidate for optimization algorithms.34 Provided a system can become “closed-loop”, where input conditions can be freely modified and objectives can be analyzed and interpreted automatically, an optimization algorithm can be integrated to fully automate finding optimal conditions. Therefore, the same approach can be used to optimize HPLC method conditions.
Berridge in 1986 stated that the use of optimization algorithms in HPLC method development is limited as they were previously only local and single-objective, one example being the Simplex algorithm.35,36 However recent advancements in optimization algorithms have increased their functionally to optimize globally and handle multiple objectives at once, making the concept of fully autonomous HPLC method optimization possible.34,37 Simplex was used to optimize for chromatogram quality.38,39 An iterative stochastic search, based on a pure random search where the design space is shrunk with each iteration, was also developed.40 However, both of these optimization approaches are unlikely to reliably find the global optimum in a HPLC method optimization.
Recent research has shown Bayesian optimization algorithms to be particularly efficient at solving complex optimization problems.41 They are described as being black box, meaning no previous intuitive knowledge about the optimization problem is required for them work.34 Therefore, other than developing a way to measure the chromatogram quality, no fundamental HPLC theory would need to be programmed to use these algorithms. This may offer an advantage when developing analytical methods on novel systems as no previous knowledge about the system would be assumed.
The use of Bayesian statistical modelling has been investigated by Lebrun et al. where multivariate models were used on experimental data to make predictions about retention time.42 A Bayesian design space has also been used for robustness testing for pharmaceutical assays.43 This work aims to incorporate Bayesian optimization algorithms as a means to find the global optima of chromatogram quality by changing method variables. One drawback of Bayesian modelling is that it does not scale well with problems containing 10–20 variables.44 However, HPLC method optimization should fit comfortably within the required dimensionality for this.
Boelrijk et al. demonstrated the use of Bayesian optimization algorithms to optimize HPLC methods for two complex dye mixtures in as few as 35 experiments.45 Both single and multi-objective optimization algorithms were used using input conditions that defined a multi-linear gradient program to separate the analytes, and custom objective functions such as ‘separation quality’ which combined the number of peaks detected with the method time. Building on this approach, we report herein the development of an autonomous impurity scouting method which focuses on achieving baseline resolution in the shortest time possible for full quantitative analysis.
Guidelines known as the Quality by Design (QbD) principles for liquid chromatography were written to ensure HPLC method conditions are explored effectively, ensuring impurities are identified and methods are robust.46 Coupling single and multi-objective Bayesian optimization algorithms with automated data analysis integrated into a closed loop optimization platform, offers a novel approach to HPLC method optimization. A schematic of this approach is described in Fig. 1. Work detailed in this paper aims to highlight the advancements of an industry 4.0 approach on HPLC method optimization, aiming provide a methodology that can be used automate and accelerate the identification of impurities in chemical reactions for the pharmaceutical industry.
Variable | Description | Lower bound | Upper bound |
---|---|---|---|
Initial organic modifier concentration (%) | The organic modifier concentration when time is zero | 5 | 60 |
Initial isocratic hold time/minutes | The length of time the initial organic modifier concentration is held for before a gradient method begins | 0 | 10 |
Gradient time/minutes | The length of time from the initial organic modifier concentration to an organic modifier concentration of 95% after the initial isocratic hold | 1 | 10 |
For initialisation, the algorithms require an initial data set which is generated using Latin hypercube sampling (LHS).51 Seven initial conditions were generated using LHS for the three input variables defined in Table 1. A different set of seven initial LHS conditions were generated for each optimization experiment.
For the optimization algorithm to find conditions that maximize chromatogram quality, an objective function(s) must be defined. This can be done using a range of different chromatogram factors. One such factor is the separation between two peaks, known as resolution (Rs) which is defined in eqn (1). This factor denotes the separation between two Gaussian peaks, where tRx is the retention time of peak x and whx is the width of peak x at half height.
![]() | (1) |
The larger the resolution between two peaks, the greater the separation. Perfect separation between two Gaussian peaks is achieved when Rs = 1.5. Separating all the peaks in a chromatogram with an Rs greater than 1.5 is optimal in most situations. The smallest overall Rs between any two consecutive pairs of peaks in a chromatogram is defined as the critical resolution (RsCrit) shown in eqn (2), where n is the number of consecutive peak pairs.
![]() | (2) |
An optimal HPLC method resolve all the analytes in a mixture with a RsCrit greater than 1.5 in the shortest possible time. Shorter method times are desirable to increase analysis throughput. Therefore, it was decided that the overall quality of the chromatogram would be governed by three factors: The number of peaks, the time the last peak elutes and RsCrit.
BOAEI was initially used to optimize HPLC method conditions. A weighted objective function (R) was created to represent the overall chromatogram quality based on these three HPLC factors. R is summarized in eqn (3), where N is the number of peaks detected and tRL is the retention time of the last peak in the chromatogram.
![]() | (3) |
As R tends towards zero, the chromatogram quality is increased. R = 0 denotes a chromatogram with seven peaks, RsCrit ≥ 2 and the time the last peak elutes at zero minutes. R = 1 denotes a chromatogram with zero peaks, RsCrit = 0 and the time the last peak elutes at 22 minutes. R will always be between zero and one. BOAEI will aim to minimize R by varying the three input variables defined in Table 1.
N, RsCrit and tRL are calculated from chromatogram data, normalized between 0 and 1 using pre-defined limits and then multiplied by a pre-defined weighting factor based on its importance. Each factor with its normalisation and weighting is described in Table 2. A special case for eqn (3) was also defined so when RsCrit > 2, the 0.3 ((2-RsCrit)/2) term is removed, preventing the term from becoming negative and from giving optimal values to chromatograms with large RsCrit values over N and tRL.
Factor | Desired result | Normalisation | Weighting |
---|---|---|---|
Number of peaks (N) | Maximize | 0–7 | 0.6 |
Critical resolution (RsCrit) | Greater than or equal to two | 0–2 | 0.3 |
Time last peak elutes (tRL) | Minimize | 0–22 | 0.1 |
N was deemed the most important HPLC factor and so was given the largest weighting, followed by RsCrit and then tRL. Therefore, a 6:
3:1 ratio respectively of the weightings was selected to focus on this order of importance in the objective function. Normalisations were defined based on the maximum and minimum possible values that could be obtained for each objective in an experiment, based on the input variables defined in Table 1 and a mixture containing up to seven analytes. The selection of weightings is difficult without prior information about the system and can have a significant impact on the trajectory of the optimization.52 This is overcome with the multi-objective optimization approach, where the need to define weightings and normalisation parameters is removed.
TS-EMO, a multi-objective Bayesian optimization algorithm, was next used with three objective functions. This time the HPLC factors defined in Table 2, N, RsCrit and tRL, were used individually as the different objective functions. The natural log of each objective was taken before it was fed into the optimization algorithm, as surrogate models tend to fit better to log transformed data.53 As TS-EMO aims to minimize its objective functions, the result of the log transformed N and RsCrit objectives were multiplied by −1, as these objectives are to be maximized. The TS-EMO optimization with three objectives is summarized in eqn (4).
Minimize[−ln![]() ![]() ![]() | (4) |
TS-EMO prioritizes solutions that maximize the hypervolume improvement of the design space. This makes use of Thompson sampling, an acquisition function that balances exploration of the design space versus exploitation of points that are believed to be optimal from the Gaussian process model, and NSGA-II, a genetic algorithm that uses Pareto ranking and crowding distance computations to find points that maximize the hypervolume improvement. The result is an algorithm that aims to find the trade-off between different objective functions. The points that lie on the boundary of the trade-off are described to be Pareto dominant and can be used to plot a Pareto front. This represents points in the design space for a given objective that cannot be improved without having a detrimental effect on another objective.34,50 Therefore, TS-EMO will aim to find the trade-off between N, RsCrit and tRL.
The structures of these molecules are shown in Fig. 2.
MATLAB (version R2021b), Excel (office 365) and ChemStation (version C.01.09 [144]) were used to automate the HPLC method development process and were run on a HP Prodesk computer with an Intel® Core™ i5-8500 processor @ 3.00 GHz, 6 cores, and 8 Gb RAM.
BOAEI was able to find method conditions for optimizations 1–3 that satisfied the defined criteria in an average of 13 experiments. Experiments 12, 19 and 9 for optimizations 1–3 respectively were the first experiments to reach optimal conditions, achieving R values of 0.0195, 0.0222 and 0.0238 respectively.
Further experimentation resulted in even more optimal HPLC method conditions being discovered, where tRL was reduced to 3.9 minutes after 33 experiments (R = 0.0178), 3.3 minutes after 24 experiments (R = 0.0150) and 5.1 minutes after 28 experiments (R = 0.0230) for optimizations 1–3 respectively, which also satisfied the N = 7 and RsCrit ≥ 2 criteria. The design spaces for optimizations 1–3 are shown in Fig. 4 and have been plotted in a four-dimensional design space with R represented by a blue to green color scale (for 2D matrix plots see Fig. S9†). The crosses represent the first experiments to satisfy the design space criteria and correspond to the method conditions used to acquire the chromatograms in Fig. 3. The green stars represent the experiments with the smallest value of R achieved by each optimization. Despite more optimal conditions being found in later experiments, the algorithm was highly effective at finding the optimal regions of the design space in early experiments, demonstrated by the near overlap of the crosses and stars for each optimization in Fig. 4.
![]() | ||
Fig. 4 The design spaces for optimizations 1–3 and the trade-off between RsCrit and tRL where N = 7. The color scale represents the value of the weighted objective function R. |
Fig. 4 shows that there are two optimal regions in the design space that lead to small values of R. The most optimal region lies with an initial organic modifier between 30 and 40%, a gradient time of one minute and the initial isocratic hold time between one and three minutes. The BOAEI algorithm in optimizations 1 and 2 found R to be minimized in this region of the design space. However, a second optimal region is observed when longer gradient times between six and ten minutes are selected, the initial isocratic hold time is close to zero minutes and the same initial organic modifier concentration is used. This is where the BOAEI identified R to be minimized in optimization 3.
The results from optimization 3 demonstrated that methods with long, shallow gradients, that allow the first four peaks to elute with a RsCrit ≥ 2, were just as optimal as methods with fast and steep gradients but with a longer initial isocratic hold time to enable efficient separation of the last three peaks, shown in optimizations 1 and 2.
Despite the success of BOAEI using R to find optimal chromatograms in as few as nine experiments, one drawback is demonstrated by the differences in the optimal chromatogram tRL after 40 experiments. The most optimal method condition found in optimization 2 had a tRL of 3.3 minutes, which is clearly more desirable than the most optimal methods in optimizations 1 and 3 which were only able to achieve 3.9 and 5.1 minutes respectively. Consequently, the R values are too similar for each optimal condition, with a difference of only 0.0043 between them. The weighting for the tRL term in R had a smaller influence on the overall value of R compared to the N and RsCrit terms, making the two regions in design space similarly optimal for the BOAEI algorithm.
Re-defining the individual weightings and normalisation factors for R may help to prevent this, however further experimentation and knowledge about the system being optimized would be required, which contradicts the aims of this research. Simply increasing tRL weighting could have other detrimental effects, such as favouring small tRL times over maximising N. Therefore, more complicated mixtures with unknown numbers of analytes may not be suitable for this type of optimization as an outside knowledge is required to compose an ideally suitable weighted objective function.
The trade-off between the RsCrit and tRL for optimizations 1–3 where N = 7 is also shown in Fig. 4. The red dashed box denotes the experiments that satisfied the design space criteria. A total of 13 experiments from optimizations 1–3 were found to satisfy these criteria. Most of the data points in the trade-off plot lie to the right-hand side where RsCrit is maximized. This is due to the RsCrit term in R having a larger weighting associated with it compared with the tRL term, so the BOAEI algorithm will focus on these methods more as the value of R is smaller.
The trade-off graph in Fig. 4 shows that if the critical resolution criteria were to be lowered to 1.5, a tRL of 2.05 minutes for the separation of Mixture A could be achieved, which was experiment 25 in optimization 2. R for this point is only 0.0694 as the R favours methods with RsCrit ≥ 2. For the algorithm to effectively explore methods with RsCrit ≥1.5 instead, the normalisation factors in R would have to be rewritten and the optimization repeated. A more suitable approach to optimising HPLC methods would involve an algorithm that removes the need for normalisation and weighting factors, and instead explores this trade-off. Therefore, it was decided that a multi-objective optimization algorithm such as TS-EMO, which is designed to effectively explore the trade-off between objectives such as N, RsCrit and tRL, would be more suitable. This Pareto front can then be used to select optimal conditions based on the user's requirements. It would also ensure that if the requirements ever changed, the optimization would not need to be repeated. Removing the weightings and normalisation factors would also mean less information about the mixture being optimized would be needed.
Optimizations 4–6 ran for 50 experiments each overnight without interruption. Fig. 5 shows the design space for all three of these optimizations overlayed (for 2D matrix plots see Fig. S10†), along with the trade-off between the RsCrit and tRL when N = 7, with the blue to orange color scale representing the distance to the Pareto front when RsCrit ≥ 1.5. This metric represents the smallest normalized distance of each point to the pareto front. Points that have RsCrit < 1.5 were deemed sub-optimal and so have been set to the maximum distance of 1. This metric aims to show the optimal conditions that are close in proximity to the pareto front so that they can be visualised in the design space clearly.
Fig. 5 shows that the optimal HPLC method conditions for optimizations 4–6, that lie close to these best conditions, are in a very similar location of the design space compared to the method conditions where R is minimized for optimizations 1–3 in Fig. 4, showing that both algorithms were successful at effectively exploring the design space and identifying optimal conditions. As TS-EMO is a multi-objective optimization algorithm, it was efficient at finding points that lie close to the Pareto front between RsCrit and tRL when N = 7 in the trade-off graph in Fig. 5, unlike BOAEI in Fig. 4 where most of the data points in the trade-off graph were focused to the right-hand side with large RsCrit values.
The number of experiments required to reach an optimal method condition where N = 7, RsCrit ≥ 2, and tRL ≤ 6 minutes for optimizations 4–6, excluding the initial LHC, was 17, 40 and 22 respectively, making the average number of experiments required to reach the design space criteria, 26.3, over double the average of 13 experiments when compared to optimizations 1–3.
The overall best methods out of the 50 experiments for optimizations 4–6 were able to reduce tRL to 2.8 minutes after 17 experiments, 3.5 minutes after 44 experiments and 3.2 minutes after 22 experiments respectively, as well as satisfying N and RsCrit criteria. Although TS-EMO required more experiments, it outperformed BOAEI as it was able to consistently find more optimal HPLC method conditions with a smaller average tRL. It was additionally able to efficiently explore the Pareto front between RsCrit and tRL, which can be used to select chromatograms with other characteristics, such as methods with RsCrit ≥ 1.5, without the need to repeat the optimization. Therefore, if new design space criteria were to be defined as: RsCrit ≥ 1.5, N = 7 and tRL ≤ 6, the algorithm (excluding LHC experiments) was able to optimize the method conditions in as few as 11, 12 and 10 experiments for optimizations 4–6 respectively. The fastest overall experiment that satisfies these new criteria was experiment 32 in optimization 6 with tRL = 2.4 minutes. Given that in the pharmaceutical industry, methods need to undergo robustness testing, which is part of the QbD process for HPLC method development, the flexibility to change criteria without needing to repeat experimentation could be a useful time saving tool.
Some datapoints unfortunately in Fig. 5 were just below an Rscrit of 1.5 and therefore deemed sub-optimal. For example, experiment 31 in Optimization 4 had a tRL of 2.04 and an Rscrit of 1.46, which is very similar to experiment 25 in optimization 2 shown in Fig. 4, which had a tRL of 2.05 and Rscrit of 1.60. As TS-EMO aims to find the trade-off between objectives, conditions where RsCrit ≤ 1.5 were also explored, which may be undesirable. A constraint on the objective function could be added here to help reduce the number of experiments in this region and focus on more useful HPLC conditions.
To further test the effectiveness of using TS-EMO for HPLC method optimization, Mixture B which was a more complex mixture with 11 analytes was created. This mixture contained the same analytes as Mixture A but added four new molecules that were again varied in polarity and represented typical molecules found in reactions. The same design space that was used for optimizations 1–6 defined in Table 1 was selected to make the optimization process challenging, even though more molecules were present in Mixture B. Optimizations 7–9 ran for 50 experiments each, without interruption overnight. Fig. 6 shows the design space for all three of these optimizations overlayed (for 2D matrix plots see Fig. S10†), along with the trade-off between the RsCrit and tRL when N = 11, with the blue to orange color scale representing the distance to the Pareto front when RsCrit ≥ 1.5.
All three optimizations were unable to find HPLC method conditions that gave RsCrit ≥ 2, given the defined design space. Only a total of 12 experiments across optimizations 7–9 were found where RsCrit was greater than 1.5. Subsequently the design space criteria were redefined so RsCrit ≥ 1.5, N = 11 and tRL ≤ 10. This was first observed first for experiment 8 for Optimization 7 and experiment 10 for optimization 9. However, optimization 8 failed to find any optimal method conditions within 50 experiments. Points that were optimal appear to have their initial organic modifier concentrations between 5 and 35%, with short isocratic hold times and long gradient times, therefore most of the optimal conditions lie in the corner of this design space.
The randomness incorporated into selecting initial conditions using LHS may have been the reason why optimization 8 was unable to find any chromatograms that satisfied the design space criteria, when compared to optimizations 7 and 9. In this instance, using a 2k factorial DOE instead of LHS for initial conditions, where the corners of the design space are explored first, may have been more suitable as an initial starting point for TS-EMO to explore a wider range of conditions more quickly.
Extra experiments were run on optimization 8 and an optimal point was eventually found on experiment 68, which was significantly slower compared to optimizations 7 and 9, resulting in an average of 29 experiments across all three optimizations to satisfy the design space criteria. One experiment for optimization 8 was however able to reach an RsCrit of 1.48 by experiment 44, and located in a similar region of the design space to the optimal points in optimizations 7 and 9.
Despite few optimal chromatograms being discovered, the region of the design space that contains the optimal solutions is small. These experiments show that for more optimal solutions to be found, expansion of the design space, specifically changing the gradient time parameter to an upper bound of 15–20 minutes, may have enabled expansion of the Pareto front towards methods that give RsCrit ≥ 2. Selecting a suitable parameter space for the optimization will vary depending on the mixture being optimized. Generally, some prior knowledge about the mixture being optimized will be known. However, starting with a design space with a large range between variables and running an optimization will allow the user to see where the optimal points lie. This may be more beneficial to do before then reducing the range of the variables in the design space and repeating to fine tune more optimal conditions along the Pareto front.
Optimization 7 found the fastest tRL that satisfied the design space criteria, with separation in 5.2 minutes with an RsCrit of 1.58 by experiment 30. Optimal chromatograms for both Mixture A and Mixture B are shown in Fig. 7.
![]() | ||
Fig. 7 Optimal chromatograms for Mixture A (top) and Mixture B (bottom) using TS-EMO, representing optimization 4 experiment 17 and optimization 7 experiment 30 respectively. |
Further modifications to this software could include the implementation of discrete and continuous variable optimization algorithms to allow for different columns, pH's and solvents to be investigated, such as MVMOO.55 Defining desired input conditions and implementing custom written objective functions could enable the software to be used to optimize for methods across a range of different applications, including in the separation of polymers in GPC, proteins in size exclusion chromatography and for finding preparative HPLC conditions.
Footnote |
† Electronic supplementary information (ESI) available. See DOI: https://doi.org/10.1039/d4dd00062e |
This journal is © The Royal Society of Chemistry 2024 |