If you are finding it difficult to stick to a weight-loss diet, the hunger-sensitive cells in your brain are to be blamed, scientists say.

Researchers have found that a set of neurons is responsible for the unpleasant feelings associated with hunger that make snacking irresistible.

Scientists at the Howard Hughes Medical Institute’s Janelia Research Campus said the AGRP neurons in the hypothalamus make sense from an evolutionary point of view.

In an environment where food is readily available, their difficult-to-ignore signal may seem like an annoyance but for earlier humans or animals in the wild, pursuing food or water can mean venturing into a risky environment, which might require some encouragement, researchers said.

AGRP neurons do not directly drive an animal to eat, but rather teach an animal to respond to sensory cues that signal the presence of food.

AGRP neurons are known to be clearly involved in feeding behaviours: When the body lacks energy, AGRP neurons become active, and when AGRP neurons are active, animals eat.

Postdoctoral researcher Nicholas Betley and graduate student Zhen Fang Huang Cao in a series of behavioural experiments offered well-fed mice two flavoured gels – one strawberry and the other orange. Neither gel contained any nutrients, but the hungry mice sampled them both.

Then the scientists’ manipulated the hunger signals in the animals’ brains by switching AGRP neurons on while they consumed one of the two flavours. In subsequent tests, the animals avoided the flavour associated with the false hunger signal.

In a reverse experiment, the scientists switched AGRP neurons off while hungry animals consumed a particular flavour. The animals developed a preference for the flavour choice that led to silencing of AGRP neurons, suggesting they were motivated to turn off the cells’ unpleasant signal.

In further experiments, the scientists found that mice also learn to seek out places in their environment where AGRP neurons had been silenced and avoid places where those cells were active.

Next, postdoctoral researcher Shengjin Xu used a tiny, mobile microscope to peer inside the brains of hungry mice and monitor the activity of AGRP neurons. As expected, the cells were active until the mice found food.

What was surprising, Sternson said, is that mice did not actually have to eat to quiet the neurons. Instead, the cells ceased activity as soon as an animal saw food – or even a signal that predicted food. And their activity remained low while the animal was eating.

That wouldn’t make sense if the job of AGRP neurons was to make food taste better or if they directly controlled the individual actions that go into eating, which were two possibilities, said Scott Sternson, group leader at Janelia.

But to encourage eating, a negative signal would need to turn off when an animal consumed food, he said.

The findings are published in the journal Nature.