GraphSAGE optimization for insurance risk assessment: balancing performance and efficiency

Oleksandr Lutsenko, Serhii Shcherbak

Abstract


The subject of this article is the application and optimization of Graph Neural Networks, specifically the GraphSAGE (Graph SAmple and aggreGatE) architecture, for insurance risk assessment in volatile environments. This study aims to develop a robust and efficient GraphSAGE-based framework for insurance risk assessment that balances predictive performance with computational efficiency. This is achieved by systematically exploring various GraphSAGE architectures, optimizing hyperparameters, and implementing regularization techniques to prevent overfitting. The effectiveness of different configurations is evaluated through empirical analysis to find the optimal balance between model performance (accuracy) and efficiency (computational speed and memory usage). The tasks to be accomplished in this study include: designing and implementing a synthetic graph generation process that accurately represents the complexities of insurance risk data; conducting a systematic exploration of GraphSAGE architectures, varying the number of layers (2, 3, 4) and hidden channels (64, 128, 256); investigating the impact of different learning rates (0.1, 0.01, 0.001) on model convergence and stability; analyzing the effectiveness of various regularization techniques, including dropout (0.1 to 0.5) and weight decay (1e-05 to 0.0001); evaluating different training strategies, including the optimal number of epochs (100 to 300) and the implementation of early stopping; assessing the performance of different loss functions in handling outliers common in insurance data; and developing a comparison framework to facilitate informed decision-making in model selection for insurance risk assessment tasks. The methods used in this study are: employing an experimental approach, utilizing the PyTorch Geometric library for implementing GraphSAGE models, deploying the models and testing them on the cloud infrastructure, developing a custom graph generation algorithm to create realistic insurance risk scenarios, incorporating factors such as health scores, smoking status, and regular check-ups, and a grid search strategy for hyperparameter optimization, combined with cross-validation, regularization techniques to prevent overfitting, and employment of early stopping mechanisms. The quantitative results were confirmed by generating synthetic graphs that simulate realistic insurance risk scenarios and by conducting experiments to test different model configurations. One key finding is that a 2-layer GraphSAGE model with 128 hidden channels achieved performance comparable to more complex architectures, demonstrating that simpler models can be effective for insurance risk assessment tasks. Conclusions. The novelty of the results is as follows: 1) the relatively simple GraphSAGE architectures, such as 2-layer models with 128 hidden channels, can achieve performance comparable to more complex models in insurance risk assessment tasks. This suggests that the inherent structure of insurance risk data may not always require deep, elaborate neural networks to capture essential patterns. 2) the research underscores the importance of tailored regularization strategies, with deeper models generally requiring stronger regularization to combat overfitting. The investigation into training dynamics reveals the role of learning rate selection and early stopping strategies, with shallower models benefiting from higher learning rates, whereas deeper architectures require more conservative learning rates for stable convergence. The consistent performance of the Smooth L1 loss function across various model architectures demonstrates its suitability for insurance risk assessment tasks. 3) a foundation for the effective application of GraphSAGE models in insurance risk assessment is established, emphasizing the importance of a balanced approach to model design that considers not only predictive performance but also computational efficiency and practical deployment considerations.

Keywords


GNN; GraphSAGE; loss function; risk assessment; cloud infrastructure

Full Text:

PDF

References


Lutsenko, O., & Shcherbak, S. GNN Implementation Approaches in AWS Cloud for Risk Assessment in the Insurance Area. Journal of Lviv Polytechnic National University "Information Systems and Networks", 2024, vol. 16, pp. 251–272. DOI: 10.23939/sisn2024.16.251.

Aslam, U., Tang, H., Wu, G., Marjan, Sh., Hussain, A. Deep Learning with Graph Convolutional Networks: An Overview and Latest Applications in Computational Intelligence. International Journal of Intelligent Systems, 2023, vol. 2023. DOI: 10.1155/2023/8342104.

Hamilton, W. L., Ying, R., & Leskovec, J. Inductive Representation Learning on Large Graphs. 2018, arXiv. DOI: 10.48550/arXiv.1706.02216.

Rawat, S., Rawat, A., Kumar, D., & Sabitha, A. Application of machine learning and data visualization techniques for decision support in the insurance sector. International Journal of Information Management Data Insights, 2021, vol. 1, iss. 2, article no. 100012. DOI: 10.1016/j.jjimei.2021.100012.

Motie, S., & Raahemi, B. Financial fraud detection using graph neural networks: A systematic review. Expert Systems with Applications, 2024, vol. 240, article no. 122156. DOI: 10.1016/j.eswa.2023.122156.

Liu, B., Li I., Yao J., Chen Y., Huang G., & Wang, G. Unveiling the Potential of Graph Neural Networks in SME Credit Risk Assessment. 2024, arXiv. DOI: 10.48550/arXiv.2409.17909.

Naufal, N., Devila, S., & Lestari, D. Generalized linear model (GLM) to determine life insurance premiums, in. Proceedings of the 4th International Symposium on Current Progress in Mathematics and Sciences (ISCPMS2018), Depok, Indonesia, 2019, article no. 020036. DOI: 10.1063/1.5132463.

Zhang, J., Wang, H., & Zhu, M. Build a GNN-based real-time fraud detection solution using Amazon SageMaker, Amazon Neptune, and the Deep Graph Library. AWS Machine Learning Blog. 2022. Available at: https://aws.amazon.com/blogs/machine-learning/build-a-gnn-based-real-time-fraud-detection-solution-using-amazon-sagemaker-amazon-neptune-and-the-deep-graph-library/ (accessed 12.10.2024).

Min, S. W., Wu, K., & Huang, S. PyTorch-Direct: Enabling GPU Centric Data Access for Very Large Graph Neural Network Training with Irregular Accesses. 2021, arXiv. DOI: 10.48550/arXiv.2101.07956.

Xie, X., He, W., Zhu, Y., & Xu, H. Performance Evaluation and Analysis of Deep Learning Frameworks, in Proceedings of the 2022 5th International Conference on Artificial Intelligence and Pattern Recognition. AIPR 2022, Xiamen China: ACM, 2022, pp. 38-44. DOI: 10.1145/3573942.3573948.

Azevedo, B., Rocha, A.-M., Pereira, A. Hybrid approaches to optimization and machine learning methods: a systematic literature review, 2024. Machine Learning, vol. 113, pp. 4055—4097. DOI: 10.1007/s10994-023-06467-x.

Chitty-Venkata, K. T., Somani, A. K. Neural Architecture Search Survey: A Hardware Perspective. 2022. ACM Computing Surveys, vol. 55 (4), pp. 1 – 36. DOI: 10.1145/3524500

Zeng, H., Zhang, M., & Xia, Y. Decoupling the Depth and Scope of Graph Neural Networks. 2022, arXiv. DOI: 10.48550/arXiv.2201.07858.

Loukas, A. What graph neural networks cannot learn: depth vs width. 2020, arXiv. DOI: 10.48550/arXiv.1907.03199.

Meng, L., Ye, Z., & Yang Y. DeepMCGCN: Multi-channel Deep Graph Neural Networks, International Journal of Computational Intelligence Systems, 2024, vol. 17, iss. 1, article no. 41. DOI: 10.1007/s44196-024-00432-9.

Arroyo, Á., Gravina, A., & Gutteridge, B. On Vanishing Gradients, Over-Smoothing, and Over-Squashing in GNNs: Bridging Recurrent and Graph Learning. 2025, arXiv. DOI: 10.48550/arXiv.2502.10818.

Shu, J. Xi, B., Li, Y., & Wu, F. Understanding Dropout for Graph Neural Networks, in Companion Proceedings of the Web Conference 2022. WWW 22: The ACM Web Conference 2022, Virtual Event, Lyon France: ACM, 2022, pp. 1128–1138. DOI: 10.1145/3487553.3524725.

van Laarhoven, Tw. L2 Regularization versus Batch and Weight Normalization. 2017, arXiv. DOI: 10.48550/arXiv.1706.05350.

Liu, H., Fu, Q., & Du, L. Learning Rate Perturbation: A Generic Plugin of Learning Rate Schedule towards Flatter Local Minima. 2022, arXiv. DOI: 10.48550/arXiv.2208.11873.

Afaq, S., & Rao, S. Significance of Epochs on Training a Neural Network. International Journal of Scientific & Technology Research, 2020, vol. 9, pp. 485-488.

Hussein, B. M., & Shareef, S. M. An Empirical Study on the Correlation between Early Stopping Patience and Epochs in Deep Learning. ITM Web of Conferences, 2024, vol. 64, article no. 01003. DOI: 10.1051/itmconf/20246401003.

Zhang, J., He, T., & Sra, S. Why gradient clipping accelerates training: A theoretical justification for adaptivity. 2020, arXiv. DOI: 10.48550/arXiv.1905.11881.

Dickson, M., Bosman, A., & Malan, K. Hybridised loss functions for improved neural network generalization. Pan-African Artificial Intelligence and Smart Systems. 2022, pp. 169-181. DOI: 10.1007/978-3-030-93314-2_11.

Liu, C., Yu, S., & Yu, M. Adaptive Smooth L1 Loss: A Better Way to Regress Scene Texts with Extreme Aspect Ratios. 2021 IEEE Symposium on Computers and Communications (ISCC), 2021, Athens, Greece: IEEE, pp. 1–7. DOI: 10.1109/ISCC53001.2021.9631466.

Hodson, T. O., Over, T. M. & Foks, S. S. Mean Squared Error, Deconstructed. Journal of Advances in Modeling Earth Systems, 2021, vol. 13, iss. 12, article no. e2021MS002681. DOI: 10.1029/2021MS002681.

Qi, J., Du, J., & Siniscalchi, S. M. On Mean Absolute Error for Deep Neural Network Based Vector-to-Vector Regression. IEEE Signal Processing Letters, 2020, vol. 27, pp. 1485–1489. DOI: 10.1109/LSP.2020.3016837.

Terven, J., & Cordova-Esparza, D.-M. A comprehensive survey of loss functions and metrics in deep learning. Artificial Intelligence Review, 2025, vol. 58, iss. 7, article no. 195. DOI: 10.1007/s10462-025-11198-7.

Li, X., Wang, W., Wu, L., & Chen, Sh. Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection. 2020, arXiv. DOI: 10.48550/arXiv.2006.04388.

Ferrentino, R. & Vota, L. The Risk in the Insurance Field: A Generalized Analysis. Journal of Mathematical Finance, 2020, vol. 10, iss. 01, pp. 200–221. DOI: 10.4236/jmf.2020.101013.

Yao, K.-L. & Li, W.-J. Asymmetric Learning for Graph Neural Network based Link Prediction, ACM Transactions on Knowledge Discovery from Data, 2024, vol. 18, iss. 5, pp. 1–18. DOI: 10.1145/3640347.

Parashar, S., Olson, B., & Khurana, S. Inference-Time Computations for LLM Reasoning and Planning: A Benchmark and Insights. 2025, arXiv. DOI: 10.48550/arXiv.2502.12521.

Bai, Y., Chen, M., & Zhou, P. How Important is the Train-Validation Split in Meta-Learning? 2021, arXiv. DOI: 10.48550/arXiv.2010.05843.

Wu, J., Sun, J., Sun, H., & Sun, G. Performance Analysis of Graph Neural Network Frameworks, in 2021 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS). 2021 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), Stony Brook, NY, USA: IEEE, 2021, pp. 118-127. DOI: 10.1109/ISPASS51385.2021.00029.




DOI: https://doi.org/10.32620/reks.2025.3.14

Refbacks

  • There are currently no refbacks.