According to a 4-year study by the Mayo Clinic, a diet high in carbs is linked to dementia, eating more healthy fats and protein offers some protection, and a diet high in healthy fats is least likely to cause cognitive impairment.