The holidays — starting with Halloween — can trip up even the most conscientious dieter. This happened to a client who had lost and kept off 20 lbs. successfully. The Halloween trap caught her by surprise. She bought several bags of her favorite candy bar and began a binge that didn't end until the candy was gone — long before trick or treating even began! That brought her up a couple of pounds.

The holidays came, and before you know it, she had gained almost 10 lbs. before winter was over.

With Halloween and the holidays looming, it's important to determine your strategy for dealing with the temptation of sweets — what you eat, what you bring into your home and what you serve others. My philosophy is that all foods can be enjoyed in moderation. But there are special challenges posed with some foods, particularly sweets, a finding that has been confirmed by solid science — it's not just in our heads! Understanding the science behind cravings for sweets and overeating can help everyone eat in a more moderate and healthy way.

People have an inborn attraction to sweets. If you don't believe it, simply watch an infant's response to something sweet versus, say, a vegetable. There's an automatic acceptance — even joy — after eating something sweet. On the other hand, vegetables are an acquired taste, which may take 10 to 20 tries before acceptance. This is partly explained by evolution. Humans have been eating naturally sweet foods, such as breast milk and fruit, for millions of years. Those foods contain life-sustaining nutrients, and a love for those foods helped keep people alive. Also, over the course of human evolution, an attraction to scarce calorie-dense foods, such as sweets and fats, improved people's chances for survival.

But there are other explanations. The research surrounding the human attraction to sweets has stepped up in recent decades. Scientists are grappling with understanding the calorie imbalances causing the obesity epidemic, which is partly fueled by eating too many sweets.

Human brain chemistry holds an important clue. Research shows that sweets, similar to many antidepressants, increase levels of the brain chemical serotonin, which helps regulate mood and appetite. Without carbohydrates, the brain stops regulating serotonin. Eating carbohydrates profoundly improves mood, which is why a handful of candy corn will make you feel better.

When people are stressed, anxious or depressed, serotonin levels can drop, and one way people modify their moods is by eating carbohydrates. But Halloween and holiday-sweet cravings may be uniquely influenced by seasonal changes, too. Studies show that as the days get shorter and people are exposed to less sunshine, serotonin levels drop, leading to increased carbohydrate cravings in susceptible people. Women are particularly vulnerable to sweet cravings because their brains have less serotonin than men's.

There have been other explanations for women's reported increased sweet craving and indulging. Some researchers attribute the difference to the female hormone estrogen. Researchers have reported that cravings for sweets change along with where a woman is in her menstrual cycle — suggesting that estrogen may play a role in sweet cravings. But the findings are inconsistent, as some studies report increased cravings during menstruation, while others report higher cravings as a premenstrual symptom — a time when serotonin levels may be low.

A study in the American Journal of Physiology showed that female rats ate more rat chow when it was sweetened compared with males. In animals, having high levels of estrogen is associated with eating more sweets. This theory has yet to be proven in humans, but the bottom line is intriguing: Females appear to overeat sweets compared to males.

Cravings and overeating are difficult to study because they can be so subjective and multifactorial. Other researchers stipulate cravings for sweets are mainly determined by culture or by psychological and behavioral factors, rather than physiology.

In some cultures, people don't crave sweets because they haven't been exposed to them as regularly as Americans have. A studyof chocolate in Appetite, for instance, found that American women crave chocolate significantly more than Spanish women. And while a large percentage of American women reported increased chocolate cravings surrounding their menstrual period, Spanish women did not.

Other studies confirm that exposure during childhood is the major determinant of what people crave and are susceptible to overeating. I copied my mother's love for sweets and love of baking; it was a fun activity we did together. In college, to combat loneliness — and heck, just for fun — I overindulged my love for sweets (as the pounds went up and up). I would regularly bake my favorite chocolate-chip bars and caramel popcorn, both of which I made in childhood. Study after study shows the importance of parental modeling on a child's preferences.

Science has found availability and proximity are two of the most important factors that influence what people crave and overeat, and those factors probably trump all of the others combined. When tasty foods, such as sweets, are around, people simply eat more of them.

Chances are, a combination of factors is responsible for cravings and overeating sweets at Halloween and the holidays. The sweets common around the holiday season are novel; they only come around once a year. Sweets come in small pieces, so you fool yourself into thinking you're not eating as much. You put it in bowls around the house and eat it mindlessly.

If you have a strong desire for sweets, it may be a sign that you're depressed, anxious or stressed. But you don't have to indulge in sweets to raise your serotonin levels or to feel good. Physical activity, stress management and spending time with loved ones are activities that will also help reduce depression, anxiety and stress. (My client discovered a psychological basis for her binges, which she is successfully averting these days).

Using candy to feel better is not a great solution for your waistline. Candy is high in calories and it doesn't take much to overeat — and forget your weight-loss plans. For the same calories in a candy bar, you could eat four apples — or maybe you couldn't before getting full, and that's the point!

Don't get me wrong; I'm not urging you to be a Halloween Scrooge. I believe it's possible to have fun with Halloween, and even eat Halloween candy, but still avoid some of the excesses that many people have fallen victim to in the past. Here are a few suggestions:

To reduce the possibility of seasonal cravings, make sure you're getting 30 minutes to one hour of sunlight each day by taking a walk in the mornings or at lunch. You may be able to "catch up" on the weekend, if you didn't get enough rays during the week.

Eat plenty of healthy carbohydrates — such as fruits, vegetables, whole grains and legumes — to keep serotonin at optimum levels and reduce cravings of less-healthy carbohydrates, such as refined sugar.

If you feel driven to eat sweets, it may be a signal that you're depressed, anxious or stressed. Reduce tension and anxiety by exercising, meditating or talking with loved ones. It's important to understand the core of the problem, and for that, you may need to seek help from a professional.

If you want to lose weight, keep your candy — or other "extra" calories — to no more than 10 percent of your daily calories (that's 200 calories for the average 2,000-calorie intake, or 150 calories a for 1,500-calorie diet). You may even get away with one big splurge on Halloween. But if you splurge for two or more days, it will probably affect your waistline negatively.

If you can't resist eating too much candy, wait to buy it on the day of the party or event (or, don't buy it). This way, the candy won't be sitting around as a constant temptation. Buy only what you need for the event, and buy your least-favorite candy. Give away the remaining candy at the end of the evening so that there's nothing left.

Try fun, and healthier, alternatives to sweets to have around your home and serve to family and guests, such as popcorn, roasted pumpkin seeds, sliced apples and fruit with nice dips.

Most important, if you do find you overeat, lighten up, don't dwell on the negative and get over it! Analyze objectively what you can do differently next time.

With awareness and good planning, you can have your sweets and eat them, too!