Machine Learning Applications to Insurance Modelling
Introduction
Modern machine learning (ML) techniques have caused a massive stir in all sectors over the past few years. Chatbots such as ChatGPT and Google Gemini are incredibly powerful (though certainly not flawless) tools for research and entertainment. But what powers these programs? Can actuaries use similar methods to enhance their models? Research would certainly suggest so!
What is Meant by Machine Learning?
Different sources have different specific definitions of the term “Machine Learning”[1]. As a summary, it is a branch of Artificial Intelligence (AI) that uses mass amounts of data to slowly improve models, attempting to emulate how humans learn. This definition is very broad; some books in statistical learning even consider rather basic statistical techniques such as 1-dimensional linear regression as a form of ML[2].
The creation of a ML algorithm boils down to 4 steps –
- Pre-process your data into a form that can be learned from. This involves changing categorical features into numerical values and selecting your target variable (the thing you want to output). This step is certainly non-trivial and large amounts of research goes on in this area.
- Define a “shell” function that will take a vector of your input features and output your prediction. This function should have some numerical parameters associated with it that will be optimised later. (e.g the vector of betas in an OLS linear regression)
- Define a “loss” function that takes the “shell” function’s output and the real value associated with the input and tells you how wrong your prediction was. (e.g the squared distance function in an OLS linear regression)
- Optimise your parameters to minimise the average loss over your entire training dataset.
That’s it really, if you have these 4 aspects, you can call your algorithm a ML algorithm confidently!
Universal Approximators and Neural Networks
When defining a “shell” function, usually some knowledge of the underlying relationship between the variables is needed. You don’t want to be modelling sinusoidal data linearly! However, such knowledge of the data structures is not always readily available, and, therefore, many models will fall at the first hurdle.
There is a solution to this problem. There exists a class of shell functions such that can learn the structure of the data sample provided, which generally gives a good idea as to the structure of the underlying data. Such a function must be able to approximate any continuous function with an arbitrary degree of precision[3]. This class is called Neural Networks
The structure of a NN can vary depending on how complex you want your model to be, but the simplest structure is called a multi-layer perceptron.
A perceptron will take in a vector of inputs, call it x, compute its inner product with a weight vector, call it w, add a bias, and finally put it through a non-linear activation function. Some common choices for these functions are sigmoid functions, as they generally mimic the process of a brain neuron “firing” or not (hence the name Neural Network!).
Many of these perceptrons work at the same time, taking in the same inputs, but not necessarily ascribing the same weights and biases. This is called a hidden layer (or often just a layer) of a NN. Each layer then can be displayed as a vector itself, call it h, and fed through another layer of perceptrons, until it finally reaches an output perceptron (usually with a different activation function). This is illustrated in the following 1-layer perceptron image.

To train the model, the only parameters that need adjusting is each perceptron’s weights and biases. This can be done via a backpropagation algorithm, which is out of the scope of this article.
Combining Actuarial Models and Neural Networks
In this section, I will be following and summarising findings in a paper published by the Swiss Society of Actuaries[4]. The problem they were trying to model was using data about a driver and vehicle to calculate a rating adjustment factor for claims frequency.
The usual method for carrying out this task is via use of a General Linear Model, where a linear combination of the input variables is calculated, then put through an exponential function. This exponential function was chosen to emulate the factors being approximately independent. (i.e if driving a pickup truck makes you twice as likely to crash and being over 60 makes you twice as likely to crash, a 61-year-old with a pickup truck should be 4x as likely to crash). This assumption is actually rather strong, and it is not always true.
Given the strength of assumptions, it makes sense to explore other structures within the data that may be having influence. To this end, a NN can be used to uncover these interactions between variables, and adjust the model accordingly.
The big idea behind a Combined Actuarial Neural Network (CANN) is that the GLM does most of the heavy lifting of the model, and an associated NN adds a bit more explanatory power. The model first trains the GLM as per usual, then takes its output and adds it to the output of an untrained NN running simultaneously. Now the model can fix the parameters of the GLM, and exclusively train the NN to finetune the output of the GLM[5].
So, how well did it do? Pretty well overall. The most advanced CANN model they tested was the best at giving the overall claims frequency for the testing data, though it was of note that all tested models undershot the actual frequency. Further, the “loss” value of the CANN model was substantially better than the “loss” for the GLM alone, however not as high as just using a NN alone. This would mean that strictly speaking, the NN has more predictive power than the CANN, though for reasons discussed later, it may still be preferable to use a CANN. They were also able to isolate which inputs did not behave multiplicatively, such as the pair of inputs “Vehicle Brand” and” Vehicle Age”.
So overall, this looks pretty good! But what issues could it face?
Problems with using Machine Learning Techniques
One big concern surrounding machine learning is overfitting. Overfitting is the problem of an algorithm being too tuned to the data it has seen, and so it does not generalise well to all data. For example, point-interpolation of the training data is almost certainly undesirable. This is caused by either:
- overparameterizing the model, which is when the network has too many hidden layers or too many neurons per layer.
- overtraining the model, which is where the process of training the model continues on for far too long.
Remember, NNs are universal approximators, so their natural bend in the training process will be to interpolate the training points, as this will minimise the loss.
The best way to combat this is to have an independent test set of data, which is never used to tune parameters. This includes the non-trainable parameters too, such as how wide or deep the network should be. Much research goes on in this area, and so it is expected that this problem will lessen over time

Another issue is much more potent, with that being the potential for indirect discrimination from the algorithms. When calibrating the parameters of an ML algorithm, they are generally optimised for predictive power based on the test data given. However, if this data is skewed or biased, as large amounts of historical data is, then this can be perpetuated in the future by the decisions being made by the algorithm[6]. This problem is very material and has caused issues in the past, meaning extra care must be taken in assuring neutrality in predictions. For example, it was found that COMPAS, a tool used in the US for scoring risk associated with prison inmates, was much more likely to falsely flag black defendants as high risk.
Further, a mass amount of data is needed to accurately make ML models. This is not an issue for mass-market insurance such as home or motor, but for bespoke and niche insurance, we wouldn’t expect these models to be used anytime soon. Further, collection and processing of data can be expensive for even the biggest businesses, and so it is best to do a cost-benefit analysis on implementing a model like this.
What does the future hold for AI?
Full disclaimer here, I (sadly) own no crystal ball, and so I will just be giving my vision on how this topic will progress in the future.
Many large institutions, such as the World Economic Forum, are campaigning for regulation on ML being used in decision making processes about people[7]. One point in particular that seems to have picked up traction is a so-called “right to understanding”. This is described as:
“If ML systems are involved in decision-making that affects individual rights, this must be disclosed. The systems must be able to provide an explanation of their decision-making that is understandable to end users and reviewable by a competent human authority.”
Indeed, the EU’s AI act has clauses relating to the transparency required of high-risk AI models. From their classification of high risk, pricing models that determine premiums paid would fit in as it is an “essential private or public service”. Though this is only constrained to the EU at the moment, it will be likely that other countries follow suit with similar legislation.
This poses a big problem for conventional NNs, as data about their inner workings cannot be easily extracted. For simpler models, like the GLM, simply looking at the coefficients learned for each variable will give the desired explanation; however, there is no such mechanism for NNs. For example, the model could well find that younger drivers are more reckless when driving a bigger car, but older drivers are safer. This will require extensive testing to find, and even then, it may not be possible to obtain a full picture for the entire function. Perhaps this is where the CANN shines, as the main bulk of prediction is done by the easily explainable GLM, with only finetuning done by the NN[8].
The IFoA have a “Machine Learning in Reserving Working Party” where they research ways of improving general insurance techniques using ML. This sort of application would not be considered as high risk for the purposes of legislation, and so perhaps this will be the way ML models in insurance develop in the future.
The final point I wanted to mention is: how far is “too far” for these ML pricing models? Perhaps an amount of uncertainty is a good thing. Let’s take this enhanced predictive power to its extreme – suppose a ML model could completely accurately predict whether somebody would be involved in a car accident or not. The pricing structure the model would then come up with would be the claim value, for anyone who would claim, and zero for anyone who would not (plus expenses!). Surely this goes against the spirit of insurance and risk pooling?! And if such a thing were to be implemented, insurance business would cease overnight. Of course this is intended as an extreme example, but I can’t help but think that this is the natural end goal to the advancement of ML models in pricing.
To sum it all up, modern ML techniques are good, sometimes scarily good, and they can apply to general insurance pricing. Tests in the field are promising, and some structures are already widely used in pricing models. That being said, legislation may be on the horizon to limit their use, and perhaps we as an industry have to not just think about how advanced our pricing models can get, but how advanced they SHOULD get.
Footnotes
[1] What Is Machine Learning (ML)? | IBM
[2] The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Second Edition | SpringerLink
[3] For continuous functions, this convergence is actually in L-Infinity, which is quite surprising and really cool!
[4] ssrn_id3320525_code769240.pdf
[5] This approach is exactly equivalent to initialising a NN at the GLM, then training from that starting point, but due to practical considerations, the method in the main article is used.
[6] Handling Discriminatory Biases in Data for Machine Learning | by Matthew Stewart, PhD | Towards Data Science
[7] WEF_40065_White_Paper_How_to_Prevent_Discriminatory_Outcomes_in_Machine_Learning.pdf
[8] Its important to limit training of this though, as overall the final model may have the NN take over the GLM entirely.
Liam Gettins
February 2025

Introduction