Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Sex-specific mediating effect of gestational weight gain between pre-pregnancy body mass index and gestational diabetes mellitus

## Abstract

### Background

Inappropriate weight gain may increase the risk of gestational diabetes mellitus (GDM). However, the relationship between pre-pregnancy body mass index (BMI), weight gain, and GDM has not been precisely quantified. This study aimed to explore whether gestational weight gain played a mediating role between pre-pregnancy BMI and GDM and whether the mediating effect was sex specific.

### Methods

This study established a population-based observational cohort to assess weight gain in pregnant women. Mediation analyses were performed to quantify whether weight gain mediated the association between pre-pregnancy BMI and GDM.

### Results

A total of 67,777 pregnant women were included in the final analysis, among whom 6751 (10.0%) were diagnosed with GDM. We verified that both pre-pregnancy BMI and weight gain were associated with GDM, and that BMI negatively contributed to weight gain. We also found that weight gain had a significant mediating effect on the relationship between pre-pregnancy BMI and GDM (Za×Zb confidence intervals [CIs] 0.00234–0.00618). Furthermore, the effect was sex-specific, in that it was only significant in overweight women carrying female fetuses (Za×Zb CIs 0.00422–0.01977), but not male fetuses (Za×Zb CIs −0.00085 to 0.01236).

### Conclusions

Weight gain during pregnancy had a fetal sex-specific mediating effect between pre-pregnancy BMI and GDM.

## Introduction

Gestational diabetes mellitus (GDM) is one of the most common endocrine and metabolic diseases, characterized by temporary hyperglycemia or glucose intolerance with onset or first recognition during pregnancy [1, 2]. It impairs the health of mothers and offspring and creates huge social, economic, and health burdens at both the population and individual levels [3, 4]. Although the prevalence of GDM varies widely due to demographic and diagnostic criteria differences [5], it continues to increase worldwide. In addition, maternal obesity and Asian ethnicity are established risk factors for GDM. A meta-analysis from East Asia and Southeast Asia showed that the prevalence of GDM in China was reported to be 11.91%, which was much higher than that of Japan, Korea, and Thailand [6]. In the past decade, many studies have focused on screening high-risk groups of and lifestyle interventions for GDM [7,8,9].

Furthermore, gestational weight gain (GWG) is an important part of prenatal examinations and is used to evaluate nutritional statuses during pregnancy [10]. The Institute of Medicine (IOM) developed GWG guidelines in 1990 and updated them in 2009 to guide clinical practice [11]. However, previous studies have used inconsistent definitions and have had different findings for GWG above typical guidelines as well as its associated GDM risk [12]. Currently, individuals may try to reduce GWG by improving the diet and exercise habits of women with obesity, with hopes of preventing GDM [13,14,15,16,17,18]. However, the relationship between pre-pregnancy body mass index (BMI), GWG, and GDM remains unclear [19]. Furthermore, differences in the risk of GDM in women carrying a male or female fetus exist [20, 21], though this association has not been adequately studied.

This study aimed to explore the influence of pre-pregnancy BMI and GWG on GDM as well as sex-specific effects that may exist.

## Methods

### Study design

This study established an observational cohort to monitor the weight of pregnant women from the beginning of pregnancy until the day of their GDM screening, typically between 24 and 28 gestational weeks. We analyzed the relationship between BMI and GWG as well as the risk of GDM. Potential confounding factors, including maternal age, multiparity, active smoking, education, and family history of diabetes, were adjusted for in the multivariable analysis.

### Population and data collection

This cohort included all singleton pregnant individuals aged 18–45 who were registered with the Tianjin Women and Child Health Care Network between January 1 and December 31, 2015. Pregnant women were excluded if they had: (1) been diagnosed with diabetes or primary hypertension before the current pregnancy, (2) had a hypertensive disease during pregnancy, (3) started prenatal care later than 13 weeks+6 days, or (4) terminated their pregnancies before 24 weeks+0 days (see Fig. 1).

Prenatal examination data were collected from the Tianjin Women and Children Health Care Network database, a government-administered public health system covering all communities in Tianjin, China and with antenatal care coverage rates of the local pregnant population exceeding 95%. At registration, each pregnant woman received a unique identification number that linked the antenatal care information recorded by different care providers. Basic information included date of birth, ethnicity, gravidity, parity, last menstrual period, history of chronic disease, family history of chronic and genetic diseases, and routine prenatal measurements and tests, such as height, weight, blood pressure, routine complete blood counts, urine test, blood glucose, liver, and kidney function at the first prenatal visit. Maternal weight, blood pressure, pregnancy complications, and medical treatments were continuously recorded. Antenatal care information was anonymized exported from the database, with only unique identification numbers used. The study was approved by the Ethics Committee for Clinical Research of Tianjin Women’s and Children’s Health Center. The need for written informed consent was waived due to this was retrospective analysis of data routinely collected from participants.

### Screening and diagnosis of gestational diabetes mellitus

All pregnant women were screened for diabetes between 24 and 28 weeks of gestation. After the publication of the 2010 International Association of Diabetes in Pregnancy Study Group (IADPSG) recommendations, our antenatal care system considered adopting the IADPSG criteria of interpreting the oral glucose tolerance test (OGTT) results. However, due to local conditions and an attempt at minimizing changes in public health management, the previous two-step testing method was maintained, which did not comply with the IADPSG one-step criteria [22]. In this study, a 50-g 1-h glucose-challenge test was used to screen pregnant women for diabetes at community hospitals. Women with plasma glucose (PG) ≥ 7.8 mmol/L were then referred to the Tianjin Women and Children’s Health Center for a 75 g OGTT. Participants were diagnosed with GDM and defined as the GDM group if their PG with a 75 g OGTT met one or more of the following criteria: (1) fasting PG ≥ 5.1 mmol/L, (2) 1-h PG ≥ 10.0 mmol/L, or (3) 2-h PG ≥ 8.5 mmol/L [1, 2]. Pregnant women whose PG did not reach these cutoff points were defined as the non-GDM group.

### Calculation of weight gain

GWG was defined as the difference between the final and baseline weights. Self-reported pre-pregnancy or measured weight in the first trimester is usually used to calculate pre-pregnancy BMI and GWG [11]. Although the accuracy of self-reported pre-pregnancy weight is uncertain, it can be easily collected or retrieved from medical records. In the present study, the mean differences between the two weight measurements were under 2 kg, which had little impact on BMI classification and GWG calculation [23]. Thus, it seemed to be a suitable choice to define the baseline weight. The final weight was measured on the day of diabetes screening tests that took place between 24 and 28 weeks of gestation. In addition, the gestational age of weight was adjusted for in the analysis.

BMI was calculated by dividing weight in kilograms by the square of height in meters. Participants were divided into four groups based on pre-pregnancy BMIs using the World Health Organization’s (WHO) BMI classification criteria: underweight (BMI < 18.5 kg/m2), normal weight (BMI 18.5–24.9 kg/m2), overweight (BMI 25.0–29.9 kg/m2), and obesity (BMI ≥ 30.0 kg/m2).

### Statistical analysis

IBM SPSS Statistics for Windows (Version 21.0. Armonk, NY: IBM Corp), R statistical software (R version 4.0.3, Comprehensive R Archive Network), and GraphPad Prism 8 (San Diego, CA: GraphPad Software) were used for data analysis and figure drawing. Normally distributed continuous variables were presented as means (standard deviations) and were compared between two groups using a t-test of independent samples. Moreover, non-normally distributed continuous variables were presented as medians (interquartile ranges), and an independent sample Mann–Whitney U test was performed to compare the two groups. Categorical variables were presented as frequencies (percentages) and were compared using the chi-square test. Restricted cubic spline (RCS) analysis was used in the logistic regression to assess nonlinear associations of BMI or weight gain with GDM, while linear regression analysis was performed to analyze the effects of pre-pregnancy BMI on GWG. Logistic regression analysis was performed to analyze the effects of BMI and GWG on GDM. A two-tailed P value of less than 0.05 was considered statistically significant, and multiple imputations were performed for missing values.

Furthermore, mediation analysis was conducted to determine whether GWG could mediate the relationship between pre-pregnancy BMI and GDM. Theoretically, if the independent variable X has a certain influence on the dependent variable Y through a certain variable M, then M plays a mediating role between variables X and Y and would therefore be the mediator. Mediation analysis can help explain mechanisms in the relationship between independent and dependent variables. In the most common mediation model, X, Y, and M are continuous variables. Using linear regressions, the mediation analysis equations were as follows:

$${{{\mathrm{Y}}}} = {{{\mathrm{cX}}}} + e_1$$
(1)
$${{{\mathrm{M}}}} = aX + e_2$$
(2)
$${{{\mathrm{Y}}}}^{\prime} = {{{\mathrm{c}}}}^{\prime} {{{\mathrm{X}}}} + {{{\mathrm{bM}}}} + e_3$$
(3)

c is the total effect of X on Y, a × b is the mediating effect through mediator M, and c’ is the direct effect. When only one mediator exists, c = c’+a × b. The mediating effect was measured using the equation c-c’ = a × b.

In this study, the dependent variable Y was GDM, the independent variable X was pre-pregnancy BMI, and the mediator M was GWG. Consequently, logistic regressions were used in place of the standard linear regression [24], where we applied the mediation model with X and M as continuous variables and Y as a binary variable with the following equations:

$${{{\mathrm{Y}}}}^{\prime} = i_4 + {{{\mathrm{cX}}}} + e_4$$
(4)
$${{{\mathrm{M}}}} = i_5 + aX + e_5$$
(5)
$$Y^{\prime\prime} = i_6 + {{{\mathrm{c}}}}^{\prime} {{{\mathrm{X}}}} + {{{\mathrm{bM}}}} + e_6$$
(6)
$$Y^{\prime} = LogitP\left( {Y = 1{{{\mathrm{|}}}}X} \right) = \ln \frac{{P\left( {Y = 1{{{\mathrm{|}}}}X} \right)}}{{P\left( {Y = 0{{{\mathrm{|}}}}X} \right)}}$$
(7)
$$Y^{\prime\prime} = LogitP\left( {Y = 1{{{\mathrm{|}}}}M,X} \right) = \ln \frac{{P\left( {Y = 1{{{\mathrm{|}}}}M,X} \right)}}{{P\left( {Y = 0{{{\mathrm{|}}}}M,X} \right)}}$$
(8)

As the dependent variable Y was binary, a logistic regression was adopted for Eqs. 4 and 6. The mediator M was continuous; therefore, linear regression was adopted in Eq. 5 [25, 26]. Here, the regression coefficient a came from the regression of the continuous variable M to X (the scale of the continuous variable), while regression coefficient b came from the regression of the binary dependent variable Y to M, X (the scale of logit). Therefore, the two regression coefficients were not on the same scale and were not comparable. For the regression coefficients to have the same scale, Lacobucci proposed the Sobel method [25]. A t-test was used to test the significance of regression coefficient a in the linear regression, and the tested statistic was t = a/SE(a). Typically, when sample sizes increase to more than 30 degrees of freedom, the t-test can be viewed as a z-test, which can be written as Za = a/SE (a). In the logistic regression, the significance of the regression coefficient b was tested using the Wald χ 2 test, and the test statistic was calculated as χ2 = b/SE(b)2. The square root of the test statistic is b/SE(b), which is the t-test statistic. When sample sizes increase to more than 30 degrees of freedom, Zb = b/SE(b). After the regression coefficients a and b were converted into Za and Zb, they were on the same scale. Therefore, the size of the mediating effect of this model with binary dependent variables was Za×Zb, and a significance test of the mediating effect was used to test the significance of Za×Zb. The statistics were calculated as follows:

$$Z = \frac{{Z_{a \times b}}}{{{{{\mathrm{SE}}}}(Z_{a \times b})}} = \frac{{Z_a \times Z_b}}{{SE(Z_{a \times b})}} = \frac{{Z_a \times Z_b}}{{\sqrt {Z_a^2 + Z_b^2 + 1} }}$$
(9)

MacKinnon and Cox suggested applying the distribution-of-the-product method to build confidence intervals (CIs) for the mediating effect. The RMediation software package with R software was automatically operated to obtain the asymmetric CIs of Za×Zb [27]. A significant mediating effect was defined as a CI that did not include zero (asymmetric interval).

## Results

### Population characteristics

A total of 67,777 pregnant women were included in this study (Fig. 1). Among them, 7055 (10.4%) were underweight, 45,880 (67.7%) were normal weight, 11,894 (17.5%) were overweight, and 2948 (4.3%) were obesity. Of the total participants, 6751 (10.0%) were diagnosed with GDM and defined as the GDM group, while 61,026 (90.0%) were defined as the non-GDM group. Compared to the non-GDM group, pregnant women in the GDM group were significantly older, had higher blood pressures (P < 0.001), had higher proportions of individuals with >12 years of education, higher levels of active smoking, family histories of diabetes, and higher proportions of carrying a male fetus (P < 0.05). Furthermore, these women had higher pre-pregnancy BMIs and lower levels of weight gain (P < 0.001) (Table 1).

### Relationship among pre-pregnancy body mass index, gestational weight gain, and gestational diabetes mellitus

#### Pre-pregnancy body mass index and gestational diabetes mellitus

In this study, RCS analysis was performed to verify the relationship between pre-pregnancy BMI and GDM. In general, the risk of GDM nonlinearity increased with an increase in BMI (nonlinear P < 0.001) (Supplementary Fig. 1A). However, subgroup analysis showed a linear relationship between BMI and GDM in each BMI category (all nonlinear P > 0.05) (Supplementary Fig. 1B). Logistic regression analysis confirmed that BMI significantly increased the risk of GDM when maternal BMI was ≥18.5 kg/m2 (BMI 18.5–24.9 kg/m2, OR 1.175, 95% CI 1.153–1.198, P < 0.001; BMI 25.0–29.9 kg/m2, OR 1.110, 95% CI 1.072–1.150, P < 0.001; BMI ≥ 30.0 kg/m2, OR 1.075, 95% CI 1.039–1.112, P < 0.001) (Supplementary Table 1).

#### Gestational weight gain and gestational diabetes mellitus

Logistic regression analysis showed that weight gain negatively contributed to GDM after adjusting for pre-pregnancy BMI and maternal age (OR 0.945, 95% CI 0.938–0.952, P < 0.001; AOR 0.983, 95% CI 0.976–0.991, P < 0.001) (Supplementary Table 2). The RCS curve of GWG and OR for GDM was inverse J-shaped (nonlinear P < 0.001) (Fig. 2A). However, after adjusting for pre-pregnancy BMI, GWG was negatively correlated with GDM (nonlinear P = 0.680) (Fig. 2B). Moreover, subgroup analysis showed a linear relationship between GWG and GDM in each BMI category (all nonlinear P > 0.05) (Supplementary Fig. 2). We further verified by logistic regression analysis that GWG had a significant negative effect on GDM when pre-pregnancy BMI was 18.5–24.9 kg/m2 (AOR 0.984, 95% CI 0.974–0.994, P = 0.002), and 25.0–29.9 kg/m2 (AOR 0.980, 95% CI 0.967–0.994, P = 0.004) (Supplementary Table 3).

#### Body mass index and gestational weight gain

Our previously noted results showed that pre-pregnancy BMI and GWG appeared to have opposite effects on GDM. We also investigated the influence of pre-pregnancy BMI on weight gain. GWG decreased with an increase in pre-pregnancy BMI in both the GDM and non-GDM groups (Fig. 3). GWG in the GDM group was lower than that in the non-GDM group. Therefore, we formulated a linear regression model with GWG as the dependent variable and pre-pregnancy BMI as the independent variable. Results showed that pre-pregnancy BMI negatively contributed to GWG (β = −0.239, 95% CI = −0.246 to −0.233, P < 0.001), which remained true after adjusting for confounding factors (β = −0.232, 95% CI = −0.239 to −0.225, P < 0.001) (Table 2).

### Mediating effect analysis

Pre-pregnancy BMI, GWG, and GDM are known to be interrelated. Therefore, we explored whether GWG played a mediating role in the association between BMI and GDM. Table 3 shows that GWG had a significant mediating effect on BMI and GDM (Za×Zb CIs 0.00243–0.00618) (Supplementary Fig. 3). In the analysis of different BMI categories, no significant mediating effects were noted in the BMI < 18.5 kg/m2 or BMI ≥ 30.0 kg/m2 groups. In addition, the effect size of the BMI 18.5–24.9 kg/m2 category was greater than that in the BMI 25.0–29.9 kg/m2 category (Za×Zb 67.20 vs. 48.41).

### Fetal sex specificity

As shown in Table 1, differences in the distribution of fetal sex between the GDM and non-GDM groups were noted. Logistic analysis showed that, compared with carrying a female fetus, carrying a male fetus was an independent risk factor for the development of GDM (OR 1.055, 95% CI 1.003–1.109, P = 0.038). In addition, in comparing weight gain, we found that mothers carrying female fetuses gained less weight than those carrying male fetuses, especially if pre-pregnancy BMI was greater than 25.0 kg/m2 (Supplementary Table 4). Subgroup analysis showed that this difference was mainly observed in the non-GDM group and was not significant in the GDM group (Supplemental Table 4).

A mediating effect was also observed in the subgroup analysis of fetal sex. Table 3 shows that the effect size in women carrying a female fetus was greater than that in women carrying a male fetus (Za×Zb 189.24 vs. 165.60). Notably, in the BMI 25.0–29.9 kg/m2 category, the mediating effect was only observed in women carrying a female fetus (Za × Zb CIs 0.00422 to 0.01977) and not in those carrying a male fetus (Za × Zb CIs −0.00085 to 0.01236). In contrast, in the BMI 18.5–24.9 kg/m2 category, the effect size in women with male fetuses was greater than that in those with female fetuses (Za × Zb 40.50 vs. 26.92). Our results indicated that the mediating effect of weight gain during pregnancy was sex-specific.

## Discussion

Weight gain during pregnancy is considered an indicator of the accumulation of maternal fat, expansion of body fluids, and growth of the breast, uterus, placenta, and fetus. It is closely associated with nutritional intake, physical exercise, and other metabolic conditions during pregnancy [28], and is therefore regarded as an important health monitoring item in pregnancy care [29]. Managing weight gain may prevent GDM in pregnant women with obesity [30, 31]. Weight gain is also widely used to evaluate the effects of lifestyle interventions [32,33,34,35]. However, the role of weight gain in GDM has not been fully understood [19].

In this study, RCS analysis showed a negative correlation between weight gain and the risk of GDM. Additionally, we confirmed that pre-pregnancy BMI can increase the risk of GDM, which is consistent with previous studies [22]. Therefore, we focused on the influence of pre-pregnancy BMI on GWG. Linear regression models demonstrated that weight gain decreased significantly as pre-pregnancy BMI increased. Our findings demonstrated a complex relationship between BMI, GWG, and GDM.

Mediation analysis confirmed a significant mediating effect of GWG on pre-pregnancy BMI and GDM. Furthermore, subgroup analysis revealed that this mediating effect existed only in normal weight and overweight pregnant women, with the effect size being greater in the normal weight group. This may be due to weight gain decreases with higher pre-pregnancy BMI. Normal weight women may have gained more weight than those that were overweight, making the mediating effect more obvious.

Furthermore, we confirmed that differences existed in fetal sex subgroup analysis. Weight gain in women carrying female fetuses showed a more powerful mediating effect than that in women carrying male fetuses in the overweight group. This phenomenon may follow sex-specific programming theory. Based on the fetal origin hypothesis, female fetuses make more adaptive changes in utero than male fetuses in response to maternal metabolic disturbance [36]. The intrauterine environment of overweight pregnant women is characterized by overnutrition, and female fetuses may actively reduce their weight gain, which may help maintain maternal and metabolic homeostasis.

These results suggest that weight gain may be a good predictor of GDM and can be used to evaluate the effectiveness of preventive measures in normal weight and overweight women. In addition, weight evaluation may be more effective for women carrying female fetuses than for those carrying male fetuses.

### Strengths and limitations

This study was based on a government-administered health care system that covered all community populations in Tianjin, China. Data acquisition and quality control were monitored at multiple levels, which made the data representative and objective. In addition, a sufficient number of underweight women were included in this study. Therefore, the results could be a meaningful supplement to the IOM guidelines. BMI was categorized according to the WHO classification, which may make the conclusions applicable to and a reference for populations outside of Asia. However, the potential weaknesses of this study are worth considering. All pregnant women were from China, and the sample size of the obesity group was relatively small, which may have resulted in insignificant mediating effects in women with obesity.

## Data availability

The datasets analyzed during this study are available from the corresponding author on reasonable request.

## References

1. International Association of Diabetes and Pregnancy Study Groups Consensus Panel, Metzger BE, Gabbe SG, Persson B, Buchanan TA, Catalano PA, et al. International association of diabetes and pregnancy study groups recommendations on the diagnosis and classification of hyperglycemia in pregnancy. Diabetes Care. 2010;33:676–82.

2. American Diabetes Association. Diagnosis and classification of diabetes mellitus. Diabetes Care. 2014;37(Suppl 1):S81–90.

3. Page KA, Luo S, Wang X, Chow T, Alves J, Buchanan TA, et al. Children exposed to maternal obesity or gestational diabetes mellitus during early fetal development have hypothalamic alterations that predict future weight gain. Diabetes Care. 2019;42:1473–80.

4. Waters TP, Dyer AR, Scholtens DM, Dooley SL, Herer E, Lowe LP, et al. Maternal and neonatal morbidity for women who would be added to the diagnosis of GDM using IADPSG criteria: a secondary analysis of the hyperglycemia and adverse pregnancy outcome study. Diabetes Care. 2016;39:2204–10.

5. He Z, Xie H, Liang S, Tang Y, Ding W, Wu Y, et al. Influence of different diagnostic criteria on gestational diabetes mellitus incidence and medical expenditures in China. J Diabetes Investig. 2019;10:1347–57.

6. Nguyen CL, Pham NM, Binns CW, Duong DV, Lee AH. Prevalence of gestational diabetes mellitus in eastern and Southeastern Asia: a systematic review and meta-analysis. J Diabetes Res. 2018;2018:6536974.

7. Gao C, Sun X, Lu L, Liu F, Yuan J. Prevalence of gestational diabetes mellitus in mainland China: a systematic review and meta-analysis. J Diabetes Investig. 2019;10:154–62.

8. Wu L, Han L, Zhan Y, Cui L, Chen W, Ma L, et al. Prevalence of gestational diabetes mellitus and associated risk factors in pregnant Chinese women: a cross-sectional study in Huangdao, Qingdao, China. Asia Pac J Clin Nutr. 2018;27:383–8.

9. Zhu WW, Yang HX, Wei YM, Yan J, Wang ZL, Li XL, et al. Evaluation of the value of fasting plasma glucose in the first prenatal visit to diagnose gestational diabetes mellitus in China. Diabetes Care. 2013;36:586–90.

10. Barnes RA, Wong T, Ross GP, Griffiths MM, Smart CE, Collins CE, et al. Excessive weight gain before and during gestational diabetes mellitus management: what is the impact? Diabetes Care. 2020;43:74–81.

11. Rasmussen KM, Yaktine AL, editors. Institute of Medicine (US) and National Research Council (US) Committee to Reexamine IOM Pregnancy Weight Guidelines. Weight Gain During Pregnancy: Reexamining the Guidelines. Washington (DC): National Academies Press (US); 2009.

12. Goldstein RF, Abell SK, Ranasinha S, Misso M, Boyle JA, Black MH, et al. Association of gestational weight gain with maternal and infant outcomes: a systematic review and meta-analysis. J Am Med Assoc. 2017;317:2207–25.

13. Silva-Zolezzi I, Samuel TM, Spieldenner J. Maternal nutrition: opportunities in the prevention of gestational diabetes. Nutr Rev. 2017;75:32–50.

14. Looman M, Geelen A, Samlal RAK, Heijligenberg R, Klein Gunnewiek JMT, Balvers MGJ, et al. Changes in micronutrient intake and status, diet quality and glucose tolerance from preconception to the second trimester of pregnancy. Nutrients. 2019;11:460.

15. Fernandez-Twinn DS, Gascoin G, Musial B, Carr S, Duque-Guimaraes D, Blackmore HL, et al. Exercise rescues obese mothers’ insulin sensitivity, placental hypoxia and male offspring insulin sensitivity. Sci Rep. 2017;7:44650.

16. Woodside A, Bradford H. Exercise and the prevention of gestational diabetes mellitus. Nurs Women’s Health. 2021;25:304–11.

17. Vasan SK, Jobe M, Mathews J, Cole F, Rathore S, Jarjou O, et al. Pregnancy-related interventions in mothers at risk for gestational diabetes in Asian India and low and middle-income countries (PRIMORDIAL study): protocol for a randomised controlled trial. BMJ Open. 2021;11:e042069.

18. Bennett CJ, Walker RE, Blumfield ML, Gwini SM, Ma J, Wang F, et al. Interventions designed to reduce excessive gestational weight gain can reduce the incidence of gestational diabetes mellitus: a systematic review and meta-analysis of randomised controlled trials. Diabetes Res Clin Pract. 2018;141:69–79.

19. Redman LM, Drews KL, Klein S, Horn LV, Wing RR, Pi-Sunyer X, et al. Attenuated early pregnancy weight gain by prenatal lifestyle interventions does not prevent gestational diabetes in the LIFE-Moms consortium. Diabetes Res Clin Pract. 2021;171:108549.

20. Jaskolka D, Retnakaran R, Zinman B, Kramer CK. Sex of the baby and risk of gestational diabetes mellitus in the mother: a systematic review and meta-analysis. Diabetologia. 2015;58:2469–75.

21. Retnakaran R, Shah BR. Fetal sex and the natural history of maternal risk of diabetes during and after pregnancy. J Clin Endocrinol Metab. 2015;100:2574–80.

22. Leng J, Shao P, Zhang C, Tian H, Zhang F, Zhang S, et al. Prevalence of gestational diabetes mellitus and its risk factors in Chinese pregnant women: a prospective population-based study in Tianjin, China. PLoS ONE. 2015;10:e0121029.

23. Rangel Bousquet Carrilho T, Rasmussen KathleenM, Rodrigues Farias D, Freitas Costa NC, Araujo Batalha M, Reichenheim MichaelE, et al. Agreement between self-reported pre-pregnancy weight and measured first-trimester weight in Brazilian women. BMC Pregnancy Childbirth. 2020;20:734.

24. Fang J, Wen Z, Zhang M. [Mediation analysis of categorical variables]. J Psychological Sci. 2017;40:471–7.

25. Mackinnon DP, Cox MC. Commentary on “Mediation Analysis and Categorical Variables: The Final Frontier” by Dawn Iacobucci. J Consum Psychol. 2012;22:600–2.

26. MacKinnon DP, Lockwood CM, Brown CH, Wang W, Hoffman JM. The intermediate endpoint effect in logistic and probit regression. Clin Trials. 2007;4:499–513.

27. Tofighi D, MacKinnon DP. RMediation: an R package for mediation analysis confidence intervals. Behav Res Methods. 2011;43:692–700.

28. Parrettini S, Caroli A, Torlone E. Nutrition and metabolic adaptations in physiological and complicated pregnancy: focus on obesity and gestational diabetes. Front Endocrinol. 2020;11:611929.

29. Bogdanet D, Mustafa M, Khattak A, Shea PMO, Dunne FP. Atlantic DIP: is weight gain less than that recommended by IOM safe in obese women with gestational diabetes mellitus? Int J Obes. 2021;45:1044–51.

30. Robitaille J. Excessive gestational weight gain and gestational diabetes: importance of the first weeks of pregnancy. Diabetologia. 2015;58:2203–5.

31. Muhammad HFL, Pramono A, Rahman MN. The safety and efficacy of supervised exercise on pregnant women with overweight/obesity: a systematic review and meta-analysis of randomized controlled trials. Clin Obes. 2021;11:e12428.

32. Almeida VAH, Costa RAD, Paganoti CF, Mikami FC, Sousa A, Peres SV, et al. Diet quality indices and physical activity levels associated with adequacy of gestational weight gain in pregnant women with gestational diabetes mellitus. Nutrients. 2021;13:1842.

33. Cantor AG, Jungbauer RM, McDonagh M, Blazina I, Marshall NE, Weeks C, et al. Counseling and behavioral interventions for healthy weight and weight gain in pregnancy: evidence report and systematic review for the US preventive services task force. J Am Med Assoc. 2021;325:2094–109.

34. Schoenaker D, de Jersey S, Willcox J, Francois ME, Wilkinson S. Prevention of gestational diabetes: the role of dietary intake, physical activity, and weight before, during, and between pregnancies. Semin Reprod Med. 2020;38:352–65.

35. Ehrlich SF, Ferrara A, Hedderson MM, Feng J, Neugebauer R. Exercise during the first trimester of pregnancy and the risks of abnormal screening and gestational diabetes mellitus. Diabetes Care. 2021;44:425–32.

36. Cheong JN, Wlodek ME, Moritz KM, Cuffe JS. Programming of maternal and offspring disease: impact of growth restriction, fetal sex and transmission across generations. J Physiol. 2016;594:4727–40.

## Acknowledgements

The authors sincerely thank the obstetricians and nurses in the community hospitals involved in the information collection of this study.

## Funding

This study was funded by the National Key Research and Development Program of China (grant numbers 2018YFC1314000, 2018YFC1313900, and 2018YFC1313903) and the National Nature Science Foundation of China (grant numbers 81774043, 82074253, and 81703247). This work was also supported by the National Center for Women and Children’s Health, China CDC (grant number: 2019FYH012), and Tianjin Key Medical Discipline (Specialty) Construction. The funding agency had no role in study design, data collection, and analysis, the decision to publish, or the preparation of the manuscript.

## Author information

Authors

### Contributions

SZ, JW, and FX contributed equally to this work and shared first authorship. BCC and HZ contributed equally to this work and shared the corresponding authorship. SZ, HZ, and BCC conceived of and designed the study. BCC, HZ, and JHL supervised this study. SZ, YZQ, and HZ performed statistical analyses. JHL, NL, and JG contributed to data acquisition and interpretation as well as data quality control. FX, JYW, XCL, ZAG, and XFS contributed to the creation of the tables and figures, and data verification. HG contributed to the review of obstetric professional standards and clinical indications as well as the consideration of clinical application value. SZ drafted the manuscript. All authors contributed to the acquisition, analysis, and interpretation of the data and approved the final version before submission.

### Corresponding authors

Correspondence to Baocheng Chang or Hong Zhu.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Zhang, S., Wang, J., Xu, F. et al. Sex-specific mediating effect of gestational weight gain between pre-pregnancy body mass index and gestational diabetes mellitus. Nutr. Diabetes 12, 25 (2022). https://doi.org/10.1038/s41387-022-00203-5