A surreal illustration of neural network combined with actuarial data, showcasing GLMMNet's integration of technology and risk analysis.

Unlock Actuarial Insights: How Machine Learning Tames High-Cardinality Categorical Features

"Discover the GLMMNet approach and how it's revolutionizing risk assessment in insurance and beyond."


Machine learning (ML) is reshaping numerous fields, including actuarial science. Yet, the unique challenges posed by insurance data often require more than general-purpose ML algorithms can offer. One significant hurdle is the prevalence of high-cardinality categorical features—variables with a large number of categories—which conventional methods struggle to process effectively. Think of occupation in commercial property insurance or the cause of injury in workers' compensation claims; these factors significantly influence risk but are difficult for traditional ML models to interpret.

Traditional methods like one-hot encoding falter when faced with high-cardinality features. One-hot encoding, which converts each category into a binary attribute, becomes computationally expensive and leads to data sparsity as the number of categories grows. This approach also assumes independence between categories, an assumption that often doesn't hold in real-world scenarios.

Enter the Generalised Linear Mixed Model Neural Network, or GLMMNet, a novel approach designed to model high-cardinality categorical features effectively. GLMMNet integrates a generalised linear mixed model within a deep learning framework. This offers the predictive power of neural networks alongside the transparency of random effects estimates, a benefit often lost with entity embedding models.

AI Search Multiple angles on this topic

Statistics & Impact

Fields with very many distinct values are a common feature of the datasets used in insurance and related risk analyses. Postal codes, make-and-model identifiers, and diagnosis codes, for example, can each span thousands of distinct categories and behave very differently from simpler categorical inputs. Reliable, quantified figures on the prevalence or business impact of these high-cardinality fields remain limited and vary by market and dataset. As a result, any specific statistics on this topic should be treated as indicative rather than definitive.

The Classical Actuarial Toolkit

Actuarial science is the discipline that applies mathematical and statistical methods to assess risk in insurance, pension, finance, and other industries. In practice, the actuarial profession has been consistently ranked for decades as one of the most desirable, with practitioners employed across sectors such as insurance, finance, and consulting, typically in office-based settings and standard professional hours. Professional bodies such as the Society of Actuaries further frame actuaries as leaders in measuring and managing risk to improve financial outcomes for individuals, organizations, and the public. Within this tradition, classical modeling favors transparent, well-understood statistical techniques, which can struggle when categorical inputs take on very many unique values.

A Milestone Built on Examinations

The modern actuarial profession is anchored in a formal credentialing pathway rather than a single founding event. Prospective members pursue the Associate of the Society of Actuaries (ASA) designation by completing a structured sequence of scheduled exams, online modules, take-home assessments, and an ethics seminar. This exam-driven progression reflects how the discipline institutionalized its core methods and standards over time. The credentialing system itself stands as a foundational milestone that continues to define who is recognized as an actuary.

What is GLMMNet and How Does It Work?

A surreal illustration of neural network combined with actuarial data, showcasing GLMMNet's integration of technology and risk analysis.

GLMMNet fuses deep neural networks with generalised linear mixed models (GLMMs). Neural networks excel at capturing complex, non-linear relationships in data, while GLMMs provide a transparent, interpretable structure, especially for categorical variables. This combination offers a powerful tool for actuaries and other professionals dealing with complex datasets.

At its core, GLMMNet extends the Linear Mixed Model Neural Network (LMMNN) by accommodating a wider range of data distributions. While LMMNN is limited to Gaussian distributions, GLMMNet handles the exponential dispersion (ED) family, making it suitable for modeling claim frequency, severity, and pure risk premiums across various insurance contexts.

  • Neural Network Component: GLMMNet uses a multi-layer neural network to learn complex relationships among standard features.
  • GLMM Component: High-cardinality categorical features are modeled as random effects within a GLMM structure, providing transparency and interpretability.
  • Variational Inference: GLMMNet uses variational inference to estimate model parameters, balancing accuracy and computational efficiency.
AI Search Multiple angles on this topic

An Active, Evolving Literature

Research on machine-learning methods for high-cardinality categorical features is active but still evolving, making it difficult to point to a single canonical study. Approaches range from target encoding and frequency encoding to embeddings learned within neural networks, and reported results often depend heavily on dataset characteristics. Because the literature is expanding quickly, published findings should be regarded as tentative and context-dependent. Together these papers form an ongoing conversation rather than a settled consensus.

Failures and Open Criticisms

High-cardinality techniques are not without criticisms. Aggressive encodings can leak target information, inflate model complexity, or erode interpretability compared with simpler categorical treatments. Some approaches that perform well in benchmark settings fail to generalize to noisy, real-world actuarial data. Formal evaluations of these shortcomings remain limited, so the severity and scope of such failures is difficult to quantify and should be read cautiously.

Weighing the Options

Methods for handling high-cardinality categoricals—one-hot encoding, target encoding, frequency encoding, and embedding-based approaches, among others—offer distinct trade-offs across accuracy, interpretability, and computational cost. Yet systematic comparisons are scarce, and results vary widely across datasets and model families. No single technique has demonstrated clear dominance across the board. Practitioners are therefore best served by benchmarking candidates empirically on their own data rather than relying on a default choice.

The architecture balances predictive accuracy with interpretability. The neural network captures non-linear relationships, while the GLMM component offers insights into the impact of different categories within the high-cardinality feature. This transparency is crucial in actuarial applications, where understanding risk factors is as important as predicting outcomes.

The Future of Actuarial Modeling

GLMMNet offers a promising path forward in actuarial modeling, providing a blend of predictive power, transparency, and flexibility that traditional methods lack. As machine learning continues to evolve, models like GLMMNet will empower actuaries to gain deeper insights into risk and make more informed decisions. While there is no 'one size fits all' approach for each situation, models such as GLMMNet are a welcome addition to the actuary's toolbox, and offers flexibility to accommodate a wide range of real world scenarios.

AI Search Multiple angles on this topic

A Pragmatic Synthesis

Across the material covered in this article, a consistent theme emerges: actuarial work is fundamentally risk-driven and data-intensive, and the categorical fields within that data are growing in both prevalence and complexity. Machine-learning techniques open promising avenues for handling these fields, but tooling, governance, and expertise are still catching up. Where consensus exists, it favors pragmatic, well-tested methods over speculative ones, with empirical validation on domain-specific data. This synthesis is offered as framing guidance rather than a definitive account of the field.

Next Frontiers for the Profession

Looking ahead, actuaries use mathematics, statistics, and financial theory to analyze the economic costs of risk and uncertainty, with most employed by insurance companies. Although most actuaries work full time in an office setting, some who act as consultants travel to meet with clients, pointing toward a profession whose working patterns are evolving alongside modeling techniques. As both data volumes and machine-learning adoption rise, the ability to incorporate high-cardinality categorical features efficiently is likely to become a more routine part of actuarial practice. Any projections here rest on a current snapshot of the profession and should be read as directional rather than definitive.

Broader Systemic Challenges

Beyond any single modeling technique, high-cardinality categorical handling intersects with broader systemic challenges in risk analytics: data quality, model governance, fairness, and interpretability. These challenges span industries and are shaped as much by regulatory expectations as by technical capability. Success with high-cardinality features therefore depends on organizational practices and standards, not just algorithmic choices. This wider context explains why the technical question addressed in this article matters beyond a single modeling task.

The Human Element

Behind every technical method are the people who build, validate, and ultimately use it. Actuaries and data professionals must translate model outputs into decisions that shape financial outcomes for individuals, organizations, and the public, keeping professional judgment central even in automated workflows. This human dimension is what gives high-cardinality modeling its practical significance. It is a reminder that statistical technique exists to support human decision-making, not replace it.

About this Article -

Written with AI assistance from published research, and reviewed by the Mystum team. See our About page for more information.

This article is based on research published under:

DOI-LINK: 10.1017/asb.2024.7,

Title: Machine Learning With High-Cardinality Categorical Features In Actuarial Applications

Subject: stat.ml cs.lg econ.em q-fin.rm

Authors: Benjamin Avanzi, Greg Taylor, Melantha Wang, Bernard Wong

Published: 30-01-2023

Everything You Need To Know

1

What is GLMMNet, and how does it improve on traditional methods for actuarial modeling?

GLMMNet, or the Generalised Linear Mixed Model Neural Network, is a novel approach in actuarial science that combines deep learning with generalised linear mixed models (GLMMs). It tackles the challenge of high-cardinality categorical features, which traditional methods like one-hot encoding struggle with. One-hot encoding becomes computationally expensive and leads to data sparsity as the number of categories grows. GLMMNet integrates a neural network for complex relationship capture and a GLMM structure for transparency and interpretability, especially for categorical variables. This combination allows for improved predictive accuracy while maintaining the ability to understand the impact of different risk factors, a key advantage in actuarial applications.

2

How does GLMMNet handle high-cardinality categorical features, and why is this important in insurance risk assessment?

GLMMNet models high-cardinality categorical features as random effects within a GLMM structure. This is critical in insurance risk assessment because many important variables, such as occupation or cause of injury, have a large number of categories. Traditional methods like one-hot encoding become inefficient with these features. By using GLMMs, GLMMNet provides a transparent and interpretable structure, allowing actuaries to understand how each category within a high-cardinality feature influences risk. This level of understanding is essential for accurate risk assessment and pricing.

3

What are the core components of GLMMNet, and how do they contribute to its functionality?

GLMMNet comprises three core components: a neural network, a GLMM component, and variational inference. The neural network captures complex, non-linear relationships among standard features. The GLMM component models high-cardinality categorical features as random effects, offering transparency. Finally, variational inference is used to estimate model parameters, balancing accuracy with computational efficiency. Together, these components allow GLMMNet to predict outcomes accurately while providing insights into the influence of different risk factors.

4

How does GLMMNet differ from the Linear Mixed Model Neural Network (LMMNN), and what implications does this have for its application?

GLMMNet extends the Linear Mixed Model Neural Network (LMMNN) by accommodating a wider range of data distributions. LMMNN is limited to Gaussian distributions, whereas GLMMNet handles the exponential dispersion (ED) family, making it suitable for modeling claim frequency, severity, and pure risk premiums across various insurance contexts. This flexibility means that GLMMNet can be applied to a broader range of insurance problems, offering a more versatile tool for actuaries dealing with different types of data and risk scenarios.

5

What are the benefits of using GLMMNet over traditional machine learning or statistical methods in actuarial science?

GLMMNet offers a blend of benefits that traditional methods lack. It provides enhanced predictive accuracy through its neural network component, while the GLMM component offers transparency in how high-cardinality categorical features influence outcomes. This allows for a deeper understanding of risk factors. The model's ability to handle a wider range of data distributions also contributes to its flexibility. Overall, GLMMNet empowers actuaries to gain deeper insights into risk, make more informed decisions, and move beyond the limitations of earlier methods such as one-hot encoding.

Newsletter Subscribe

Subscribe to get the latest articles and insights directly in your inbox.