Korali
High-Performance Uncertainty Quantification, Optimization, and DRL
Korali is a high-performance framework for uncertainty quantification, optimization, and deep reinforcement learning. Its engine provides support for large-scale HPC systems and a multi-language interface compatible with distributed computational models.
Download
(06/11/2020) Korali v2.0.0 – Download / Release Notes / Documentation
What Korali Does
Optimization
Gradient-free optimization algorithms that enable parallel sampling in HPC systems. Additionally, Korali implements many well-known gradient based optimization algorithms.
Bayesian Uncertainty Quantification
Bayesian inference methods for the inference computational models parameters and their associated uncertainty, based on experimental data. Additionally, it provides multiple likelihood models and prior distributions.
Deep Reinforcement Learning
Deep reinforcement learning algorithms for both discrete and continuous actions spaces. Multiple agents can run in parallel, distributed across different nodes.
Design Principles
High-Performance
The work distribution engine is optimized to fully harness computational resources of large-scale supercomputers, maximizing throughput and minimizing workload imbalance. Furthermore, Korali supports the execution of parallel (OpenMP, Pthreads), distributed (MPI, UPC++), and GPU-based (CUDA) models.
Fault Tolerance
Experiments store their internal state regularly, allowing them to be resumed later in case of errors. The result of a resumed experiment is guaranteed to be exactly the same as one in a single run.
Extensible Engine
The framework is open-source, modular and extensible. Developers can integrate and test new modules which will automatically benefit from its parallel engine and fault-tolerance without additional effort.
Multi-Language Support
The API is compatible with C/C++/Fortran and Python models. Additionally, the engine can sample from pre-compiled computational models.
Publications
Journal / Conference / arXiv Papers
Articles for citing Korali
S. Martin, D. Wälchli, G. Arampatzis, A. E. Economides and P. Karnakov, P. Koumoutsakos, “Korali: Efficient and Scalable Software Framework for Bayesian Uncertainty Quantification and Stochastic Optimization“. arXiv 2005.13457. Zürich, Switzerland, March 2021.
BibTex
@misc{martin2021koral
title ={Korali: Efficient and Scalable Software Framework for Bayesian Uncertainty Quantification and Stochastic Optimization},
author = {Sergio M. Martin and Daniel Wälchli and Georgios Arampatzis and Athena E. Economides and Petr Karnakov and Petros Koumoutsakos},
year = {2021},
eprint = {2005.13457},
archivePrefix ={arXiv},
primaryClass ={cs.DC}
}
Abstract
We present Korali, an open-source framework for large-scale Bayesian uncertainty quantification and stochastic optimization. The framework relies on non-intrusive sampling of complex multiphysics models and enables their exploitation for optimization and decision-making. In addition, its distributed sampling engine makes efficient use of massively-parallel architectures while introducing novel fault tolerance and load balancing mechanisms. We demonstrate these features by interfacing Korali with existing high-performance software such as Aphros, Lammps (CPU-based), and Mirheo (GPU-based) and show efficient scaling for up to 512 nodes of the CSCS Piz Daint supercomputer. Finally, we present benchmarks demonstrating that Korali outperforms related state-of-the-art software frameworks.
D. Wälchli, S. Martin, A. Economides, L. Amoudruz, G. Arampatzis, X. Bian, P. Koumoutsakos, “Load Balancing in Large Scale Bayesian Inference“. Proceedings of the Platform for Advanced Scientific Computing Conference (PASC2020). Geneva, Switzerland, June 2020.
BibTex
@inproceedings{10.1145/3394277.3401849,
author = {W\”{a}lchli, Daniel and Martin, Sergio M. and Economides, Athena and Amoudruz, Lucas and Arampatzis, George and Bian, Xin and Koumoutsakos, Petros},
title = {Load Balancing in Large Scale Bayesian Inference},
year = {2020},
isbn = {9781450379939},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3394277.3401849},
doi = {10.1145/3394277.3401849},
booktitle = {Proceedings of the Platform for Advanced Scientific Computing Conference},
articleno = {5},
numpages = {12},
keywords = {High Performance Computing, Erythrocyte Membrane Viscosity, Uncertainty Quantification,
Bayesian Inference, Load Balancing},
location = {Geneva, Switzerland},
series = {PASC ’20
}
Abstract
We present a novel strategy to improve load balancing for large scale Bayesian inference problems. Load imbalance can be particularly destructive in generation based uncertainty quantification (UQ) methods since all compute nodes in a large-scale allocation have to synchronize after every generation and therefore remain in an idle state until the longest model evaluation finishes. Our strategy relies on the concurrent scheduling of independent Bayesian inference experiments while sharing a group of worker nodes, reducing the destructive effects of workload imbalance in population-based sampling methods.
To demonstrate the efficiency of our method, we infer parameters of a red blood cell (RBC) model. We perform a data-driven calibration of the RBC’s membrane viscosity by applying hierarchical Bayesian inference methods. To this end, we employ a computational model to simulate the relaxation of an initially stretched RBC towards its equilibrium state. The results of this work advance upon the current state of the art towards realistic blood flow simulations by providing inferred parameters for the RBC membrane viscosity.
We show that our strategy achieves a notable reduction in imbalance and significantly improves effective node usage on 512 nodes of the CSCS Piz Daint supercomputer. Our results show that, by enabling multiple independent sampling experiments to run concurrently on a given allocation of supercomputer nodes, our method sustains a high computational efficiency on a large-scale supercomputing setting.
G. Arampatzis, D. Wälchli, P. Weber, H. Rästas, and P. Koumoutsakos, “(μ, λ)-CCMA-ES for Constrained Optimization with an Application in Pharmacodynamics“, Proceedings of the Platform for Advanced Scientific Computing Conference (PASC2019). Zürich, Switzerland, June 2019.
BibTex
@inproceedings{arampatzis2019,
author = {Arampatzis, Georgios and W\”{a}lchli, Daniel and Weber, Pascal and R\”{a}stas, Henri and Koumoutsakos, Petros},
booktitle = {Proceedings of the Platform for Advanced Scientific Computing Conference on – {PASC} {\textquotesingle}19},
doi = {10.1145/3324989.3325725},
keywords = {Stochastic optimization, constraint handling, covariance matrix adaptation, evolution strategy, pharmacodynamics, viability evolution},
publisher = {{ACM} Press},
title = {(\Μ,{\Lambda})-CCMA-ES for Constrained Optimization with an Application in Pharmacodynamics},
url = {https://drive.google.com/file/d/1gpcJ0z-9SZTMTjon8O6Kkgj1gfBXINdU/view?usp=drive_link},
year = {2019}
}
Abstract
We present the algorithm CCMA-ES, an extension to CMA-ES, an evolution strategy that has shown to perform well in a broad range of black-box optimization problems. The (μ, λ)-CMA-ES effectively handles nonlinear nonconvex functions but faces difficulties in constrained optimization problems. We introduce viability boundaries to improve the search for an initial point in the valid domain and adapt the covariance matrix using normal approximations to maintain the inequality constraints. Using benchmark problems from 2006 CEC we compare the performance of CCMA-ES with a state of the art optimization algorithm (mViE) showing favorable results. Finally, CCMA-ES is applied to a pharmacodynamics problem describing tumor growth, and we demonstrate that CCMA-ES outperforms mViE in terms of the objective function value and total function evaluations.
Publications that used Korali
P. Karnakov, G. Arampatzis, I. Kiči ć, F. Wermelinger, D. Wälchli, C. Papadimitriou, P. Koumoutsakos “Data-driven inference of the reproduction number for COVID-19 before and after interventions for 51 European countries“. Swiss Medical Weekly. Zürich, Switzerland, July 2020.
BibTex
@article {Karnakov2020.20313,
author = {Karnakov, Petr and Arampatzis, Georgios and Ki{\v c}i{\’c}, Ivica and Wermelinger, Fabian and W{\”a}lchli, Daniel and Papadimitriou, Costas and Koumoutsakos, Petros},
title = {Data-driven inference of the reproduction number for COVID-19 before and after interventions for 51 European countries},
year = {2020},
doi = {10.4414/smw.2020.20313},
publisher = {Swiss Medical Weekly},
URL = {https://smw.ch/index.php/smw/article/view/2831},
journal = {Swiss Medical Weekly}}
}
Abstract
The reproduction number is broadly considered as a key
indicator for the spreading of the COVID-19 pandemic. Its
estimated value is a measure of the necessity and, eventually, effectiveness of interventions imposed in various
countries. Here we present an online tool for the data-driven inference and quantification of uncertainties for the
reproduction number, as well as the time points of interventions for 51 European countries. The study relied on
the Bayesian calibration of the SIR model with data from
reported daily infections from these countries. The model fitted the data, for most countries, without individual
tuning of parameters. We also compared the results of
SIR and SEIR models, which give different estimates of
the reproduction number, and provided an analytical relationship between the respective numbers. We deployed
a Bayesian inference framework with efficient sampling
algorithms, to present a publicly available graphical user
interface (https://cse-lab.ethz.ch/coronavirus) that allows
the user to assess and compare predictions for pairs of
European countries. The results quantified the rate of the
disease’s spread before and after interventions, and provided a metric for the effectiveness of non-pharmaceutical
interventions in different countries. They also indicated
how geographic proximity and the times of interventions
affected the progression of the epidemic.
M. Chatzimanolakis, P. Weber, G. Arampatzis, D. Wälchli, P. Karnakov, I. Kiči ć, C. Papadimitriou, P. Koumoutsakos “Optimal Testing Strategy for the Identification of COVID-19 Infections“. medRxiv 2020.07.20.20157818v2. Zürich, Switzerland, July 2020.
BibTex
@article {Chatzimanolakis2020.07.20.20157818,
author = {Chatzimanolakis, Michail and Weber, Pascal and Arampatzis, Georgios and W{\”a}lchli, Daniel and Karnakov, Petr and Ki{\v c}i{\’c}, Ivica and Papadimitriou, Costas and Koumoutsakos, Petros},
title = {Optimal Testing Strategy for the Identification of COVID-19 Infections},
elocation-id = {2020.07.20.20157818},
year = {2020},
doi = {10.1101/2020.07.20.20157818},
publisher = {Cold Spring Harbor Laboratory Press},
URL = {https://www.medrxiv.org/content/early/2020/07/27/2020.07.20.20157818},
eprint = {https://www.medrxiv.org/content/early/2020/07/27/2020.07.20.20157818.ful…},
journal = {medRxiv}
}
Abstract
The systematic identification of infectious, yet unreported, individuals is critical for the containment of the COVID-19 pandemic. We present a strategy for identifying the location, timing and extent of testing that maximizes information gain for such infections. The optimal testing strategy relies on Bayesian experimental design and forecasting epidemic models that account for time dependent interventions. It is applicable at the onset and spreading of the epidemic and can forewarn for a possible recurrence of the disease after relaxation of interventions. We examine its application in Switzerland and show that it can provide timely and systematic guidance for the effective identification of infectious individuals with finite testing resources. The methodology and the open source code are readily adaptable to countries around the world.
Talks, Posters and Lectures
S. Martin, Korali Tutorials, Computational Science Zürich’s Course on Uncertainty Quantification & Data Analysis in Applied Sciences. (Lecture) Zürich, Switzerland, May 2020. [Part I] [Part II]
S. Martin, Korali, High-performance Framework for Bayesian Uncertainty Quantification and Optimization. (Technical Talk) CSCS Lugano, December 2019.
G. Arampatzis, Korali, High-performance Multi-Intrusive Bayesian Inference Software For Large-Scale Scientific Models. (Poster), DAEDALUS Winter School, Berlin, December 2019.
G. Arampatzis, Optimization using Covariance Matrix Adaptation (CMA), (Lecture) ETH Zürich, Spring 2019.
G. Arampatzis, Transitional Markov Chain Monte Carlo (TMCMC), (Lecture) ETH Zürich, Spring 2019.
Contact us
Development Team
- Sergio Martin
- Daniel Wälchli
- George Arampatzis
- Pascal Weber
Collaborators
- Ivica Kičić (ETH Zürich)
- Lucas Amoudruz (ETH Zürich)
- Susanne Keller (ETH Zürich)
- Mark Martori (ETH Zürich)
Principal Investigator
Affiliations







