Is Coffee Good for Us? Maybe Machine Learning Can Help Figure It Out.


Should you drink coffee? If so, how much? These seem like questions that a society able to create vaccines for a new respiratory virus within a year should have no trouble answering. And yet the scientific literature on coffee illustrates a frustration that readers, not to mention plenty of researchers, have with nutrition studies: The conclusions are always changing, and they frequently contradict one another.

This sort of disagreement might not matter so much if we’re talking about foods or drinks that aren’t widely consumed. But in 1991, when the World Health Organization classified coffee as a possible carcinogen, the implications were enormous: More than half of the American population drinks coffee daily. A possible link between the beverage and bladder and pancreatic cancers had been uncovered by observational studies. But it would turn out that such studies — in which researchers ask large numbers of people to report information about things like their dietary intake and daily habits and then look for associations with particular health outcomes — hadn’t recognized that those who smoke are more likely to drink coffee. It was the smoking that increased their cancer risk; once that association (along with others) was understood, coffee was removed from the list of carcinogens in 2016. The next year, a review of the available evidence, published in The British Medical Journal, found a link between coffee and a lower risk for some cancers, as well as for cardiovascular disease and death from any cause.

Now a new analysis of existing data, published in the American Heart Association journal Circulation: Heart Failure, suggests that two to three (or more) cups of coffee per day may lower the risk of heart failure. Of course, the usual caveats apply: This is association, not causation. It could be that people with heart disease tend to avoid coffee, possibly thinking it will be bad for them. So … good for you or not good for you, which is it? And if we can’t ever tell, what’s the point of these studies?

Critics have argued, in fact, that there isn’t one — that nutrition research should shift its focus away from observational studies to randomized control trials. By randomly giving coffee to one group and withholding it from another, such trials can try to tease apart cause and effect. Yet when it comes to understanding how any aspect of our diet affects our health, both approaches have significant limitations. Our diets work on us over a lifetime; it’s not feasible to keep people in a lab, monitoring their coffee intake, until they develop heart failure. But it’s notoriously difficult to get people to accurately report what they eat and drink at home. Ideally, to get to the bottom of the coffee question, you would know the type of coffee bean used and how it was roasted, ground and brewed — all of which affect its biochemistry — plus the exact amount ingested, its temperature and the amount and type of any added sweetener or dairy. Then you would consider all the other variables that influence a coffee drinker’s metabolism and overall health: genome, microbiome, lifestyle (sleep habits, for example) and socioeconomic status (is there household stress? poor local air quality?).

Randomized control trials could still yield useful insights into how coffee influences biological processes over shorter periods. This might help explain, and thus validate, certain longer-term associations. But before doing a trial on a given nutrient, scientists need to have some reason for thinking that it might have a meaningful impact on lots of people; they also need to already have plausible evidence that testing the compound on human subjects won’t do them lasting harm.

The Circulation study employed observational data, but its initial aim was not to assess the relationship between coffee and heart failure. This is how the lead author David Kao, a cardiologist at University of Colorado School of Medicine, characterized it to me: “The overall question was, What are the factors in daily life that impact heart health that we don’t know about that could potentially be changed to lower risk.” Because one in five Americans will develop heart failure, even small changes in their behaviors could have a big cumulative impact.

Traditionally, researchers start out with a hypothesis — coffee lowers the risk of heart disease, for example. Then they compare subjects’ coffee intake with their cardiovascular history. One drawback to this process is that there are all sorts of ways researchers’ preconceived notions can lead them to find false relationships by influencing which variables they include and exclude in the analysis or by prompting unscrupulous researchers to manipulate the data to fit their theory. “You can dredge up any finding you want in science using your own biases, and you get a publication out of it,” says Steven Heymsfield, a professor of metabolism and body composition at the Pennington Biomedical Research Center at Louisiana State University. To illustrate this point, a widely cited 2013 review in The American Journal of Clinical Nutrition searched for 50 common cookbook ingredients in the scientific literature; 36 had been linked individually to an increased or decreased risk of cancer, including celery and peas.

Kao, however, didn’t start with a hypothesis. Instead, he used a powerful and increasingly popular data-analysis technique known as machine learning to look for links between thousands of patient characteristics collected in the well-known Framingham Heart Study and the odds of those patients’ developing heart failure. The algorithm “will start to line up the variables that contributed the most to the variance in the data,” or the range of cardiac outcomes, says Diana Thomas, a professor of mathematics at West Point. “And that’s objective.”

The ability of machine learning to process vast amounts of data could transform the ability of nutrition researchers to study their subjects’ behavior more precisely and in real time, says Amanda Vest, medical director of the Cardiac Transplantation Program at Tufts Medical Center, who wrote an editorial that was published with the Circulation study. For example, it could be trained to scan photographs of subjects’ meals and interpret their macronutrient level. It could also analyze data from geolocation devices, activity sensors and social media.

But machine learning is only as good as the data being analyzed. Without careful controls, says Michael Kosorok, a professor of biostatistics at the University of North Carolina at Chapel Hill, “it gives us the ability to make more and more mistakes.” If, for instance, it is applied to data sets that aren’t diverse or random enough, the patterns it sees won’t hold up when the algorithm then uses them to make real-world predictions. This has been a serious problem with facial-recognition software: Trained primarily on white male subjects, the algorithms have been much less accurate in identifying women and people of color. Algorithms must also be programmed to handle uncertainty in the data — as when one person’s reported “cup of coffee” is six ounces and another’s is eight ounces.

An analysis like Kao’s, which starts with no preconceived notions about what the data might say, can reveal connections no one has thought of. But those findings must be rigorously tested to see if they can be replicated in other contexts. After the link appeared between coffee intake and a reduced risk of heart failure in the Framingham data, Kao confirmed the result by using the algorithm to correctly predict the relationship between coffee intake and heart failure in two other respected data sets. Kosorok describes the approach as “thoughtful” and says that it “seems like pretty good evidence.”

Still, it’s not definitive. Rather, it’s part of a growing body of evidence that, at the moment, can say little about how much coffee people should drink. “It may be good for you,” says Dariush Mozaffarian, dean of the Friedman School of Nutrition Science and Policy at Tufts University. “I think we can say with good certainty it’s not bad for you.” (Additives are another story.) Getting more specific will require more research. Last year, Mozaffarian and others called on the National Institutes of Health to establish an institute for nutrition science that could coordinate those efforts and, crucially, help people interpret the results. “We need a well-funded, well-organized, coordinated effort to figure out nutrition,” he says. “No single study gets to the truth.”

Kim Tingley is a contributing writer for the magazine.


Please enter your comment!
Please enter your name here