We love sweet treats. But too much sugar in our diets can lead to weight gain and obesity , Type 2 diabetes and dental decay . We know we shouldn't be eating candy, ice cream, cookies, cakes and drinking sugary sodas, but sometimes they are so hard to resist.

It's as if our brain is hardwired to want these foods.

As a neuroscientist my research centers on how modern day "obesogenic," or obesity-promoting, diets change the brain. I want to understand how what we eat alters our behavior and whether brain changes can be mitigated by other lifestyle factors.

Your body runs on sugar — glucose to be precise. Glucose comes from the Greek word glukos which means sweet. Glucose fuels the cells that make up our body — including brain cells (neurons) .

Dopamine "hits" from eating sugar

On an evolutionary basis, our primitive ancestors were scavengers. Sugary foods are excellent sources of energy, so we have evolved to find sweet foods particularly pleasurable. Foods with unpleasant, bitter and sour tastes can be unripe, poisonous or rotting — causing sickness.

So to maximize our survival as a species, we have an innate brain system that makes us like sweet foods since they're a great source of energy to fuel our bodies.

Read more: Forget toast and oatmeal, low-carb breakfasts reduce sugar spikes in those with Type 2 diabetes

When we eat sweet foods the brain's reward system — called the mesolimbic dopamine system — gets activated. Dopamine is a brain chemical released by neurons and can signal that an event was positive. When the reward system fires, it reinforces behaviors — making it more likely for us to carry out these actions again.

Dopamine "hits" from eating sugar promote rapid learning to preferentially find more of these foods.

Our environment today is abundant with sweet, energy rich foods. We no longer have to forage for these special sugary foods — they are available everywhere. Unfortunately, our brain is still functionally very similar to our ancestors, and it really likes sugar. So what happens in the brain when we excessively consume sugar?

Can sugar rewire the brain?

The brain continuously remodels and rewires itself through a process called neuroplasticity . This rewiring can happen in the reward system. Repeated activation of the reward pathway by drugs or by eating lots of sugary foods causes the brain to adapt to frequent stimulation, leading to a sort of tolerance.

In the case of sweet foods, this means we need to eat more to get the same rewarding feeling — a classic feature of addiction.

Food addiction is a controversial subject among scientists and clinicians. While it is true that you can become physically dependent on certain drugs, it is debated whether you can be addicted to food when you need it for basic survival.

The brain wants sugar, then more sugar

Regardless of our need for food to power our bodies, many people experience food cravings, particularly when stressed, hungry or just faced with an alluring display of cakes in a coffee shop.

To resist cravings, we need to inhibit our natural response to indulge in these tasty foods. A network of inhibitory neurons is critical for controlling behavior. These neurons are concentrated in the prefrontal cortex — a key area of the brain involved in decision-making, impulse control and delaying gratification.

Inhibitory neurons are like the brain's brakes and release the chemical GABA . Research in rats has shown that eating high-sugar diets can alter the inhibitory neurons . The sugar-fed rats were also less able to control their behavior and make decisions.

Importantly, this shows that what we eat can influence our ability to resist temptations and may underlie why diet changes are so difficult for people.

A recent study asked people to rate how much they wanted to eat high-calorie snack foods when they were feeling hungry versus when they had recently eaten. The people who regularly ate a high-fat, high-sugar diet rated their cravings for snack foods higher even when they weren't hungry.

This suggests that regularly eating high-sugar foods could amplify cravings — creating a vicious circle of wanting more and more of these foods.

Sugar can disrupt memory formation

Another brain area affected by high sugar diets is the hippocampus — a key memory center.

Research shows that rats eating high-sugar diets were less able to remember whether they had previously seen objects in specific locations before.

The sugar-induced changes in the hippocampus were both a reduction of newborn neurons , which are vital for encoding memories, and an increase in chemicals linked to inflammation .

How to protect your brain from sugar?

The World Health Organization advises that we limit our intake of added sugars to five per cent of our daily calorie intake , which is 25g (six teaspoons).

Considering the average Canadian adult consumes 85g (20 teaspoons) of sugar per day , this is a big diet change for many.

Importantly, the brain's neuroplasticity capabilities allow it to reset to an extent following cutting down on dietary sugar, and physical exercise can augment this process . Foods rich in omega-3 fats (found in fish oil, nuts and seeds) are also neuroprotective and can boost brain chemicals needed to form new neurons.

Read more: Young adults need to eat more omega-3 fats

While it's not easy to break habits like always eating dessert or making your coffee a double-double, your brain will thank you for making positive steps.

The first step is often the hardest. These diet changes can often get easier along the way.

[ Like what you've read? Want more? Sign up for The Conversation's daily newsletter . ]