Learn How Recommender Systems Work with Your Own Facebook Data

ReadyAI.org
ReadyAI.org
Published in
4 min readFeb 23, 2021

By Yang Cheng

New lesson plan alert! This week we are releasing a new high school lesson plan on recommender systems. Have you wondered how personalized ads show up on your feed? This lesson will not only dive into the technical details of how recommendations are made, it will also cover the ethics of ad targeting. Students will get a chance to download their own Facebook data and use it to explore recommender systems.

What are recommender systems? The best examples come from Netflix and Spotify. These platforms learn about your preferences about movies or music (either expressed explicitly like giving a thumbs up for a movie or “heart”ing a song, or implicitly like simply choosing to watch or listen). The platforms will compare your interests and interests of users who are similar to you, then recommend things those people have liked to you. This specific technique is called user-based collaborative filtering, collaborative being that other users’ preferences are used to generate recommendations for you. User-based collaborative filtering is used in many places, such as targeted ads, suggested pages and suggested friends. In this way, your recommendations are not just based on your behavior but what your friends and other similar users are buying, liking and clicking on.

It’s much more meaningful and provocative when people explore their personal data. In this lesson adapted from Yim Register’s study, students will download data from their Facebook account. Then, they will be able to explore what interests Facebook thinks they have, ranging from brands, concepts, causes, celebrities to movies (explore your own data here!). Students will pick seven interests and make three fictional friends, who will share a few of your seven interests.

In this chart, students will cross-compare each friend’s interests and determine that Friend3 is most similar to me.

Then the interests of Friend3, the friend who is most similar to me, is displayed in this visualization. Based on the user-based collaborative filtering method, Friend3’s interests, Button and electronic music, are recommended to me.

To dive deeper into the technical details of this machine learning technique, students will also complete an unplugged exercise. This time, instead of 1s and 0s representing interest (I am interested in electronic music or not), we will use ratings from 1–5 to represent interest just like Netflix’s old rating system.

In this exercise students are data scientists at an AI-powered streaming service. They have access to a handful of ratings made by users and are tasked with making recommendations to one user named Quinn.

How do we guess what Quinn might like? One idea may be just recommending her the best movie according to other users, meaning we can take an average rating of all movies and recommend her the highest rated one. Although this is a very generalized recommendation, after all, we don’t expect all users on the site to like the most popular movie. Armed with the knowledge of user-based collaborative filtering, we can take into account Quinn’s taste. We start by comparing Quinn to every other user and calculate their cosine similarity. We find that Jordan is most similar to Quinn in our database so we will recommend the movie that Jordan rated highly but Quinn hasn’t seen yet.

This exercise serves to show students how similar preferences can predict future preferences, but in the process students also discover some potential issues with recommender systems. In the discussion phase, students share their thoughts from the Facebook study. One of the most pressing issues is online privacy. This includes our browsing habits and history as well as the personal information we share with the websites and apps we use. Platforms are storing personal data from users and using it for commercial gain. It may seem beneficial when it comes to movies, but what about other categories of data like household income?

On Facebook, advertisers can target by how your income compares to your neighbors.

The discussion should serve as a jumping off point for students to dig deeper into the use of recommender systems for ad targeting. The Facebook experiment helps to make the technical aspect clearer and the problem more personal and concrete. For an AI application that is as commonplace as recommender systems, this lesson will help students make sense of the AI systems they are interacting with everyday.

ReadyAI Chats with Yim Register About Their New Lesson Plan | Recommender Systems

Check out our courses and lesson plans here: https://edu.readyai.org

--

--

ReadyAI.org
ReadyAI.org

ReadyAI is the first comprehensive K-12 AI education company to create a complete program to teach AI and empower students to use AI to change the world.