The algorithm developed by a Cornell University professor and a senior Facebook engineer takes advantage of a new metric system called "disperson," which looks at connections between people who have different sets of friends.

Researchers say close friends are likely to share a lot of friends in common, which social scientists call "embeddedness".

The researchers used multiple sets of anonymous data, including a large data set from 1.3 million Facebook users. They identified with 60 per cent accuracy who was dating whom, much better than the 2 per cent accuracy they'd get from random guessing, 'The Verge' reported.

High dispersion also seems to be correlated with longer relationships, researchers said. Couples were 50 per cent more likely to break up in the next two months if the dispersion algorithm failed to guess that they were dating, the study found.

Researchers also looked at metrics such as how many times a user viewed another person's profile, attendance at the same events, and messages sent.

Dispersion turned out to be the most overall accurate metric for determining romantic relationships.