CS代考 CSC 311: Introduction to Machine Learning

CSC 311: Introduction to Machine Learning
Embedded Ethics — Recommender System Objectives
Roger of Toronto, Fall 2021
Intro ML (UofT) CSC311-Lec3 1 / 24

Copyright By PowCoder代写 加微信 powcoder

Intro ML (UofT) CSC311-Lec3 2 / 24

Today’s lecture is part of the pilot of our new Embedded Ethics initiative.
Topic: objective functions for recommender systems Two parts
I Part 1 (Roger): technical challenges in moving beyond regression and classification
I Part 2 (Steve): ethical challenges, and philosophical tools for reasoning about them
Intro ML (UofT) CSC311-Lec3 3 / 24

Recap and Motivation
Intro ML (UofT) CSC311-Lec3 4 / 24

Recap: Netflix Challenge
Last lecture, we viewed collaborative filtering as a matrix completion problem.
Rating matrix
Ninja Cat Tongey Neutral
Our focus was on the learning algorithm.
But this is just one component of a larger system. It’s at least as imporant to consider the data and the objective function.
Intro ML (UofT) CSC311-Lec3 5 / 24
23?????1? 4?5?????? ???355??? ??????2?? ?5??????? ????????1
Chained Frozen
Bambi Titanic
Goodfellas Dumbo

Recommender Systems
Other kinds of recommendation systems include search engines and social media feeds.
What are some difficulties you’d run into if you tried to use a Netflix-style algorithm to organize a user’s social media feed?
Intro ML (UofT) CSC311-Lec3

Recommender Systems
If you were designing an ML algorithm to organize a user’s social media feed, what other information might you use?
As a supervised learning problem, what would be the inputs, and what would be the targets?
Intro ML (UofT) CSC311-Lec3 7 / 24

Challenge 1: Inferring User Preferences
Intro ML (UofT) CSC311-Lec3 8 / 24

Challenge 1: Inferring User Preferences
Google News was an early example of training a model to predict clicks.
Intro ML (UofT) CSC311-Lec3 9 / 24

Challenge 1: Inferring User Preferences
Why are clicks a useful signal?
What are some problems with optimizing for clicks?
Intro ML (UofT) CSC311-Lec3 10 / 24

Challenge 1: Inferring User Preferences
Here is a Bayesian network designed to model user behavior for a search engine.
I We covered Bayes nets briefly when we discussed na ıve Bayes. They’re covered in much more detail in CSC412.
Nodes represent random variables, and edges represent direct influences. Shaded = observed.
Want to infer user satisfaction (S).
Chuklin et al., “Click models for web search”
user attracted to document
user is satisfied
user examines the item
user clicks
Intro ML (UofT) CSC311-Lec3 11 / 24

Challenge 1: Inferring User Preferences
User preferences aren’t just a matter of reactions to individual items, but also of the user’s overall experience.
Many web services optimize for a criterion called engagement.
I User’s frequency, intensity, or depth of interaction with a product over some time period
I Not a technical term, but a business term, instantiated in different ways by different companies
I E.g. Gmail: percentage of active users who visited the site on 5 or more days during the past week Rodden et al., “Measuring the user experience on a large scale”
I E.g. Facebook: time spent on site, meaningful social interactions https://www.washingtonpost.com/technology/interactive/2021/how- facebook- algorithm- works/
This is not directly optimized by an ML algorithm (as far as I know), but is used to evaluate changes to the system.
I Sort of analogous to how logistic regression minimizes cross-entropy loss but you might tune hyperparameters based on accuracy.
Intro ML (UofT) CSC311-Lec3 12 / 24

Challenge 1: Inferring User Preferences
The choice of what to optimize for can have ethical implications (the subject of Steve’s lecture)
The recently published Facebook Papers reveal a lot about unintended consequences of algorithm design
I My aim isn’t to pick on Facebook here. They found these harms and worked to fix them!
Early years: optimizing for likes and clicks ⇒ clickbait
Optimizing for time spent reading/watching ⇒ favored professional over organic content
2017: service changed to reward comments & emojis ⇒ most successful political posts were the polarizing ones
I Some political parties consciously shifted their messaging to be much more negative
I Facebook eventually rolled back this change for health and politics https://www.wsj.com/articles/facebook- algorithm- change- zuckerberg- 11631654215
Intro ML (UofT) CSC311-Lec3 13 / 24

Challenge 2: Bandit Feedback
Intro ML (UofT) CSC311-Lec3 14 / 24

Challenge 2: Bandit Feedback
You only get information about user preferences for the posts you choose to show them. Therefore, the choices you make affect the data you get.
This is closely related to the multi-armed bandit problem.
You have a set of slot machine arms, and each arm i pays off $1 with an unknown probability pi.
You are given T trials. You only find out the payoff for the arm that you tried. You want to maximize your total expected payoff.
Showing the user a post = pulling an arm. Your metric (e.g. likes, clicks) = the payoff.
Intro ML (UofT) CSC311-Lec3 15 / 24

Challenge 2: Bandit Feedback
Here are the payoffs so far. Which arm should you pull next?
Arm 1: $ $ x $ x $ $ x $ $ Arm 2: x x x x $ $ x x x Arm 3: x $
Intro ML (UofT) CSC311-Lec3 16 / 24

Challenge 2: Bandit Feedback
Bandit problems are an important example of an
exploration-exploitation tradeoff
I “Exploitation”: show the user a post you’re confident they’ll like I “Exploration”: show the user a post they may or may not like so
that you get information about their preferences
We’ll discuss approaches to the exploration-explotation tradeoff in our lecture on reinforcement learning.
Intro ML (UofT) CSC311-Lec3 17 / 24

Challenge 3: Evaluating Structured Outputs
Intro ML (UofT) CSC311-Lec3 18 / 24

Challenge 3: Evaluating Structured Outputs
Most of this class has focused on classification, where there is a natural metric to use (accuracy).
In this case, we’d like to produce a feed (an ordered list of items). Problems where we want to predict a structured object are known as structured prediction.
For now, assume that all items are either relevant or irrelevant. Which of the following lists is preferable?
irrelevant
irrelevant
irrelevant
List A List B
irrelevant
irrelevant
irrelevant
irrelevant
irrelevant
Intro ML (UofT) CSC311-Lec3 19 / 24

Challenge 3: Evaluating Structured Outputs
One basic measure is precision: the fraction of items which are relevant.
Which of the following lists is preferable?
List A List B
Intro ML (UofT) CSC311-Lec3 20 / 24

Challenge 3: Evaluating Structured Outputs
Precision for the list up to the Kth item.
Average Precision (AP): average of where K is taken as the indices of the first N relevant items.
I Moving a relevant item from position 2 to position 1 is worth more points than moving it from position 8 to position 7.
Mean Average Precision (MAP): mean of the AP over multiple queries.
Note: in different application areas, there are different (but related) definitions of AP/MAP.
Intro ML (UofT) CSC311-Lec3

Challenge 3: Evaluating Structured Outputs
An example of calculating AP with N = 3.
= 2/5 = 3/6
MAP = 3 3 + 25 + 36 0.41
= 2/3 = 3/4
MAP = 3 1 + 23 + 34 0.81
Intro ML (UofT) CSC311-Lec3 22 / 24

Challenge 3: Evaluating Structured Outputs
What other factors might you consider in evaluating a list of recommendations?
Intro ML (UofT) CSC311-Lec3 23 / 24

Towards Ethics
We’ve been discussing challenges that arise when defining optimization objectives beyond the basic classification and regression settings.
So far, we’ve focused on challenges of building a useful and engaging system.
But what we choose to optimize for can have unintended consequences. The rest of the lecture focuses on thinking about optimization objectives from an ethical standpoint.
Intro ML (UofT) CSC311-Lec3

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com