Unless you’re watching Her, you don’t generally connect AI with romantic angst. But researchers from the University of Southern California have trained one to give troubled relationships a death date — which might be the key to saving them.

The researchers’ study, published in PLOS One, details the process. A machine learning algorithm listened in on the therapy sessions of 134 couples, and the researchers fed it information on the lifespan of each relationship. It studied how long both parties spoke, when, and what tone they used more than the actual words.

According to the paper:

Our experiments, using data from a longitudinal clinical study of couples in distressed relations, showed that predictions of relationship outcomes obtained directly from vocal acoustics are comparable or superior to those obtained using human-rated behavioral codes as prediction features.

While it might sound bleak to think an AI can hear you talk to your sweetheart and be able to determine you’ll break up in three months, there’s another way of looking at its efforts — namely, that hearing its predictions might give couples a way of realizing how toxic their tone is.

I don’t claim to be an expert on relationships, but negative tone of voice can imply a lack of respect or regard — an implication that can be poison for a relationship. So if you’re in therapy and an AI attuned to tone of voice gives your couplehood a death sentence, perhaps that can be a concrete way of correcting an otherwise ephemeral issue.

h/t Phys Org

Read next: Apple reports 400 percent rise in national security requests