Abstract Background Diet is an important environmental factor that may affect flare occurrence in inflammatory bowel disease (IBD), but analyses are hindered by its complexity. Different a priori and a posteriori dietary assessment tools can be used, such as dietary quality scores and dietary pattern analyses. The Sparse Group LASSO (SGL) might be a novel method combining an a priori and an a posteriori approach. In this study, we aim to explore the SGL method to study whether different food categorisations, representing different dietary patterns, can predict flares in patients with IBD. Methods Baseline data on habitual dietary intake and longitudinal data on disease course was collected over a period of 24 months from two cohorts from the Northern and Southern provinces of the Netherlands. Collected food items were classified into 22 food groups. These were further classified into 3 diet categorisations, representing different dietary patterns: model 1. Plant vs animal vs mixed; model 2. Potentially healthy vs neutral vs potentially unhealthy; model 3. Ultra-processed vs not ultra-processed. The SGL parameter ‘lambda’ identifies important groups using a priori group information, while allowing for only a subset of variables within a group to be important predictors. Results Of 724 eligible patients, 427 were in remission at baseline and could be included in the SGL analyses. 106 patients (65.1% female, 34% ulcerative colitis, mean age 43.3 ± 14.7 years) developed a flare within 11.2 ± 6.6 months of follow-up. There was a significant higher crude food intake of red meat (p=0.028) and vegetables (p=0.027) in patients who developed a flare compared to those remaining in remission. Prediction models were moderate with AUC varying between 0.425 and 0.542 for model 1, 0.512 and 0.562 for model 2 and 0.451 and 0.612 for model 3 (Table 1). All models showed red meat, legumes and vegetables as the first selected predicting variables. Unexpectedly, legumes and vegetables predicted a higher risk on flares independently of their categorisation. This was robust in our data and confirmed by Kaplan-Meier survival analyses. Notably, clinical confounders sex and kilocalorie intake had the highest predictive values in all 3 models. Conclusion Categorisation of the same food groups and food items in different ways influences the predictive value of the SGL method. For the present study, categorising according to ultra-processed and not ultra-processed achieved the best prediction model, though still moderate. The current exploration of the SGL method showed that food might not be the most important predictor of flares in IBD. However, red meat, legumes and vegetables were the most important dietary influencers in these cohorts.