Pfizer Pharmaceutical
  • Simulations of novel pharmacology of a treatment for heart failure sped up by 175x faster using GPUs in Julia
  • Simulations of a model of cardiac metabolism were accelerated by 26x using Julia on single CPUs
  • Multithreading the same cardiac model with Julia increased the simulation speed up to 115x

With 356 drugs on the market in the United States alone, Pfizer is one of the five largest pharmaceutical companies in the world. Drug development is costly because human trials and regulatory approval for a single drug can take a decade and more than $2 billion. Every month of delay in bringing a new therapy to market has significant implications for the company’s return on investment and the patients waiting for new, more effective therapies.

To increase R&D productivity and reduce cost, Pfizer uses model-informed drug development (MIDD) techniques like quantitative systems pharmacology (QSP) to model the effect of their therapies in patients before testing them in clinical trials. QSP modeling assists in identifying issues with efficacy and safety before commencing the next phase of trials. This technique has been employed to help predict trial failures and potentially save valuable resources by allowing the company to focus on therapies with the highest probabilities of clinical success.

Maximizing impact with MIDD in the very fast-paced clinical development cycle is an open issue for pharmaceutical-industry modelers. QSP-type analyses can require millions of solutions to very complicated stiff differential equations, which means that the time required for rigorous analysis is often computationally limited.

Enter Julia.

Julia has many advantages in the area of stiff differential equations. Julia is the fastest open source high productivity language with GPU support and the state-of-the-art DifferentialEquations.jl library with newly developed algorithms that exploit specific characteristics of pharmacometric systems to outperform even the classic C++ and Fortran solvers.

Solving differential equations in Julia isn’t just fast. DifferentialEquations.jl is also the most feature-complete set of differential equation solvers in any language, meaning that what would require substantial scientific developer time in other language ecosystems like R and Python can largely be replaced with function calls from well-documented DifferentialEquations.jl tutorials. Pharma companies use this tooling to improve the efficiency of their QSP modeling in a number of ways:

  1. Automated derivation and optimization of Jacobian functions directly from numerical Julia code calculations allow the full optimization of a hand-derived Jacobian without scientists having to actually derive these functions, saving time and easing the maintainability of the project code.

  2. Improved ODE integrators give instant orders of magnitude performance improvements without requiring a rewrite of the model into a high-performance language like C++ or Fortran.

  3. Automation of the ODE parallelism makes deployment to JuliaRun cloud systems a simple 5 line code change for simultaneous generation of millions of virtual patents.

  4. Automation of ODE parallelism on GPUs allows for instant 175x acceleration using available accelerator hardware on desktop and cloud systems.

Pfizer used Julia to accelerate several models:

  • Steady state calculations of a cardiac model went from nearly a day to just 40 minutes - an improvement of 26x. With multithreading, the total simulation time was reduced to just 9 minutes - an improvement of 115x.

  • The global optimization and simulation of virtual populations in an active drug-target model were reduced from 15.5 hours to 1 hour per patient. Changing a single flag from “Threads” to “Distributed” to “DistributedGPU” allowed this code to easily scale up from a single machine to a JuliaRun deployment on either CPUs or GPUs, enabling previously impractical analyses to be computed within a single day.

  • Global sensitivity analysis of the Tewari-Beard 2016 model was accelerated by 2x over the highly optimized C code, showing that even well-optimized code can be improved through Julia’s specialized differential equation solver algorithms.

Julia’s fast runtime and unique libraries give Pfizer a special efficiency advantage in the field of quantitative pharmacology.

Deployment and scaling are demonstrated here using JuliaHub:

our enterprise products