On suboptimal optimization.

On suboptimal optimization.

I’ve been helping a friend learn the math behind optimization so that she can pass a graduation-requirement course in linear algebra. 

Optimization is a wonderful mathematical tool.  Biochemists love it – progression toward an energy minimum directs protein folding, among other physical phenomena.  Economists love it – whenever you’re trying to make money, you’re solving for a constrained maximum.  Philosophers love it – how can we provide the most happiness for a population?  Computer scientists love it – self-taught translation algorithms use this same methodology (I still believe that you could mostly replace Ludwig Wittgenstein’s Philosophical Investigations with this New York Times Magazine article on machine learning and a primer on principal component analysis).

But, even though optimization problems are useful, the math behind them can be tricky.  I’m skeptical that this mathematical technique is essential for everyone who wants a B.A. to grasp – my friend, for example, is a wonderful preschool teacher who hopes to finally finish a degree in child psychology.  She would have graduated two years ago except that she’s failed this math class three times.

I could understand if the university wanted her to take statistics, as that would help her understand psychology research papers … and the science underlying contemporary political debates … and value-added models for education … and more.  A basic understanding of statistics might make people better citizens.

Whereas … linear algebra?  This is a beautiful but counterintuitive field of mathematics.  If you’re interested in certain subjects – if you want to become a physicist, for example – you really should learn this math.  A deep understanding of linear algebra can enliven your study of quantum mechanics.

The summary of quantum mechanics: animation by Templaton.

Then again, Werner Heisenberg, who was a brilliant physicist, had a limited grasp on linear algebra.  He made huge contributions to our understanding of quantum mechanics, but his lack of mathematical expertise occasionally held him back.  He never quite understood the implications of the Heisenberg Uncertainty Principle, and he failed to provide Adolph Hitler with an atomic bomb.

In retrospect, maybe it’s good that Heisenberg didn’t know more linear algebra.

While I doubt that Heisenberg would have made a great preschool teacher, I don’t think that deficits in linear algebra were deterring him from that profession.  After each evening that I spend working with my friend, I do feel that she understands matrices a little better … but her ability to nurture children isn’t improving.

And yet.  Somebody in an office decided that all university students here need to pass this class.  I don’t think this rule optimizes the educational outcomes for their students, but perhaps they are maximizing something else, like the registration fees that can be extracted.

Optimization is a wonderful mathematical tool, but it’s easy to misuse.  Numbers will always do what they’re supposed to, but each such problem begins with a choice.  What exactly do you hope to optimize?

Choose the wrong thing and you’ll make the world worse.

#

Figure 1 from Eykholt et al., 2018.

Most automobile companies are researching self-driving cars.  They’re the way of the future!  In a previous essay, I included links to studies showing that unremarkable-looking graffiti could confound self-driving cars … but the issue I want to discuss today is both more mundane and more perfidious.

After all, using graffiti to make a self-driving car interpret a stop sign as “Speed Limit 45” is a design flaw.  A car that accelerates instead of braking in that situation is not operating as intended.

But passenger-less self-driving cars that roam the city all day, intentionally creating as many traffic jams as possible?  That’s a feature.  That’s what self-driving cars are designed to do.

A machine designed to create traffic jams?

Despite my wariness about automation and algorithms run amok, I hadn’t considered this problem until I read Adam Millard-Ball’s recent research paper, “The Autonomous Vehicle Parking Problem.” Millard-Ball begins with a simple assumption: what if a self-driving car is designed to maximize utility for its owner?

This assumption seems reasonable.  After all, the AI piloting a self-driving car must include an explicit response to the trolley problem.  Should the car intentionally crash and kill its passenger in order to save the lives of a group of pedestrians?  This ethical quandary is notoriously tricky to answer … but a computer scientist designing a self-driving car will probably answer, “no.” 

Otherwise, the manufacturers won’t sell cars.  Would you ride in a vehicle that was programmed to sacrifice you?

Luckily, the AI will not have to make that sort of life and death decision often.  But here’s a question that will arise daily: if you commute in a self-driving car, what should the car do while you’re working?

If the car was designed to maximize public utility, perhaps it would spend those hours serving as a low-cost taxi.  If demand for transportation happened to be lower than the quantity of available, unoccupied self-driving cars, it might use its elaborate array of sensors to squeeze into as small a space as possible inside a parking garage.

But what if the car is designed to benefit its owner?

Perhaps the owner would still want for the car to work as a taxi, just as an extra source of income.  But some people – especially the people wealthy enough to afford to purchase the first wave of self-driving cars – don’t like the idea of strangers mucking around in their vehicles.  Some self-driving cars would spend those hours unoccupied.

But they won’t park.  In most cities, parking costs between $2 and $10 per hour, depending on whether it’s street or garage parking, whether you purchase a long-term contract, etc. 

The cost to just keep driving is generally going to be lower than $2 per hour.  Worse, this cost is a function of the car’s speed.  If the car is idling at a dead stop, it will use approximately 0.1 gallon per hour, costing 25 cents per hour at today’s prices.  If the car is traveling at 30 mph without breaks, it will use approximately 1 gallon per hour, costing $2.50 per hour.

To save money, the car wants to stay on the road … but it wants for traffic to be as close to a standstill as possible.

Luckily for the car, this is an easy optimization problem.  It can consult its onboard GPS to find nearby areas where traffic is slow, then drive over there.  As more and more self-driving cars converge on the same jammed streets, they’ll slow traffic more and more, allowing them to consume the workday with as little motion as possible.

Photo by walidhassanein on Flickr.

Pity the person sitting behind the wheel of an occupied car on those streets.  All the self-driving cars will be having a great time stuck in that traffic jam: we’re saving money!, they get to think.  Meanwhile the human is stuck swearing at empty shells, cursing a bevy of computer programmers who made their choices months or years ago.

And all those idling engines exhale carbon dioxide.  But it doesn’t cost money to pollute, because one political party’s worth of politicians willfully ignore the fact that capitalism, by philosophical design, requires we set prices for scarce resources … like clean air, or habitable planets.

On Linda Tirado’s Hand to Mouth (until devolving into senseless tangents about cash transfers as medicine, the U.S. criminal justice system, work as exercise, and flawed science).

9780425277973As long as you think feeling angry is fun (does it say awful things about my personality that I do?), Linda Tirado’s Hand to Mouth is a fun little book.

Unlike Barbara Ehrenreich’s Nickel and Dimed, Tirado’s main focus isn’t analyzing why people are poor — she states, bluntly and in my opinion correctly, that the issue is simply not enough money.  Wages are low, hours are short (with bonus structural impediments to taking second jobs in order to compensate for short hours), and debt (especially medical debt) is high.

There are a few sections with analysis like what you may have read in Ehrenreich’s work, about the high cost of financial transactions for poor people, for instance, but primarily Tirado’s book is a narrative about her own experiences feeling spiritually and physically oppressed by poverty.  And that’s great.  I’m not sure there’s another book like this written by someone who’s lived in that world (a world shared by ca. 1/3 of the populace of the United States) for as long as she has, which is part of what makes the book so compelling.

I was very appreciative to have a tour guide whom I could trust to have all the little details right.  And, yes, it’s angering.  It’s bleak and off-putting.  But Tirado has a charming sense of humor, which helps her work go down easier… and, honestly, itshouldn’t go down too easy.  I’d like to think that people better off than Tirado should hate themselves a little while reading her book; couldn’t we have done more to fix things, so that her book would’ve never been written?

I know I didn’t do enough.  I spent many years doing biomedical research; my successes might help wealthy people live a little longer.  But, in terms of maximizing well-being, more research findings aren’t what we need.

Like, okay, the ongoing HIV/AIDS crisis is something I care a lot about, and my father is an infectious disease doctor who has been researching ways to help for years, and has recently begun another research initiative in Kenya that local doctors and scientists will be participating in… but, still, is it possible that economic initiatives could ameliorate the crisis more readily than biomedical research?  Yes.  Definitely.  AIDS is still a big deal in the United States, for instance, but suffering is decidedly correlated with poverty.  If you’re lucky enough to be related to someone who works in the right clinics, you can hear stories about all sorts of people who’ve come up with a raw deal from life, but the few big news stories I’ve seen lately are set in regions of economic blight (e.g. this one, from my own home state of Indiana).

So, thank you Tirado.  I imagine most people already know what ought to be done to fix the issues she’s writing about — some minimum standard of medical care that people can receive debt free, higher wages, more worker protections (like getting rid of “at-will” employment and requiring schedules to be contracted in advance) — so I think it’s great that she wrote her book the way she did.  Specifically, not focusing on what should be done but rather presenting her own experience — which isn’t even as bad as it gets — in all its horrors.

And then, two minor responses.  I wanted to save these for the end because these sound rather like complaints, to me, but they aren’t meant to be.  Her book was good, and these are just two things I thought about while I was reading it.

She writes that the U.S. doesn’t have debtor’s prison anymore.  Just after that sentence, she does acknowledge that people can be thrown into jail for failure to pay court fees, but… how is that not debtor’s prison? Here’s John Oliver on the subject.

Like, yes, you have to be broke and violate a law before you can be thrown in jail, but it’s not really possible to live in the U.S. without violating any laws.  Which is obviously problematic in and of itself.  It’s insane to have a patchwork of laws on the books that people violate every day and then leave it to police officers’ discretion whether or not people will be charged with crimes.

For instance, when Tirado discusses driving strategies to avoid being stopped by the police, she says she always drives two miles per hour above the speed limit.  Which is illegal.  Driving one mile per hour above the speed limit is illegal.  If you really wanted to avoid breaking any laws, you’d have to drive a couple miles per hour below the speed limit… that way minor deviations wouldn’t result in an illegal speed.

At four miles per hour below the speed limit, though, you’ll get pulled over.  I’ve been stopped numerous times for driving too slowly, even at speeds only one or two miles per hour below posted limits.  And I even drive nice-looking cars!  A dent-free, rain-washed Honda Civic!  Previously a Toyota Avalon that had sufficient internal maladies that I called it “The Torpedo,” but the exterior was fine.  I’ve read that people in decrepit vehicles are pulled over more.

So it’s easy to be stopped by police and charged with something, at which point you’ll have to pay court fees, and if you don’t you’ll go to jail (as is well-documented in The New Jim Crow).  And if you try to avoid going to jail for debt by evading capture (as is depicted in On the Run), you might be executed.

I typically write these essays a few days before they go up.  I’m writing this one on April 9th; yesterday the video was released of another person being murdered without cause by a police officer, this time because he was running away (presumably because he didn’t want to go to jail for unpaid child support, court fees), and… wait, nope.  No “and.”  He was running away, so the police officer shot him, to stop him, then shot him again, and again… then planted a (ineffectual) weapon on the body to justify having murdered the man.  Why, again, would it seem reasonable to trust police officers to use their discretion in choosing which crimes should be punished?

[Note: Tirado has since informed me that the line about the U.S. not having debtor’s prison was meant to be a joke. Which was already pretty clear from her work, i.e. the immediate juxtaposition of that claim with the fact that they’ll lock you up for not paying court fees. But even though it was clear Tirado knows the score, I wrote the preceding paragraphs… how else was I going to work in the horrific idea that dudes are apparently now subject to debtor’s execution?]

The other thing I wanted to mention was, Tirado writes about how poor people generally don’t have time for / feel too exhausted for exercise.  But she also walks a lot, and her work is often physically arduous, much more so than any job I’ve ever held (which, right — I worked in laboratories for a decade, and since then I’ve been writing.  I’ve never had to endure anything worse than a little wrist pain while I was typing a lot and learning to lift a baby many times per day)… so I wanted to toss in a link to Crum and Langer’s study wherein hotel cleaning staff who were told that their day to day work is exercise became healthier.

ModelC5_1912Oops.  Okay, so, minor admission to make on my part.  I’d never read that paper until today — I simply remembered the coverage of it from the popular press — and there might be some, uh, minor problems.  My opinion is that you’d definitely want to conduct a study longer than 30 days to test something like this, especially because there are many wacky treatments that can result in short term weight loss and apparent health gains.  Indeed, another research group attempted to replicate their findings, and also continued the study for a slightly longer period of time — still not long enough if they were reporting a positive result, in my opinion, but they weren’t.  They reported seeing no change in health outcome.  Although they did see a change.  Measured blood pressure went down in their treatment group.

I don’t know if I’ve mentioned this in a previous post, but reading scientific papers can be frustrating.  Normally, I don’t do it.  In general, the way I’ve been trained to engage with scientific papers is to look at the pictures and read the figure legends, then read the abstract, then jot down my own impression next to the abstract.

But I was trained to do that for a small range of fields — nothing much harder than quantum mechanics (“hard” here doesn’t mean “difficult,” btw; my preferred synonym is “intransigent”), nothing much squishier than cellular biology.  Whereas my recent research has covered a wider swath, which means I have to actually read papers, especially a review or two before I look at research results.

And it’s maddening sometimes, looking at a figure and thinking, “Oh, they’ve found this,” but then reading the text and seeing that they’ve stated “We found that.”  I’ve definitely posted a link to this previously, but Emily Willingham has written a very fun guided tour through this type of doublethink.  Or, if you’d prefer your meander through the vagaries of data interpretation be mega-bleak (i.e. about child abuse) instead of rather bleak (i.e. about sexism in academia), one of my own previous posts touches upon this idea as well.

Anyway, my apologies for the digression.  Definitely didn’t mean to go so far off topic!  It’s just that Tirado wrote about walking a lot and also said she doesn’t exercise.  Which reminded me of that study.  But how could I have expected that a high-profile psychology study might have flaws??

OhWait.

p.s. This essay was a bit of a downer, so I scrolled through the archives for an old “Dave vs. Dave” about economic injustice.  Here ya go!

dave59