Introduction

Inflammatory bowel disease (IBD), including Crohn’s disease (CD) and ulcerative colitis (UC), is estimated to affect around 7 million people worldwide1. The disease typically begins in early adulthood, but recently, an increasing number of children are being diagnosed2. This concerning trend toward earlier disease onset underscores the need for early prevention, as IBD with pediatric onset is often more severe3 and may result in linear growth failure, delayed puberty, and impaired psychosocial functioning4,5. Meanwhile, the prevalence of both pediatric- and adult-onset IBD has steadily been rising on a global perspective, particularly in newly industrialized countries2,6, suggesting that a Western lifestyle contributes to the disease development7,8, possibly with influence already in early life9.

According to the Developmental Origins of Health and Disease theory, early life exposures have a significant impact on long-term health10,11. This concept was first proposed by Barker et al. in 1989 after observing a link between low birth weight and death from coronary heart disease12, which led to the hypothesis that in-utero undernutrition affects disease susceptibility later in life through its influence on fetal growth13. Since then, a growing body of evidence suggests a role of maternal diet during pregnancy in offspring’s disease development, including cardiovascular disease, cancer, and allergies14,15. Likewise, maternal diet during pregnancy may contribute to offspring’s IBD risk by inducing pathological changes similar to those observed in the preclinical phase of the disease16, as shown by experimental studies with pregnant mice and their offspring17. For instance, maternal high-fat diets have consistently been found to increase offspring’s intestinal inflammation and permeability, with release of pro-inflammatory cytokines, gut microbiota dysbiosis, and enhanced susceptibility to experimental colitis18,19,20,21. In contrast, the opposite effects have been observed with maternal high-fiber diets22,23,24. Furthermore, a high-sugar/high-fat diet, mimicking a classical Western diet, increased offspring’s susceptibility to CD-like colitis characterized by severe intestinal inflammation and higher histopathological scores25. However, human studies confirming these findings are scarce26,27.

Because the human diet is inherently more complex, focusing only on individual nutrients or foods has some conceptual limitations. People do not consume nutrients in isolation, but rather meals composed of different foods with diverse nutritional profiles, which may interact and influence health outcomes synergistically28. Dietary pattern analysis addresses this complexity by capturing overall intake, thereby accounting for the collinearity between dietary components and providing a more realistic depiction of habitual eating patterns28. Several dietary pattern analysis methods exist, usually divided into a priori (hypothesis-driven), a posteriori (data-driven), and hybrid approaches. Cluster analysis is an a posteriori approach that empirically derives dietary patterns by separating the study population into clusters based on similarities in their diets29. Thus, naturally occurring dietary patterns in the data can be identified and compared regarding offspring’s disease risk, which may lay the foundation for future research exploring the specific food groups that drive these associations.

Therefore, the present study aim to characterize maternal a posteriori dietary patterns during pregnancy using k-means cluster analysis and to explore their associations with pediatric-onset IBD risk in the offspring. Utilizing data from the unique large-scale nationwide Danish National Birth Cohort (DNBC), we link detailed maternal dietary information collected in the second trimester of pregnancy with long-term data on their children obtained from the Danish National Patient Registry. Among the 56,097 mother-child pairs analyzed, we identify five distinct maternal dietary patterns during pregnancy: diverse, non-recommended, Mediterranean, animal-based, and Western. In this study, we show that compared to a Western dietary pattern, maternal adherence to a diverse dietary pattern during pregnancy is associated with a lower risk of pediatric-onset IBD in offspring, whereas no significant associations are observed for the remaining dietary patterns.

Methods

Study design and population

This prospective cohort study encompasses data from the DNBC, an ongoing study of early life exposures and their long-term effects on disease susceptibility30. Between January 1996 and October 2002, general practitioners across Denmark invited mothers to enroll in the DNBC at their first pregnancy visit, which usually takes place around gestational weeks 6 to 1230. All Danish-speaking mothers in Denmark, who became pregnant during the recruitment period and wished to carry to term, were eligible for inclusion30.

Methods for data collection in the DNBC have been previously described30,31. In short, information on maternal and offspring exposures was collected through computer-assisted telephone interviews in gestational weeks 12 and 30, as well as 6 and 18 months post-delivery. In addition, a validated semi-quantitative food frequency questionnaire was mailed to the mothers in gestational week 25 to assess their diets during the previous four weeks32,33. This time frame was chosen because maternal dietary habits are more stable in the second trimester compared to earlier in the pregnancy period31.

By October 2002, the DNBC had enrolled 101,042 mothers, corresponding to approximately 60% of those who were invited30. The enrolled mothers and their children were then followed long-term by linkage with the Danish National Patient Registry through their civil registration numbers. Our study included all singleton mother-child pairs from the DNBC, where the mother fully responded to the food frequency questionnaire with realistic self-reported energy intakes (>2500 kJ/day to <25,000 kJ/day). Mother-child pairs, where the child’s information was missing from the patient registry, were excluded.

Dietary pattern analysis

The food frequency questionnaire assessed the maternal frequency of consumption for ~360 food items. Reported frequencies were converted into times/day and multiplied by standard portion sizes to estimate daily food intakes (servings/day)31. Energy intake was previously calculated by combining estimated food intakes with national food composition tables34, accounting for loss of fat, water, vitamins, and minerals during food preparation31. Furthermore, food intakes were translated into the intake of 37 food groups using standard classifications34 (Supplementary Table 1) and scaled by z-score normalization to make them comparable.

Maternal dietary patterns derived from the scaled food group intakes with k-means cluster analysis using the R-package ‘cluster’35. This method grouped mother-child pairs into n mutually exclusive clusters based on maternal intake of the 37 food groups, where n = the optimal number of clusters. The optimal number of clusters was determined using the Elbow method, which identified the point where additional clusters no longer improved the within-cluster homogeneity36. Clusters were internally validated by re-running the algorithm with a different number of initial seeds, showing consistently produced stable cluster centroids.

Thereby, each mother-child pair was assigned to a single cluster based on maternal dietary patterns. For each cluster, the mean scaled food group intakes (cluster centroids) were visualized in a spider plot to identify and name the dietary pattern that defined the mothers belonging to the specific cluster. Dietary patterns were named based on the predominant food groups consumed within each cluster, aiming to use terminology consistent with previous studies to facilitate comparison and communication of the results37,38,39.

Outcome

Children with pediatric-onset IBD, defined as ≤18 years of age at the time of their diagnosis40, were identified by linkage with medical data in the National Patient Registry through their civil registration numbers. Positive cases were defined as at least two IBD hospital contacts within two years, consisting of inpatient contacts only or a combination of inpatient and outpatient contacts41. The date of diagnosis was defined as the date of the first contact. Danish versions of ICD-10 codes associated with the contacts determined the disease subtype (CD ICD-10 code: DK50; UC ICD-10 code: DK51). If both CD and UC were recorded, the disease subtype was classified as CD41.

Covariates

To describe the study population, we retrieved information on maternal, paternal, and child characteristics from DNBC telephone interviews and the National Patient Registry. The following variables were assessed in the telephone interviews: maternal pre-pregnancy body mass index (kg/m2), maternal alcohol intake in second trimester (yes/no), maternal smoking in second trimester (yes/no), maternal nutritional supplement use in second trimester (yes/no), child’s exclusive breastfeeding duration and any breastfeeding duration (days, truncated at 180 days), and maternal educational level (primary/secondary or post-secondary/tertiary). Maternal educational level follows definitions by the International Standard Classification of Education42, where levels 0–2 reflect primary education, levels 3–4 reflect secondary and post-secondary education, and levels 5–8 reflect tertiary education. The following variables were retrieved from the National Patient Registry: maternal age at childbirth (years), maternal or paternal IBD diagnosis (yes/no), maternal antibiotics use in pregnancy (0 courses/1–2 courses/≥3 courses), child’s antibiotics use in the first year of life (yes/no), child’s sex (boy/girl), delivery mode (vaginal/cesarean), and preterm delivery (yes/no). In addition, we also evaluated maternal diet quality during pregnancy using the Healthy Eating Index, which was previously developed within the DNBC based on maternal adherence to Danish official dietary recommendations43.

Statistical analyses

R was used for all statistical analyses with a significance level of p<0.05. Characteristics of mothers and their children were described according to clusters of maternal dietary patterns. Data with fewer than 10 observations were presented as <10 to comply with General Data Protection Regulation guidelines and protect individual privacy. Continuous variables were expressed as medians and interquartile range (IQR), and categorical variables were expressed as counts with corresponding percentages. Depending on the data type, Kruskal-Wallis or X2 tests compared the maternal and offspring characteristics across the clusters of maternal dietary patterns.

Pediatric-onset IBD was ascertained from the date of birth to the date of diagnosis, death, emigration, or 18th birthday, whichever occurred first. Cox proportional hazards model estimated the offspring’s risk of pediatric-onset IBD associated with maternal dietary patterns, using the most common pattern as reference. Furthermore, associations were explored separately for the two IBD subtypes, CD and UC. The proportional hazards assumption was tested for violation using the Schoenfeld residuals test, and none of the analyses violated this assumption (all p>0.05).

Results were presented as hazard ratios with corresponding 95% confidence intervals before and after adjusting for covariates. The adjusted analyses included the following covariates, which were selected a priori based on knowledge about diet-related risk factors for IBD: maternal educational level, pre-pregnancy body mass index, smoking during pregnancy, nutritional supplement use during pregnancy, antibiotic use during pregnancy, energy intake during pregnancy, and parental IBD diagnosis. Another model further adjusted for offspring’s antibiotics use during the first life year. Those with missing covariate data were excluded, and their proportion was reported in the results section (Fig. 1).

Fig. 1: Flow diagram of the study population selection.
Fig. 1: Flow diagram of the study population selection.The alternative text for this image may have been generated using AI.
Full size image

‘Incomplete food data’ refers to incomplete responses to the food frequency questionnaire. DNBC Danish National Birth Cohort, GP general practitioner, IBD inflammatory bowel disease, NPR National Patient Registry.

Ethical approval

The DNBC was approved by the National Committee on Health Research Ethics in Denmark (ref. no. [KF] 01-471/94) and conducted according to the guidelines of the Declaration of Helsinki. All participants gave written informed consent at enrollment on behalf of themselves and their unborn child, thereby giving permission for researchers to use their information in medical records and registers for long-term follow-up. The register data are protected by the Danish Act on Processing of Personal Data and are accessed through application to and approval from the Danish Data Protection Agency and the Danish Health Data Authority. The Center for Molecular Prediction of Inflammatory Bowel Disease (PREDICT) has got ethical approval to work on the data by The Danish Council on Ethics (H-20048987). No new ethical approval was needed to conduct the current study, but authorization to use the DNBC data was sought and approved by the DNBC Reference Group.

Patient and public involvement

This study was based on historical data. However, the Danish Colitis-Crohn Association (CCF) was consulted regarding the relevance of the study. They found it to be highly relevant and have expressed their support for the project.

Results

Mother–child pairs

The DNBC enrolled 96,817 liveborn mother-child pairs, of which 40,720 were excluded from our analyses for reasons detailed in Fig. 1. Baseline characteristics of the included and excluded populations are presented in Supplementary Table 2. Accordingly, the final study population consisted of 56,097 mother–child pairs. By the age of 18 years, 161 children (0.29%) had developed pediatric-onset IBD, with a median (IQR) age at diagnosis of 15.0 (13.0–17.0) years. Among these, 89 children (0.16%) were diagnosed with pediatric-onset CD, and 72 (0.13%) with pediatric-onset UC. Kaplan-Meier curves illustrating cumulative incidence rates are presented in Supplementary Fig. 1.

Table 1 outlines the study population’s characteristics. At childbirth, the mothers had a median (IQR) age of 30.0 (27.0–33.0) years. Their median (IQR) diet quality score was 22.2 (17.8–27.1), and their median (IQR) daily energy intake was 9831 (8277–11,616) kJ/day. Regarding educational attainment, 48.6% had tertiary education. During pregnancy, 50.7% drank alcohol, 15.9% smoked, 97.9% used nutritional supplements, and 29.9% used antibiotics at least once. Among the children, 3.6% were born preterm, 41.4% received at least one course of antibiotics during the first year of life, and 1.2% had a parent diagnosed with IBD.

Table 1 Characteristics of the study population according to maternal dietary patterns during pregnancya

Maternal dietary patterns during pregnancy

K-means cluster analysis identified five different clusters of maternal dietary patterns during pregnancy (Fig. 2, Supplementary Table 3). Cluster 1 (n = 8388) had a diverse dietary pattern with high intakes of most food groups, including meat, fish, vegetables, legumes, fruits, potatoes, and desserts. Cluster 2 (n = 14,110) had a non-recommended dietary pattern with below-average intakes of most food groups. Cluster 3 (n = 14,700) was characterized as following a Mediterranean dietary pattern due to their above-average intakes of whole grain products, cheese, fermented dairy, fruits, vegetables, and fish. Cluster 4 (n = 3808) had an animal-based dietary pattern composed of most animal-based foods, although they also consumed other food groups, such as whole grain products and soft drinks with sugar. Cluster 5 (n = 15,091) was characterized as following a Western dietary pattern with high intakes of processed meat, refined grain products, snacks, candies, chocolate, potatoes, pizzas, burgers, and sugar-free soft drinks. This dietary pattern was also the most common and was therefore used as the reference in further analyses.

Fig. 2: Spider plot of the five maternal dietary patterns identified with k-means cluster analysis (Diverse = 8388; Non-recommended = 14,110; Mediterranean = 14,700; Animal-based = 3808; Western = 15,091).
Fig. 2: Spider plot of the five maternal dietary patterns identified with k-means cluster analysis (Diverse = 8388; Non-recommended = 14,110; Mediterranean = 14,700; Animal-based = 3808; Western = 15,091).The alternative text for this image may have been generated using AI.
Full size image

The values represent z-score normalized daily intakes of 37 food groups across the five clusters.

Compared to mothers with a Western dietary pattern (Table 1), those following diverse, Mediterranean, or animal-based dietary patterns were older at childbirth, had a higher educational level, higher diet quality, and lower body mass index. Mothers with a Mediterranean dietary pattern also smoked less (8.5% versus 20.4%) and their children had a lower antibiotic use during early life (36.2% versus 45.0%) compared to mothers with a Western dietary pattern. Mothers with a diverse dietary pattern had the highest intake of all macronutrients, except added sugar, compared to mothers with other dietary patterns. Conversely, mothers with a non-recommended dietary pattern had the lowest intake of energy and all macronutrients compared to mothers with other dietary patterns (Table 2).

Table 2 Macronutrient intake according to maternal dietary patterns during pregnancya

Maternal dietary patterns and offspring’s risk of pediatric-onset inflammatory bowel disease

A maternal diverse dietary pattern during pregnancy was associated with a 45% lower risk of pediatric-onset IBD in offspring compared to a Western dietary pattern (adjusted hazard ratio: 0.55; 95% confidence interval: 0.31–0.97). Analyzing the two IBD subtypes separately showed a non-significant lower risk of both pediatric-onset CD (adjusted hazard ratio: 0.67; 95% confidence interval: 0.31–1.45) and pediatric-onset UC (adjusted hazard ratio: 0.44; 95% confidence interval: 0.19–1.03). Furthermore, compared to a Western dietary pattern, the other three dietary patterns showed no significant association with the risk of pediatric-onset IBD in offspring, including separate analyses for CD and UC (Table 3). Additionally adjusting for offspring’s antibiotics use during the first year of life had no impact on the results (Supplementary Table 4).

Table 3 Maternal dietary patterns during pregnancy and risk of pediatric-onset inflammatory bowel disease in the offspringa

Discussion

In this extensive nationwide prospective cohort study of 56,097 mother-child pairs followed over 18 years, we demonstrated that a maternal diverse dietary pattern, compared to a Western dietary pattern, during pregnancy was associated with a 45% lower risk of pediatric-onset IBD in the offspring. This association was found for both pediatric-onset CD and UC when analyzing these disease subtypes separately, but neither were statistically significant. Other dietary patterns (Mediterranean, animal-based, and non-recommended) during pregnancy did not show significant associations with offspring’s risk of pediatric-onset IBD, CD, or UC compared to a Western dietary pattern.

Our findings support previous results from animal studies suggesting that maternal diet during pregnancy may influence offspring’s IBD susceptibility through effects on intestinal development, microbiota, permeability, and inflammatory response17,18,19,20,21,22,23,24,25. A recent birth cohort study from Norway similarly reported that higher diet diversity scores during pregnancy were associated with a reduced UC risk in offspring26. However, the Norwegian study quantified maternal dietary patterns a priori based on the variety in intakes of grains, fruits, vegetables, and animal-based products26, whereas our empirically derived maternal dietary patterns are not necessarily indicative of diet diversity, although we also see a lower risk in the group characterized by high intakes across most food groups. Thus, while not directly comparable, both studies underscore a potential protective effect of consuming a variety of food groups during pregnancy.

Adherence to a diverse dietary pattern is the most widely recognized dietary recommendation for achieving overall health44. Incorporating various food groups into the diet ensures adequate intake of essential nutrients45, which is particularly crucial during pregnancy due to their important roles in offspring’s early development and long-term health46,47. In contrast, animal models suggest that a Western-style diet may persistently program the fetal immune system toward a proinflammatory state48. Hence, the protective association observed for the diverse dietary pattern, compared to the Western dietary pattern, may reflect a mitigation of these adverse immune effects.

Moreover, a diverse dietary pattern promotes gut microbiota diversity49, which could contribute to IBD prevention, as individuals with IBD commonly exhibit reduced microbial diversity50,51. This influence may extend to the offspring, as the maternal microbiota shapes the infant’s gut microbiota establishment52,53,54. A potential mechanism is through the vertical transfer of maternal microbes at delivery, with the delivery method being a key factor55. Indeed, a birth cohort study from the United States found that associations between maternal diet and infant gut microbiota differed for vaginally versus cesarean-delivered infants, indicating that delivery method could modify the microbiota-mediated effects of maternal diet on offspring IBD risk56. Nonetheless, delivery method was not adjusted for in our analyses because there is no evidence that it is directly linked to maternal dietary patterns during pregnancy, making confounding unlikely.

The observed association between a diverse maternal dietary pattern during pregnancy and offspring’s IBD risk may not be solely explained by in-utero exposures. The offspring’s own dietary pattern during childhood also likely plays a role, potentially formed by maternal dietary patterns during pregnancy. Another study from the DNBC found that maternal diet quality during pregnancy predicts offspring’s diet quality at age 1443, and more broadly, research shows that children’s dietary habits often mirror those of their parents57,58. Therefore, the dietary patterns identified among the mothers may have been adopted by their children, thereby indirectly influencing IBD risk through postnatal exposures. This also aligns with prior studies in children showing an association between various elements of childhood diet and lower IBD risk, including high intakes of fruits, vegetables, and fish, and low intakes of sugar-sweetened beverages and fatty foods59. Likewise, breastfeeding and infant feeding practices could also mediate part of the observed association, mainly if maternal dietary patterns persisted postpartum. Maternal dietary patterns influence the maternal breast milk composition60,61, which in turn might shape offspring’s immune development and gut microbiota colonization via breastfeeding62,63. However, this is less expected to explain our findings, as previous results from the DNBC showed no association between breastfeeding and offspring’s IBD risk64.

Our study has several strengths. First, its prospective design, large sample size, and long follow-up period collectively capture the longitudinal impact of maternal dietary patterns on offspring’s disease development. Second, clustering maternal food intake into dietary patterns mitigates type I error from multiple comparisons that would have arisen if all 37 food groups were analyzed independently. Third, unlike predefined indices or scores, empirically derived dietary patterns are less affected by a priori assumptions about diet and health29. Although principal component analysis is more commonly employed to derive such patterns65, we applied k-means cluster analysis, which has the advantage of identifying mutually exclusive dietary patterns for comparison regarding offspring’s disease risk. Notably, previous studies show that dietary patterns derived from cluster and principal component analyses are largely comparable66,67, suggesting that both methods capture substantial variation in dietary behaviors. Fourth, dietary pattern analysis provides a more holistic perspective on maternal diet by considering the complex interrelationships among food groups. Compared to single food or nutrient-based analyses, dietary patterns are more strongly associated with gut microbiota variations68, a potential key player in IBD pathogenesis69,70,71 that is thought to mediate the relationship between diet and IBD72. Lastly, dietary pattern-based recommendations may seem easier to implement than nutrient-specific advice, which often requires a deeper understanding of food composition.

This study also has some potential limitations. Residual confounding cannot be ruled out due to its observational design, despite adjusting for multiple relevant covariates. The small number IBD cases may have limited statistical power and could partly explain the non-significant associations observed in subtype-specific analyses of CD and UC. Selection bias may also exist from the low participation rates, although a previous study from the DNBC suggested that non-participation had minimal impact on different exposure-outcome associations73. Furthermore, dietary pattern analysis involves multiple subjective decisions, such as choosing the number of food groups for cluster analysis and naming the identified patterns. To minimize observer bias, we used standard food group classifications34 for objectivity and transparency. Because the dietary patterns are based on z-scores unadjusted for total energy intake, they may reflect absolute intake levels; however, we adjusted for energy intake in the Cox regression models to account for this. Another limitation is that maternal diet was assessed only in the second trimester, although its impact on fetal development may vary across trimesters74. Still, this is unlikely to affect the study’s validity, as dietary patterns remain relatively stable over time75 and show minimal variation from pre-conception through pregnancy despite some changes in intakes of specific food groups76,77,78. Since our study focused on dietary patterns, the additional information gained from repeated assessments may therefore not outweigh the burden to participants and investigators. Finally, dietary pattern analysis remains complementary to analyses of single foods and nutrients, which are key to understanding the biological mechanisms behind the observed associations28. Thus, our findings might reflect differences in intakes of specific foods or nutrients among mothers adhering to a diverse compared to a Western dietary pattern, but further investigation is needed to clarify this.

Conclusion

This nationwide prospective cohort study demonstrates that a maternal diverse dietary pattern, compared to a Western dietary pattern, during pregnancy is associated with a reduced risk of pediatric-onset IBD in the offspring. In contrast, a Mediterranean, animal-based, or non-recommended dietary pattern during pregnancy showed no association with offspring’s disease risk compared to a Western dietary pattern.

These findings offer insights into the role of maternal a posteriori dietary patterns in the etiology of pediatric-onset IBD, underscoring their significance for future generations’ health. Given the limited research in the area, however, further studies are needed to identify specific diets that may influence IBD development in offspring. This includes studying maternal diet from other perspectives to clarify whether the observed associations are driven by elements unique to each of the five identified dietary patterns.