Administrative Stuff

CPU:

Guest Conversation 5-10min

Upcoming Activities

Scholarly

  • Tuesday, 4 March 2025, Noon–12:50 p.m., PDR 224C (White Dining Room). CS Table: TBD
  • Thursday, 6 March 2025, 11:00 a.m.–Noon, JRC 101. Scholars’ Convocation: ???

Artistic

  • Friday, 28 February 2025, 7:30–8:30 p.m., Roberts Theatre. Day/Dream.
  • Saturday, 1 March 2025, 2:00–3:00 p.m., Roberts Theatre. Day/Dream.
  • Saturday, 1 March 2025, 7:30–8:30 p.m., Roberts Theatre. Day/Dream.
  • Sunday, 2 March 2025, 2:00–3:00 p.m., Roberts Theatre. Day/Dream.

Multicultural

  • Friday, 28 February 2025, 4:00–5:00 p.m., HSSC N1170 (Global Living Room). Middle of Everywhere: ???

Peer

Musical, theatric, sporting, and academic events involving this section’s students are welcome.

  • Saturday, 1 March 2025, 2:00 p.m., Sebring-Lewis. Grinnell Orchestra presents Rimsky-Korsakov Symphony No. 1.

Wellness

  • Friday, 28 February 2025, ?:?? p.m., ??? Badminton Club (Smash that bird!)
  • Friday, 28 February 2025, 9:00 p.m., Noyce Elbow. Nerf at Noyce.

Misc

  • Sunday, 2 March 2025, 7:30–8:30 p.m., Science 3819. Mentor Session
  • Tuesday, 4 March 2025, 7:00–8:00 p.m., Science 3820. Mentor Session
  • Sunday, 9 March 2025, 7:30–8:30 p.m., Science 3819. NO Mentor Session

Upcoming work

  • Friday, 28 February 2025
    • MP5 released.
  • Submit post-reflection for MP4 on Gradescope
  • Sunday, 2 March 2025
    • Submit Friday’s lab on Gradescope
    • Submit redo of MP3 on Gradescope
    • Readings:
      • Submit pre-reflection for MP5 on Gradescope
  • Wednesday, 5 March 2025
    • Quiz: Lists (and the big three)
    • Makeup quiz: Tracing
    • Makeup quiz: Conditionals
    • Makeup quiz: Cut and compose
    • Remember that you can bring a sheet of notes for each quiz.
    • Remember that you can show up as early as 8:00 a.m.

PSA

Insert Sam’s PSA here

My summary

  • Take care of yourselves, take care of each other
  • Be respectful of yourself
    • All choices in moderation
    • Sleep is important: many of you have midterms next week
    • You aren’t alone in not partaking in things, trust me, I was once in your shoes
  • Be respectful of others
    • Consent is necessary but not sufficient
    • Don’t pressure others to partake
  • Watch out for each other
    • Choices on Saturday effect the future as well
    • Water is great!

Ethics!

Introduction

Why do we talk about ethics in 151?

  • Computers and computing technology have an outsize impact on the world.
  • Those who develop computing technology should understand their resposibilities as professionals.
    • Most don’t.
  • We should have a day (or at least a class period) thinking about the impacts of technology and our responsibilities
  • Reminder: CS table discusses these issues on most Tuesdays.
  • Reminder: TWO concentrations that consider these kinds of issues as part of their work: Science, Medicine, and Society (SMS) and Digital Studies.

Other notes

  • Lots of different approaches in CS classes.
  • Sam likes the ACM code of ethics.
  • AI has created large numbers of challenges, particularly to understanding why things are happening and unexpected factors.
    • William likes talking about these

ACM Ethics

https://www.acm.org/code-of-ethics

Code of Ethics

Let’s read them aloud. We’ll just go around the room.

  1. GENERAL ETHICAL PRINCIPLES.
    1. Contribute to society and to human well-being, acknowledging that all people are stakeholders in computing.
    2. Avoid harm.
    3. Be honest and trustworthy.
    4. Be fair and take action not to discriminate.
    5. Respect the work required to produce new ideas, inventions, creative works, and computing artifacts.
    6. Respect privacy.
    7. Honor confidentiality.
  2. PROFESSIONAL RESPONSIBILITIES.
    1. Strive to achieve high quality in both the processes and products of professional work.
    2. Maintain high standards of professional competence, conduct, and ethical practice.
    3. Know and respect existing rules pertaining to professional work.
    4. Accept and provide appropriate professional review.
    5. Give comprehensive and thorough evaluations of computer systems and their impacts, including analysis of possible risks.
    6. Perform work only in areas of competence.
    7. Foster public awareness and understanding of computing, related technologies, and their consequences.
    8. Access computing and communication resources only when authorized or when compelled by the public good.
    9. Design and implement systems that are robustly and usably secure.
  3. PROFESSIONAL LEADERSHIP PRINCIPLES.
    1. Ensure that the public good is the central concern during all professional computing work.
    2. Articulate, encourage acceptance of, and evaluate fulfillment of social responsibilities by members of the organization or group.
    3. Manage personnel and resources to enhance the quality of working life.
    4. Articulate, apply, and support policies and processes that reflect the principles of the Code.
    5. Create opportunities for members of the organization or group to grow as professionals.
    6. Use care when modifying or retiring systems.
    7. Recognize and take special care of systems that become integrated into the infrastructure of society.
  4. COMPLIANCE WITH THE CODE.
    1. Uphold, promote, and respect the principles of the Code.
    2. Treat violations of the Code as inconsistent with membership in the A CM.

Initial Reflections TPS

  • Which principles did you find surprising (or most surprising)? Why?
  • Which are your “favorite” principles? Why?
  • Which principles do you expect to be hardest to follow? Why?

Right arrow Detour

What does a right arrow on a form mean?

  • In general?
  • At Grinnell?
  • Ethics? Issues?

Ethics of algorithms

Motivating Example (Sam)

  • We can sort lists
    • We will probably do so in class
  • As a search designer, you might want to give users autocomplete options
    • Obvious options: based on frequency of similar queries
  • Issues the programmers should have worried about?
    • The internet, and searches on the internet, can be problematic
    • Giving autocomplete options that are problematic is itself a problem

Mini Lecture: Definitions

Discrimination

  • Discrimination definition 1: differentiate between groups, the goal of predictive algorithms (e.g. should a loan be provided)
  • Discrimination definition 2: the unjust or prejudicial treatment of different categories of people, especially on the grounds of ethnicity, age, sex, or disability (i.e. how we normally think about it).
  • If there was discrimination evident in the training data, an accurate algorithm will perpetuate the discrimination

Fairness vs Accuracy

The Geometry of Fairness

Paper: On Fairness and Calibration

Various plots of Fairness definitions demonstrating that differing groups means they can’t all be satisfied
Various plots of Fairness definitions demonstrating that differing groups means they can’t all be satisfied

Objectives

Objective Functions

  • In most modeling approaches, the goal is to minimize the error between the predicted value and the actual value of the objective
  • For example, when fitting a line to a set of data, we generally minimize the mean squared error (\(\ell_2\) norm) of the predicted value \(\hat{y}\) vs the actual value \(y\)
  • The choice of error function is important (e.g. we could just as easily minimize the absolute error (\(\ell_1\) norm) or the worst case error (\(\ell_\infty\) norm))
  • However, today we will talk about the difference between the goal of the designers, and the objective in the data

Matching Objectives vs Objective Mismatch

Given a dataset of dogs and cats, can you build a model that when given an image:

  • Tells you whether it is a dog or a cat? In this case, the objective (dog or cat) is captured in the data, so the overall objective is solvable with an objective based on the data.
  • Tells you whether it is a rat or not a rat? In this case the objective is not captured in the data, so there is a mismatch.
  • Tells you whether or not the image is a dog? In this case, the objective appears to be in the data (since we have images of dogs), but there may not be enough information in the cat images to properly identify a rat as not a dog.

Objective Mismatch

Objective mismatch: fit a model to an objective that is different than the one you wish to optimize. The less correlated the objectives are the worse that this gets. This is especially evident in models where we can’t actually measure the objective we want to optimize.

  • Policing models (where should we send more police):
    • Goal: Send more police to places that are more likely to have crimes occur
    • Data that can be found: Places that are more likely to have someone arrested
    • Metric: Arrest counts
  • Healthcare (how should finite resources be allocated):
    • Goal: Minimize cost of hospital stays
    • Data: Cost of hospital stays by person
    • Metric: Minimize length of stay since each additional day is costly
  • Healthcare (how should finite resources be allocated):
    • Goal: determine who is most likely to need medical intervention, apply appropriate interventions in a cost efficient manner
    • Data: People who have received interventions
    • Metric: Minimize dollars spent while maximizing care
  • Generative AI for healthcare:
    • Use generative AI to summarize and provide up to date information during the pandemic
    • Internet
    • Misinformation
  • Amazon hiring.
    • Goal: Hire people who will do well for Amazon
    • Data: People who have done well in the past
    • Result: Continuation of biased practices

Choosing Objectives

  • Goodhart’s Law: When a measure becomes a target, it ceases to be a good measure. Or (Jon Danielsson) Any statistical relationship will break down when used for policy purposes.
  • People respond to metrics by
    • improving the system
    • distorting the system
    • distorting the data
  • Examples of distortions:
    • Cobra bounty: If there is a bounty on cobras, raise them and sell corpses
    • Exams: If school funding is based on test scores, teach to the test
    • 5/10 point scales for service (e.g. Uber): Companies want high ratings \(\rightarrow\) anything lower than a 5 is failing
  • Paperclip Maximizer - Nick Bostrom
  • Survivorship bias: airplane example
  • Recent lawsuits:
    • USDA crop insurance: Loss of crops (goal) vs lack of rain (measure). Distortion: covering buckets.
    • ADM: Maximize profit (goal) vs maximize profit of new division (measure). Distortion: moving money to new division by buying from other divisions at a loss.

Case Studies

Case study 1: UK A levels

UK estimates of exam scores during the pandemic

Summary:

  • UK has A-level exams (think something like SAT subject tests)
    • Students get university offers based on predicted scores
    • Students need to achieve those scores to matriculate
  • Due to Covid, students could not take the exam
  • However, it is needed for moving on in school
  • Gov solution:
    • Create an algorithm to predict a students score based on:
      • (Teacher estimates)
      • Ranking within School
      • School’s historical performance
    • Goal: Generate scores that are (nationally) similar to prior years
    • Result: Overall Success, overall results are slightly up (2.4% more passes A*-C)

TPS: What issues do you think occurred? Did the government ultimately use the system?

Case Study 2: dark ux patterns

Taken from Professor Samuel Rebelsky

Modified from https://ethics.acm.org/code-of-ethics/using-the-code/case-dark-ux-patterns/. (Please don’t look there for analysis.)

The change request Stewart received was simple enough: replace the web site’s rounded rectangle buttons with arrows and adjust the color palette to one that mixes red and green text. But when Stewart looked at the prototype, he found it confusing. The left arrow suggested that the web site would go back to a previous page or cancel some action; instead, this arrow replaced the button for accepting the company’s default product. The right arrow, on the other hand, upgraded the user to the more expensive category; it also silently added a protection warranty without asking for confirmation. Stewart suggested to his manager that this confusing design would probably trick users into more expensive options that they didn’t want. The response was that these were the changes requested by the client.

Shortly after the updates were released into their production system, Stewart’s team was invited to a celebration. As a result of these changes, revenues at their client had increased significantly over the previous quarter. At the celebration, Stewart overheard some of the client’s managers discussing the small increase for refunds by users who claimed that they didn’t want the protection plan, but there weren’t many. One manager noted several complaints from visually impaired users, who noted that the mixture of red and green text obscured important disclaimers about the product.

TPS: What principles are at play? What should Stewart do (or have done)?

\(~\)

Additional Readings