Introduction

Irritable bowel syndrome (IBS), characterized by chronic or recurrent abdominal pain and altered bowel habits [1], has a prevalence of approximately 4% [2]. IBS is associated with reduced quality of life [3] and work productivity [4] and accounts for a direct cost of approximately $700–7500 per patient per year [5]. Although its cause remains unknown, almost all affected patients believe that food triggers their symptoms [6].

The treatment of IBS is currently suboptimal. Treatments include neuromodulators [7], antidiarrheals [8], prokinetics [9], antihistamines [10], psychological therapies such as hypnotherapy [11], and cognitive behavioral therapy [12] as well as several diets such as the NICE diet (NICE: UK National Institute for health and Care Excellence) [13] and the low-FODMAP diet (Fermentable Oligo-Di-Monosaccharides And Polyols) [14]. The response to these treatments is modestly superior to placebo, and not every patient experiences symptom relief [15].

One reason for the suboptimal treatment effects is the heterogeneity of IBS pathophysiology [16]. The immune system plays a known role in the symptomatology of some patients [17], possibly triggered by food components such as milk, wheat, and/or soy proteins [18]. However, pain can arise from stimulation by capsaicin found in red pepper [19]. Moreover, the effects of caffeine on the gastrointestinal (GI) tract are complicated [20]. Furthermore, gas accumulation in the GI tract can occur upon the fermentation of FODMAP-containing foods and their osmotic effects [21]. Other unknown diet-related mechanisms may exist as evidenced by the reported success of various diets [22, 23]. With such differences in pathophysiology, it is difficult to triage patients and select the best treatment (e.g. diet) in a timely way.

One interesting strategy is to study IBS in a “mechanism-agnostic” data-driven manner. One study from our joint research group [24] objectively determined food–symptom associations from food–symptom diaries rather than self-perceived food intolerances, which are inaccurate [25]. In a previous study, approximately 200 patients with IBS were asked to maintain a food diary and record their symptoms over a period of at least 3 weeks. Diaries were kept with pen and paper, a MS Excel template, or the smartphone app mySymptoms, which is an app specifically designed to track lifestyle events such as food intake and gastrointestinal symptoms. The results demonstrated the existence of several types of food–symptom associations. However, the relatively small sample size (n = ~ 200) provided insufficient power for specific food products [24] and, to our knowledge, no equivalent studies have been undertaken. Overall, it remains difficult to empirically identify which food products trigger GI symptoms in a substantial proportion of the IBS patient population as well as which mechanism is involved for each patient.

In the present study, we selected 9,710 food symptom diaries that matched our quality criteria from subjects who used the mySymptoms smartphone app and gave permission for the use of their data for research purposes. This allowed us to compute food–symptom associations in a large IBS-predominant sample and perform in-depth analyses of the potential underlying biological mechanisms of such associations.

Methods

Food diaries of anonymous subjects recorded in the mySymptoms smartphone app (2018–2022) were analyzed. The diaries were selected if at least 3 weeks long (robust food-symptom associations require roughly 5 occurrences of the food and symptom respectively, and most common foods and symptoms have reached 5 occurrences after 3 weeks). Also, days with fewer than 3 food events were considered of poor quality, and we allowed no more than 10% of such days in the diary. The usage of the data for research purposes was one of the app’s terms of use. All data was anonymous (i.e. not de-identified) and therefore no Institutional Review Board was necessary.

mySymptoms app

Users download the app onto their smartphones. The app was written in English. They then agreed to the terms of use of the app, including consent to share anonymized data for scientific research. Next, for as long as desired, users tracked their symptoms, food intake, medications, and/or other lifestyle factors. All entries were timestamped in minutes. The app provided tips for keeping a diary, for example, recommending that they enter their data after each meal rather than at the end of the day, but there were no strict rules for the data entry.

Foods and medications were reported in free text (and each user’s language of choice). Portion size estimates were optional. Symptoms were reported on a slider scale of 0–10 and included stomach pain, diarrhea, bloating, gas (flatulence), heartburn, and headache. Bowel movements could also be noted, combined with a Bristol Stool Form (BSF) [26] score of 1–7.

Diary Preprocessing

After data loading, the portion sizes per string were homogenized by normalizing around the median. For example, if a food string had entries of 300 g, 400 g, and 0.5 kg, these were converted to 0.75, 1.00, and 1.25, respectively.

We assigned all free text strings to one of 201 categories (e.g. beef, white bread) using an in-house–developed string library. This included both complete, partial, and fuzzy string matching as well as categorization of composed dishes, such that even misspelled versions of “cappuccino” would be categorized as caffeinated coffee, cow’s milk, and table sugar. Specific business rules were applied in cases such as “apple tea” (only tea, not apple). Infrequent categories were pooled into a higher-level category so each category had at least five entries. For example, if there were four entries for poultry intake, two for beef intake, and one for pork intake, they were combined as seven entries for meat intake.

Furthermore, because the app has diarrhea as both a symptom (range, 0–10) and a bowel movement with a BSF score (range, 1–7), the two were merged. BSF scores of 1–5, 6, and 7 were arbitrarily converted to scores of 0/10, 5/10, and 10/10 for diarrhea, respectively. This preprocessing methodology was described previously [24].

Diary Analysis

We analyzed all food–symptom associations in each diary. The analysis algorithm was described previously [24]. The analysis algorithm aims to change the analysis from a mere statistical correlation to a meaningful association by adjusting for several biases. This includes adjustment for confounding variables (e.g. commonly co-consumed items such as coffee and milk, circadian patterns/time of day), reverse causation (e.g. post- versus preprandial symptoms), and multiple tests (e.g. data reduction and mechanism analysis).

The specifics of the algorithm are as follows: a postprandial symptom score is computed in short-term (1–2 h), mid-term (4–18 h), and long-term (24–72 h) models. Scores are adjusted for time of day within a null distribution of scores with food intake times shuffled randomly between days and are expressed as Z-scores. The Z-scores were further adjusted for reporting frequency by extraction of the residuals of group-level associations between reporting frequency and Z-scores. Similarly, we quantified the associations between medication, sleep, exercise, psychological distress, and symptoms.

Putative mechanisms were analyzed together by two registered dietitians (SN and SS) who labeled food products as high or low in terms a variety of food properties: FODMAPs [21], fructans, fructose, lactose, polyols, galacto-oligosaccharides, histamine [27], alcohol, caffeine, and carbohydrate as well as foods that are difficult to digest, for example, fibrous foods such as whole grains, whole nuts, asparagus, mushrooms, and peeled fruits [28]. These labels were used in a functional enrichment analysis performed per user on the total list of foods sorted by food–symptom association. The enrichment scores were ranked within the null distribution and analyzed over the total user base, resulting in p values.

App Users’ Characteristics

The app users were individuals worldwide who reported GI symptoms. They remained anonymous; therefore, we had no background characteristics on demographics or reasons for downloading the app. Thus, we surveyed current app users to establish a general estimate of users’ characteristics using the Rome IV questions defining IBS [29], the IBS Symptom Severity Scale (IBS-SSS) [30], and the food subscale of the IBS Quality of Life (IBS-QOL) questionnaire [31].

Results

A total of 9,710 diaries were collected. Food–symptom associations were identified at the group level for all studied symptoms. The results are presented below as short-term (1–2 h), mid-term (4–18 h), and long-term (24–72 h postprandial) associations.

Diarrhea

Food–diarrhea associations were strongest for coffee (short-term) and all alcoholic beverages (mid-term). It should be noted that the food–diarrhea associations of milk and sugar diminished after the adjustment for coffee but not vice versa. The next food products at a respectable distance were baked potatoes and chips/French fries (all short-term). The smallest food–diarrhea associations were observed for products such as still water, pumpkin seeds, tapioca starch, white rice, and bananas. In addition to laxatives, migraine medications were positively associated with diarrhea (long-term). The strongest associations are presented in Table 1. The complete table is available in Supplementary Table 1.

Table 1 Selection of the highest food–diarrhea associations

Pain

Food–pain associations were generally strong for alcoholic beverages (mid- and long-term). Other large coefficients were observed for aspartame (long-term), corn syrup (short-term), and e621/monosodium glutamate (mid-term). Other food–pain associations were identified across food groups, with slightly larger coefficients for meat, potato products, cruciferous vegetables (e.g. broccoli, cauliflower), and condiments/sauces. The weakest food–pain associations were identified for water, tea, fruits, nuts, and seeds. The strongest associations are presented in Table 2. The complete table is available in Supplementary Table 2.

Table 2 Highest food–pain associations

Gas (Flatulence)

Food–gas associations were strong for a variety of products including onions, garlic (short-term), beer, and legumes (mid-term). Loperamide and antiflatulence medications were negatively associated with gas. The strongest associations are presented in Table 3. The full table is available in Supplementary Table 3.

Table 3 Highest food–gas associations

Bloating

Various foods were associated with bloating within 2 h of intake. These included seaweed, chips (French fries), onions, garlic, condiments, meat, and tomatoes. Four food products were identified as having long-term associations (24–72 h): acesulfame K, beer, sucralose, and aspartame. The strongest associations are listed in Table 4. The full table is available in Supplementary Table 4.

Table 4 Highest food–bloating associations

Possible Mechanisms

An enrichment analysis suggested that specific mechanisms may be involved in symptom development. Generally, the trigger scores of alcohol-containing foods were enriched for all studied symptoms. The same procedure was followed for histamine. Caffeinated coffee was more strongly associated with diarrhea than decaffeinated coffee, but no statistical difference was observed in other GI symptoms. Finally, fructans-containing foods were enriched in gas. Surprisingly, FODMAP foods were not significantly associated with GI symptoms. The results are presented as p values in Table 5.

Table 5 Food-related mechanisms of GI symptoms

Users’ Characteristics

The users’ characteristics were obtained from 500 users. These could be, but are not necessarily part of the 9,710 that shared their diaries for use in the present study. Of the 500 respondents, 350 (70%) had IBS according to the Rome IV criteria. The average IBS-SSS score was 244 (scale 0–500). The average food-related IBS-QOL score was 36 (scale, 0–100), with 12% of the users scoring 0 (worst possible), see Table 6.

Table 6 Users’ characteristics (N = 500). Scores are reported in averages (IBS-SSS, IBS-QOL) or percentages. *Mild: <175; moderate: 175–300; severe: >300

Discussion

This study demonstrated the existence of specific associations between food and GI symptoms in a large sample of clinically uncharacterized users of a smartphone app used to track food and GI symptoms. Generally, strong associations existed for coffee (diarrhea, 1–2 h postprandial), artificial sweeteners, and alcoholic beverages (multiple GI symptoms, 4–72 h postprandial). The intake of histamine-rich food is associated with abdominal pain and diarrhea. Some associations are in line with the existing literature, while the absence of an enriched FODMAP symptom association contrasts with current knowledge.

This study demonstrated that coffee intake was associated with (and possibly responsible for) a substantial proportion of diarrheal events in subjects with GI symptoms. Although caffeinated coffee is known to increase GI motility [32] within minutes, one study reported effects with decaffeinated coffee as well [33]. It has been proposed that chlorogenic acid is another coffee component that can cause gastrin release and trigger GI symptoms [34, 35]. This explains why the present study found decaffeinated coffee, too, to have a reasonably strong association with diarrhea.

Both direct and indirect mechanisms linking alcohol to GI symptoms have been described, including the inhibition of water absorption, which can result in diarrhea [36, 37]. In the long term, alcohol can damage the epithelium and increase mucosal permeability, potentially leading to GI symptoms. Our findings are in line with this knowledge since alcoholic beverages were consistently associated with diarrhea in the mid-term and with abdominal pain in the mid- and long-term. Since long-term was defined as 24–72 h after alcohol consumption, it is tempting to hypothesize that epithelial integrity, rather than absorption rates, is a likely mechanism triggering abdominal pain.

The adverse health effects of artificial sweeteners, such as aspartame, have a long and controversial history. Aspartame is generally considered safe [38]. However, research has mostly focused on toxicity and carcinogenicity rather than on GI symptoms. One study compared the ingestion of 100 mg of aspartame with placebo and found no difference in bloating at up to 4 h postprandial [39]. In another study [40], exposure to a mix of artificial sweeteners for 5 weeks led to substantially increased GI symptoms. Interestingly, the association with bloating that we found occurred no sooner than 24–72 h postprandial, which is in line with the cited studies. However, the underlying mechanism remains to be elucidated. On the one hand, acesulfame K and aspartame would usually be digested and absorbed before reaching the colon and should not affect the microbiota [41]. However, it has also been suggested that artificial sweeteners may induce pro-inflammatory changes in the gut bacteria and gut wall immune reactivity [42, 43]. We recommend that future research of artificial sweeteners include a follow-up symptom assessment after 1–3 days with additional analyses that aim to identify the possible underlying osmotic, fermentative, microbial, or mucosal mechanisms. One study type would be an experimental setup with controlled exposure, and monitoring of various outcomes over 1 week.

However, we noted that FODMAP-containing foods (other than fructans) were not highly associated with any GI symptoms. This was surprising, as a low-FODMAP diet is generally considered efficacious based on extensive research [44]. It is possible that some of our subjects had already applied the low-FODMAP diet to the extent of selection bias toward those who were unresponsive. It is also possible that other mechanisms contribute to symptom generation. Finally, since fructans were statistically enriched in association with gas, it is possible that fructans contributed more than other FODMAP members.

Some other associations were surprising. Potato products, for example, were associated with bloating. There could be a true mechanism behind this association, for example, the effects of resistant starch or the total wet mass of potatoes, although this is speculative. Mechanisms related to eating habits, such as rapid eating or inadequate chewing, could also be at play. It is also possible that these products trigger a stronger gastro-colonic response than other products. We could not quantify this in the diary data, and missing such patterns is a limitation of this study.

A second limitation is that participants are uncharacterized, and the 500 respondents to the app-wide survey may not be reflective of the 9,710 that shared their diaries. Third, dietary self-reporting is generally known to be inaccurate (e.g. over- and under-reporting), but our study focuses on which foods were consumed, rather than the quantities. Although misreporting in this setting has never been quantified, this method of dietary reporting appears to be feasible for most patients, even when extended over several weeks. Fourth, the symptom “stomach pain” does not specify the location of pain in the abdomen, and epigastric pain, for example, could have different triggers than pain elsewhere.

A strength of this study is that well-known associations were indeed detected. For instance, the analysis algorithm detected the function of medications (loperamide and laxatives for diarrhea, antiflatulence medications for gas, and spasmolytics for abdominal pain). The clear correlation between these medications and a reduction in symptoms supports the validity of the algorithmic approach used to identify food-symptom associations.

Conclusion

In summary, our findings suggest that several specific food–symptom associations existed in this large IBS-predominant sample. An important next step would be to test whether the individual lifestyle advice generated from personalized food–symptom associations identified by the smartphone app leads to symptom improvement.