Bioprocess Modeling Made Easy With Hybrax
This paper introduces Hybrax, an open-source Python framework that streamlines bioprocess modeling by providing a standardized data format and an automated end-to-end training pipeline for hybrid mechanistic-neural network models, thereby enhancing reproducibility and reducing the coding effort required to develop and share these models.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of a preprint that has not been peer-reviewed. It is not medical advice. Do not make health decisions based on this content. Read full disclaimer
In the factories that make life-saving medicines, the most critical work often happens inside invisible glass vessels where tiny cells are coaxed into producing complex proteins. These bioprocesses are delicate, expensive, and difficult to control because the living organisms inside are constantly changing their behavior in response to their environment. Scientists have long tried to build computer models to predict how these cells will act, hoping to optimize production without running endless, costly experiments. The most successful approach so far has been a hybrid method: combining the known laws of physics and chemistry with flexible computer programs that learn patterns directly from the data. However, building these models has traditionally been a laborious, custom job for every single project, requiring researchers to write vast amounts of code just to handle the messy details of feeding the cells, removing samples, and tracking volume changes. This repetitive work has made it difficult to share models or compare different approaches, slowing down progress in the field.
To solve this bottleneck, a team of researchers has developed a new open-source software framework called Hybrax. Think of this tool as a standardized chassis for building bioprocess models, much like a car frame allows engineers to swap out engines without rebuilding the entire vehicle. Before Hybrax, scientists had to manually write the code that accounts for how adding liquid or removing a sample changes the concentration of substances in the reactor. Hybrax automates this entire process. It takes raw data from the lab—measurements of what was added, what was removed, and what the cells produced—and automatically calculates the necessary physical adjustments. This allows researchers to skip the tedious plumbing of the code and focus entirely on the biological question: how do the cells actually behave?
The framework is designed to be flexible enough to handle different types of models, from those based strictly on known chemical equations to those that use artificial intelligence to guess the unknown parts of the process. The researchers demonstrated its power by re-creating two existing models from scientific literature. The first involved a well-known bacterium, E. coli, used to produce a specific compound. By feeding the real-world data from a previous study into Hybrax, the team built a model that matched the original results, achieving a high level of accuracy in predicting biomass and product levels. The second test used synthetic data from a mammalian cell line, HEK293, which is commonly used to make antibodies. This process is more complex, involving dozens of different nutrients and waste products. The team built a model using a type of artificial intelligence known as a long short-term memory network, which is good at remembering patterns over time. This model performed just as well as the original version written in a different programming language, accurately predicting the levels of biomass, antibodies, and glucose over time.
One of the most significant features of Hybrax is how it handles the sharing of scientific work. In many fields, it is difficult to reproduce a study because the original data is buried in custom spreadsheets and the code is scattered across different files. Hybrax bundles everything together. Every time a model is trained, the software saves a complete checkpoint containing the model's settings, the code used to define it, the configuration, and the processed data. This means that any other researcher can take that single file, run the model immediately, or retrain it from scratch without needing to hunt down the original dataset or decipher the original author's notes. The researchers found that this approach not only made their own work faster but also made it possible to swap different model architectures onto the same data set with ease, allowing for direct and fair comparisons of which methods work best.
The team also showed that the software can handle the tricky problem of keeping predictions physically realistic. In their tests with the mammalian cells, the initial models sometimes predicted negative amounts of a substance, which is impossible in the real world. By adding a simple rule to the software that penalizes these impossible predictions, they were able to train a second version of the model that performed just as well but kept all its predictions positive. This flexibility suggests that the tool can be adapted to enforce the physical laws of the specific process being studied without requiring a complete rewrite of the underlying code.
Ultimately, Hybrax represents a shift toward making bioprocess modeling more accessible and reproducible. By taking the routine, repetitive tasks of data preparation and equation setup off the shoulders of researchers, the software frees them to focus on the actual science of how cells function. The authors note that while the tool is currently open-source and available for anyone to use, it is still evolving. Future versions will aim to improve training speed and add better tools for understanding why a model makes certain predictions. For now, the framework stands as a practical solution to a long-standing problem, offering a way to build, share, and compare complex biological models with a level of clarity and consistency that was previously out of reach.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.