Facebook (NASDAQ:FB), it seems, has all the prognosticating powers of a real-life love guru. A research paper published by the social media company says it has developed an algorithm that can identify who you are dating -- or who your spouse is -- and whether your relationship is heading for a breakup.

The study, conducted by Facebook senior engineer Lars Backstrom and Cornell University scientist Jon Kleinberg, focuses on Facebook users who have declared in their profile that they are in a relationship, engaged or married.

The process depends on two data points that measure social connectedness on the network. The first is dispersion, a measure of the level of connectivity among two people’s mutual friends.

A link between two people has high dispersion when, according to the study, their mutual friends are not well-connected to each other. The second is embeddedness, another data point used to determine the strength of a relationship between two friends, and it's based on the number of mutual friends shared by a pair of friends.

Dispersion was deemed the best metric. In 60 percent of test cases involving married users, the friend with the highest dispersion rating was deemed to be a user’s spouse. Embeddedness achieved an accurate result about 25 percent of the time.

If the algorithm failed to guess a user’s significant other, they were 50 percent more likely to break up within two months.

The researchers tested other data as well, including the number of messages sent, event attendance and the number of times a user views a friend’s profile, but dispersion surpassed all other data as the most effective relationship indicator.