How Graphics Technology – and a Little Math – Helped One Man Find True Love

by Brian Caulfield

A lonely Ph.D. student at the University of California, Los Angeles, used math, GPUs — and a little hacking — to find true love.

The tale of how Chris McKinlay mined profiles on the OkCupid dating service site to get himself in front of scores of women, eventually meeting fiancée Christine Tien Wang, has earned the mathematician worldwide fame.

Here’s the part of the story that hasn’t been told: McKinlay used CUDA, and a Tesla GPU, to crunch the numbers that made him lucky in love. “It was probably overkill, but it was hard to resist, as I had one sitting in front of me,” McKinlay said.

Mathematician Chris McKinlay
A mathematician walks into a bar… : number-crunching helped Chris McKinlay bypass the bar scene and find the woman of his dreams.

CUDA is a parallel programming model that makes using a graphics processing unit (GPU) for general purpose computing simple. With CUDA, developers can tap into the parallel processing power of GPUs, giving them access to the kind of compute power once available only on multi-million dollar supercomputers.

McKinlay, 35, is living proof that a knack for math — and a bit of subversive streak — is the functional equivalent of a comic book super power.

Know When to Hold Them …

Before graduate school, McKinlay played with an offshoot group of MIT-educated blackjack players, earning a living from his math skills.

He’s now using his Ph.D. to build profiles of the bacteria that live in our gut — known as the microbiome — a field that promises to one day yield treatments for everything from obesity to cancer.

The result of that know-how, when applied to the dating marketplace, puts even the smoothest bar-hopping pickup artist to shame.

“You go out and if you’re really aggressive you might meet a couple of dozen people in a night,” McKinlay says. “But by putting myself at the top of everyone’s match percentage, I would be exposing my profile to 20 to 25 thousand women — not just any women, but women who had answered questions in a statistically significantly similar way.”

With Great Power, Comes Great Dating Prospects

Wired’s Kevin Poulson first told the tale of how McKinlay used a pair of Mac Mini servers to mine data from the profiles of women in OkCupid to find out which of the thousands of questions the service posed to its users most mattered to them.

Optimal Cupid: Mastering the Hidden Logic of OKCupid
Better than okay: McKinlay has written a book explaining how to get the most out of the dating site.

McKinlay then built models of the different kinds of women using the dating service, and answered the questions that mattered most to the kinds of women he wanted to meet. The result: the service rated him as compatible with thousands of possible partners.

To speed up the process of crunching all those numbers, McKinlay took advantage of the CUDA extensions available in C/C++ to tap into the Tesla GPU he was using for his Ph.D. dissertation.

These helped him quickly use an algorithm developed at Bell Labs called K20-Modes — originally used to analyze diseased soybean crops — to clump results from 20,000 women into seven separate clusters.

“I was already using it for my dissertation research,” McKinlay says of using a supercomputer accelerator to speed up his quest. “So, I felt a little less guilty about spending a month hacking OkCupid instead of the stuff I was supposed to be doing.”

Two Dates a Day? Now That’s Parallel Processing

With a little nudge from computers that he programmed to view the profiles of his best prospects — sending them a signal that he had looked at their profiles — McKinlay was able to line up all the face-to-face meetings he wanted; sometimes stacking up two in a single day. On his 88th date, he met Tien. They now plan to marry.

Maybe it would have gone quicker if McKinlay had run his dates like he did his code: in parallel. “Unfortunately, I’m mostly a single-threaded processor,” he says.