Abstract
Background
Bariatric surgery enhances glucose metabolism, yet the detailed postprandial joint glucose and insulin responses, variability in individual outcomes, and differences in surgical approaches remain poorly understood.
Methods
We used hierarchical multi-output Gaussian process (HMOGP) regression to reveal clinically relevant patterns between persons undergoing two types of bariatric surgery by modeling the individual postprandial glucose and insulin responses and estimating the average response curves from individual data. 44 participants with obesity underwent either Roux-en-Y gastric bypass (RYGB; n = 24) or One-Anastomosis gastric bypass (OAGB; n = 20) surgery. The participants were followed up at the 6th and 12th months after the operation, during which they underwent an oral glucose tolerance test (OGTT) and a mixed meal test (MMT).
Results
A marked reduction in glycemia, an earlier glucose peak, and an increase and sharpening in the postprandial glucose and insulin responses are evident in both metabolic tests post-operation. MMT results in higher postprandial glucose and insulin peaks compared with OGTT. Higher glucose and insulin responses are observed after RYGB compared with OAGB, suggesting differences between the procedures that may influence the clinical practice.
Conclusions
Computational modeling with HMOGP regression can thus be used to, in detail, predict the combined responses of patient cohorts to ingested glucose or a mixed meal and help in assessing individual metabolic improvement after weight loss. This can lead to new knowledge in personalized metabolic interventions.
Plain language summary
Bariatric surgery is used to reduce stomach size or nutrient absorption in people with obesity. However, the effects can vary depending on the person and the type of operation performed. This study used a computational model to analyze the amount of sugar and insulin, a hormone that impacts how the body responds to consumption of sugar, in the blood of 44 individuals who underwent two common types of bariatric surgery. The model revealed that while both operations improved people’s ability to process food, they had different impacts on the amounts of sugar and insulin in the blood after consuming a meal. This knowledge could be used to ensure the best strategy to treat obesity is used for each person with obesity.
Introduction
The prevalence of obesity has increased enormously over the last decades. Over 1.8 billion people lived with overweight or obesity in 2017 (WHO factsheet). Obesity is associated with various diseases and metabolic problems such as type 2 diabetes (T2DM), dyslipidemia, cardiovascular diseases, and cancer1,2.
Treating obesity is extremely difficult. While diet-induced weight loss strategies lead to modest results, bariatric surgery is the most effective treatment of obesity, leading to improved glucose tolerance already within days3,4. Roux-en-Y gastric bypass (RYGB) has been the gold standard in bariatric surgery. One-Anastomosis gastric bypass (OAGB) emerged as a potentially more beneficial procedure for the resolution of T2DM5,6, but recent randomized controlled trials have challenged this7,8,9. Additionally, individual metabolic phenotypes of participants undergoing bariatric surgery, such as differential glucose response between sexes10, have resulted in the need for understanding and modeling in detail the glycemic responses in different patient cohorts before and after surgery.
Conventional methods for assessing glucose responses after the oral glucose tolerance test (OGTT) and the mixed meal test (MMT) have relied on averaging the means of patient responses for each individual separately. Previously used methods in assessing the results of these tests, therefore, yield a robust estimation of blood glucose regulation but lack detailed characteristics of the overall blood glucose/insulin response at the population level and neglect individual differences. Additionally, OGTT is sparsely sampled, and individual estimates may be missing from the available data. Artificial intelligence techniques to better understand blood glucose regulation have emerged in recent years11. For example, the Eindhoven Diabetes Education Simulator (E-DES) model has been successfully used for OGTT to develop personalized models of glucose and insulin sensitivity and to explore the heterogeneity in the responses12. In another study, methods quantifying glucose fluxes between tissues using tracers have been applied to create predictive models of glucose-insulin interactions in MMT analyses13. Zeevi et al.14 developed a machine-learning algorithm integrating blood parameters, dietary habits, anthropometrics, physical activity, and gut microbiota to estimate the glucose and insulin responses accurately. A Gaussian process has been previously used in modeling OGTT responses in participants with and without cystic fibrosis to provide measures of beta-cell function with quantified uncertainty15.
In this study, we developed hierarchical multi-output Gaussian process (HMOGP) regression, which is the combination of hierarchical Gaussian process (HGP) and multi-output Gaussian process (MOGP). The hierarchical Gaussian process (HGP) is beneficial when part of the data reveals different characteristics, such as the considerable inter-individual variability usually observed in postprandial glucose and insulin responses16. On the other hand, the multi-output Gaussian process (MOGP) is able to deal with multiple correlated outputs (such as glucose and insulin dynamics) and to provide more accurate predictions than simply modeling these outputs separately17,18,19. Similar techniques to HMOGP have been successfully applied before in different domains such as anomaly detection20, multi-task learning21, and mobile cellular network analysis22, performing better than MOGP and GP. We expanded these techniques to the medical domain in OGTT and MMT responses with necessary adaptations. HMOGP allows us (1) to model the insulin and glucose response together via multi-output (2) while considering the individual-level differences through a hierarchical structure. It also (3) quantifies uncertainty in predictions, making it suitable for datasets with noise or missing values, and (4) can model non-linearities and complex temporal dynamics in postprandial responses, providing more accurate predictions than simpler models23. Here, we apply a hierarchical multi-output Gaussian process (HMOGP) regression model to analyze and characterize postprandial glucose and insulin dynamics following two types of bariatric surgery. We use data from both oral glucose tolerance tests (OGTT) and mixed meal tests (MMT) to compare Roux-en-Y gastric bypass (RYGB) and One-Anastomosis gastric bypass (OAGB). Our findings reveal that while both procedures improve metabolic responses, RYGB induces a more pronounced glucose and insulin response than OAGB. We also identify distinct metabolic patterns between sexes and demonstrate that our computational approach provides detailed, personalized insights into post-surgical outcomes, which can lead to new knowledge in personalized metabolic interventions.
Methods
The primary clinical outcomes of this randomized clinical trial (NCT02882685), which compares Roux-en-Y and One-Anastomosis gastric bypass, have been previously published in Heinonen et al.9, Saarinen et al.24. This manuscript presents secondary analyses of the detailed postprandial glucose and insulin dynamics from the trial data. These specific computational modeling analyses were not prespecified in the original trial protocol.
Subjects
We included participants with obesity (n = 44, aged 46.6 years, with 14 men and 30 women, 26 participants with obesity, 18 participants with obesity and T2DM, matched for age and diabetes status between the operation types). Participants were examined before and at 6th and 12th months after bariatric surgery with either Roux-en-Y gastric bypass (RYGB; n = 24, 8 men, 16 women, n = 9 with T2DM) or One-Anastomosis gastric bypass (OAGB; n = 20, 6 men, 14 women, n = 9 with T2DM). 33% of men vs. 43% of women had T2DM. The subjects were recruited from Helsinki University Hospital through the Department of Gastrointestinal Surgery. The full randomized clinical trial is registered at clinicaltrials.gov with no. NCT02882685 and the randomization and selection process of the participants and study dropouts are described in detail in Saarinen et al.24 and Heinonen et al.9. All participants from Helsinki University Hospital with OGTT data available were included in the current study. No data or participants were removed from the analysis. Written informed consent was obtained from all participants. The study protocol was designed and performed according to the principles of the Helsinki Declaration and approved by the Ethical Committee of the Helsinki University Central Hospital.
Bariatric surgery
In RYGB, the gastric pouch was created with one horizontal 45 mm and two vertical 60 mm staplers. The length of the biliary limb was 80 cm, and that of the alimentary limb was 130 cm. In OAGB, a tubular gastric pouch was created using 60 mm staplers along a 38Fr bougie starting at the crow’s foot with a horizontal 45 mm stapler and the omega loop being 210 cm long. The length of the bypasses was standardized between the procedures to allow for equal comparison. A 210 cm biliopancreatic limb in OAGB and 80 cm biliopancreatic and 130 cm alimentary limbs in RYGB were chosen to obtain equally long bypassed intestines in both groups24.
Clinical examinations and body composition
Weight and height were measured after an overnight fast in light clothing. Whole-body composition was measured by Dual-energy X-ray absorptiometry (DEXA) using a Lunar Prodigy whole-body scanner (GE Medical Systems, Madison, WI).
Analytical blood samples
Fasting laboratory tests, including HbA1c and plasma lipids, were performed as described by Heinonen et al.25.
Mixed meal test (MMT) and oral glucose tolerance test (OGTT)
Glucose metabolism was measured after an overnight fast with a 3-hour oral glucose tolerance test (OGTT, 75 g of glucose), with time points 0 (before the ingestion of the glucose drink) and post-glucose samples at 30, 60, 120, and 180 min. We additionally performed a 6-hour Mixed Meal Test (MMT) on a separate day, where a fasting blood sample was collected before ingesting the liquid meal of 2620 kJ (627 kcal) with a balanced distribution of fat (24 g), carbohydrates (76 g) and protein (24 g) (Resource® 2.5 Compact, Nestle Health Science), with post-meal samples at 15, 30, 60, 120, 180, 240 and 360 min for measuring glucose and insulin.
Data features
Each patient underwent both OGTT and MMT tests across three different visits: once preoperatively and then at the 6th and 12th months post-operatively. Six participants missed the baseline OGTT visit, while 10 and 6 missed the 6th and 12th month visits, respectively. In MMT, 4 and 5 participants missed the 6th and 12th month visits, respectively. Additionally, 3% of the overall data was missing due to vomiting or nausea, which interrupted the test.
Statistical method and reproducibility
Blood glucose and insulin evolve as a function of time. Here, we model them using a Gaussian process, which is a continuous stochastic process and can be considered a probability distribution over functions23,26. The standard Gaussian process regression is defined as:
where \({{{\boldsymbol{y}}}}\in {{\mathbb{R}}}^{T}\) are the observation points, t ∈ {1, …, T} the input locations, and σ the measurement error. The function f(t) is defined as the Gaussian process \(f(t) \sim {{{\mathcal{GP}}}}(0,{{{\bf{K}}}})\) with kernel matrix K. However, applying this approach directly to our problem is not straightforward. First, we know that glucose and insulin responses are strongly correlated, and applying Gaussian process regression on them separately would miss this correlation. Therefore, we propose to use Multi-Output Gaussian Process regression17,18,19, which is able to calculate the cross-covariance between functions and is the proper choice for modeling insulin and glucose together. If we define \({{{\boldsymbol{f}}}}=[{f}_{{{{\rm{glucose}}}}},{f}_{{{{\rm{insulin}}}}}]\):
where \({\hat{f}}_{{{{\rm{glucose}}}}},{\hat{f}}_{{{{\rm{insulin}}}}}\in {{\mathbb{R}}}^{T}\) are independent GPs and L is the Cholesky factor matrix of the corresponding correlation matrix C, then \({{{\boldsymbol{f}}}}\in {{\mathbb{R}}}^{T\times D}\), where D is the output dimension (glucose, insulin), has the multi-output GP distribution. However, the challenge of the data is not limited to the output correlation. The second issue is that individuals have slightly different blood glucose and insulin responses. Hierarchical Gaussian process regression modeling can solve this issue by learning the population average response curve and individual deviations from the average response separately16. Let fn(t) denote the response curve for a single patient, f population(t) the average response curve across all participants, and \({{{{\boldsymbol{f}}}}}_{n}^{{{{\rm{patient}}}}}(t)\) the deviation of the patient from the average response. Then, hierarchical GP can be represented as:
where \({{{{\boldsymbol{f}}}}}^{{{{\rm{population}}}}},{{{{\boldsymbol{f}}}}}_{n}^{{{{\rm{patient}}}}}\in {{\mathbb{R}}}^{T\times D}\) have multi-output Gaussian process distributions. We apply the same hierarchical approach to model the constant terms for fasting glucose and insulin, as follows:
where μn is fasting glucose and insulin for a single patient, μpopulation corresponds to the normally distributed population average of fasting glucose and insulin, and \({{{{\boldsymbol{\mu }}}}}_{n}^{{{{\rm{patient}}}}}\) denotes the normally distributed individual deviation from the population average.
Overall, we modeled the data using the Hierarchical Multi-Output Gaussian process (HMOGP), where hierarchy allows us to consider the deviations of individual responses, and multi-output models the correlation of insulin and glucose response. Let the whole data be denoted by \({{{\boldsymbol{y}}}}\in {{\mathbb{R}}}^{N\times T\times D}\), where N is the total number of participants, T is the number of time points, and D = 2 refers to the two possible outputs (glucose, insulin). If we index the patient by n, time by t, and output by d, the blood glucose and insulin level yn,t of patient n at time t can be represented as
where Σ is the diagonal measurement error matrix, and the latent function fn is formulated as
We applied this model separately to the different visits (Baseline, 6th month, 12th month) and tests (OGTT, MMT). The only shared parameter across these models was the measurement error. For comparisons by operation, sex, and T2DM, we divided the dataset accordingly and modeled them separately. Further details of the model parameters and priors can be found in Supplementary Note.
Stan software27 was used to draw samples from the posterior distributions using the Markov Chain Monte Carlo inference. We used posterior samples to calculate Bayesian credible intervals (CI) and p-values as described in Gelman et al.28. Furthermore, we evaluated four metrics to investigate the characteristics of the postprandial glucose and insulin responses: peak value (PV), time-normalized area under the curve (AUC), peaking time (PT), and time in the risk zone (TiH; Hyperglycemia for glucose >7.0 mmol/l and Hyperinsulinemia for insulin >50 mU/l). These metrics are illustrated in Fig. 1. In the clinical analyses, non-normally distributed variables were log10-transformed before the parametric analyses. Differences at baseline between the groups were analyzed by Student’s t-tests and between visits with generalized linear mixed modeling adjusting for sex, T2DM, and operation type (Stata Statistical software ver. 7.0). These results are presented as means and 95% confidence intervals (CI).
Peaking time (PT) and time in the risk zone (TiH; hyperglycemia for glucose > 7.0 mmol/l and hyperinsulinemia for insulin > 50 mU/l) are represented in minutes, and peak value (PV) and time-normalized area under the curve (AUC) are represented in mmol/l for glucose and mU/l for insulin.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Results
Throughout the manuscript, we investigated the glucose and insulin responses of all participants following an oral glucose tolerance test (OGTT) and a mixed meal test (MMT) over the entire dataset and in different subgroups divided by operation, sex, and T2DM using hierarchical multi-output Gaussian process (HMOGP) regression, which is suitable for longitudinal data. In MMT, 76 g of glucose was combined with protein and fats, while OGTT had only 75 g of glucose. Supplementary Fig. 1 and Supplementary Fig.2 show HMOGP predictions by individuals, which validate the model fit for different persons. Note that Supplementary Figs. 1 and 2 contain only the participants with the complete set of observations while the model was fitted using all the participants.
Glucose and insulin responses sharpen post-surgery in OGTT and MMT
From baseline to the 12th month of post-surgery, the glucose-insulin response improved in both tests (Fig. 2). During OGTT, AUCs of glucose and insulin concentrations substantially decreased from baseline to 6th and 12th months (Supplementary Table 3). Similarly, PVs of both glucose and insulin were reduced considerably from baseline to the 12th month (Supplementary Table 2), and PT at the 12th month occurred 12 minutes earlier for glucose and 11 minutes earlier for insulin compared to baseline (Supplementary Table 1). TiH for glucose was reduced by 53 min during weight loss, already bringing about large metabolic benefits (Supplementary Table 4). Overall, OGTT demonstrated a sharpened and markedly earlier glucose and insulin response with lower peak values following bariatric surgery (Fig. 2).
This figure compares the model-predicted average glucose and insulin responses preoperatively (Preop.) at Baseline and post-operatively (Postop.) at the 6th and 12th month visits. It shows how metabolic responses to an oral glucose tolerance test (OGTT) and a mixed meal test (MMT) change over the 12-month period following surgery. Shaded areas represent 95% confidence intervals (CI) derived from n = 1000 simulation samples, which indicate the statistical certainty of the predicted average response curves.
In MMT, AUCs of both glucose and insulin showed a substantial reduction from baseline to the 12th month (Supplementary Table 3). Unlike in OGTT, PVs of glucose and insulin markedly increased over 12 months (Supplementary Table 2). PT occurred 48 minutes and 11 minutes earlier for glucose and insulin, respectively, from baseline to the 12th month (Supplementary Table 1). Additionally, there was a total reduction of 83 minutes in TiH for glucose from baseline to the 12th month (Supplementary Table 4). These findings indicate a sharper and more pronounced glucose-insulin response, with notably higher peak values and earlier peak times after bariatric surgery in MMT (Fig. 2).
Higher postprandial glucose-insulin response in MMT vs. OGTT after bariatric surgery
OGTT and MMT evaluate participants’ metabolic status through differential ingestion of macronutrients between the tests. To elucidate the differences between the tests before and after bariatric surgery, we next analyzed the average postprandial response in glucose and insulin, comparing MMT and OGTT by including similar follow-up times of 180 minutes in both tests (Fig. 3). PVs of glucose and insulin were higher after OGTT than MMT at baseline, but other metrics did not differ considerably at baseline (Supplementary Tables 1, 2, 3, 4). Post-operatively at the 6th and 12th months, glucose and insulin responses (AUC, PV, and PT) were all considerably enhanced in MMT compared with OGTT (Supplementary Tables 1, 2, 3, 4). TiH for glucose did not differ between the tests during weight loss. While both tests are performed in the same individuals and on the following days, these differences could be attributed to differential absorption of glucose in combination with other macronutrients in MMT vs. OGTT post-operatively and to postprandially enhanced insulin stimulus originating from proteins and fats included in MMT.
This figure directly contrasts the model-predicted average glucose and insulin responses between the oral glucose tolerance test (OGTT) and the mixed meal test (MMT) at each study visit. This comparison highlights how the body’s glucose and insulin regulation differs when challenged with glucose alone versus a more complex mixed meal. Shaded areas represent 95% confidence intervals (CI) derived from n = 1000 simulation samples, which indicate the statistical certainty of the predicted average response curves.
Glucose-insulin response is higher and longer after RYGB than OAGB
To shed light on the potential differential responses between two types of bariatric surgery, we modeled RYGB (n = 24) and OAGB (n = 20) groups separately. Figure 4 and Fig. 5 show population comparison for OGTT and MMT tests, respectively. In the OGTT, the RYGB and OAGB groups had comparable glucose and insulin responses at baseline. The RYGB group showed a trend towards a larger AUC of glucose compared to the OAGB group (p = 0.09) at the 12th month and had a substantially larger AUC of insulin at the 6th month (Supplementary Table 3). PV of glucose for the RYGB group was higher than the OAGB group at the 12th month (10.0 mmol/l vs. 7.8 mmol/l). For insulin, the RYGB group had a higher PV at the 6th month and a trend towards it at the 12th month (p = 0.062, Supplementary Table 2). PTs showed no difference between operations (Supplementary Table 1). TiH for glucose was longer in the RYGB vs. the OAGB group at the 12th month (70 min vs. 47 min), but this difference was nearly notable already at baseline (125 min vs. 105 min, p = 0.088, Supplementary Table 4). During the entire weight-loss period, the mean TiH reduction of glucose was similar between RYGB and OAGB (55 min vs. 58 min) (Fig. 6).
This figure compares the average glucose and insulin responses during an oral glucose tolerance test (OGTT) for participants who underwent Roux-en-Y gastric bypass (RYGB) versus those with One-Anastomosis gastric bypass (OAGB). It isolates the responses to the glucose intake only to show the specific metabolic differences between the two surgical procedures. Shaded areas represent 95% confidence intervals (CI) derived from n = 1000 simulation samples, which indicate the statistical certainty of the predicted average response curves.
This figure compares the average glucose and insulin responses during a mixed meal test (MMT) for participants who underwent Roux-en-Y gastric bypass (RYGB) versus those with One-Anastomosis gastric bypass (OAGB). The figure highlights how the two surgical procedures affect the metabolic response to a mixed meal, a more complex physiological challenge than glucose alone. Shaded areas represent 95% confidence intervals (CI) derived from n = 1000 simulation samples, which indicate the statistical certainty of the predicted average response curves.
In MMT, the RYGB group had similar PV of glucose but slightly higher PV of insulin than the OAGB group at baseline (Supplementary Table 2). During weight loss, the enhanced glucose and insulin responses in RYGB vs. OAGB were pronounced, with notably higher PVs (Supplementary Table 2) and AUCs (Supplementary Table 3) of both glucose and insulin at 6th and 12th months. PTs of glucose and insulin were similar between the groups at all visits (Supplementary Table 1). Interestingly, the RYGB group experienced more TiH for glucose at the 6th month (83 min vs. 53 min) and a trend towards it at the 12th month (69 min vs. 54 min, p = 0.054) compared with the OAGB group, despite similar baseline values between the groups (Supplementary Table 4). This may be partly due to the higher PV of glucose observed in RYGB. Over the 12 months, the reduction in TiH for glucose was 64 minutes for RYGB and 82 minutes for OAGB.
Overall, RYGB surgery induced a more pronounced glucose and insulin response in both tests, particularly in MMT, compared with OAGB, suggesting clinical differences between the procedures that can be taken into account in operation selection. Additionally, the pronounced PV and AUC in the RYGB group may drive the differences between MMT and OGTT in the postprandial response after surgery.
Higher postprandial glucose but not insulin response in men vs. women
Next, to account for other metabolic subgroups included in our cohort, we modeled women (n = 30) and men (n = 14) as different groups. Supplementary Figs. 4, 5, 6 show population comparison for OGTT and MMT tests, respectively. In OGTT, men exhibited a higher AUC of insulin and higher PVs of glucose and insulin compared to women at baseline Supplementary Table 3). Men had consistently higher postprandial PV of glucose response at all visits (Supplementary Table 2). At the 12th month, men had a higher AUC of glucose (Supplementary Table 3), later PTs for both glucose and insulin (Supplementary Table 1), and longer TiH for glucose with a smaller reduction in hyperglycemic time compared with women (31 min vs. 62 min) from baseline to 12th month (Supplementary Table 4).
In MMT, men and women showed similar baseline characteristics (Supplementary Fig. 5). Men exhibited higher AUCs of glucose and insulin at the 6th month (Supplementary Table 3) along with higher PV of glucose at the 6th and 12th months (Supplementary Table 2) compared with women. At the 6th month, the PTs of glucose and insulin occurred later with men (Supplementary Table 1), and men also had longer TiH for glucose. However, the sexes had similar improvement in TiH during the weight loss (Supplementary Table 4).
Higher postprandial glucose but lower insulin response in T2DM vs. non-T2DM
We additionally evaluated the postprandial glucose and insulin responses between persons with T2DM (n = 18) separately from those without (n = 26) (Supplementary Figs. 7, 8, 9). As expected in OGTT, at all visits, persons with T2DM had higher PV and AUC, later PT and longer TiH for glucose, and later PT and lower PV for insulin (Supplementary Tables 1, 2, 3, 4). In MMT, PV and AUC of glucose were higher, and TiH for glucose was longer with T2DM at all visits. PV of insulin was lower than in persons without T2DM at the 12th month (Supplementary Tables 1, 2, 3, 4). Both groups improved in their glucose and insulin responses during weight loss.
Metabolic features in all participants improve during weight loss
At baseline, both RYGB and OAGB groups had similar metabolic features. Women had a higher fat percentage than men, and persons with T2DM had higher HbA1c and fasting plasma glucose than persons without T2DM. During the weight loss, body weight, fat kilograms, fat percentage, fasting glucose, insulin, and lipid levels improved considerably in all groups (Supplementary Table 5). A slightly more prominent decrease in HbA1c in favor of OAGB vs. RYGB was observed, and HDL-cholesterol, fat kilograms, and fat percentage improved better in men vs. women. In persons with T2DM, weight, HbA1c, and fasting glucose improved more than in those without T2DM. (Supplementary Table 5).
HMOGP model outperforms the conventional trapezoidal data analysis
We additionally analyzed the data by conventional methods of estimating PT, PV and calculating the AUC and TiH during the test with the linear trapezoid method. The comparison with HMOGP showed that HMOGP consistently predicted AUC and TiH with improved uncertainty compared to the conventional data analysis. Additionally, HMOGP was able to give realistic PT and PV estimations compared to the linear trapezoid method, as these parameters only relied on the timing of the observations in fundamental statistical analysis. Supplementary Table 6 shows the comparison of HMOGP predictions with trapezoidal data analysis.
Discussion
We applied hierarchical multi-output Gaussian process (HMOGP) regression to analyze glucose and insulin dynamics in OGTT and MMT, identifying distinct metabolic responses based on bariatric surgery type and sex. Our findings reveal sharper and earlier glucose-insulin peaks with faster restoration to baseline in both OGTT and MMT post-surgery, along with more pronounced postprandial glucose-insulin responses in MMT than in OGTT and in RYGB compared to OAGB. Our findings underscore RYGB’s role in enhanced glycemic control, while OAGB could be preferred in milder metabolic disturbances or when hypoglycemia may be a risk. RYGB’s sharper glucose peaks may have vascular implications, favoring OAGB for participants with cardiovascular disease. Additionally, we observed sex-based metabolic differences with men exhibiting a more unhealthy glucose-insulin profile throughout weight loss and distinctions between individuals with and without T2DM. We thus present that the HMOGP approach can be used to model postprandial glucose-insulin responses in detail in different groups of participants for personalized treatment strategies, allowing new means of understanding and improving individual glycemic responses in metabolic conditions.
Our study proposes the hierarchical multi-output Gaussian process (HMOGP) regression machine-learning model as a suitable tool for modeling postprandial glucose-insulin data in detail for both OGTT and MMT. Previous studies have used the standard Gaussian process for modeling OGTT responses in participants with and without cystic fibrosis15, but HMOGP has not been applied to OGTT or MMT in relation to obesity or weight loss. Traditional linear regression models or simple curve-fitting approaches assume independence between glucose and insulin and fail to capture individual variability. Non-hierarchical Gaussian processes do not handle individual variations as effectively as the hierarchical structure in HMOGP23,29. Additionally, fixed-effect models like ANOVA, or simpler mechanistic models, cannot accommodate individual-to-population hierarchy and multi-output dependencies. In conventional linear trapezoid calculations, the outcomes rely strongly on the exact measurement time points. Our HMOGP method will allow a more granular understanding of how a patient compares with the population in insulin and glucose responses after surgery. The additional advantages are suitability for the correlated structure of glucose and insulin dynamics, for datasets with noise or missing values (typical in OGTT and MMT), improved accuracy of the prediction, and the ability to handle complex, multivariate data.
Both OGTT and MMT assess the pancreatic beta-cell response, which includes activation of the gut-related insulin-stimulating hormones. While OGTT is the standard for evaluating glucose intolerance and T2DM, MMT provides a more comprehensive physiological stimulus, as glucose combined with protein and fats enhances insulin secretion30. The duration of the postprandial glucose and insulin peaks was considerably elevated and shortened after both metabolic tests, confirming enhanced insulin stimulus and improved glucose clearance from the circulation post-operatively. Our results align with previous studies reporting that RYGB leads to a rapid increase in both postprandial blood glucose and insulin levels31. These metabolic benefits likely stem from gut reconfiguration post-surgery, including altered nutrient absorption and enhanced stimulation of L-cells, leading to a 10-fold increase in insulin-stimulating GLP-1 secretion32, and an increase in other gut hormones33. Gut mucosa hyperplasia post-operation promotes glucose absorption34 while improved pancreatic islet coordination may enhance insulin release35, collectively accelerating insulin secretion and glucose clearance. The enhanced post-surgical glucose-insulin response, earlier peak timing, and faster glucose normalization offer substantial benefits, as hyperglycemia is linked to vascular dysfunction, cardiovascular risk, oxidative stress, inflammation, and cognitive decline36. Interestingly, earlier timing of the glucose-insulin peaks in OGTT also seems to indicate the effectiveness of the antidiabetic drugs37 and reflect improved insulin sensitivity and secretion in T2DM38, while delayed glucose peaks reflect pancreatic beta-cell dysfunction37. In addition, increasing OGTT curve complexity is associated with better glucose tolerance39. However, sharp glycemic peaks after OGTT have also been linked to atherosclerosis40 and higher pulse pressure41, suggesting potential risks in certain metabolic conditions. The metabolic impact of such peaks in MMT remains unexplored. The metabolic and predictive value of the sharp and early glucose-insulin peaks will be better understood in the future.
In this study, RYGB resulted in a higher peak glucose-insulin response, larger AUC, and prolonged glucose levels above 7.0 mmol/l compared to OAGB, though both procedures showed similar peak timing and return to baseline. This difference was particularly evident in MMT post-surgery. While earlier non-randomized studies suggested a superior glucose profile after OAGB due to differences in bypassed intestine length42, randomized controlled trials (RCTs) with comparable anatomy have found RYGB and OAGB to be metabolically equivalent at 1- and 2-year follow-ups8,9. The RCT on the same data as in this study reports similar improvements in fasting glucose, HbA1c, and postprandial glucose and insulin AUCs in OGTT9 as well as comparable glycemic responses to carbohydrate intake measured by continuous glucose monitoring43. Our findings suggest that the more pronounced glucose-insulin peak in RYGB stems from its anatomical differences, where nutrients reach key gut areas more rapidly, leading to faster glucose absorption and a sharper insulin response compared to OAGB. This accelerated glycemic response may enhance early glucose control. In contrast, OAGB’s more gradual glucose absorption presents a smoother curve and may thus lower post-bariatric hypoglycemia risk, making it a preferable option for participants with preserved beta-cell function or milder metabolic disturbances. Although higher glycemic peaks in RYGB are linked to vascular risks like atherosclerosis and hypertension40,41, studies indicate better hypertension improvement and reduced antihypertensive medication use post-RYGB9. Given these dynamics, OAGB could, however, be a safer choice for individuals with a history of cardiovascular disease. Nonetheless, bariatric surgery remains a powerful metabolic intervention, providing substantial glycemic benefits regardless of the procedure44.
Men exhibited higher peak glucose in OGTT compared to women, higher peak glucose and insulin, and longer TiH post-operatively in both OGTT and MMT, suggesting a more unhealthy profile in obesity and after weight loss. Typically, women have lower fasting plasma glucose, higher 2-hour glucose, and greater increases in 2-hour glucose following OGTT than men, though HbA1c levels are reported to be comparable between sexes45. Insulin sensitivity is also generally better in women46. Research on obesity is sparse, with older studies indicating that men have higher peak glucose at 1 hour during OGTT, but women surpass them at 2-3 hours47. Recent data show that bariatric surgery leads to similar T2DM resolution between sexes, though only in men. AUC of insulin during OGTT predicts weight loss48,49. Previous studies have not compared OGTT and MMT responses before and after bariatric surgery and between sexes. We confirm a blunted glucose-insulin response in both sexes in obesity, an unhealthier glucose profile for men throughout the weight loss, and sex-related advantages with sharper and quicker glucose-insulin responses post-operatively in favor of women.
Bariatric surgery results in excellent rates of T2DM remission50, but its effects on postprandial glycemia between persons with or without T2DM are not yet well characterized. Some studies suggest less weight loss in persons with T2DM51 but do not assess postprandial glycemic response. In our study, individuals with T2DM lost more weight and showed better metabolic improvements but had higher glucose, lower insulin responses, and a flatter curve at all visits compared to non-diabetic individuals. This altered response reflects considerable changes in glucose and insulin dynamics in T2DM, warranting more individualized characterization of postprandial glycemic responses.
The strengths of this study include the standardized OGTT and MMT measurements on the same individuals undergoing bariatric surgery, with follow-up extending to 6th and 12th months. The used cohort and its subgroups are representative of a general population undergoing bariatric surgery9,24 making the results generalizable. The comparisons between RYGB and OAGB are from a randomized controlled trial designed to compare these procedures, using identical bypass limb lengths and equal stratification of participants by sex, age, and T2DM status. These factors enhance the reliability of comparisons. Additionally, the MMT’s extended follow-up period of 360 minutes is a unique strength of this study. Analyzing responses across time and in subgroups further improves relevance by identifying procedure-specific, sex-related, and diabetes-associated patterns. While a larger, more diverse cohort would allow finer subgroup analyses, this study still provides valuable insights. Future research with an expanded dataset across different ethnicities could validate these findings. It is also worth noting that OGTT and MMT were performed on consecutive days, which may introduce slight day-to-day variation.
Conclusions
Utilizing Hierarchical Multi-Output Gaussian Process (HMOGP) regression modeling to analyze postprandial OGTT and MMT responses presents an advanced approach to studying postprandial glucose-insulin responses in obesity and weight loss. The employed HMOGP regression is capable of estimating individual-level effects—the personalized treatment response—in addition to the effects at the population level while accounting for and correcting for measurement errors and thus improving accuracy in complex multivariate data. This method not only unveils differences between metabolic cohorts after bariatric surgery but also a differential response between the two operation types and sexes. This can lead to new knowledge in choosing the right treatments for participants and a more accurate modeling method for assessing OGTT and MMT responses in the clinic. Our study suggests that, based on postprandial glucose dynamics, RYGB may be favorable over OAGB in hyperglycemic patients without risk for hypoglycemia or vascular diseases, where OAGB could be preferred. Thus, HMOGP regression offers a versatile tool for investigating and predicting glycemic responses in metabolic conditions, paving the way for personalized interventions in metabolic health.
Data availability
Individual participant data are not directly available but may be available after the study closes upon reasonable request from the authors. According to the General Data Protection Regulation of the European Union (679/2016), the principles of data protection should apply to any information concerning an identified or identifiable natural person and that personal data which has undergone pseudonymization, which could be attributed to a natural person by the use of additional information, should be considered to be information on an identifiable natural person. Thus, according to the GDPR, all pseudonymized data is considered personal data and cannot be published openly. Therefore, we are bound to the law and to the strict hospital policies and are unable to share the data directly. However, the institutional (Helsinki and Uusimaa Hospital District) contact details for potential future data requests are as follows: https://huspalvelu.microsoftcrmportals.com/fi-FI/. The data used to generate the figures in this manuscript are provided as supplementary data.
Code availability
The full Stan code used for the analysis and modeling in this study is available at Poyraz52.
References
Zimmet, P., Magliano, D., Matsuzawa, Y., Alberti, G. & Shaw, J. The metabolic syndrome: a global public health problem and a new definition. J. Atheroscl. Thromb. 12, 295–300 (2005).
Guh, D. P. et al. The incidence of co-morbidities related to obesity and overweight: a systematic review and meta-analysis. BMC Public Health 9, 1–20 (2009).
Adams, T. D. et al. Health benefits of gastric bypass surgery after 6 years. Jama 308, 1122–1131 (2012).
Sjöström, L. Review of the key results from the swedish obese subjects (SOS) trial–a prospective controlled intervention study of bariatric surgery. J. Intern. Med. 273, 219–234 (2013).
Almalki, O. M. et al. Laparoscopic gastric bypass for the treatment of type 2 diabetes: a comparison of Roux-en-Y versus single anastomosis gastric bypass. Surg. Obes. Relat. Dis. 14, 509–515 (2018).
Magouliotis, D. E., Tasiopoulou, V. S. & Tzovaras, G. One anastomosis gastric bypass versus Roux-en-Y gastric bypass for morbid obesity: a meta-analysis. Clin. Obes. 8, 159–169 (2018).
Disse, E. et al. Greater weight loss with the omega loop bypass compared to the Roux-en-Y gastric bypass: a comparative study. Obes. Surg. 24, 841–846 (2014).
Robert, M. et al. Efficacy and safety of one anastomosis gastric bypass versus Roux-en-Y gastric bypass for obesity (yomega): a multicentre, randomised, open-label, non-inferiority trial. Lancet 393, 1299–1309 (2019).
Heinonen, S. et al. Roux-en-Y versus one-anastomosis gastric bypass (RYSA study): weight loss, metabolic improvements, and nutrition at 1 year after surgery, a multicenter randomized controlled trial. Obesity 31, 2909–2923 (2023).
Mauvais-Jarvis, F. Gender differences in glucose homeostasis and diabetes. Physiol. Behav. 187, 20–23 (2018).
Li, J., Huang, J., Zheng, L. & Li, X. Application of artificial intelligence in diabetes education and management: present status and promising prospect. Front. public health 8, 521222 (2020).
Erdős, Balázs et al. Personalized computational model quantifies heterogeneity in postprandial responses to oral glucose challenge. PLoS Comput. Biol. 17, e1008852 (2021).
Dalla Man, C., Rizza, R. A. & Cobelli, C. Meal simulation model of the glucose-insulin system. IEEE Trans. Biomed. Eng. 54, 1740–1749 (2007).
Zeevi, D. et al. Personalized nutrition by prediction of glycemic responses. Cell 163, 1079–1094 (2015).
Garrish, J., Chan, C., Nychka, D. & Diniz Behn, C. A Gaussian process model for insulin secretion reconstruction with uncertainty quantification: Applications in cystic fibrosis. SIAM J. Appl. Math. 84, S65–S81 (2024).
Park, S. & Choi, S. Hierarchical Gaussian process regression. In: Proceedings of 2nd Asian Conference on Machine Learning. 95–110. PMLR, JMLR Workshop and Conference Proceedings (2010).
Álvarez, M., Luengo, D., Titsias, M. & Lawrence, N. D. Efficient multioutput Gaussian processes through variational inducing kernels. In: Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics. 25–32. PMLR, JMLR Workshop and Conference Proceedings (2010).
Liu, H., Cai, J. & Ong, Y. S. Remarks on multi-output Gaussian process regression. Knowl.-Based Syst. 144, 102–121 (2018).
Moreno-Muñoz, P., Artés, A. & Alvarez, M. Heterogeneous multi-output Gaussian process prediction. NIPS'18: Proceedings of the 32nd International Conference on Neural Information Processing Systems. Vol. 31, Curran Associates, Inc. (2018).
Cho, W., Kim, Y. & Park, J. Hierarchical anomaly detection using a multioutput Gaussian process. IEEE Trans. Autom. Sci. Eng. 17, 261–272 (2019).
Li, P. & Chen, S. Hierarchical Gaussian processes model for multi-task learning. Pattern Recognit. 74, 134–144 (2018).
Ramírez, C. & Janyk, J. Hierarchical and Multiple Output Gaussian Process for the Analysis of Colombian Cellular Networks. https://hdl.handle.net/11059/5968 (Universidad Tecnológica de Pereira, 2015).
Williams, C. K. I. & Rasmussen, C. E. Gaussian Processes for Machine Learning Vol. 2. (MIT Press, Cambridge, MA, 2006).
Saarinen, T., Meriläinen, S., Koivukangas, V., Pietiläinen, K. H. & Juuti, A. Prospective randomized controlled trial comparing the efficacy and safety of Roux-en-Y gastric bypass and one-anastomosis gastric bypass (the RYSA trial): trial protocol and interim analysis. Trials 20, 1–10 (2019).
Heinonen, S. et al. Impaired mitochondrial biogenesis in adipose tissue in acquired obesity. Diabetes 64, 3135–3145 (2015).
MacKay, D.J. C. et al. Introduction to Gaussian processes. NATO ASI Ser. F. Comput. Syst. Sci. 168, 133–166 (1998).
Carpenter, B. et al. Stan: a probabilistic programming language. J. Stat. Software 76, 1 (2017).
Gelman, A. et al. Bayesian Data Analysis. 3rd edn. ISBN 9781439840955 (CreateSpace, United States, 2013).
Alvarez, M. A. & Lawrence, N. D. Computationally efficient convolved multiple output Gaussian processes. J. Mach. Learn. Res. 12, 1459–1500 (2011).
Cersosimo, E., Solis-Herrera, C., Trautmann, M. E., Malloy, J. & Triplitt, C. L. Assessment of pancreatic β-cell function: review of methods and clinical applications. Curr. Diab. Rev. 10, 2–42 (2014).
Ferrannini, E. & Mingrone, G. Impact of different bariatric surgical procedures on insulin action and β-cell function in type 2 diabetes. Diab. Care 32, 514 (2009).
Cummings, D. E., Overduin, J., Foster-Schubert, K. E. & Carlson, M. J. Role of the bypassed proximal intestine in the anti-diabetic effects of bariatric surgery. Surg. Obes. Relat. Dis. 3, 109–115 (2007).
Sandoval, D. A. & Patti, MaryElizabeth Glucose metabolism after bariatric surgery: implications for T2DM remission and hypoglycaemia. Nat. Rev. Endocrinol. 19, 164–176 (2023).
Cavin, J. B. et al. Differences in alimentary glucose absorption and intestinal disposal of blood glucose after Roux-en-Y gastric bypass vs sleeve gastrectomy. Gastroenterology 150, 454–464 (2016).
Akalestou, E. et al. Intravital imaging of islet Ca2+ dynamics reveals enhanced β cell connectivity after bariatric surgery in mice. Nat. Commun. 12, 5165 (2021).
Di Giuseppe, G. et al. First-phase insulin secretion: can its evaluation direct therapeutic approaches? Trends Endocrinol. Metab. 34, 216–230 (2023).
Tran, S., Kramer, C. K., Zinman, B., Choi, H. & Retnakaran, R. Effect of chronic liraglutide therapy and its withdrawal on time to postchallenge peak glucose in type 2 diabetes. Am. J. Physiol.-Endocrinol. Metab. 314, E287–E295 (2018).
Wang, X. et al. Delay in glucose peak time during the oral glucose tolerance test as an indicator of insulin resistance and insulin secretion in type 2 diabetes patients. J. Diab. Investig. 9, 1288–1295 (2018a).
Tura, A. et al. Shape of glucose, insulin, c-peptide curves during a 3-h oral glucose tolerance test: any relationship with the degree of glucose tolerance? Am. J. Physiol. Regul. Integr. Comp. Physiol. 300, R941–R948 (2011).
Temelkova-Kurktschiev, T. S. et al. Postchallenge plasma glucose and glycemic spikes are more strongly associated with atherosclerosis than fasting glucose or HbA1c level. Diab. Care 23, 1830–1834 (2000).
Anan, F. et al. Postchallenge plasma glucose and glycemic spikes are associated with pulse pressure in patients with impaired glucose tolerance and essential hypertension. Hypertens. Res. 31, 1565–1571 (2008).
Wang, F. G., Yan, W. M., Yan, M. & Song, M. M. Outcomes of mini vs Roux-en-Y gastric bypass: a meta-analysis and systematic review. Int. J. Surg. 56, 7–14 (2018b).
Ashrafi, R. A. et al. Computational modelling of self-reported dietary carbohydrate intake on glucose concentrations in patients undergoing Roux-en-Y gastric bypass versus one-anastomosis gastric bypass. Ann. Med. 53, 1885–1895 (2021).
Sinclair, P., Docherty, N. & le Roux, C. W. Metabolic effects of bariatric surgery. Clin. Chem. 64, 72–81 (2018).
Sicree, R. A. et al. Differences in height explain gender differences in the response to the oral glucose tolerance test–the AusDiab study. Diabet. Med. 25, 296–302 (2008).
Nuutila, P. et al. Gender and insulin sensitivity in the heart and in skeletal muscles: studies using positron emission tomography. Diabetes 44, 31–36 (1995).
Young, R. L., Fuchs, R. J., Woltjen, M. J. & Cooperman, M. T. Glucose-insulin response to oral glucose in a healthy obese population. Diabetes 28, 208–212 (1979).
Risi, R. et al. Sex difference in the safety and efficacy of bariatric procedures: a systematic review and meta-analysis. Surg. Obes. Relat. Dis. 18, 983–996 (2022).
Shu, J. et al. Sex dimorphism in the effect and predictors of weight loss after sleeve gastrectomy. Front. Endocrinol. 14, 1333051 (2024).
Courcoulas, A. P. et al. Long-term outcomes of medical management vs bariatric surgery in type 2 diabetes. JAMA 331, 654–664 (2024).
Rebelos, E., Moriconi, D., Honka, M.-J., Anselmino, M. & Nannipieri, M. Decreased weight loss following bariatric surgery in patients with type 2 diabetes. Obes. Surg. 33, 179–187 (2023).
Poyraz, O. onurpoyraz/hmogp: Hierarchical multi-output Gaussian process. https://doi.org/10.5281/zenodo.16945020 (2025).
Acknowledgements
The study was supported by the Research Council of Finland (272376, 266286, 314383, and 335443 to K.H.P., 314457 to A.J., 361956 and 338417 to S.H.), the Finnish Medical Foundation (K.H.P., S.H., and A.J.), the Finnish Diabetes Research Foundation (S.H. and K.H.P.), the Orion Foundation (S.H.), the Novo Nordisk Foundation (NNF10OC1013354, NNF17OC0027232, and NNF20OC0060547 to K.H.P. NNF23SA0083953 for S.H.), European Foundation for the Diabetes Research (S.H.), the Paulo Foundation (S.H.), the Gyllenberg Foundation (K.H.P.), Paavo Nurmi Foundation (S.H.), the Sigrid Juselius Foundation (K.H.P.), Helsinki University Hospital Research Funds (S.H., K.H.P., A.J.), Government Research Funds (K.H.P., S.H.), the Research Council of Finland (Flagship program: Finnish Center for Artificial Intelligence FCAI, and grants 352986, 358246 to P.M.) and EU (H2020 grant 101016775 and NextGenerationEU to P.M.). Additionally, we thank the participants for their invaluable time and effort. We also thank the study nurses, dieticians, and laboratory personnel for their help.
Author information
Authors and Affiliations
Contributions
Onur and Sini contributed equally to this work as lead authors. Onur designed and implemented the statistical models with assistance from S.T. Sini, who was primarily responsible for interpreting the clinical and biological meaning of the analysis, with support from Tuure and Anne on data collection and interpretation. Pekka and Kirsi jointly supervised the research. All authors contributed to editing the manuscript and suggested improvements.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Communications Medicine thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Poyraz, O., Heinonen, S., John, S.T. et al. Computational modeling enables individual assessment of postprandial glucose and insulin responses after bariatric surgery. Commun Med 5, 434 (2025). https://doi.org/10.1038/s43856-025-01155-4
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s43856-025-01155-4





