Embedded EthiCSTM @ Harvard Bringing ethical reasoning into the computer science curriculum
We Value Your Feedback! Help us improve by sharing your thoughts in a brief survey. Your input makes a difference—thank you!
Introduction to Algorithms and their Limitations (CS 120) – Fall 2022
First time reviewing a module? Click here.
Click ⓘ to access marginalia information, such as reflections from the module designer, pedagogical decisions, and additional sources.
Click “Download full module write-up” to download a copy of this module and all marginalia information available.
Module Topic: Matching Algorithms for Ethical Organ Distribution
Module Author: Megan Entwistle
Course Level: Upper-level undergraduate
AY: 2022-2023
Course Description: “An introductory course in theoretical computer science, aimed at giving students the power of using mathematical abstraction and rigorous proof to understand computation. Thus equipped, students will be able to design and use algorithms that apply to a wide variety of computational problems, with confidence about their correctness and efficiency, as well as recognize when a problem may have no algorithmic solution. At the same time, they will gain an appreciation for the beautiful mathematical theory of computation that is independent of (indeed, predates) the technology on which it is implemented.” (Course website)
Semesters Taught: Fall 2022, Fall 2023
Tags
ⓘ
- decision-making [phil]
- fairness [phil]
- maximization [phil]
- prioritarianism [phil]
- utilitarianism [phil]
- maximin [both]
- algorithms [CS]
- algorithmic design [CS]
- maximum matching algorithms [CS]
Module Overview
The module introduces two distinct ethical approaches for allocating kidneys to patients on a maximum matching scheme. Students consider whether donor-patient matches should be guided by considerations of expected outcomes or by considerations of patient need, and whether there are prospects for an algorithmic solution that can incorporate both kinds of concern.
Connection to Course Technical Material
ⓘ
The module is designed to get students to appreciate that algorithmic solutions to real-world problems require serious background ethical thinking. Maximum matching algorithms are only a first step towards solving a very complicated problem about which of the many patients in need of a kidney transplant should be matched with a donor. Students are alerted to the fact that more complex algorithms can incorporate certain ethically relevant factors into the decision procedure (e.g. using weighted edges to represent expected life years gained as a result of a transplant). The main takeaway is that determining which factors carry the most ethical weight should be prior to algorithmic design (or, at the very least, prior to a decision about which algorithm to apply to a real-life problem). This lesson could be taught using maximum matching algorithms in a different context in which something is at stake for the parties being matched. However, the kidney exchange case is particularly pedagogically effective, as students’ ethical sensibilities are readily engaged in matters concerning life and death.
This module took place at the end of a unit on graph theory, during which students were introduced to maximum matching algorithms: solving for the greatest number of matches (edges) between two sets of individuals (vertices). Maximum matching algorithms have various applications: e.g. matching rideshare passengers to drivers; matching medical residents to hospitals; matching living kidney donors to patients in need of a transplant. Prior to the module, the professors introduced the graph theory behind matching algorithms in the context of the US kidney exchange, and students practiced solving for greatest total matches in simplified cases (in which the only relevant constraints were (i) numbers of donors and patients, and (ii) blood-type compatibilities between individuals of either group). This set the stage for the module, which begins with a simple demonstration that under conditions of donor scarcity, there will typically be more than one way to maximize matches (based on compatibility considerations alone). In reality, further considerations such as urgency of need, or projected future life years of the patient following the transplant, need to be incorporated into a matching decision procedure. The two main candidate decision procedures we discuss are backed by competing ethical theories, and are abstractable into formal algorithms that students would encounter in more advanced CS courses.
Goals
Module Goals
ⓘ
- Toy example: In a case of two donors and four patients, where Donor #1 is compatible with Patient #1 and Patient #3, and Donor #2 is compatible with Patient #2 and Patient #4, there are two maximum matching solutions to the problem. A decision therefore needs to be made about whether to prioritize the health of Patients 1 and 3, or patients 2 and 4. Over the course of the module, more description of their contexts is given so that it is clear how different ethical theories will yield different verdicts.
- Factors include not only donor-patient compatibility, but also (i) the likelihood of a successful transplant outcome, (ii) patient need, (iii) urgency, (iv) waiting time. The module focuses ethical discussion on (i) and (ii), but a different version could incorporate, say, fairness considerations pertaining to waiting time.
- An outcomes-based approach favors doing the most total good with the kidneys available. “Maximization”: match donors to patients so as to maximize the total additional life years the patients are expected to gain as a result of the transplants.
- A needs-based approach favors allocating kidneys to the least well-off patients. “Maximin”: pick the distribution of outcomes in which whoever is least well-off is better off than whoever is least well-off in any other distribution.
- An outcomes-based approach will tend to prioritize patients who are relatively healthier, which in a health care context is arguably unfair. But a needs-based approach will prioritize helping the neediest patient even if the marginal benefit to that patient is very small (and the benefit to others would otherwise be very large).
- Prioritarianism draws on the idea that increases in utility have decreasing moral value. All benefits are taken into account, but marginal benefits are weighted higher when the starting point is lower.
- Get students to recognize that maximum matching algorithms for matching donors to patients, under current conditions of donor scarcity, leave open a further ethical question of which patients to prioritize.
- Highlight some ethically relevant factors for decisions about medical resource allocation, in the context of the kidney exchange.
- Introduce students to an outcomes-based approach (e.g. Utilitarianism), and have them practice applying the corresponding decision procedure (Maximization) to kidney exchange cases.
- Introduce students to a needs-based approach (e.g. Rawls), and have them practice applying the corresponding decision procedure (Maximin) to kidney exchange cases.
- Enable students to identify potential problems with either approach, and to articulate which decision procedure they think yields the better ethical verdicts.
- Sketch an alternative solution (Prioritarianism) that accommodates the core intuitions of both approaches.
Key Philosophical Questions
ⓘ
Discussion of (1) follows the demonstration that maximum matching algorithms might deliver more than one solution. Students are asked to volunteer suggestions about what other information (besides donor-patient compatibilities) we might want to know about the context. (2) is the core guiding question throughout the module, as we discuss whether available kidneys should go to patients who can “convert” them into more life years (in 3), or to patients who are worse-off (in 4). Once students are able to articulate the pros and cons of both ethical approaches, they are in a position to offer informed responses to (5). The module closes with a class discussion of (6).
- What ethical considerations should guide our decisions about scarce resource allocation?
- Under a maximum matching scheme for kidney transplants, which patients ought to be prioritized?
- What is the core ethical intuition behind the maximization decision procedure, and what are some reasons to think this procedure is unfair?
- What is the core ethical intuition behind the maximin decision principle, and in what kinds of cases might it deliver the wrong verdict?
- Is it ethically better, in the context of the kidney exchange, to maximize total life years gained for patients or to help the worst-off?
- What would a decision procedure look like that is sensitive to both scale (like maximization) and starting points (like maximin)?
Materials
Key Philosophical Concepts
ⓘ
The notion of a scarce resource problem sets the stage for discussion: currently in the US, there are four times as many patients on the waiting list to receive a kidney transplant as there are donors available. Allocation decisions have to be grounded in ethical considerations about which patients to prioritize.
Welfare maximization is introduced as a motivation for an outcomes-based approach. The concept of fairness is used to problematize that approach (as de-prioritizing patients whose welfare is less likely to be maximized by a kidney transplant – i.e. sicker patients – seems unfair).
QALY is the metric used to determine which patients are “worst off” on the needs-based approach. (E.g. a 20-year-old patient in need of a kidney is (all else equal) worse off than a 70-year-old patient, and would be the favored transplant recipient on the Maximin decision procedure.)
The module content is designed to be self-contained: the various ethical theories and concepts are presented with the level of detail required for students to grasp the underlying intuition, apply those theories and concepts to given cases, and identify potential problems.
Some references are included for those students interested in thinking further about the issues on their own time. For example:
F.M. Morality, Mortality, Vol. 1: Death and Whom to Save from It. Oxford University Press. (1993)
D. Parfit, “Equality or Priority?” in Matthew Clayton & Andrew Williams (eds.), The Ideal of Equality. New York: Palgrave Macmillan. (2002)
- Scarce resource problem
- Welfare maximization
- Fairness
- Maximin
- QALY (quality-adjusted life years)
- Prioritarianism
Assigned Readings
None
Implementation
Class Agenda
- Motivate the central question: given the scarcity of donors, which patients ought to be prioritized under a maximum matching scheme?
- Identify some ethically relevant factors for decisions about allocating scarce resources.
- Introduce an outcomes-based approach (Utilitarian ethical theory/principle of Maximization), apply it to the case, and discuss potential problems.
- Introduce a needs-based approach (Rawlsian fairness/principle of Maximin), apply it to the case, and discuss potential problems.
- Weigh the pros and cons of each approach.
- Briefly consider a middle way (Prioritarianism).
Sample Class Activity
ⓘ
Students came up with creative variations on the case in which:
(i) the QALY of the least well-off is only slightly worse than the next least well-off; or
(ii) the marginal benefit to the second least well-off is significantly greater than the benefit to the least well-off.
Both variations exposed the problem with Maximin, which is that its lexical ordering of patient priorities disregards any amount of benefits to patients other than the least well-off.
Once students are familiar with both approaches, they are asked to form small groups and come up with a potential problem for the Maximin decision principle. The prompt is to vary the case under discussion involving two donors and four patients, by assigning different marginal utilities and QALY’s, such that it would generate a bad result for the Maximin principle.
Module Assignment
ⓘ
Student responses to the reflection question were evaluated by the CS TAs, who were provided with the following grading rubric by the Embedded EthiCS TA:
Total: 1 pt
½ pt if the student correctly applied a decision principle/ethical theory to the case. For example, the student decided to give the kidney to Patient B on the basis of maximization/utilitarianism.
½ pt if the student displayed an understanding of the relevant ethical intuition behind the decision principle/theory, which they incorporated into their reasoning about the case. For example, in applying maximin, the student explained why the right thing to do is give the kidney to whoever is currently ‘worst off’ or ‘needs it the most’ (and they say why Patient A fits this description).
Example of a reflection question on the problem set for the graph theory unit:
EthiCS Reflection (1 pt): Suppose there are two patients in need of an immediate kidney transplant, but only one donor is currently available. The donor’s kidney is compatible with both patients. Patient A is 30 years old, and is expected to live 6 additional years as a result of the transplant. Patient B is 60 years old, and is expected to live 10 additional years as a result of the transplant. All else being equal (e.g., both patients have an urgent need for the transplant; both patients have been on the kidney exchange waiting list for the same length of time), which patient should the kidney go to, and why? Your response should take the form of a short paragraph (3-4 sentence) reflection. In explaining your ethical reasoning about the case, be sure to draw on at least one concept discussed in class.
Lessons Learned
Students caught on quickly to the underlying intuitions, as well as the problems with, both ethical approaches to the matching problem. Despite the size of the class and lecture hall, students were able to engage productively in conversation with one another facilitated by the Embedded EthiCS TA. Based on a show of hands at the end of the module, more students favored the Maximin decision procedure over welfare maximization. Overall, student responses to the module were overwhelmingly positive.
Pedagogical lessons:
- Concluding the module with a sketch of a view that captures best of the two main approaches is a good way to leave students feeling both that progress was made, and that more work is to be done. That said, some students were keen to hear more, so a future iteration of the module might leave more time at the end for in-depth discussion of Prioritarianism.
- It is important to strike an appropriate balance between (i) impressing upon students that the ethical complexity of real-world cases might not be best addressed by simply applying an algorithm to the problem, and (ii) keeping students optimistic about the prospects of representing solutions to problems abstractly, once the right ethical considerations are in view.
- It might be worth considering other ways (besides QALY) to capture comparisons of more/less well-off. Some students found the intuition that a patient who has lived fewer (quality-adjusted) life years than someone else is therefore in more ‘need’ of a kidney a bit difficult to get behind.
About
About Approach
History
News
Team
Placement Team
Team Alums
Column block with website map links
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 4.0 International License.
Embedded EthiCS is a trademark of President and Fellows of Harvard College | Contact us