– A trip to almost any bookstore or a cruise around the Internet might leave the impression that avoiding cancer is mostly a matter of watching what you eat. One source after another promotes the protective powers of superfoods, rich in antioxidants and other phytochemicals, or recommends the diets of Chinese peasants or Paleolithic cave dwellers.

But there is a yawning divide between this nutritional folklore and science. During the past two decades the connection between the foods we eat and the cellular anarchy called cancer has been unraveling string by string.

This month at the annual meeting of the American Association for Cancer Research, a huge event that drew more than 18,500 researchers and other professionals, the latest results about diet and cancer were relegated to a single poster session and a few scattered presentations. There were new hints that coffee may lower the risk of some cancers and more about the possible benefits of vitamin D. Beyond that there was not much to say.

Walter Willett, a Harvard epidemiologist who has spent many years studying cancer and nutrition, sounded almost rueful as he gave a status report. Whatever is true for other diseases, when it comes to cancer there was little evidence that fruits and vegetables are protective or that fatty foods are bad.

About all that can be said with any assurance is that controlling obesity is important, as it also is for heart disease, type 2 diabetes, hypertension, stroke and other threats to life. Avoiding an excess of alcohol has clear benefits. But unless a person is seriously malnourished, the influence of specific foods is so weak that the signal is easily swamped by noise.

The situation seemed very different in 1997, when the World Cancer Research Fund and the American Institute for Cancer Research published a report, thick as a phone book, concluding that diets loaded with fruits and vegetables might reduce the overall incidence of cancer by more than 20 percent.

After reviewing more than 4,000 studies, the authors were persuaded that green vegetables helped ward off lung and stomach cancer. Colon and thyroid cancer might be avoided with broccoli, cabbage and Brussels sprouts. Onions, tomatoes, garlic, carrots and citrus fruits all seemed to play important roles.

In 2007, a major follow-up all but reversed the findings. While some kinds of produce might have subtle benefits, the authors concluded, “in no case now is the evidence of protection judged to be convincing.”

The reason for the change was more thorough epidemiology. The earlier studies tended to be “retrospective,” relying on people to remember dietary details from the distant past. These results were often upended by “prospective” protocols, in which the health of large populations was followed in real time.

The hypothesis that fatty foods are a direct cause of cancer has also been crumbling, along with the case for eating more fiber. The idea that red meat causes colon cancer is shrouded in ambiguity. Two meta-analyses published in 2011 reached conflicting conclusions — one finding a small effect and the other no clear link.

If hamburgers are carcinogenic, the effect appears to be mild. One study suggests that a 50-year-old man eating a hefty amount of red meat — about a third of a pound a day — raises his chance of getting colorectal cancer to 1.71 percent during the next decade, from 1.28 percent. Spread over a population of millions, that would have an effect. From the point of view of an individual, it barely seems to matter.

Trying to tweeze feeble effects from a tangle of variables, many of them unknown, inevitably leads to a tug of war of contradictory reports. (As the San Diego meeting was winding up, a new paper on high-fat diets and breast cancer suggested there might be a connection after all.)

With even the most rigorous studies, it is hard to adjust for what epidemiologists call confounding factors: Assiduous eaters of fruits and vegetables probably weigh less, exercise more and are vigilant about their health in other ways.

Some of this can be sorted out with randomized controlled trials, with two large groups of people arbitrarily assigned different diets. But such studies are expensive, and the rules are hard to enforce in the short term — and probably impossible over the many years it can take for cancer to develop.

The emphasis at the meeting was on other things: new immunotherapies, the role of chronic inflammation and the endlessly intricate subterfuges of cancer cells. With his focus on nutrition, Willett seemed like the odd man out.

“Diet and cancer has turned out to be more complex and challenging than any of us expected,” he said, standing thin as a rail at the lectern.

There were some reasons for optimism. A study last year suggested that while eating lots of produce had no effect on most breast cancers, vegetables might reduce the occurrence of a type called estrogen-negative. Cutting back on milk and other dairy products might lower the risk of prostate cancer.

As epidemiologists began to follow the health of younger populations, Willett hoped that more dietary influences would yet emerge.

That evening at a reception hosted by the M.D. Anderson Cancer Center, guests partook of a sumptuous buffet that included thick slabs of roast beef, a variety of rich cheeses and generous servings of wine. Afterward came the cancer research association’s grand celebration known for its dessert buffet.

The next morning the scientists were back at the meeting, coffee in hand, rushing from session to session.