The evidence that junk food isn't good for our bodies, let alone our brains, is piling up just like a cheeseburger stacked with all the toppings.

Now a new study has found that feasting on a high-fat, sugary diet can lead to lasting memory impairments in rats fed those foods from a young age. That seems to be because diets high in simple sugars and saturated fats disrupt acetylcholine, a key neurotransmitter in animals' brains involved in memory.

"What we see not just in this paper, but in some of our other recent work, is that if these rats grew up on this junk food diet, then they have these memory impairments that don't go away," says Scott Kanoski, a neuroscientist at the University of Southern California (USC).

Recent research has linked diets of unhealthy, processed foods to people's risk of Alzheimer's disease in later life. Since acetylcholine is involved in memory and learning, and gets depleted in Alzheimer's – a neurodegenerative disease characterized by memory problems – the researchers behind this latest study wondered what eating sugary, fatty foods could mean for younger people in the long term.

Other studies suggest certain eating junk foods can undermine the brain's appetite control, and that obesity can alter the human brain's ability to detect fullness and feel satisfied after people consume foods high in sugar and fat.

A common finding running through these studies is that these types of foods, which are common Western diets, often affect memory, even when eaten occasionally.

So what then if people, or in this case rats, ate a Western-style diet from a young age?

The research team fed rats a diet of high fat, sugary foods from 26 to 56 days old, a period that parallels human adolescence when the brain is undergoing significant development. Another group of rats of this same age ate healthy chow instead.

In memory tests, rats on the cafeteria-style diet couldn't identify new objects in a scene they had explored days earlier, or if a familiar object had moved slightly, whereas the control group could. These memory problems persisted even when the junk food group switched to the healthy chow for 30 days, in what equates to adulthood.

The researchers also found that the junk food group had reduced levels of a protein that transports acetylcholine in the hippocampus, a brain region that helps consolidate memories and spatial information.

Further imaging showed that this reduction impaired acetylcholine signaling in the animals that performed poorly on the memory task, while drugs that prompted cells in the hippocampus to release acetylcholine restored the animals' memory abilities.

"Acetylcholine signaling is a mechanism to help them encode and remember those events, analogous to 'episodic memory' in humans that allows us to remember events from our past," lead author and USC nutrition researcher Anna Hayes explains. "That signal appears to not be happening in the animals that grew up eating the fatty, sugary diet."

The team's previous work uncovered some differences in timing and sex that still need to be resolved: Eating a Western-style diet in early, but not late adolescence had long-lasting impacts on memory in male, but not female rats who ate healthily for long periods after adolescence.

Which is to say that teasing apart the influence of consuming fatty, sugary foods in adolescence on brain function in adult life is difficult to do – and the findings of these animal studies may or may not translate to humans. But it's certainly food for thought.

The research has been published in Brain, Behavior, and Immunity.