Hello and welcome to the NVIDIA AI Podcast.
I'm your host, Noah Kravitz. Love. The search for love.
The search even for someone you just kind of like.
It's been the subject of poems, novels, songs, you name it.
For as long as humans have been around, they've been looking for love.
But what if you could use AI to automate the process, to help you with everything from finding your true match to swiping through all those not quite true matches?
Today's guest has done just that. Here to talk about his work with artificial intelligence, including how he hacked Tinder.
Joining us from Stockholm, Sweden, Oskar Alsing.
Oskar, thanks so much for joining us. Yeah, it's a big pleasure to be here as well.
Thank you very much. So you're the host of a YouTube series called Artificial Intelligence for Everyone.
Want to throw that out there right at the beginning because it's a fascinating series.
I think a lot of our listeners will be into it because you get into artificial intelligence and how it can be applied in different ways and fun things to do with it, that kind of stuff.
But I want to go back in time a little bit and ask you about this whole thing with Tinder.
Where did that come from? How'd it get started?
And how'd you do? Tell us about it. Yeah, so basically I've been single for many years, right?
About four years now. And I've been on Tinder time from time.
But when I go there, I notice like it's quite mundane to swipe back and forth.
You kind of know if you would be attracted to someone or not. sat there thinking of the world a lot with convolutional neural networks for the past year like Shouldn't I be able to create a convolutional neural network that would be kind of good at swiping, right?
It would kind of understand what kind of people I find appealing and not appealing.
I mean, my goal here was to make a convolutional network that would be better at swiping than the drunk version of me.
And that was the... the whole goal of this.
And so I started thinking like, how can I gather the data that I need here in order to do this?
So I found out that the Tinder API back then, they didn't have a web interface, but you could kind of sniff the API calls by using Charles and and see what the endpoints are in the API, and could use cookies and authentication to pretend to be an iPhone or an Android.
So basically, I found out that it was this package for Python you could use called Pinder.
So they had Sniffed API for you, so you can basically use this package and use it to build a Python script that would gather data for you.
So I... did plug into that so I could gain access to the API, and then I could swipe from my computer.
I can go left and right, so dislike and like.
And when I did that, I make sure to also save their images in a Yes folder or a No folder.
Basically, I did that for quite a while.
So I gathered thousands of thousands and thousands of images.
When I wrote the article about it, I only did go halfway.
I'd continue for a while to do that. So I was able to gather a tremendous amount of data.
Now, thinking back at it, was it worth it?
Because I basically swiped like thousands of people getting all this data.
So... That was a bit like the programming dilemma, trying to automate things when it takes more time to automate it than actually using the application.
So I did that. And after a while, I got enough data and started to play around with convolutional network.
So I tried many different versions of it. and different setups with layers and dropouts and whatever.
And we managed to create a convolutional neural network that did very well.
When I wrote the article, I announced that it got 85% accuracy.
After fiddling for a while, I noticed I have some faults here, but I'm still at about 75% accuracy on a yes or no on image. that I can use well to automate the swiping for me.
So the end goal here is that I didn't want to swipe right, because it's so mundane.
It's like you, you swipe, yes or no on people if you find them attractive or not.
But what I was interested in was talking to people that I found attractive.
I don't like the swiping too much to connect with people.
And I did want to have more time to connect to people and less time swiping.
So that was the whole idea around it. So let's walk back a step or two here, and not just because I'm well out of the dating market and so this is how I live vicariously.
But when you're talking about accuracy and even before that, when you're setting up your network, I assume that accuracy means swiping the correct way based on whether you find these people's photos attractive.
Yes, exactly. Yeah. So when I gathered all this data, basically I created a very large training set, right?
With label images. So accuracy would be on the test set how many people that it actually will classify it as a no when it was supposed to be a dislike and a yes when it was supposed to be alike.
And did you train your model just simply on these are the types of... people or images that I like and these that I don't?
Did you get kind of more specific about features you were looking for.
And then also, I'll just throw this all out here so I can get out of your way and you can talk.
How did you sort of account for, I'm assuming that not everybody on Tinder has a professional headshot that was taken from the exact same angle.
So I'm, Assuming you've got some pictures up there that are close ups of faces, some that are kind of further out, some from an angle, you know, how do you deal with all that?
Yeah, so that was like the major issues.
And I think biggest issue for me was group shots, right?
If you have a group shot, who is the person that I'm looking for?
That was a big problem. So what I did, I didn't care about people's bodies and everything.
I focus on the face. So I use something called hard case case and in open CV to extract faces.
So I would run these pre-processing on all of the images.
And I would look for faces. And when I found a face, I actually looked, do they have two eyes so that the images would be kind of consistent, right?
So then I extracted 100 times 100 images of only the faces.
And that is the pre-processed data that I would train on later on.
Uh, so I would only look at people's faces and all of the images wouldn't be very professional.
Of course it would be somewhat different, different angles, but at least it would have two eyes and would have a closeup of their face.
So I didn't. look at you know someone in a swimming suit and then all of a sudden someone who in winter clothes uh skiing somewhere right Because that would be really weird.
And I didn't want these group shots because you have no clue whether, you know, which person you're looking for or not.
So with the preprocessing there, it's only the faces that it looks at and it doesn't take anything else in consideration in terms of the profile. your age or anything.
It's just basically trying to see here if we can use convolutional networks to kind of measure if I would be attracted to a person or not, and that would be attracted to their face.
And so you said you at one point when you wrote the article, which I'm looking at now, and it's actually it's really well done.
Compliment you on that because you do a A nice writing style that kind of combines the technical aspects with making it readable and entertaining. and some good use of visuals there and obviously your videos to explain the technical underpinnings of what you're doing.
So listeners can check that out on Oscar's blog.
Oscar, I'm going to mispronounce your last name.
So you say it. Yeah, oscarolzing.com. And yeah, you'll find me easier on YouTube where I have a video about this, a very old video, but probably going to make a new video about it as well.
But that's oscarolzing at YouTube as well.
Cool. So on the blog, you, you said you had about an 85% accuracy rate and you said, you know, after you wrote the blog, you kept going and maybe it's around 75% now.
So I'm assuming that's the accuracy rate for the network correctly predicting and swiping.
What was your success rate in terms of actually finding human connections?
So this one is good. I actually went on five dates with people that my AI matched with.
Wow. So I did get a lot of matches because what I did, I have a deep learning server at home here. that I also train my networks on, but I made a crying job to run this algorithm every morning. so it would go every morning would log into my tinder it would swipe a couple of people with the algorithm And then at the end of like every two days, I would log in and see if I match with anyone through the use of this algorithm.
And I did. So I actually set up a date with five people here and that and told them about this.
I told them that I was working with this kind of researcher because I also did this together with a professor at my uni. to get some input like, what do you think about this?
And I told them about that. Four of them took it really well.
They took it really well. They thought it was incredibly awesome.
That's great. Tell us about the fifth. Yeah, the fifth, she had a more bad experience about AI, right?
She heard about AI once, and there was some news article that people would teach you AI.
So she was very cynical about it all. And she wasn't very happy with the fact that an AI matched with her.
She didn't think it was very romantic. Um, so yeah, we actually canceled that date after like 25 minutes because we did have somewhat different views of the world that didn't go hand in hand with a loving relationship later on.
So it was for the better. Like for me, I spent a lot of time, like my life now resolves around artificial intelligence.
What I do full-time teaching CEOs and boards, and then on YouTube as well, and teaching everyone about AI.
So if you don't like AI, we... wouldn't work very well together anyway.
You probably had a good match. Yeah. So for me, it was a good call anyway to see that it didn't work out.
It didn't fly for initially, and maybe it was a good call.
Well, from an ethical standpoint, I'm very glad to hear that you were upfront about everything.
And, uh, You know, still 80% match, right?
So four out of five dates that didn't get canceled right away.
And you know, 75, 85% match using the technology.
It's pretty good. Let's step back a little bit to your pre-dating life.
And how did you get into- My pre-dating life.
How did you get into working with AI? Were you into math and science as a kid?
How did this all develop? Actually, so back in the day, I wasn't the coolest kid in school when I was very young.
So I spent a lot of time at home and I got a computer when I was very young.
And so I started playing with that. And then I was playing this game called RuneScape back in the days, RuneScape and Diablo 2.
Sure. Well, I wanted to become very rich in these games because when you were very rich, you can do cool stuff, right?
You got the best items. So I started to write very basic bots to automate these games, to go and get items, go play by yourself, go... mining RuneScape to get more ores that you can sell for gold.
And so that's how I started with programming in general, was creating bots for video games.
And then I moved on to World of Warcraft, selling gold by creating bots that would go on and farm gold and so on.
And for me, it was very natural to go in and studying like computer science as well.
So I've been doing that, you know, high school programming, then back to the Royal Institute. at the university and studied computer science theory.
And it's very clear that I wanted to go into artificial intelligence and machine learning as well, because I right now feel that that is the field within computer science that would impact the future the most.
And I find it incredibly fascinating to be part of that and to understand it.
So that's the core reason behind it. And of course, math has always been there as well.
Otherwise, it would be horrible to work with machine learning.
And so you mentioned that for your work on the project with Tinder, you were advised by a professor at university.
Are you still in school studying? Yes. So I'm finishing my studies now.
I've been studying artificial intelligence masters and I'm doing my master's this spring, where I'm actually going to work with convolutional neural networks, but on mobile phones.
I'll be using TensorFlow Mobile. to evaluate how these convolutional neural networks algorithms can be applied on the phones and executed on the phones in comparison to other algorithms that are used right now to identify items.
Oh, very interesting. Can you give us a preview?
Have you gotten far enough along to have any findings, any surprises?
No, not yet. So I'm starting this in January.
I have done some research, though, because I find it very fascinating.
And I think for modern cell phones, yes, absolutely.
So. I usually train my deep learning algorithms on servers, right?
I have access to some PTC servers with key 50s on them.
So they're really fast to train. And then you just take in the pre-trained network, put him on a cell phone and then execute the network steer. it doesn't really take that much computational power just to execute them.
So I think that it is very, very viable, especially as cell phones are becoming so tremendously fast.
So that's going to be really fascinating to see.
And I mean, yes, the fact that you now can use deep learning on your cell phones, you have been able to do that for a while, but not as easy as with TensorFlow Mobile.
It's just going to make a lot of I think VR and AR applications are much more fun as well because you can plug them together on the cell phones.
So I think we're going to see a lot more cool things happening here instead of having the old back... for each item that you want to.
If you want to identify a mug or a cup, that you would have to use some heuristics to identify that.
We can use deep learning now on the cell phone, so I think it's going to be really cool.
All right, so let's shift gears for a moment here.
And I was reading through your blog and there was an article you wrote from September of 2017 that I wanted to ask you about.
It's titled Risks of AI and its role in our future society.
And I know, you know, obviously, Anybody who's been following AI, working at all in the field knows that, especially over the course of this past year, The term has started to go mainstream, if you will, and there are more depictions and...
TV shows, books, movies, what have you, but just also more discussion the news media and general lay people circles, so to speak, about AI and is it going to take the jobs or the robots coming, that kind of thing.
And even in your own work with Tinder, you know, that fifth out of the five dates was canceled early because of some preconceptions about AI.
Yeah. So I'm wondering about this article, Risks of AI and Its Role in Our Future Society.
What do you see, even setting the risks aside if you want to, what do you see the role of AI, you know, in our future societies being?
I'm very positive to AI in the future. I'm not as concerned as many people are.
I think that as I see it right now, when we develop our AI right now is very narrow, not too much risks here.
But when AI becomes more general, if we are very good at integrating our what we as humans think is right or wrong into our AIs, I think they will work very well with us.
And I think that they would be like the perfect partner to us.
So as I see it, we as humans should use our cognitive functions as much as possible.
We are supercomputers in a sense. And if we can automate everything that can be automated very easily with artificial intelligence, and have that with us, like your AI buddy who can do all the mundane stuff for you and you can focus on the more abstract things that requires the human brain still where AI isn't yet.
I think that's where we're going to see the future.
I do think there is a risk though, which I talk quite a lot about, about training data.
So right now when we train our algorithms, we need some training data to train them, right?
And the quality of training data is crucial for having good AI in the future.
So let's say we have an AI that is supposed to be the first filter if someone is supposed to get a bank loan or not.
And the training data is biased. So a person has been sitting here before reviewing everything manually, and he had a bias versus some kind of person or gender or race, whatever.
And that is then, you know, it comes into the training data and the AI then keeps on getting this bias further and further and further into its algorithm.
I think that is my biggest concern, that the human bias when we have produced our training data and when we make choices is going to come to the AI as well, and that the AI will not understand what is truthful in terms of the general society.
So for the short term, I think that is a risk.
But no, I think that AI is going to be like a very nice buddy.
A friend that can help you with everything that you don't want to think about.
So that's how I see it. All right, so let's talk about your work on YouTube.
You've got this series, Artificial Intelligence for Everyone.
And in talking to you even just for a short time, it seems like a very natural outgrowth of your work and your personality and your grade on camera.
So tell folks about that. How did that get started?
And what are you aiming to do with the video series?
So I started this series because I felt like there was such a discrepancy between AI engineers and common human beings.
That sounds very bad, but I don't know how to say it.
Like people who aren't interested in AI.
And I wanted people to understand this in a better sense.
Even programmers who haven't done a lot of work with AI before, I want them to understand it in a good sense.
So I try to take all these abstract concepts, like everything from support vector machines to other, like how the perceptron works, what is deep learning, and take it down to a very, very basic level, and then try to explain it without going deep into programming nor math.
I wanted to explain this as I would explain it to a child without talking to a child because people don't like that.
You just make everyone... understand it in in this sense because i think it's so important when we come into the future that everyone has somewhat of a basic understanding of it because From a societal perspective, if we understand how the algorithm works, it kind of influences our society. and influences how choices are being automated all around us, I think that makes us better human beings, citizens, that we can feel a bit more relaxed what's happening around us.
We're like, well, I kind of understand how this works.
I kind of, you know, see the point here why we should use AI.
So that was the whole idea behind it. So that was artificial intelligence for everyone that I started.
It's about 30 videos now and It's absolutely heartwarming when I see, like, I see yesterday Rosalie commented on the perception we do.
Like, I'm so happy that I had a cognitive science exam tomorrow, Ayaan.
This really cleared everything out for me.
And that makes me very happy because I know that there's a lot of students out there who study all different things. she's studying cognitive science and she still has to know how the perceptron works and for her to come to my AI channel and understand that it's really cool as well because I see a lot of fields kind of like getting more inspiration from AI and people from all different backgrounds are here to learn more about artificial intelligence.
That's excellent. That's great to hear. The channel is under your name.
It's youtube.com slash Oscar Alsing. The last name is A-L-S-I-N-G.
So check that out. And you're still producing videos, I assume.
Every day now. So since three days back, I produce a video every day.
Very cool. So I had Two awesome guests this morning, some blockchain people.
Not only talking about AI, but machine learning and a lot of technology in general, a bit of blockchain as well.
I find it very fascinating. My focus is to do this full time in about a year, along with my lectures and the consultant work that I do with companies.
Excellent. Let's wrap up here with the million dollar question.
Are you still single? Yes, I am. And are you still using Tinder?
I was going to say, but it isn't my algorithm's fault, though, because I'm not too prone.
I don't like Tinder that much, actually.
Like I told you, it's like the war of AIs because Tinder uses AI to make you stay on the app as long as possible.
Right. And I wouldn't to create an AI to not stay on the app because I find it so addictive and it is because it's crafted to be very addictive.
Um, not really Tinder's fault, not my convolutional network's fault.
It's just that, uh, Yeah, you know, it's hard when you spend most of your time working with AI.
It's also time to meet people. But I'm getting there.
It looks bright, the future. My future dating life looks very bright at the moment.
There's no better note to end on than that.
Oscar Alsing, thank you so much for joining us.
In addition to the YouTube channel. the blog, which is also under your name, O S C A R A L S I N G.com.
Anywhere else where people who want to follow your work online should go.
No, it's the YouTube channel is the main source to see my content.
I also upload some videos on Facebook from time to time.
They're a bit shorter. It's the same Oscar Holsinger as well.
So you can check me out there as well. But otherwise I would say the main venue to find me is on YouTube.
Excellent. Well, we look forward to more of your work, more of your videos.
And of course, we're all rooting for you to find, you know, That special someone, or maybe it's a bunch of someones who, who knows, but the future is bright.
Who knows? That's what I'll announce it on my YouTube.
To everyone from the AI podcast, I'm not single any longer.
Call Noah, tell him. Exactly. Perfect. Oscar, thank you so much for joining us and we'll look forward to seeing more from you.
Thank you very much. I'm glad to be here.