Exploring the relationship between psychological interventions and glycemic stability in youth with type 2 diabetes mellitus using machine learning methods

Article information

Ann Pediatr Endocrinol Metab. 2026;31(3):203-205
Publication date (electronic) : 2026 June 30
doi : https://doi.org/10.6065/apem.2550248.124
Department of Pediatrics, Inha University College of Medicine, Incheon, Korea
Address for correspondence: Dong Hyun Kim Department of Pediatrics, Inha University Hospital, 27 Inhang-ro, Jung-gu, Incheon 22332, Korea Email: id@inha.ac.kr
Received 2025 July 29; Revised 2025 September 16; Accepted 2025 October 3.

To the editor,

Current guidelines from the American Diabetes Association and the International Society for Pediatric and Adolescent Diabetes strongly recommend psychiatric evaluation and appropriate interventions for children and adolescents with diabetes. Notably, psychiatric disorders often precede the onset of type 2 diabetes mellitus (T2DM), and a large Korean cohort study showed that schizophrenia and bipolar disorder significantly increase the risk of T2DM in young adults [1]. Machine learning encompasses a range of statistical methods used to identify complex patterns and relationships within data, predict outcomes, and classify observations [2]. Therefore, we report findings from a machine learning-based analysis of the effects of psychiatric interventions in pediatric and adolescent patients with T2DM, demonstrating how computational approaches can reveal clinically meaningful patterns in glycemic variability that traditional statistical methods may overlook.

We conducted a retrospective cohort study using electronic health records from 111 pediatric patients aged <18 years with T2DM who were treated at Inha University Hospital from January 2010 to March 2024. Patients were divided into psychiatric intervention (n=15) and nonintervention (n=96) groups. The intervention group received comprehensive psychiatric evaluations, individual psychotherapy, and pharmacotherapy when indicated. Psychiatric interventions were tailored to individual patient needs following standardized screening. Patients received psychiatric evaluation and assessment for depression, with additional testing performed when necessary. Treatment typically involved weekly therapy sessions over 6 months, with varied approaches, including medication and family therapy, as appropriate. This diversity of treatment reflects the real-world clinical practice captured in our retrospective design. We excluded patients who were receiving psychiatric medication at the time of diabetes diagnosis or who had a prior history of diagnosed mental health conditions. Machine learning techniques, including linear regression, principal component analysis, and K-means clustering, were used to analyze intervention timing and glycemic outcomes. Linear regression was used to model the relationship between intervention timing and glycemic outcomes. The dataset was split 80/20 for training and testing, with cross-validation and feature selection applied. Model performance showed an R² of 0.78, indicating reasonable predictive capability [3,4].

Baseline characteristics were comparable between the intervention and nonintervention groups in terms of age at diagnosis (14.00±1.65 years vs. 13.80±2.19 years, P=0.684), sex distribution (P=0.851), initial hemoglobin A1c (HbA1c) levels (9.92%± 2.93% vs. 10.11%±2.46%, P=0.812), and baseline body mass index-standard deviation score (2.34 vs. 2.44, P=0.83), minimizing concerns regarding selection bias. Although the overall difference in the latest HbA1c levels was not statistically significant (8.26%±2.26% vs. 7.76%±2.31%, P=0.434), Fig. 1 demonstrates a clinically meaningful pattern through violin plot visualization. The intervention group showed a more compact HbA1c distribution, with reduced glycemic variability compared with the nonintervention group.

Fig. 1.

Violin plots showing the distribution and variability of hemoglobin A1c (HbA1c) levels. (A) The figure compares "HbA1c after" levels, showing wider variability in the "No" group and more normalized levels in the "Yes" group. (B) "HbA1c change" was similar in both groups, with a slight improvement in the "Yes" group. PY, psychiatric intervention.

The timing of psychiatric involvement also appeared meaningful. Patients who received psychiatric care within 180 days of diagnosis showed better glycemic trends (mean HbA1c, 7.29%±1.92%) than those with delayed intervention (9.37%±2.11%, P=0.094) (Table 1). Although this difference was not statistically significant, the observed trend suggests that earlier psychiatric evaluation after diabetes diagnosis may be more beneficial for subsequent diabetes management.

Comparison of glycemic control outcomes by timing of psychiatric interventions

Patients with T2DM have heightened psychological risks due to multiple factors, including lifelong disease management, associations with obesity, complex treatment adherence challenges, and the possibility of serious complications [5]. Moreover, many pediatric patients with T2DM from disadvantaged socioeconomic backgrounds face amplified mental health risks. Addressing psychological well-being in children and adolescents with T2DM is essential, as untreated mental health issues negatively affect diabetes management, treatment adherence, and quality of life [6].

Our study illustrated the distribution patterns of the latest HbA1c levels in the intervention and nonintervention groups using violin plots, revealing important insights beyond simple mean comparisons. Although the difference in mean HbA1c levels between groups was not statistically significant, the violin plot visualization showed that the intervention group had a more compact and stable distribution pattern. This finding suggests that psychiatric interventions may contribute to reduced glycemic variability, which is clinically relevant because HbA1c stability can be as important as absolute values in diabetes management. In addition, although our findings did not reach statistical significance, the observed trend toward improved outcomes with early intervention aligns with the broader literature emphasizing the importance of early psychosocial support in chronic disease management [7].

Although this study underscores the potential benefits of integrating psychiatric interventions into diabetes care, its small sample size, single-center design, and heterogeneous psychiatric interventions limit generalizability. In addition, the potential for overfitting in our machine learning models indicates the need for external validation. Nevertheless, our findings are hypothesis-generating and provide a compelling rationale for further investigation. We advocate large-scale, multi-institutional prospective studies using standardized psychiatric protocols to rigorously evaluate the impact of mental health integration on metabolic outcomes in pediatric T2DM.

Notes

Conflicts of interest

No potential conflict of interest relevant to this article was reported.

Funding

This study was supported by the Young Faculty Research Grant funded by Inha University (2025).

Acknowledgments

We would like to thank all children and adolescents with diabetes and their caregivers.

References

1. Lee MK, Lee SY, Sohn SY, Ahn J, Han K, Lee JH. Type 2 diabetes and its association with psychiatric disorders in young adults in South Korea. JAMA Netw Open 2023;6e2319132.
2. Sarker IH. Machine learning: Algorithms, real-world applications and research directions. SN Comput Sci 2021;2:160.
3. Ding C, He X. K-means clustering via principal component analysis. Proceedings of the twenty-first international conference on Machine learning Banff (Canada): Association for Computing Machinery; 2004. p. 29.
4. Hong H, Hong S. simpleNomo: a Python package of making nomograms for visualizable calculation of logistic regression models. Health Data Sci 2023;3:0023.
5. Sellers EAC, McLeod L, Prior HJ, Dragan R, Wicklow BA, Ruth C. Mental health comorbidity is common in children with type 2 diabetes. Pediatr Diabetes 2022;23:991–8.
6. Block WM, Putzer GJ, Jaramillo JR. Children with type 2 diabetes mellitus and the prevalence of psychiatric disorders. South Med J 2010;103:1214–8.
7. Stewart SM, Rao U, White P. Depression and diabetes in children and adolescents. Curr Opin Pediatr 2005;17:626–31.

Article information Continued

Fig. 1.

Violin plots showing the distribution and variability of hemoglobin A1c (HbA1c) levels. (A) The figure compares "HbA1c after" levels, showing wider variability in the "No" group and more normalized levels in the "Yes" group. (B) "HbA1c change" was similar in both groups, with a slight improvement in the "Yes" group. PY, psychiatric intervention.

Table 1.

Comparison of glycemic control outcomes by timing of psychiatric interventions

Characteristic Early Intervention (≤180 days, n=8) Delayed Intervention (>180 days, n=7) P-value
Mean latest HbA1c (%) 7.29±1.92 9.37±2.11 0.094
Median latest HbA1c (%) 6.8 11.1 0.117
Mean change of HbA1c -1.77±2.85 -1.53±3.42 0.860

Values are presented as mean±standard deviation unless otherwise indicated.

Early intervention: ≤180 days from diagnosis; delayed intervention: >180 days from diagnosis. Mean comparisons by independent t-test; median comparisons by Mann-Whitney U-test. Mean hemoglobin A1c (HbA1c) change = latest HbA1c – initial HbA1c (negative values indicate improvement).