You probably know that a healthy diet can be beneficial to brain health and may protect your brain from cognitive decline as you age. In a new wrinkle, however, a recent study finds that the single foods you eat may not be as connected to your risk of dementia as the combination of foods you eat, putting a new spin on nutrition for brain health.

No food can prevent loss of brain function as we age, but certain foods — green leafy vegetables, walnuts, berries and fatty fish — have been identified as “brain boosters.” These foods definitely have their place in a brain-healthy diet, but there may be more to it.

Eating a healthy diet at younger ages may pay off in a healthier old age, free of dementia as well as other chronic diseases.

Researchers from the University of Bordeaux in France looked at the foods people who developed dementia and those who didn’t consumed and the combinations of foods they ate. Just over 200 people were involved in the study, including 78 who had dementia and 418 who did not.

Five years earlier, the participants had completed a food frequency questionnaire that described the types of food they ate over a year and how often, whether once a month or four times a day. Medical checkups every two to three years were also part of the study. The information from the food frequency questionnaires was used to compare the diets and the food combinations eaten by the participants with and without dementia.

Few differences were found in the amount of single foods the participants ate, but the researchers discovered that overall combinations of foods, or food networks, differed greatly between the two groups.

Processed meat seemed to be a “hub” in the food networks of people diagnosed with dementia. They were more likely to eat highly processed meats, like sausage and cured meats, with starchy foods like potatoes, alcohol and snacks, such as cookies and cakes. This suggests that rather than focusing on how often people ate processed meat as a risk factor for dementia, the frequency with which they combined it with other unhealthy foods may play a larger role in the risk of developing dementia. People who ate processed meat combined with potatoes were more likely to develop dementia than people who ate processed meat combined with fruits or vegetables, for example.

Generally speaking, participants who did not develop dementia ate diverse diets that included fruits, vegetables, seafood, poultry and meats. Their food networks were smaller.

“We found that more diversity in diet, and greater inclusion of a variety of healthy foods, is related to less dementia,” said researcher, Cécilia Samieri, in a statement. “In fact, we found differences in food networks that could be seen years before people with dementia were diagnosed. Our findings suggest that studying diet by looking at food networks may help untangle the complexity of diet and biology in health and disease.”

The take home message here is not necessarily for seniors worried about developing dementia as much as it is for younger people who have time to create and eat beneficial food networks. Eating a healthy diet at younger ages, when you think you’re invulnerable, may pay off in a healthier old age, free of dementia as well as other chronic diseases.

The study is published in Neurology.