Many UK pricing teams have a GBM sitting on a server somewhere that outperforms the production GLM. The model is not in production because nobody can get the relativities out of it. The regulator wants a factor table. Radar needs an import file. The pricing committee wants to challenge the numbers in terms they recognise — a relativity of 1.42 for young male drivers, not a SHAP waterfall plot.

SHAP values are the natural tool for this. The Shapley axioms guarantee that SHAP values sum exactly to the model output — which means you can exponentiate them to get multiplicative contributions, band them by rating factor, and average across exposure to produce a factor table in the same format as exp(beta) from a GLM. The shap-relativities library does this in a way that is production-ready: confidence intervals, exposure weighting, consistency checks against the model’s raw predictions, and output formats for Radar and Emblem import.

Extracting relativities is step one. The next step — for teams who want to move the GBM itself to production — is GBM-to-GLM distillation: fitting a surrogate GLM to the GBM’s predictions and exporting a multiplicative factor schedule that a rating engine can execute directly. The insurance-distill library handles the distillation step.

Library: shap-relativities on GitHub · pip install shap-relativities

Related library: insurance-distill on GitHub · pip install insurance-distill


Tutorials and introductions


GBM-to-GLM distillation


Validation and benchmarks