Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

Welsh poet Dylan Thomas’ famous lines are a passionate plea to fight against the inevitability of death. While the sentiment is poetic, the reality is far more prosaic. We are all going to die someday at a time and place that will likely remain a mystery to us until the very end.

Or maybe not.

Researchers are now applying artificial intelligence, particularly machine learning and computer vision, to predict when someone may die. The ultimate goal is not to play the role of Grim Reaper, like in the macabre sci-fi Machine of Death universe, but to treat or even prevent chronic diseases and other illnesses.

The latest research into this application of AI to precision medicine used an off-the-shelf machine-learning platform to analyze 48 chest CT scans. The computer was able to predict which patients would die within five years with 69 percent accuracy. That’s about as good as any human doctor.

The results were published in the Nature journal Scientific Reports by a team led by the University of Adelaide.

In an email interview with Singularity Hub, lead author Dr. Luke Oakden-Rayner, a radiologist and PhD student, says that one of the obvious benefits of using AI in precision medicine is to identify health risks earlier and potentially intervene.

Less obvious, he adds, is the promise of speeding up longevity research.

“Currently, most research into chronic disease and longevity requires long periods of follow-up to detect any difference between patients with and without treatment, because the diseases progress so slowly,” he explains. “If we can quantify the changes earlier, not only can we identify disease while we can intervene more effectively, but we might also be able to detect treatment response much sooner.”

That could lead to faster and cheaper treatments, he adds. “If we could cut a year or two off the time it takes to take a treatment from lab to patient, that could speed up progress in this area substantially.”

AI has a heart

In January, researchers at Imperial College London published results that suggested AI could predict heart failure and death better than a human doctor. The research, published in the journal Radiology, involved creating virtual 3D hearts of about 250 patients that could simulate cardiac function. AI algorithms then went to work to learn what features would serve as the best predictors. The system relied on MRIs, blood tests, and other data for its analyses.

In the end, the machine was faster and better at assessing risk of pulmonary hypertension—about 73 percent versus 60 percent.

The researchers say the technology could be applied to predict outcomes of other heart conditions in the future. “We would like to develop the technology so it can be used in many heart conditions to complement how doctors interpret the results of medical tests,” says study co-author Dr. Tim Dawes in a press release. “The goal is to see if better predictions can guide treatment to help people to live longer.”

AI getting smarter

These sorts of applications with AI to precision medicine are only going to get better as the machines continue to learn, just like any medical school student.

Oakden-Rayner says his team is still building its ideal dataset as it moves forward with its research, but have already improved predictive accuracy by 75 to 80 percent by including information such as age and sex.

“I think there is an upper limit on how accurate we can be, because there is always going to be an element of randomness,” he says, replying to how well AI will be able to pinpoint individual human mortality. “But we can be much more precise than we are now, taking more of each individual’s risks and strengths into account. A model combining all of those factors will hopefully account for more than 80 percent of the risk of near-term mortality.”

Others are even more optimistic about how quickly AI will transform this aspect of the medical field.

“Predicting remaining life span for people is actually one of the easiest applications of machine learning,” Dr. Ziad Obermeyer tells STAT News. “It requires a unique set of data where we have electronic records linked to information about when people died. But once we have that for enough people, you can come up with a very accurate predictor of someone’s likelihood of being alive one month out, for instance, or one year out.”

Obermeyer co-authored a paper last year with Dr. Ezekiel Emanuel in the New England Journal of Medicine called “Predicting the Future—Big Data, Machine Learning, and Clinical Medicine.”

AI still has much to learn

Experts like Obermeyer and Oakden-Rayner agree that advances will come swiftly, but there is still much work to be done.

For one thing, there’s plenty of data out there to mine, but it’s still a bit of a mess. For example, the images needed to train machines still need to be processed to make them useful. “Many groups around the world are now spending millions of dollars on this task, because this appears to be the major bottleneck for successful medical AI,” Oakden-Rayner says.

In the interview with STAT News, Obermeyer says data is fragmented across the health system, so linking information and creating comprehensive datasets will take time and money. He also notes that while there is much excitement about the use of AI in precision medicine, there’s been little activity in testing the algorithms in a clinical setting.

“It’s all very well and good to say you’ve got an algorithm that’s good at predicting. Now let’s actually port them over to the real world in a safe and responsible and ethical way and see what happens,” he says in STAT News.

AI is no accident

Preventing a fatal disease is one thing. But preventing fatal accidents with AI?

That’s what US and Indian researchers set out to do when they looked over the disturbing number of deaths occurring from people taking selfies. The team identified 127 people who died while posing for a self-taken photo over a two-year period.

Based on a combination of text, images and location, the machine learned to identify a selfie as potentially dangerous or not. Running more than 3,000 annotated selfies collected on Twitter through the software resulted in 73 percent accuracy.

“The combination of image-based and location-based features resulted in the best accuracy,” they reported.

What’s next? A sort of selfie early warning system. “One of the directions that we are working on is to have the camera give the user information about [whether or not a particular location is] dangerous, with some score attached to it,” says Ponnurangam Kumaraguru, a professor at Indraprastha Institute of Information Technology in Delhi, in a story by Digital Trends.

AI and the future

This discussion begs the question: Do we really want to know when we’re going to die?

According to at least one paper published in Psychology Review earlier this year, the answer is a resounding “no.” Nearly nine out of 10 people in Germany and Spain who were quizzed about whether they would want to know about their future, including death, said they would prefer to remain ignorant.

Obermeyer sees it differently, at least when it comes to people living with life-threatening illness.

“[O]ne thing that those patients really, really want and aren’t getting from doctors is objective predictions about how long they have to live,” he tells Marketplace public radio. “Doctors are very reluctant to answer those kinds of questions, partly because, you know, you don’t want to be wrong about something so important. But also partly because there’s a sense that patients don’t want to know. And in fact, that turns out not to be true when you actually ask the patients.”

Stock Media provided by photocosma / Pond5

Formerly the world’s only full-time journalist covering research in Antarctica, Peter became a freelance writer and digital nomad in 2015. Peter’s focus for the last decade has been on science journalism, but his interests and expertise include travel, outdoors, cycling, and Epicureanism (food and beer). Follow him at @poliepete.

Follow Peter: