**Background:** Upper gastrointestinal (UGI) cancers, including esophageal cancer (ESC) and gastric cancer (GC), account for 1.7 million new cases and 1.3 million deaths annually worldwide. While dietary factors are recognized as potentially modifiable risk factors, previous studies have focused on individual dietary components rather than overall dietary patterns. It was also unclear whether genetic susceptibility modifies the association between diet and UGI cancer risk, and whether a healthy diet could offset high genetic risk.
**Methods:** This prospective cohort study used data from the UK Biobank, which recruited over 500,000 participants aged 40–69 years between 2006 and 2010. After excluding participants with prevalent cancer (n=46,531), missing dietary data (n=40,132), and those who withdrew consent (n=157), 415,589 participants (193,083 men and 222,506 women) were included. Dietary intake was assessed using a touch-screen food frequency questionnaire covering 12 food items, which were categorized into 7 food groups: red meat, processed meat, total fish, total fruit, total vegetables, whole grains, and refined grains. A healthy diet score (range 0–7) was calculated based on adherence to 7 dietary recommendations: total fruit ≥4 servings/day; total vegetables ≥4 servings/day; total fish ≥2 servings/week; processed meat ≤1 serving/week; red meat ≤1.5 servings/week; whole grains ≥3 servings/day; refined grains ≤1.5 servings/day. Scores were categorized as low-quality (0–1), intermediate-quality (2–4), and high-quality (5–7). A UGI polygenic risk score (PRS) was constructed using 13 SNPs for ESC and 3 SNPs for GC, weighted by age-standardized incidence rates, and divided into low (lowest quintile), moderate (quintiles 2–4), and high (top quintile) genetic risk. Outcomes were first primary incident UGI cancers identified through national cancer registries (ICD-10 C15 for ESC, C16 for GC). Cox proportional hazard models were used to estimate hazard ratios (HRs) and 95% confidence intervals (CIs), with adjustment for age, sex, Townsend deprivation index, assessment center, ethnicity, BMI, HbA1c, smoking, alcohol intake, education, multimorbidity, physical activity, family cancer history, and the top 10 genetic principal components.
**Key Results:** Over a median follow-up of 12.12 years (IQR: 11.32–12.84), 1,389 incident UGI cancers occurred (564 GC and 831 ESC). Compared to participants with a low-quality diet, those with a high-quality diet had a significantly lower risk of UGI cancer (HR 0.76, 95% CI: 0.62–0.93, p=0.009). Each two-point increase in healthy diet score was associated with a 10% reduction in risk (HR 0.90, 95% CI: 0.83–0.97, p=0.006). In combined analyses, participants with an unhealthy diet and high genetic risk had approximately 1.60-fold higher risk compared to those with a healthy diet and low genetic risk (HR 1.60, 95% CI: 1.20–2.13, p=0.001). No significant additive or multiplicative interactions were found between diet and genetic risk (RERI, AP, and RHR were not significant). Within genetic risk groups, adherence to a healthy diet was associated with reduced absolute five-year incidence risk: among intermediate genetic risk participants, risk decreased from 0.13% (unhealthy diet) to 0.11% (healthy diet); among high genetic risk participants, risk decreased from 0.16% to 0.10%, with an absolute risk reduction of 0.06% (95% CI: 0.02–0.09). Sensitivity analyses excluding participants who changed their diet due to illness, those with <2 years follow-up, and non-white participants yielded consistent results.
**Clinical Implications:** This large prospective study provides evidence that adherence to a healthy dietary pattern is associated with reduced UGI cancer risk, and that this benefit extends to individuals with intermediate and high genetic susceptibility. The findings suggest that public health interventions promoting healthy dietary patterns could help reduce UGI cancer burden, particularly among those at higher genetic risk. The absolute risk reduction observed in the high genetic risk group (from 0.16% to 0.10% five-year incidence) indicates that dietary modification may meaningfully attenuate risk even in genetically susceptible individuals. Limitations include the predominantly European ancestry of participants, potential recall bias from self-reported dietary data, inability to adjust for total energy intake, and covariates measured only at baseline.