williamjsdavis / ThermoChroNN

ThermoChronology artificial Neural Network solver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThermoChroNN

ThermoChroNN is a Julia package for quantitative thermochronology calculations, using machine learning package Flux.jl. This is a work in progress.

Motivation

Modelling the low temperature thermal history of geologic regions is an integral part of tectonic studies, and is key for investigating the causes and effects of surface processes. In recent decades, due to the availability of data from high precision measurement techniques and computation resources, sophisticated methods have been developed to estimate time–temperature paths of rock samples using fission track, U–Th–He, 4He/3He and vitrinite reflectance data. Two examples of these are: QTQt (Transdimensional inverse thermal history modeling for quantitative thermochronology, Gallagher (2012)), and HeFTy (Forward and Inverse Modeling of Low-Temperature Thermochronometry Data, Ketcham (2005)).

Both QTQt and HeFTy sample a series of points in time–temperature space, and calculate a metric based on the path. This metric is based on physical models of how minerals in the rock respond to temperature changes over millions of years, including: multi-kinetic annealing models; helium diffusion models with Radiation Damage Accumulation and Annealing Model (RDAAM), and others. If the candidate model compares well with the experimental data, then the time–temperature path is a good representation of the "true" time–temperature path. The two methods differ in how the time–temperature parameter space is sampled. HeFTy uses a frequentist p-value approach, and searches for well fitting models from a large number of candidate models. On the other hand, QTQt implements a Markov chain Monte Carlo Bayesian approach to searching the parameter space. While both of these techniques are suitable, I want to explore other methods of solving the inverse problem of estimating time–temperature paths from experimental data.

Method

One option is to view the time–temperature (t, T) path as a general function linking every time to a temperature T = f(t),

We can approximate this function with an artificial neural network, based on some parameters

so that is can model the non-linear map from time to temperature. Through a learning process we can alter parameters θ such that some sort of metric is optimised, similarly to the methods mentioned above. According to the Universal Approximation Theorem from machine learning, if we enough layers and parameters, can approximate any nonlinear function sufficiently close.

Another advantage is that it is possible to calculate gradients of the metric with respect to the parameters. In other words, it is very easy to find out what parts of the time–temperature path are the most sensitive to the observed data. This could be useful for determining where the prediction is robust, and investigating why.

The heavy lifting of this package is done by Flux.jl. Currently, I have only implemented a pathwise comparison metric for the time–temperature path. However I hope to add more physically (and data motivated) loss functions to train the network.

Example

Here is an example of the esimation method. Say we have some time–temperature path for the last 100 million years which has been sampled at a few points.

We can form our neural network function . The network can have any structure, but I found that dense layers with increasing numbers of nodes worked well.

The network is trained to minimise the pathwise error in temperature at the sampled points. After training, the function fits the data well.

Here it a video of the model during the training process.

anim_fps30

Future

I plan to expand on this work by implementing physical models of how the time–temperature path effects the observed data. In addition I want to add other modelling features, such as "bounding boxes" for where there is independent evidence for a point in the time–temperature path.

I'm also interested in combining this with the Julia package DiffEqFlux. Advantages include placing physical constraints on the evolution of temperature through time, as well as being able to use the estimated termperature path as a input (or output) of other differential equations.

TODOs

  • Add physical models to loss function.
  • Collect sets of well fitting models.
  • Output gradients with result.
  • Make test suite.
  • Benchmark performance.

Changelog

  • Version 0.1.0 - Introduced original version.

About

ThermoChronology artificial Neural Network solver

License:MIT License


Languages

Language:Julia 100.0%