Accurate and Explainable Mortality Forecasting with the LocalGLMnet

I’m excited to share our latest research paper on using the LocalGLMnet, an explainable deep learning model, to forecast mortality rates for multiple populations. This paper is joint work with Francesca Perla, Salvatore Scognamiglio and Mario Wüthrich.

Mortality forecasting is crucial for actuarial applications in life insurance and pensions, as well as for demographic planning. However, most existing machine learning models for this task are not transparent. We wanted to bridge this gap by adapting the LocalGLMnet, which preserves the interpretable structure of generalized linear models while allowing for variable selection and interaction identification.

We applied our model to data from the Human Mortality Database (HMD) and the United States Mortality Database, and found that it produced highly accurate forecasts that can be explained by autoregressive time-series models of mortality rates. We also showed how regularizing and denoising our model can improve its performance even further.

The image below shows a comparison of forecasting results between different models for the HMD.

The full paper can be found here:

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4381215

Advances in time series forecasting – M4 and what it means for insurance

Not necessarily the best way to forecast!
Photo by Jenni Jones on Unsplash

In a previous post I discussed the M4 conference and what my key takeaways were. In this post I plan to focus the discussion on insurance, and then specifically on actuarial work, and think about what the advances in time series forecasting might mean for actuaries and other professionals in insurance.

This post starts off by discussing the traditional time series forecasting problem, where it appears in the context of insurance, and how insurers could benefit from recent advances, and then narrows in to focus on actuarial work.

Let’s quickly cover what is meant by time series forecasting. Quite often, the only data that is available for a problem consists of past values that a series took, measured at regular points in time In other words, associated variables which would help to explain the past values of the series, are not available, and the exercise needs to be informed only by the past values of the series. For example, one might have data on the number of various insurance products sold monthly for the past five years (in this case, associated variables such as number of salespeople or advertising spend might not be available), and to understand revenue, one might need to forecast the number of products that will be sold over the next quarter or year.

Some more examples of this are given in a fantastic online book on forecasting by Rob J Hyndman and George Athanasopoulos over here. I would recommend this book to anyone interested in time series forecasting!

Insurance and forecasting 

Compared to more traditional industries, insurance is interesting in that there is no physical product being sold, and insurers do not need to maintain or forecast inventories. Having said that, the familiar time series forecasting problem pops up in the context of insurance in other areas, for example:

  • Forecasting the number of sales or claims and the associated resourcing requirements
  • Forecasting revenue, losses, expenses and profits

Perhaps surprisingly, revenue forecasts play a major role in determining the capital requirements of insurers under Solvency II, which is the European insurance legislation, as well as in SAM, which is the South Africa variation. In fact, part of the capital requirements for insurance risk are often directly proportional to forecast premiums, see, for example, Article 116.3.a of the Solvency II Directive

So, besides for insurers, regulators around the world also have an interested in ensuring that revenue forecasts are accurate and advances in time series forecasting, such as those at the M4 conference, should see wider applications in insurance. One advance to consider is Microsoft’s extensive use of machine learning to determine revenue forecasts, as described in this paper , by Jocelyn Barker and others. At the M4 conference (and in the paper) Jocelyn noted that these forecasts are used for widely from providing Wall Street guidance to managing global sales performance. 

Some of the other ideas that could also be of benefit, that were expressed at the M4 conference, and are now clearly established in the time series literature are understanding:

  • when to make changes to statistical forecasts (summary here)
  • the value of aggregating forecasts (insightful presentation from Bob Winkler at M4 on the topic is here) from different methods

A peculiarity of insurance forecasting is that often insurance professionals will not aim to forecast the actual value of losses and expenses, but rather will focus on ratios that express these quantities in terms of revenue (or a close proxy to revenue). For example, if one wants to forecast losses, then one would try to forecast loss ratios, which express how many cents are paid in losses for every dollar of revenue. In the next section, I will discuss how these ratios are often currently forecast in insurance companies. 

Forecasting in Actuarial Work

For the main topic of this post, I want to examine the work that actuaries do for insurers, that often consists of, or contains forecasts of some kind.

In life insurance, these forecasts are often the key variables underlying pricing and reserving such as:

  • Mortality
  • Morbidity
  • Withdrawal or lapse rates
  • Expenses

In P&C insurance (or general or short-term if you are in the UK or South Africa), these forecasts are often comprised of:

  • Loss ratios
  • Frequency rates and average cost per claim
  • Premium rates
  • Claims development patterns

As an aside, not so long ago, these lists would have included investment returns, but a large swathe of the actuarial profession has more or less adopted market consistent valuation practices, which dictate that all cashflows should be valued like bond cashflows, with the implication that investment returns can simple be read off from market yield curves. One currently controversial discussion here is the valuation of no negative guarantees on reverse mortgages in the UK, see here from Dean Buckner and Kevin Dowd.

A common assumption that is made for some of these variables is that whatever experience has occurred over the past few years will repeat itself in the future – in time series jargon, actuaries often use so-called “naive” forecasts (please read the conclusion though, where I note that this is not always the case). Here are some examples of naive forecasts in current actuarial work:

  • When determining (P&C) claims reserves, an allowance must be made for the costs of managing claims (to be precise, here I refer to claims department and associated costs, or ULAE), in addition to the cost of indemnifying policyholders. The South African SAM regulations allow actuaries to forecast these costs on the basis of the average claims management costs over the past two years/
  • Also on P&C reserving, a very common approach to determining claims development patterns (which are used then to forecast the extent of the outstanding claims that are still to be reported) is to rely on  averages of recent experience. 
  • Mortality analysis often consists of comparing an assumed mortality table to recent experience. The assumed mortality table is then adjusted to match the recent experience more closely, and only rarely will a trend over time be allowed for. 
  • When pricing P&C insurance with a GLM, a dataset of recent claims experience is used to derive factors which define how different policies are likely to perform. For example, how much more likely are claims if the policyholder is a new driver, compared to an experienced driver. These factors are most often based on the recent past, with no allowance for trend over the years.

In all these examples, the recent past is taken as representative of the future. The reasons for this are probably a general lack of sufficient data to do better, and the difficulties in specifying a suitable model that can capture these changes over time adequately. However, as data quality (and quantity) improves, and especially, as the options for modelling increase (for example, using neural nets instead of GLMs), I think there are ample opportunities to improve on some parts of current practice. 

Two potential paths to achieve this stand out for me from the M4 conference:

  • One way to improve forecasts is to come up with a smart way of ensembling multiple models (as opposed to coming up with new, more complicated models), as done by the runners up to the M4 competition (link). Of course, this needs to be done in a scientific manner, and very little research has been performed on how this could be achieved on traditional actuarial models. The advantage of this approach is that the building blocks remain the same traditional models, and a meta-model works out which of these models is best and when.
  • Another way is more or less to forget about model specification, and let a neural net find an optimal model automatically, as was done in Slawek Smyl’s winning solution (link). To do this, one generally needs more data than in traditional modelling approaches, but the results can be impressive. I particularly favor this latter approach, and for examples of applications to population mortality forecasting and claims reserving, I would point to two recent papers I co-authored that are up on SSRN that demonstrate this approach:

Having noted some of the above areas that can be improved, it is important to end by stating that often, data simply isn’t available to do much better than the most simple forecasts, and, indeed, in cases where the data is available, actuaries will try use more sophisticated modelling. One example is mortality improvement modelling, generally undertaken by providers of annuities and other products exposed to longevity risk, where actuaries apply mortality models from both the actuarial and demographic “schools”, most often to population level data. Another example is claims reserving, where there is increasing attention being placed on developing reserving models that allow for trends in claims development assumptions over time, though I have not yet seen one of these in practice. 

In conclusion, I think it is an exciting time to be involved in actuarial work and insurance more broadly, and I look forward to seeing how advances made in other areas will influence the insurance industry. 

 

 

 

 

Thoughts on the M4 Conference

I had the opportunity to attend the M4 Conference held last week in NYC, which focused on the results of the recent M4 forecasting competition, as well as more generally on the state of the art in time series forecasting. In this post, I plan to summarize some of the key ideas that were presented at the conference and point out some of the thoughts that have occurred to me since.

There were a number of excellent speakers whose key points (from my perspective) I summarize very briefly later on in this blog, with the standout ones for me being:

  • Slawek Smyl (winner of the competition with his “hybrid” method)
  • Spyros Makridakis (M competitions)
  • Nassim Taleb 
  • Pablo Montero-Manso (representing the runner up team in the competition with a boosting meta-learning method)
  • Andrea Pasqua

The rest of this post will discuss:

  • Big Ideas of the M4 Conference
  • Summaries of some of the talks

In a follow up post I hope to discuss what actuaries can learn from the M4 competition.

The Big Ideas of the M4 Conference

There were several recurring themes at the conference that were addressed several times by the speakers. Of these, the one that came up the most often was the difference between statistics and machine learning.

Stats vs ML
It was fascinating to see the back and forth between the speakers and the audience on exactly what defines machine learning, and how this is different from statistics. Two of the different viewpoints were:

  • Statistical methods generally do not learn across different time series and datasets, whereas ML methods do. (This first perspective made sense from the perspective that most methods used for time series forecasting focus on the univariate case, i.e. where there is only one sequence, and techniques to leverage information across series are newer in this field (although obviously not a new concept in more traditional applications of statistics.)
  • There is no difference between statistics and ML, and in fact neural networks are a generalizations of GLMs, which are a basic statistical tool, in other words, the distinction is arbitrary.

Interestingly, there was also not much consensus on whether the field of forecasting should be classified as a traditional statistical discipline or not. One good point that was made is that one of the basic time series methods – exponential smoothing – was always used as an algorithm, until statistical justification in the state-space framework was given by Rob Hyndman et al. 

One amusing debate focussed on whether Slawek’s method was in fact a statistical or machine learning approach, with different participants arguing for their perspectives, and being somewhat averse to the idea of a hybrid approach. This carried on, until Slawek himself was asked to clarify, at which point he confirmed that his method is a “hybrid” of statistical and machine learning approaches. 

My perspective is that some of these issues can be tied up quite neatly using the distinction between prediction and inference given by Shmueli (2010). A significant part of statistical practice is focussed on defining models and then working out whether or not the observed data could have been generated by the model, and, within this framework, one generally does not have concepts such as out-of-sample predictive accuracy. Machine learning, on the other hand, focuses on achieving good out-of-sample performance of models, whether these have been specified using some stochastic data generating procedure, or on an algorithmic basis. From this perspective, the field of forecasting is not a traditional statistical discipline, as the focus is on prediction!

Complexity
A recurring theme of the M competitions is that more complex models are usually outperformed by simple methods, for example, in the original M1 competition it was shown that exponential smoothing was better than ARIMA models. In the M4 competition, this became much more nuanced. One the one hand, “vanilla” machine learning techniques performed poorly, and worse than the benchmark, mirroring the findings in Makridakis, Spiliotis and Assimakopoulos (2018). On the other hand, the winners of the M4 competition used relatively more complex machine learning methods to great success. The difference seems to be that the complexity of the methods is in how they learn to generalize across time series (Slawek’s LSTM model and Paulo’s meta-learning algorithm), instead of trying to apply especially sophisticated methods to single time series. 

Triumph of Deep Learning
As I have written about several times on this blog, the big advantage of deep learning over traditional machine learning approaches is that feature engineering gets performed automatically (i.e. this is the paradigm of representation learning, in that the model learns the features), and therefore, when dealing with large and very complex datasets, suitable neural network architectures can provide a massive performance boost over other approaches. I think this was clearly part of the “secret sauce” of Slawek’s winning solution, in that he very neatly specified a neural network combined with exponential smoothing, thus obviating the need to try derive features from each time series. This is in contrast to the runner-up solution presented by Pablo, which involved a substantial feature engineering step, in which many features were calculated for each time-series, after which a boosted tree model was fit on these features to work out how to weight the various time series methods. 

More to learn
Although forecasting is not a new field, it seemed to me that many participants at the conference felt that there is much more to learn to advance the state of the art of forecasting, especially as machine learning methods get adapted to time series forecasting. The amazing and unanticipated success of Slawek’s hybrid method will no doubt lead many researchers to try similar methods on other datasets.

This also manifested in the advance detail given on the upcoming M5 competition, which is going to focus on the role of explanatory variables in forecasting time series, as well as feature online learning as more data become available. I think many people felt that the techniques incorporating explanatory variables are not yet optimal and represent an opportunity to advance the state of the art.

Ensembling of methods
A famous finding in the forecasting literature is that combinations of methods usually do better than single methods, and that held true in the M4 competition. Slawek’s winning approach consisted of an ensemble of LSTM models (I discuss the very smart idea of a so-called Mixture of Specialists later) and Paulo’s method used a boosting algorithm to assign weights to different simple methods, which were then combined to produce the final forecasts. 

Summaries of talks
Here are some summaries of my favourite talks of the conference.

Slawek Smyl (Uber Technologies): A Hybrid Approach to Forecasting
Slawek won the M4 competition by a large margin over the next best entry. His method, described in a short note here, essentially did two things:

  • Firstly, allow the neural net to learn optimal coefficients of the Holt-Winters algorithm which were then used to normalize each time series
  • Secondly, forecast the normalized series using the neural net and then restore the series using the Holt-Winters parameters

The network design was a stack of various types of Long Short Term Memory cells (with skip connections and dilation).

Slawek also used ensembling at several levels to produce the forecast. I found one ensembling method which he proposed to be particularly interesting, the Ensemble of Specialists, which is described in more detail here.

Basically, the idea is to take several of the same neural net architectures and allow them to train for a single epoch on some of the training data. Then, allocate each time series to the top-2 neural nets and repeat both steps until the validation error increases. Once the nets are trained, one applies different ensemble methods to derive the final forecasts. This seems like a very smart way of ensuring optimal performance on all types of series – in my own research, I have encountered situations when neural nets trained to a global optimum do not perform as well as would be expected on some time series and I am excited to try out this approach.

Spyros Makridakis (University of Nicosia): The contributions of the M4 Competition to the Theory and Practice of Forecasting

The slides have been made available here.

What stood out most for me about Spyros’ talk was the focus on improving the state of the art of time series forecasting using hard evidence, and that seems to be the key theme running throughout his work on the M competitions and even before. As easy as it might be to favour a method based on how pleasing it is theoretically, the approach during the M competitions has been simply to check what works, and what doesn’t on out of sample error. This created what seems to be a huge amount of work in the M4 competition, in that Spyros and his team have replicated every submission (even those that take upwards of a month to run in full!) and I admire the dedication to advancing the state of the art!

Some of the major findings that Spyros discussed are:

  • Improving accuracy via combining methods
  • Superiority of Slawek’s hybrid method
  • The improved precision of prediction intervals in Slawek’s and Pablo’s methods – these had a coverage ratio very close to the required 95%
  • Increased complexity, as measured by compute time, led to increased accuracy, which I think is a first for the M competitions.
  • Learning across time series in the winning methods
  • Poor performance of pure ML methods, which was attributed to these methods overfitting on the univariate time series i.e. not learning across series

Spyros then ended with two challenges where improvement is needed – improving the measurement of uncertainty (where there is great potential for ML/DL methods) and improving explanatory models of time series.

Nassim Taleb (New York University): Forecasting and Uncertainty: The Challenge of Fat Tailedness

I enjoyed hearing Nassim explain some of his ideas in the context of forecasting. My key takeaway here was that when forecasting, one might not be as interested in the underlying random variable being forecast, call it x, but rather the payoff function of x, which is f(x). The payoff function can be manipulated in various ways by taking positions against the underlying x, for example, one could hedge out tail risks, and therefore Nassim was effectively offering a way of dealing with uncertainty in x, which is manipulate your payoffs so that you are not hurt, and ideally gain, from the parts of x that you do not know about or are at most risk from.

One interesting connection that he made was between the way options traders have always approximated payoff functions using a European options, which effectively comes down to function approximation using the ReLu activation in deep learning.

Andrea Pasqua (Data Science Manager, Uber): Forecasting at Uber: Machine Learning Approaches

Andrea’s talk covered how time series forecasting is done at Uber, with their own set of interesting and challenging issues, such as a huge number of series to forecast, dealing with extreme events, and the cold-start problem when services are launched in a new city. He gave a very nice walkthrough of how Uber arrived at the solutions currently in production, by going through each stage of model choice and development. It seems as if this team has benefited from Quantile Random Forests and I plan to read up more about these.

Conclusion

It was refreshing to see how approachable the speakers at the M4 conference were, and how willing the winners of the competition were to share of their expertise and knowledge. The organizers of the conference put together a great event and well done to them!

In the next post I hope to discuss some of what I believe the actuarial profession could learn from the advances in the state of the art of forecasting that were shown at the M4 conference.

References
Makridakis, S., E. Spiliotis and V. Assimakopoulos. 2018. “Statistical and Machine Learning forecasting methods: Concerns and ways forward”, PLOS ONE 13(3):e0194889.
Shmueli, G. 2010. “To explain or to predict?”, Statistical Science:289-310.

%d bloggers like this: