(CNN) -- It may be possible to rewire your brain so that it wants -- craves, even -- healthier foods.

How? By following a healthy diet.

We know, that wasn't the quick fix to afternoon ice cream binges you were hoping for. But this research could lead to a more sci-fi solution to the obesity epidemic.

In a pilot study published Monday in the journal Nutrition & Diabetes, scientists say that changing your eating behavior can actually change how your brain reacts to high-calorie and low-calorie foods.

"We don't start out in life loving french fries and hating, for example, whole wheat pasta," senior author Susan Roberts, director of the U.S. Department of Agriculture's Energy Metabolism Laboratory, said in a statement. "This conditioning happens over time in response to eating -- repeatedly -- what is out there in the toxic food environment."

So it makes sense that the opposite would also hold true.

Scientists divided 13 overweight and obese participants into two groups: a control group and an experimental group. At the beginning of the study, both groups underwent an fMRI to record their brain activity in response to photos of various foods.

The experimental group then participated in a behavioral intervention program, which included portion-controlled menus and support group sessions. The participants were asked to reduce their calorie intake by 500 to 1,000 calories a day and to follow a high-fiber, high-protein diet to prevent hunger and cravings.

After six months, people in the experimental group had lost an average of 14 pounds, while the control group had lost about 5 pounds.

Both groups again underwent an fMRI scan, and researchers showed the study participants photos of low-calorie and high-calorie foods, such as a turkey sandwich on wheat bread and a container of french fries. They looked at how the participants' brains responded to these photos, particularly in the striatum, a region known to be associated with the brain's reward system.

Previous studies have shown that high-calorie, fatty, sugary foods trigger the pleasure center of the brain. That's why you naturally crave these unhealthy foods: You expect to be rewarded with dopamine for eating them.

But people in the experimental group showed a slightly different response to seeing high-calorie foods after participating in the intervention program. Researchers saw less activity in the striatum when participants were shown these foods and more activity when they were shown lower-calorie foods.

The same did not hold true for the control group.

"There is much more research to be done here, involving many more participants, long-term follow-up and investigating more areas of the brain," Roberts said. "But we are very encouraged that the weight-loss program appears to change what foods are tempting to people."

Healthy school lunches face tough taste test

Salad daze: From leafy greens to meatloaf chunks