DietBERT: A Multimodal Transformer Model Linking Real-World Dietary Behavior to Immune, Metabolic and Mental Phenotypes: A Multicohort Population Study

Authors:
  • GVGabriel A. Vignolle
    Gabriel A. Vignolle
  • XWXinxu Wei
    Xinxu Wei
  • YZYu Zhang
    Yu Zhang
  • AVAllison Vaughan
    Allison Vaughan
  • MDMarika Dy
    Marika Dy
  • PVPriten Vora
    Priten Vora
  • MHMing W. Hung
    Ming W. Hung
  • ACArpana Church
    Arpana Church

Abstract
Dietary behavior is a central modifiable determinant of immune, metabolic and mental health, yet conventional nutrient-based analyses fail to capture the complexity and context of real-world eating patterns. Here we introduce DietBERT, a multimodal transformer model that integrates naturalistic diet logs with structured nutrient data by converting both into unified language-based representations through self-supervised learning. Trained on dietary records from 9,363 participants across NHANES and UCLA-omics datasets, and augmented with clinically informed health summaries, DietBERT encodes latent dietary patterns that predict affective symptoms, cognitive performance, inflammatory and metabolic biomarkers, and plasma biomarkers of neuropathology. Across both cohorts, DietBERT consistently outperformed standard linear models and non-adapted transformer baselines, with ablation analyses demonstrating complementary contributions from behavioral logs, nutrient-level features, and cross-modal fusion. Furthermore, using transfer learning, the predictive diet log encoder alone maintained strong predictive performance and generalized to an independent nutrition intervention cohort (AI4Food, n=97), highlighting its scalability without reliance on structured nutrient estimation. Partial least squares analyses further revealed interpretable nutrient axes embedded within the model, spanning micronutrient-related lipid-protein-inflammatory dimensions, thus linking dietray patterns to multisystem biological outcomes. Together, these findings establish DietBERT as a scalable framework for translating everyday dietary behavior into clinically meaningful immune, metabolic, and mental health phenotypes, advancing the field of precision nutrition and enabling population scale digital phenotyping.