Andrea Zunino1, Lars Gebraad1
Alessandro Ghirotto2, Andreas Fichtner1

1Department of Earth Sciences, ETH Zurich, Switzerland
2Applied Geophysics Laboratory, DISTAV University of Genoa, Italy
HMCLab

The use of the probabilistic approach to solve inverse problems is becoming more popular in the geophysical community, thanks to its ability to address nonlinear forward problems and to provide uncertainty quantification. However, such strategy is often tailored to specific applications and therefore there is a lack of a common platform for solving a range of different geophysical inverse problems and showing potential and pitfalls. We demonstrate a common framework to solve such inverse problems ranging from, e.g, earthquake source location to potential field data inversion and seismic tomography. Within this approach, we can provide probabilities related to certain properties or structures of the subsurface. Thanks to its ability to address high-dimensional problems, the Hamiltonian Monte Carlo (HMC) algorithm has emerged as the state-of-the-art tool for solving geophysical inverse problems within the probabilistic framework. HMC requires the computation of gradients, which can be obtained by adjoint methods, making the solution of tomographic problems ultimately feasible.

These results can be obtained with "HMCLab", a tool for solving a range of different geophysical inverse problems using sampling methods, focusing in particular on the HMC algorithm. HMCLab consists of a set of samplers and a set of geophysical forward problems. For each problem its misfit function and gradient computation are provided and, in addition, a set of prior models can be combined to inject additional information into the inverse problem. This allows users to experiment with probabilistic inverse problems and also address real-world studies. We show how to solve a selected set of problems within this framework using variants of the HMC algorithm and analyze the results. HMCLab is provided as an open source package written both in Python and Julia, welcoming contributions from the community.

One should use HMCLab when wanting to apply state-of-the-art Markov chain Monte Carlo algorithms to (Geophysical) inverse problems, or try out some inverse problems in tomography that we ourselves set up.

Collaboration

Although our documentation should allow for easy integration with your own Julia and Python codes, we are always happy to collaborate on geophysical inverse problems, both regarding the physics itself, or in implementing sampling using one of HMC Lab's algorithms.

Installation

We create Docker images in which we test our HMCLab software. This is by far the easiest way to get started. For now, it only includes the Python part of the package. To run our Docker images, simply start the image the following way:

docker run -it --rm -p 7999:8888 larsgebraad/hmclab:latest

This starts a Jupyter notebook server on your local port 7999. In your webbrowser of choice, navigate to localhost:7999. This notebook server provides both Julia and Python notebooks on Geophysical inversion, and allows you to develop your own notebooks without intalling any separate components.

To install the language specific versions of HMC Lab directly on your system, see the appropriate installation pages:

Copyright 2022, Andrea Zunino, Lars Gebraad, Alessandro Ghirotto, Andreas Fichtner. Software distributed under the following license.