Podcast thumbnail

Ethical Algorithm

11 min
4.7

Introduction

Nova: Welcome back to the show. Today we're diving into a book that tackles one of the most urgent questions of our time: Can we make algorithms ethical? The book is called The Ethical Algorithm: The Science of Socially Aware Algorithm Design, by Michael Kearns and Aaron Roth, two heavyweight computer scientists from the University of Pennsylvania.

Nova: That's exactly the objection the authors anticipate. And they make a compelling case for why algorithms are fundamentally different from hammers. When a machine learning model is trained on massive datasets and searches through millions of possible patterns to optimize for accuracy, even the human designer cannot tell you what the model will do on any particular input. If you ask, "Could this model be systematically rejecting creditworthy Black applicants?" the honest answer from the designer is: "I don't know. Let's test it and find out."

Nova: Exactly. And that's the central thesis of the book. Kearns and Roth argue that core social values like privacy and fairness can be formalized mathematically and embedded directly into the code of algorithms. They say we shouldn't just wait for harm to happen and then regulate it in courts. We should fix the technology from the inside.

Why Anonymized Data Isn't Anonymous

The Privacy Paradox

Nova: Let's start with privacy, because that's where the science is most mature. The book opens with a bombshell: anonymized data isn't. Period. Kearns and Roth walk through some jaw-dropping case studies.

Nova: In the mid-1990s, a Massachusetts government agency released hospital visit data for every state employee. They removed names, addresses, social security numbers — the obvious identifiers. The governor at the time, William Weld, publicly assured everyone their privacy was protected. A PhD student at MIT named Latanya Sweeney decided to test that claim.

Nova: Using just the governor's birthday, which is public information, she narrowed the dataset to six records. Then she cross-referenced with another public source — voter registration records — and found that of those six, only one lived in the governor's zip code. She had identified William Weld's complete medical records. And she mailed them to his office.

Nova: Another famous case: the Netflix Prize competition. Netflix released an anonymized dataset of user film rental histories so researchers could compete to build better recommendation algorithms. They removed usernames and replaced them with random IDs. But privacy researchers showed they could re-identify individuals by cross-referencing with public IMDb reviews — if someone reviewed the same obscure movie on both platforms with the same approximate date, you could link the accounts.

Nova: Right. And this is where the book introduces a concept that was an early attempt at a solution: k-anonymity. The idea is you redact or blur individual records so that for any combination of characteristics, there are at least k people who share them. So no single person stands out. But k-anonymity has limits — it doesn't protect against what's called a homogeneity attack, where all k people in a group share the same sensitive attribute.

Nova: Enter differential privacy — and this is the star of the book's privacy section. The core idea is elegant: nothing about an individual should be learnable from a dataset that cannot be learned from the same dataset with that individual's data removed.

Nova: The book gives a wonderful example. Imagine you're conducting a survey about toenail fungus — an embarrassing topic. You want honest answers, but you need to protect respondents. So you give each person these instructions: flip a coin. If it's heads, answer truthfully. If it's tails, flip the coin again — answer yes if heads, no if tails. Now, if someone's data gets subpoenaed, they can always say "oh, it was just the coin flip" — because half the time, it literally was. Yet as a researcher, you can mathematically work backward because you know exactly how much noise you introduced.

Nova: Exactly. And this isn't just theoretical. The 2020 U. S. Decennial Census used differential privacy to release all its statistical products. Google uses it to collect usage statistics from Chrome. Apple uses it for data collection across its devices. It's gone from academic concept to real-world deployment.

Nova: Always. Adding noise degrades accuracy slightly. The more privacy you want, the more noise you add, and the less precise your statistics become. The book emphasizes this relentlessly: ethical constraints are never free. You're always navigating a trade-off curve.

Why Multiple Definitions of Fairness Cannot Coexist

The Fairness Puzzle

Nova: Now let's turn to fairness, which is even messier than privacy. The book makes a provocative argument: there is no single correct definition of fairness. Instead, there are multiple reasonable mathematical definitions — and they can directly contradict each other.

Nova: Right. And that precision is where the trouble starts. The book uses a memorable thought experiment: a society with two racial groups called Circles and Squares. A bank uses machine learning to decide who gets loans. The model makes predictions: some people are predicted to repay but won't, others are predicted to default but would repay.

Nova: Yes. Now, one definition of fairness — called equality of false positive and false negative rates — says the proportion of Circles wrongly denied loans should equal the proportion of Squares wrongly denied loans, and same for wrongly approved loans. Seems reasonable.

Nova: But here's another reasonable definition: equality of positive predictive value. Among everyone the algorithm predicts will repay, the actual repayment rates should be the same for Circles and Squares. This also seems completely fair.

Nova: They can. Kearns and Roth explain there are mathematical impossibility theorems showing that unless the two groups have exactly identical base repayment rates — which they won't, in a world with historical inequality — you cannot satisfy both definitions simultaneously. You have to pick.

Nova: That's exactly the parallel. Just as Arrow showed no voting system can satisfy all desirable democratic properties at once, the book shows no algorithmic fairness framework can satisfy all reasonable fairness criteria simultaneously. And it gets even trickier with intersectionality. You can design a model that's fair across race groups and fair across gender groups, but still unfair to specific intersections like women of color.

Nova: The book introduces the concept of the Pareto frontier. Picture a graph where the x-axis is some measure of unfairness and the y-axis is model accuracy. Any model not sitting on the frontier is wasteful — you could improve either fairness or accuracy without sacrificing the other. But models on the frontier represent genuine trade-offs. Moving left means accepting more errors in exchange for more fairness.

Nova: Exactly. That quote from the book is worth repeating: "Science can shed light on the pros and cons of different definitions, but it can't decide on right and wrong." Choosing where to sit on that Pareto frontier is a political and moral decision, not a technical one.

Nova: And that's an acknowledged limitation. The book is clear that these technical approaches are necessary but not sufficient. They're one piece of a much larger socio-technical puzzle.

When Science Becomes the Problem

P-Hacking and the Perils of Data

Nova: One of the most entertaining and disturbing chapters in the book is about p-hacking — the misuse of data analysis to find patterns that aren't really there.

Nova: That's it. The book explains this with a wonderful concept from theoretical computer science called "short description" length. If you test enough hypotheses against a dataset, purely by chance you'll find something that looks statistically significant. The more hypotheses you test, the more likely you are to find a spurious correlation.

Nova: And the book connects this directly to algorithmic design. When machine learning models search through enormous spaces of possible patterns, they are essentially performing millions of implicit hypothesis tests. The risk of finding and amplifying spurious patterns is enormous.

Nova: Yes. And the book's proposed solutions here tie back to differential privacy. It turns out that algorithms that satisfy differential privacy are also resistant to p-hacking — because the noise injection that protects individual privacy also prevents overfitting to random noise in the data. It's a beautiful convergence: the same mathematical framework solves two seemingly unrelated problems.

Nova: Exactly. And it illustrates one of the book's deeper messages: that theoretical computer science, with its emphasis on rigorous definitions and mathematical proofs, has genuine power to address these messy social problems. Precision is not just academic pedantry — it exposes contradictions and reveals unexpected connections.

Limits, Generative AI, and What Comes Next

The Bigger Picture

Nova: The book was published in 2019, and in the years since, the authors have reflected on how the landscape has changed. When I looked at recent interviews with Kearns and Roth, they acknowledged that generative AI — ChatGPT, DALL-E, and the like — has made some things harder.

Nova: In the book's framework, you need a well-specified objective to apply ethical constraints. A loan algorithm has a clear goal: minimize false positives and false negatives. But with a large language model, the objective is technically well-defined — predict the next word — but nobody knows what use case it's ultimately serving. Is it generating bedtime stories for children? Is it writing literary fiction? Your tolerance for toxic output is completely different in those two scenarios.

Nova: That's the bind. Roth has pointed out that we're in this awkward moment where the technology is astonishing but the practical applications are still being figured out. And Kearns noted something fascinating — the current industry approach to safety in generative AI is something called "guardrail models" — separate systems that sit alongside ChatGPT, monitoring inputs and outputs, intervening when they detect toxicity.

Nova: Kearns called it "a step backward scientifically." The ideal is to build models that are good at the task and incapable of producing harmful output from the start — not to bolt on a separate censor after the fact. But we don't yet have the scientific understanding to do that for generative models.

Nova: Yes. They emphasize that human judgment remains irreplaceable. Algorithms can optimize, but humans must define the optimization goals. Ethical boundaries require human interpretation. And as Aaron Roth put it in a recent interview, figuring out how to trade off the legitimate goals of different stakeholders — that is not something that has a technical solution. That's politics. That's people arguing and finding compromises.

Conclusion

Nova: So here's what I take away from The Ethical Algorithm. First, the problem is real and it's not going away. Algorithms now decide who gets loans, who gets interviewed for jobs, who gets parole, what news we see, and what products we're shown. These systems can encode and amplify bias without anyone intending it.

Nova: And fourth, precision matters enormously. The book demonstrates that forcing ourselves to define "fairness" or "privacy" with mathematical rigor exposes flaws in our intuitions that casual hand-waving never would. The impossibility theorems — showing that certain fairness definitions cannot coexist — are not failures of computer science. They're revelations about the genuine complexity of fairness itself.

Nova: I think the actionable takeaway is to become an informed participant in these debates. When you hear about an algorithmic fairness controversy — biased hiring algorithms, discriminatory lending models — you'll know the questions to ask. Which definition of fairness is being used? What's the trade-off curve look like? Who decided where to sit on it? These aren't just technical questions; they're democratic ones.

Nova: The final word from the book: "We are bullish about algorithms." Not naive, not utopian — but bullish. The problems are real, the solutions are partial, but the trajectory is promising. And the alternative — avoiding algorithms altogether — is simply not an option. All decision-making, human or machine, is ultimately algorithmic. The question is whether we do it thoughtfully or carelessly.

00:00/00:00