This repo is a work in progress and explores the applications of Bayesian Neural Networks (BNNs) for actuarial mortality modelling.
Currently, 3 ways of 'training' a BNN are explored:
- Neural network trained using regular methods, afterwhich the output is assumed to be Normally distributed with a variance term assigned a prior. Markov chain Monte Carlo (MCMC) is used to approximate the posterior for the variance term.
- Neural network where all weights are iid Normal priors including a variance term, and MCMC is used to approximate the posteriors of the weights.
- Neural network where all weights are iid Normal priors including a variance term, and variational inference (VI) is used to approximate the posteriors of the weights.
Symbolic regression is explored in Case #1 to illustrate some analytical approximations for the neural network.
Below are initial comparisons of a deep neural net (red) against repeated samples from a smaller BNN (green). The data reflects unseen test data (training/test split is done based on calendar years):
Both performed well on unseen data in future years. It remains to be seen how they forecast and differences in performance when we have low data columes. Making the variance term non-constant but instead linked to the time period may assist in expressing forecast uncertainty.
Here is an example of a discovered equation from the BNN for the log of the central mortality rate (
Refitting the equation above using MCMC provides a reasonable, smooth equation for Irish mortality:
The equation can be roughly expressed as:
Taking it one further and performing some numerical integration, we can calculate life expectancies based off of our derived equation:
Further work is planned to have the MCMC smaples flow through the integrations steps to produce an uncertainty band over the above life expectancies.
Convergance is fairly reasonable after applying NUTS for 5 000 samples, all taking Normal priors:
Work is underway to test out whether Lee-Carter can be adapted to use BNNs to express the
Gender can also be incorporated into the equation to extend the model.
In addition, we will look at how BNNs fitted on auxilarly-but-informative-data (life tables, mortality for neighbouring countries) can form a "foundation" of priors for Irish mortality example. For instance, have a BNN (or regular NN) first fit against a UK life table so we have a function
- The above is subject to change as the neural network re-evaulated and different sampling methods compared
- These approaches will also be evaluated over different mortality datasets (Ireland is being used at the moment).
The data is Irish mortality data from 1950-2020, sourced from https://mortality.org.