That Neural Net That Predicts Sexual Orientation

Image via Flickr CC courtesy of Stefano Mortellaro.

What does a computer see when it looks at a face? Image via Flickr CC courtesy of Stefano Mortellaro.

A neural network is one way to achieve machine learning. Modeled after the human brain, a neural net teaches a computer how to do some task by processing a huge set of training data. The data passes through the network training thousands of nodes how to react to future data of that type. Some machine learning can lead to interesting if hilarious results, some of which Evelyn blogged about earlier this year.

This week a more questionable use of neural nets hit the newsstands with the announcement of a Journal of Personality and Social Psychology publication, Deep neural networks are more accurate than humans at detecting sexual orientation from facial images, and I hope you don’t mind me saying that the mere existence of this technology is frightening in the utmost.

As their training data the authors used several thousand photos of men and women who self-identified as homosexual or heterosexual from an internet dating site. After the training, they found that their computer could correctly detect sexual orientation 81% of the time for men and 71% of the time for women. This was compared to a 61% accuracy for men and 54% accuracy for women when detected by humans employed by Amazon Mechanical Turk.

There are many reasons why these numbers could have emerged, several are summarized on the blog ScatterPlot in a guest post by the sociologist Greggor Mattson. My first thought was that it may well have something to do with the provenance of the training set. Jesse Bering blogged about a similar but low-tech version of this type of study for Scientific American several years ago. However, the authors seem to dispatch with this idea in Study 5 when they feed Facebook photos into the trained computer.

According to the authors, the success of the neural net may have something to do with the (their words) gender-atypical features of gay men and women. And this, they claim, has something to do with prenatal hormone exposure.

A good analysis of this (erroneous) claim and publication overall was given in a blog maintained by the professors of a (really incredible looking) University of Washington course Calling Bullshit: Data Reasoning for the Digital Age. In it, the authors claim that even if we assume the neural net was set up in a totally reasonable way, and that all algorithms are mathematically sound, it’s still easy to see that the conclusions the authors draw are (in their words) not parsimonious. I appreciate their willingness to treat the technical business as a black box and nevertheless analyze the good-sense of the findings. “black boxes should not be deterrents,” they argue, “one doesn’t need extensive technical training in order to think critically about even highly technical analyses.”

But the mathematical pith shouldn’t always be ignored, since it often it takes a bit of pulling apart of the apparatus to see where things go wrong. At the same time I am also sensitive to the fact that the mere presence of math can sometimes bully people into believing.

I just finished reading Weapons of Math Destruction, the book about dangerous algorithms by the blogger Cathy O’Neil of mathbabe.org. First of all, I can’t endorse this book strongly enough. But also, this book really hammers home the idea that we mustn’t just accept things on face value because they are rooted in math. The assumptions that go into programming an algorithm are just as biased and fallible as humans, and the way we interpret the outputs of algorithms (or neural nets in this case) also require some critical thought.

With all of this, it’s just sobering to recall that whether the conclusions are specious or not, the tool now exists. And in this year 2017 we should know enough to believe that even the most critically flawed tools of math can be used against us.

This entry was posted in Data Science and tagged , , , , . Bookmark the permalink.