You would give yourself a few seconds to imagine tasting and chewing one truffle. (If there’s a picture on the box, you could focus on it.) Then you would imagine eating another, and then another and another...until at last you could open the box of real chocolates without making a total pig of yourself. And then you could start on fantasies of other vices you wanted to eliminate.

So far, the Imagine Diet exists only in my imagination, as does any evidence of its efficacy. But there is some real evidence for the benefits of imaginary eating from experiments at Carnegie Mellon University reported in the current issue of Science. When people imagined themselves eating M & M’s or pieces of cheese, they became less likely to gorge themselves on the real thing.

This form of mental dieting — I think, therefore I’m full — sounds bizarrely counterintuitive, because we’re all familiar with the opposite phenomenon: thoughts of food that make us more eager to eat it.

Indeed, there’s a well-established phenomenon called sensitization, or sometimes the whetting effect: if you picture yourself eating chocolate, your desire for it increases, and such thoughts can cause you to literally salivate.

Similarly, imagining the sight or the smell of a cigarette will increase a smoker’s craving to light up. And when you actually smell or get a taste of something, that initial sensation can also increase your desire for it.

But eventually that effect is counterbalanced by another well-established phenomenon called habituation. Just as you adjust to bright lights and stop being bothered by bad smells, you get habituated to a food as you eat it.

“After you eat the first little cheeseburger at White Castle, your craving is probably greater than it was before you started your meal,” says Carey Morewedge, a psychologist at Carnegie Mellon and the lead author of the Science article. “But your craving is probably going to be lower by the time you start your eighth.”

At that point, you may stop ordering sliders and think you’ve lost your appetite for any food. But habituation is quite specific to the food you’re eating, as has been repeatedly demonstrated both by researchers and by pastry chefs. Restaurant patrons may feel they can’t eat another bite after going through the entree, but they suddenly feel peckish when the dessert cart arrives.

The experiments at Carnegie Mellon are the first to show that habituation to food can occur simply by thinking about eating, according to Dr. Morewedge and his colleagues Young Eun Huh and Joachim Vosgerau.

The habituation occurred as people imagined eating 30 M & M’s or 30 cubes of Kraft Cheddar, one at a time. They were shown photos of each M & M for three seconds, and each cube of cheese for five seconds.

The habituation effect didn’t occur when people imagined eating just three M & M’s or cubes of cheese. Nor did it occur when people imagined moving M & M’s one at a time into a bowl or doing other mental tasks, like feeding quarters into a laundry machine.

The effect required lots of mental eating, and it was specific to each food: the people who imagined eating chocolate didn’t lose their desire for cheese.

The imaginary eating didn’t make people feel any fuller, and it didn’t change their overall opinion of M & M’s or Kraft cheese cubes. They just didn’t feel like eating as much of it at that moment.

“Our desire for food has two components: liking and wanting,” Dr. Morewedge says. “We may very much like ice cream but not want to eat it for breakfast. Imagined consumption didn’t affect how much people in our experiments liked M & M’s, but did reduce how many they wanted to eat. Habituation is generally considered to be a motivational process.”

The importance of mind over stomach was demonstrated in 1998 in a striking experiment with two men whose mental functions were normal except for a severe form of amnesia. They were unable to remember an event for more than a minute. Their eating habits were studied on several days by researchers, led by Paul Rozin at the University of Pennsylvania, who created a rather extended lunch period.

After each man ate his lunch, the food was cleared. In a few minutes, a researcher appeared with an identical meal and announced, “Here’s lunch.” The men always ate up without any complaint about feeling full. Then, after the food was cleared and another few minutes passed, a third lunch was served, and the men always dug into it, too.

In fact, one of them stood up after his third lunch of the day and announced that he would “go for a walk and get a good meal.” Asked what he planned to eat, he replied, “Veal parmigiana” — the same food he had just had for lunch.

When the researchers tried the same experiment on a control group with normal memories, the people all refused a second lunch. They, unlike the men with amnesia, consistently felt less hungry after eating, but the sensation apparently wasn’t just coming from their stomachs, as the researchers concluded.

“Nonphysiological factors seem to be of major importance in the onset and cessation of normal eating,” Dr. Rozin and his colleagues wrote in Psychological Science. “The results suggest that one of the principal nonphysiological factors is memory for what has recently been eaten.”

Now it looks as if even memories of imaginary foods can affect people’s desire to eat. Dr. Rozin says he is impressed with the new Carnegie Mellon study, and so is Leonard Epstein, an expert on habituation to food. Dr. Epstein, a psychologist at the State University at Buffalo, says the results raise intriguing questions for further research.