Introduction
gpvisc is a Python library that provides access to the models trained in the context of the following publication:
Le Losq C., Ferraina C., Sossi P. A., Boukaré C.-É. (2025) A general machine learning model of aluminosilicate melt viscosity and its application to the surface properties of dry lava planets. Earth and Planetary Science Letters, https://doi.org/10/1016/j.epsl.2025.119287
In this paper, we describe a new database of phospho-alumino-silicate melt viscosity. Using it, we train and test several machine learning algorithms. We demonstrate that combining a greybox artificial neural network with a Gaussian process provides good results. We apply the new model and various phase diagram calculations to explore the surface properties of the exoplanet K2-141 b.
The code to replicate the analysis performed in the paper is available in the folder code_paper_EPSL of the Github repository.
The database
The handheld database assembled from a manual survey of the existing litterature contains 16,667 published experimental viscosity measurements for melts in the system SiO2-TiO2-Al2O3-FeO-Fe2O3-MnO-Na2O-K2O-MgO-CaO-P2O5-H2O, spanning superliquidus to undercooled temperatures and pressures up to 30 GPa. When available, the fractions of Fe as FeO and Fe2O3were compiled. When not available, they were calculated using the Borisov model; in the case no oxygen fugacity details were provided in the publications, we assumed that melts viscosity were measured in air. We provide a function to easily calculate the ratio of ferrous and ferric iron using this model, see the documentation about this feature here: Inputs.
We also added experimental viscosity data from SciGlass, for melt compositions that were not appearing already in the handheld database. For that, we use the GlassPy library. A total of 12,231 data points from 3,591 different melt compositions were added.
The final database contains 28,868 viscosity measurements. It includes data from unary, binary, ternary, quaternary, and multivalent melt compositions, at temperatures spanning superliquidus to undercooled conditions and pressures up to 30 GPa.
The data are available in the folder code_paper_EPSL/additional_data and here:
Ferraina C., Baldoni B., Le Losq C. (2024) Silicate melt viscosity database for gpvisc, https://doi.org/10.18715/IPGP.2024.lycv4gsa, IPGP Research Collection, V1, UNF:6:odPJx0nGtBwuiwYBuyZEtA== [fileUNF]
The GP model
The GP model combines a greybox artificial neural network (ANN) with a Gaussian process.
Gaussian processes (GPs) are collections of random variables, each being described by a Gaussian distribution. It is frequently said that they allow placing a probability distribution over functions. The mean and covariance (a.k.a. kernel) functions of a GP fully describe it. There is extensive litterature online about GPs, to which we refer the user. As we use GPyTorch, please have a look at their documentation.
The mean function of a GP usually is choosen as a constant. However, other possibilities exist, as indicated in Rasmussen (2006) or more recent publications. For our work, we chose to use a greybox artificial neural network as the mean function of the GP. The greybox artificial neural network embeds the Vogel-Tamman-Fulcher equation, allowing us to place a prior idea on the functional form of the viscosity versus temperature relationship.
The GP then can be seen as a method correcting the errors made by the greybox artificial neural network (Rasmussen, 2006).
The model is implemented using GPyTorch and PyTorch.
With gpvisc, predictions can be made using the GP model, but also directly using the greybox ANN model as it also provides sensible results.