Using AI to Find a Partner

{ đź‘« } – Using AI to Find a Partner on Tinder

Illustration by Jason Yang.

There is a board game called Go — it is a game where two players alternate placing stones on a board, attempting to surround more territory than the opponent. In May 2017, the world number 1 player lost three games straight to AlphaGo, an artificial intelligence designed to become the best “player” in the game. Because of its number of possible positions and the long term impact of each single moves, conquering Go has been a target for AI for decades.

Compared to Go, swiping on Tinder to me has no complicated strategy — it’s just a simple tedious process of either swiping right or left. It’s like a Bingo. Cute? Check. Smiling? Check. Mildly funny bio? Check. Bingo, swipe right. If we can teach an AI to beat the world’s best player in Go, surely we can teach an AI to swipe for us and find the one on Tinder (after all, Valentine’s is coming up soon).

In this article, I look into existing ML models and think of ways to apply them to Tinder app. I also talk about the limitations of AI in dating and how implementing such feature could question the values of what it means to be a human.

Reading Into What’s Out There Already

There are already some attempts being done in this field. Both Andrew E Brereton and Jeffrey Li have separately managed to write an algorithm that predicts the probability of like and dislike:

  • Step 1. Data labeling and cleaning: Go through 500 to 1000 profiles, each with 4–5 photos, and manually sort into a folder called “like”, “dislike”, or “neutral” (neutral includes pictures that are obscure, unrelated, or contain multiple people).
  • Step 2. Neural Network: Retrain an existing neural network (see example) using transfer learning on the new task: swiping right or left. In other words, take something that has already been trained on a lot of data (hot dog or not hot dog) and teach it to interpret what it’s seeing in a different way (cute or not cute).
  • Step 3. Algorithm: Write a function that scores a profile based on the sum of the scores on each image that the above network has come up with. You can manually set the score bar e.g. set it low if you have low standards and want to swipe right more often.

There are a few limitations to this approach. First of all, you’d need to train the network with more than 150,000 images to have 80–90% performing algorithm; and that’s a very long and tedious process. Secondly, the profile description and other details were ignored. “It’s about the personality,” my dad would always say, and both Brereton and Li taught an AI to swipe purely based on the photos.

It’s worth interviewing with users on Tinder to understand their thought process behind each swipe. Let’s adapt the process and iterate on the limitations.

Using Another Approach to Train AI

Realistically, not many people will go through 150,000 images to train an AI. However, the neural network needs this large amount of data to recognize deeply buried patterns and correlations (smiles) that connect the many data points to our desired outcome (swipe right).

But if we take a step back, we actually do not need such a complex approach. We as humans, at least for me, already sort of know what traits we like and don’t like. We can actually use what we know and teach computers to think by encoding a series of rules: If X, then Y. If the picture has a male, minus 10 points. If the picture has a dog or a cat, plus 10 points. This is called a “rule-based” approach, and it’s often a quicker, tactical solution that requires less data set compared to using neural networks.

Rule-based system input/output flow. Credit: Packt.

This way, we can also utilize and feed our images to an existing library such as gender recognition and smile recognition. As long as people know what traits they like and those traits are mainstream, then this approach works. If not and if we also want to scale the learnings, we need to go back to neural networks and let the computer identity patterns without our interference. For now, we can use a “rule-based” approach so we only need to go through 200–500 photos (50–100 profiles).

import face_recognition
image = face_recognition.load_image_file("your_file.jpg")
face_locations = face_recognition.face_locations(image)

#click here for more

Below, I have imagined how I can insert my rules on Tinder. It’s important, especially as a designer, to think beyond the model and design the process around the AI components— how do I design a process that will generate data for the algorithm that I want to build, how do I handle the outputs, and how do I educate users to integrate the AI into the existing product (this is why I did not consider other models such as CNN attention model).

Illustration below “Create Your Own AI” by Alexandra Svistunova.

If I have more time, there are two iterations I want to make. One is from my product design side: I want to rethink about the steps from swiping to teaching the rules. It seems like having a pop up each time the user swipes would be a terrible user experience. Perhaps, it is worth leaving the familiar gesture aside to think creatively about merging the two steps.

Another is from my product manager side, and I want to make sure that the data is not biased with, say, specific race. I have obtained and manually selected photos through ThisPersonDoesNotExist to avoid using underaged or obscure profiles. But through this manual process, I may have introduced my own bias into the pool of pictures, which is a problem that I need to fix for future iterations.

Transparency in Decision Making

When I discussed the idea of using AI to swipe on Tinder, one common concern was not knowing why the AI swiped right or left. Thus, we need to make the mysterious reasoning of the AI transparent and accessible to the users and make sure that they trust the AI: why was the prediction made and which of our rules caused the prediction?

LIME, Local Interpretable Model-Agnostic Explanations, is a technique that provides model interpretability. It modifies a single data sample by tweaking the feature values and observes the resulting impact on the output— in our example, it can split an image into superpixels, gray out some parts, and then try to find out which superpixel areas give the highest prediction scores.

Image classification prediction made by LIME.
import numpy as np
import matplotlib.pyplot as plt
from skimage.color import gray2rgb, rgb2gray # since the code wants color images
from skimage.util.montage import montage2d # to make a nice montage of the images

Below is how I imagine seeing the AI reasonings. The design is inspired by some of the data visualization works by Facebook AI. One major iteration after user testing is: I changed from graying out low prediction score to displaying high prediction score (hair, eyes, lips) with a pink overlay.

Incorporating Profile Description

Shannen Lee has taken her time to survey her friends and matches to understand what people prioritize when swiping on others:

Credit: Shannen Lee.

Majority of the people, including myself, actually read the profile description and use it with the photos to judge right or left, but the current attempts have neglected this fact due to its challenges.

The major challenge is in the human complexity and not the technicality. For instance, I like descriptions that are either happy or funny. The former is relatively easy using existing API like the one below.

curl \
    -F 'text="I love going outdoor and doing new challenges"' \
    -H 'api-key:quickstart-QUdJIGlzIGNvbWluZy4uLi4K' \
    https://api.deepai.org/api/sentiment-analysis
click here for more

However, it’s still full of holes especially with short profile descriptions that have little context. If we take a look at this description, “I’m dying because I just got a ticket for BTS!”, the API will pick up on the word “dying” and rate the sentence as negative. Since it’s full of holes, perhaps we don’t punish the neutral or negative descriptions but rather we simply reward positive ones with extra points and leave the rest untouched.

As for figuring out if the description is “funny” or not, there are many ongoing, cutting-edge research. Rochester Human-Computer Interaction lab has recently introduced UR-FUNNY, a model that helps interpret how factors such as words, gestures, and cues (tone and acoustics) are used in presenting humor. Below is a visualization of how the model works.

UR-FUNNY dataset example. Credit: Association for Computational Linguistics.

The model has an average performance rate of 65.23 percent, and this is using all sorts of clues within humor. In our case, we only have words â€” it’s even hard for a human to figure out if a text is funny, let alone a machine without sufficient data or the right algorithm. One day, we can ask Siri or Alexa to tell us a joke and ask why it’s funny. Until then, we cannot rely too heavily on profile description to predict swiping right or left, and we are stuck with this:

Siri can say a joke but cannot explain why it’s funny.

Is Tinder Actually Going to Do This?

The general excitement about AI is great. There are a lot of talents going into the field, and there are tons of investments happening in AI projects. And I think AI does have a market fit in dating apps like Tinder, and it would be fascinating to see how the public reacts — I think many people, including myself, would try the feature, and we can get tons of data about AI in dating.

However, I’m trying to solve too much with AI. Since this is a personal project aimed to summarize AI techniques for non-AI developers, I ignored the scope, but it would be too big for the real world due to the subtle intricacy in swiping. If Tinder were to implement all of the above ideas, not only do they have to constantly monitor and make sure the model is not decaying, but they also have to deal with all the process around the AI from generating data to handling false positives and false negatives.

In addition, as mentioned, Tinder would need to make sure the model is not reinforcing bias and stereotypes. For instance, the most conventional “sexy” photos can be traced to behaviors and appearances that showcase younger women, which brings up an issue of the way mainstream heterosexuality preys on young women. Tinder would also need to address how the model will work for bisexual people to separately train the model for two different genders and balance between the preferences per user.

Given the scope and potential problems, I need to rethink about the project. Is swiping really a repetitive process for the users? Are we sure that the feature is inclusive to all the users out there? If so, I need to carve out a very specific portion and solve it with humans first. If there is a chance of using AI, Tinder can first come up with some heuristics and test it with a closed experimental group. Without these intermediate steps, it is not worth the investment and time to dive into AI projects.

The Future of Dating

We can go deeper into using AI. For instance, we can implement a chatbot that talks for us until a dinner date has been arranged. AI could even suggest dating spots based on a big data of where other matches in the area have gone to and enjoyed. AI could do anything, and it feels like humans are losing control over our own destiny. It took our crowns at board games, it could take our tasks and jobs, and now it could take over our mission to find love. Refer to Black Mirror’s Hang the DJ episode for more info.

But is it really the fault of the AI developers and are you, as a reader, sure that you are simply a passive victim in the story of AI? Can you confidently say that you are more than an economic contribution — that you aren’t put on Earth to merely grind away at repetitive tasks like earning money and passing it to your children? Sometimes, when I’m on my bed swiping through countless profiles on Tinder and wishing that there is an AI that can simply find the one partner for me, I forget. Finding love, or perhaps life in general, isn’t all about the ending. It’s also about the nervous first dates, the emotional breakups, the self-improvement, and the happiness of giving and receiving love. It’s the loving process that we as humans enjoy that makes us humans.

AI is a tool that we can use, but not one to take over our core values. What do you think?


If you want to contribute to next the issue of Phase Magazine, write to us here:

Hiroo Aoyama Avatar

Hiroo Aoyama / Product Design Intern @ Facebook

Hiroo Aoyama is a designer and author. He is currently an incoming product designer at Facebook.

www.hirooaoy.com/