Few-shot personalized postprandial glucose prediction with model-agnostic neighbor fusion
The postprandial glucose response varies substantially among individuals, so a model trained on a population predicts well on average yet makes consistent, person-specific errors for individual participants. Personalization can close this gap, but most methods require retraining or a personal meal history that a newly enrolled subject has not yet accumulated. This study aimed to personalize an arbitrary pre-trained glucose model at inference time, without retraining, gradient updates, or diagnosis labels. We propose Neighbor Fusion Personalization (NFP), a model-agnostic inference-time layer that combines a population-model prediction with two nearest-neighbor estimates. The global estimate uses similar meals from the training population and is available at cold start, whereas the personal estimate uses the subject’s accumulating meal history. An adaptive weight, w(n) = n/(n + λ), gradually shifts the prediction from population-level toward personal evidence as the available history increases. Across 44 subjects and 5 base architectures spanning linear, tree-ensemble, and neural models, NFP reduced normalized root mean square error for glucose 60 min after a meal at every tested checkpoint from three meals onward, reaching a mean improvement of 0.032 (about 13%, approximately 5 mg/dL) at 5 meals, significant on all 5 architectures (pfdr ≤ 0.01) with no per-model tuning. It outperformed subject-specific calibration and a mixed-effects baseline in the few-shot regime, and added about 0.11 ms and under 25 kB per prediction. On two independent cohorts spanning type 1 and type 2 diabetes, the direction of the effect was reproduced under frozen hyperparameters, with smaller gains that scaled with meal-feature fidelity. Because it is training-free and model-agnostic, NFP offers a practical personalization layer for continuous glucose monitoring, available from the first prediction. Its clinical value for dietary decision support remains to be tested prospectively.

- Das A, Kerr D, Glantz N, et al. CGMacros: a pilot scientific dataset for personalized nutrition and diet monitoring. Sci Data. 2025;12(1):1557. doi: 10.1038/s41597-025-05851-7
- Sun H, Saeedi P, Karuranga S, et al. IDF Diabetes Atlas: global, regional and country-level diabetes prevalence estimates for 2021 and projections for 2045. Diabetes Res Clin Pract. 2022;183:109119. doi: 10.1016/j.diabres.2021.109119
- Battelino T, Danne T, Bergenstal RM, et al. Clinical targets for continuous glucose monitoring data interpretation: recommendations from the international consensus on time in range. Diabetes Care. 2019;42(8):1593-1603. doi: 10.2337/dci19-0028
- Oviedo S, Vehí J, Calm R, Armengol J. A review of personalized blood glucose prediction strategies for T1DM patients. Int J Numer Method Biomed Eng. 2017;33(6):e2833. doi: 10.1002/cnm.2833
- Woldaregay AZ, Årsand E, Walderhaug S, et al. Data-driven modeling and prediction of blood glucose dynamics: machine learning applications in type 1 diabetes. Artif Intell Med. 2019;98:109-134. doi: 10.1016/j.artmed.2019.07.007
- Li K, Liu C, Zhu T, Herrero P, Georgiou P. GluNet: a deep learning framework for accurate glucose forecasting. IEEE J Biomed Health Inform. 2020;24(2):414-423. doi: 10.1109/JBHI.2019.2931842
- Martinsson J, Schliep A, Eliasson B, Mogren O. Blood glucose prediction with variance estimation using recurrent neural networks. J Healthc Inform Res. 2020;4(1):1-18. doi: 10.1007/s41666-019-00059-y
- Sun Q, Jankovic MV, Bally L, Mougiakakou SG. Predicting blood glucose with an LSTM and Bi-LSTM based deep neural network. In: 2018 14th Symposium on Neural Networks and Applications (NEUREL). IEEE; 2018:1-5. doi: 10.1109/NEUREL.2018.8586990
- Pérez-Gandía C, Facchinetti A, Sparacino G, et al. Artificial neural network algorithm for online glucose prediction from continuous glucose monitoring. Diabetes Technol Ther. 2010;12(1):81-88. doi: 10.1089/dia.2009.0076
- Mhaskar HN, Pereverzyev SV, van der Walt MD. A deep learning approach to diabetic blood glucose prediction. Front Appl Math Stat. 2017;3:14. doi: 10.3389/fams.2017.00014
- Zhu T, Li K, Herrero P, Georgiou P. Personalized blood glucose prediction for type 1 diabetes using evidential deep learning and meta-learning. IEEE Trans Biomed Eng. 2023;70(1):193-204. doi: 10.1109/TBME.2022.3187703
- Langarica S, Rodriguez-Fernandez M, Núñez F, Doyle FJ. A meta-learning approach to personalized blood glucose prediction in type 1 diabetes. Control Eng Pract. 2023;135:105498. doi: 10.1016/j.conengprac.2023.105498
- Chen J, Cai D, Shi D, Shi L, Liu W, Ji L. Physiology-informed Gaussian process meta-learning for postprandial glucose trajectory prediction. IEEE Sens J. 2025;25(18):34980-34991. doi: 10.1109/JSEN.2025.3594498
- Finn C, Abbeel P, Levine S. Model-agnostic meta-learning for fast adaptation of deep networks. In: Proc 34th Int Conf Mach Learn (ICML). 2017;70:1126-1135. https://proceedings.mlr.press/v70/finn17a.html
- Snell J, Swersky K, Zemel R. Prototypical networks for few-shot learning. In: Adv Neural Inf Process Syst (NeurIPS). 2017;30:4077-4087. https://www.cs.toronto.edu/~zemel/documents/prototypical_networks_nips_2017.pdf
- Vinyals O, Blundell C, Lillicrap T, Kavukcuoglu K, Wierstra D. Matching networks for one shot learning. In: Adv Neural Inf Process Syst (NeurIPS). 2016;29:3630-3638. https://proceedings.neurips.cc/paper/6385-matching-networks-for-one-shot-learning.pdf
- Wang Y, Yao Q, Kwok JT, Ni LM. Generalizing from a few examples: a survey on few-shot learning. ACM Comput Surv. 2020;53(3):63. doi: 10.1145/3386252
- Yu X, Yang T, Lu J, et al. Deep transfer learning: a novel glucose prediction framework for new subjects with type 2 diabetes. Complex Intell Syst. 2022;8:1875-1887. doi: 10.1007/s40747-021-00360-7
- Seo W, Park SW, Kim N, Jin SM, Park S. A personalized blood glucose level prediction model with a fine-tuning strategy: a proof-of-concept study. Comput Methods Programs Biomed. 2021;211:106424. doi: 10.1016/j.cmpb.2021.106424
- Daniels J, Herrero P, Georgiou P. A multitask learning approach to personalized blood glucose prediction. IEEE J Biomed Health Inform. 2022;26(1):436-445. doi: 10.1109/JBHI.2021.3100558
- Shen Y, Kleinberg S. Personalized blood glucose forecasting from limited CGM data using incrementally retrained LSTM. IEEE Trans Biomed Eng. 2025;72(4):1266-1277. doi: 10.1109/TBME.2024.3494732
- Zulj S, Carvalho P, Ribeiro RT, Andrade R, Magjarević R. Data size considerations and hyperparameter choices in case-based reasoning approach to glucose prediction. Biocybern Biomed Eng. 2021;41(2):733-745. doi: 10.1016/j.bbe.2021.04.013
- Aiello EM, Toffanin C, Messori M, Cobelli C, Magni L. Postprandial glucose regulation via KNN meal classification in type 1 diabetes. IEEE Control Syst Lett. 2019;3(2):230-235. doi: 10.1109/LCSYS.2018.2844179
- Brown D, Aldea A, Harrison R, Martin CE, Bayley I. Temporal case-based reasoning for type 1 diabetes mellitus bolus insulin decision support. Artif Intell Med. 2018;85:28-42. doi: 10.1016/j.artmed.2017.09.007
- Torrent-Fontbona F, López B. Personalized adaptive CBR bolus recommender system for type 1 diabetes. IEEE J Biomed Health Inform. 2019;23(1):387-394. doi: 10.1109/JBHI.2018.2813424
- Albers D, Levine M, Gluckman B, Ginsberg H, Hripcsak G, Mamykina L. Personalized glucose forecasting for type 2 diabetes using data assimilation. PLoS Comput Biol. 2017;13(4):e1005232. doi: 10.1371/journal.pcbi.1005232
- Levine ME, Hripcsak G, Mamykina L, Stuart A, Albers DJ. Offline and online data assimilation for real-time blood glucose forecasting in type 2 diabetes. arXiv. Preprint posted online September 1, 2017. doi: 10.48550/arXiv.1709.00163
- Eren-Oruklu M, Çinar A, Quinn L, Smith D. Estimation of future glucose concentrations with subject-specific recursive linear models. Diabetes Technol Ther. 2009;11(4):243-253. doi: 10.1089/dia.2008.0065
- Chung I, Kim S, Lee J, Kim KJ, Hwang SJ, Yang E. Deep mixed effect model using Gaussian processes: a personalized and reliable prediction for healthcare. Proc AAAI Conf Artif Intell. 2020;34(4):3649-3657. doi: 10.1609/aaai.v34i04.5773
- Liu Z, Hauskrecht M. A Personalized Predictive Framework for Multivariate Clinical Time Series via Adaptive Model Selection. In: Proceedings of the 2017 ACM on Conference on Information and Knowledge Management. ACM; 2017:1169-1177. doi: 10.1145/3132847.3132859
- Lewis P, Perez E, Piktus A, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. In: Advances in Neural Information Processing Systems. Vol 33. Curran Associates, Inc.; 2020:9459-9474. Accessed July 13, 2026. https://proceedings.neurips.cc/paper/2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html
- Gao Y, Xiong Y, Gao X, et al. Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv. Preprint posted online 2023. doi: 10.48550/arXiv.2312.10997
- Jing B, Zhang S, Zhu Y, et al. Retrieval Based Time Series Forecasting. arXiv. Preprint posted online 2022. doi: 10.48550/arXiv.2209.13525
- Tire K, Taga EO, Ildiz ME, Oymak S. Retrieval Augmented Time Series Forecasting. arXiv. Preprint posted online 2024. doi: 10.48550/arXiv.2411.08249
- Zhang H, Xu C, Zhang YF, Zhang Z, Wang L, Bian J. TimeRAF: retrieval-augmented foundation model for zero-shot time series forecasting. IEEE Trans Knowl Data Eng. 2025;37(9):5654-5665. doi: 10.1109/TKDE.2025.3579137
- Ning K, Pan Z, Liu Y, et al. TS-RAG: Retrieval-Augmented Generation based Time Series Foundation Models are Stronger Zero-Shot Forecaster. arXiv. Preprint posted online 2025. doi: 10.48550/arXiv.2503.07649
- Soumma SB, Ghasemzadeh H. GlyRAG: Context-Aware Retrieval-Augmented Framework for Blood Glucose Forecasting. arXiv. Preprint posted online 2026. doi: 10.48550/arXiv.2601.05353
- Adjevi A, Abdirashid AM, Aktaş F, Ucar MHB, Solak S. Explainable reinforcement learning for glucose monitoring based on Shapley value analysis. Comput Methods Programs Biomed. 2026;278:109266. doi: 10.1016/j.cmpb.2026.109266
- Cover T, Hart P. Nearest neighbor pattern classification. IEEE Trans Inf Theory. 1967;13(1):21-27. doi: 10.1109/TIT.1967.1053964
- Zhao Q, Zhu J, Shen X, et al. Chinese diabetes datasets for data-driven machine learning. Sci Data. 2023;10(1):35. doi: 10.1038/s41597-023-01940-7
- Hidalgo JI, Alvarado J, Botella M, Aramendi A, Velasco JM, Garnica O. HUPA-UCM diabetes dataset. Data Brief. 2024;55:110559. doi: 10.1016/j.dib.2024.110559
- Nie Y, Nguyen NH, Sinthong P, Kalagnanam J. A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. arXiv. Preprint posted online 2022. doi: 10.48550/arXiv.2211.14730
- Ansari AF, Stella L, Turkmen C, et al. Chronos: Learning the Language of Time Series. arXiv. Preprint posted online 2024. doi: 10.48550/arXiv.2403.07815
