Can an algorithm prevent suicide?

The A.I. behind Reach Vet seems to home in on other risk factors, Dr. Goodman said: “The things this program picks up wouldn’t necessarily be the ones I thought about. The analytics are beginning to change our understanding of who’s at greatest risk.”

The algorithm is built on an analysis of thousands of previous suicides in the V.A.’s database, dating to 2008. The computer mixes and shuffles scores of facts from the medical records — age, marital status, diagnoses, prescriptions — and settles on the factors that together are most strongly associated with suicide risk. The V.A. model integrates 61 factors in all, including some that are not obvious, like arthritis and statin use, and produces a composite score for each person. Those who score at the very top of the range — the top 0.1 percentage — are flagged as high risk.

“The risk concentration for people in the top 0.1 percent on this score was about 40 times,” said John McCarthy, the director of data and surveillance, in Suicide Prevention in the VA Office of Mental Health and Suicide Prevention. “That is, they were 40 times more likely to die of suicide” than the average person.