Tech & Innovation

Nothing Inside the Box

You don’t need to understand how something works to use it.

We don’t know how gravity works, but that does not stop me from writing this at 37,000 feet in a wide-body jet airplane. A hundred thousand people are probably similarly defying gravity as you read this. Not one of us is concerned that there is a magical, unexplainable force striving to bring us down to the ground, hard.

While no one knows how gravity works, many can describe with breathtaking precision what it does.

I spent a lot of time learning how to describe and eventually build complicated things without understanding much. I can tell you how to do this in a few sentences.

Draw a square in the middle of a page. You can use drawing software (draw.io seems popular with the kids these days), but a pencil and an old envelope will work too.

Now, draw a line with an arrow pointing into the square.

Draw another arrow pointing out of the square. I usually draw the “in” arrow on the left side of the square, and the “out” arrow on the right side. I once ran out of paper while designing a very complicated system, and had to draw these arrows all over the place. Everything still worked out fine, so I am not sure it really matters where you draw the arrows.

On the “in” arrow, label what you need for the thing you are building to operate. On the “out” arrow, list all the things you want it to accomplish.

That’s it. You are done.

This technique works on lots of different things. A more polished word for “things” might be “systems,” and you might call this idea a part of systems analysis, but that fancy language masks the simplicity, relevance, and power of the idea. You could use this idea to design the targeting radar for the F-35 fighter jet long before the hardware exists, or a complicated IT system for tracking healthcare benefits, or some factory process involving thousands of people and machines.

Or we could describe lunch.

Suppose, instead of a targeting radar or an IT system, you wanted to describe the making of a peanut butter and jelly sandwich.

Draw your box and arrows. Your arrow-pointing-in labels might be {bread, jelly, peanut butter} and your arrow-pointing-out labels might be {a PNJ sandwich}.

You could of course get more specific. Maybe you need to include “butter knife” or “utensil” as an input. Just writing things out this way might help you realize what you really want is a stack of PNJ sandwiches for a party. Or maybe you want exactly 2 pieces of bread for each sandwich, and not allow 2 or 4 layers in your sandwiches.

You have now described a system that results in at least one variant of lunch.

What you didn’t do was describe how to make the sandwich from bread, jelly, and peanut butter. You did not have to describe how to open jars, smear stuff on bread, choose an order for what to spread first, or how to lay out the bread on a countertop. None of that detail. You did not describe what happens inside the box, only what goes in and what comes out. It turns out that if you are careful about labeling arrows into and out of boxes, you can describe and use amazing ideas and never care about the inside of the box.

Describing the inside of the box is tedious, often completely unnecessary. Worse, describing box insides limits you to a single description of how to create your system. If you describe the box insides too much, then without meaning to you have killed anyone’s ability to create a better way to prepare PNJ sandwiches, and that is truly sad.

Wherever quantitative people are doing anything even remotely quantitative, they often start with these empty boxes and arrows. Before getting to the tricky details, empty boxes and arrows have been applied to medicine, engineering, factories, economics. Perhaps even lunch.

The important thing I learned long ago is that understanding the relationship between inputs and outputs lets you create some amazing stuff. Don’t worry about the insides of the box. Just label them with a name or number and move on. While I would never recommend you start building something by using PowerPoint, isn’t it amazing how many different ways that app offers for drawing boxes and arrows?

Modern civilization is built on boxes and arrows as much as electricity, semiconductors, or the wheel.

Do you know where it is very difficult to find empty boxes and arrows?

In government regulations.

Government regulations, certification programs, and the like take a very different approach. Instead of describing how to identify inputs or outputs, they describe how the insides of the box should work.

When I am forced to read regulations or certification descriptions, which occurs with sad regularity, I see detailed descriptions of how officials want things to work, not what they want the outcomes to be. Or how things actually work. Whether the topic is finance, healthcare, food safety, or educational institutions, officials seek to describe how these things should be done. Desired outcomes, if they are mentioned at all, are a very small part of the process.

As a young engineer and Wall Street newbie trying to understand the SEC and NASDAQ regulations in the ’90s, I was shocked at how subjective the regulations were. They were voluminous in describing how you should run a brokerage firm: what roles you had to have, how those people were certified to fulfill those roles, how you handled your customer files, that kind of thing. Nothing about tracking whether those brokers were actually qualified or doing a good job. There was very little attempt to actually measure whether brokerage firms as a whole were doing a good job by any defined metric.

When the auditors came by, they asked to see your firm’s operations binder. If you had all the right paperwork in there, your brokerage firm was doing a great job. No reason to check bank accounts or contact customers or interview employees or review code if the operations binder was in order.

You think I am joking? How do you think Bernie Madoff pulled off his Ponzi scheme for decades? Among other things, like being on the boards of the entities that were supposed to regulate him, he had a nice binder! Unlike mine, it was filled with all the proper descriptions of internal brokerage processes, mostly because he helped write those regs.

This regulatory aversion to defining inputs and outputs became ludicrous in 1999 because of two unrelated events.

One was that the SEC forced the implementation of the Order Audit Trail System, or OATS. OATS was not only the best trading system acronym of its era, bringing to my mind wholesome breakfasts or bucolic scenes from horse farms, but a timely idea that required all brokerage firms to submit a time-stamped digital log of all their trades. With this data the SEC had the capability to sequence every trade in every stock. OATS was, in theory, a fantastic tool for finding insider trading, firms screwing their own customers, and a host of other fraudulent activities the SEC was mandated to prevent.

The other event was a growing debate on holding brokerage firms accountable for “best execution.” Every brokerage firm, and indeed every broker, was required to provide “best execution” for customer trades. If you were buying stock at the current price, say a share price of $100, your broker should not give you a purchase price of $105. Why should I need a specific rule so that my broker doesn’t screw me? Well, that tells you something about the stock brokerage business in the ’90s, and it’s probably still relevant today.

“Best execution” regulations had been in place before. The increased transparency provided by online brokerage and all-electronic trading had exposed how often “best execution” was not the norm. Apparently these kinds of violations were occurring so often the SEC sought specific rules to make things clearer.

The solution to the “best execution” dilemma in the world of OATS was perfectly clear, to me at least: put a measurement on that outward-pointing arrow of the trading system. Score every retail brokerage execution price relative to the official best price at the moment of execution. Regulators would not even have to set limits or recommend score guidelines. Exposing scores by firm would let the public make decisions. Maybe “best execution” was important to some customers and not others, but publishing an official scorecard would serve to cleanse the brokerage industry with sunlight.

In real life, the official best price of a particular stock was more complex than a single price. I will spare you the technical details, even though I found them delightful at the time. Despite a small amount of data chaos, it was possible to match up execution prices with stock quotes, calculate the difference, add up the differences, and score every brokerage or broker by stock, time of day, anything you think is relevant. The SEC and NASDAQ already had all the data necessary to do this for the entire stock market and everyone participating in it.

My firm had been doing this all along. We needed this for our own quantitative framework, to ensure we were getting better at what we did. It was not that hard. It did use up a lot of hard drives. Even back then data was cheap to store and getting cheaper every month. It was worth it.

Of course, the financial regulators never implemented anything like this, not in that decade anyway.

Instead, the regulators focused on telling brokerage firms to put more pages in their binders. The resulting rules described monitoring processes that firms had to implement, which any intelligent firm should have had in place already. Once again, the rules described what should happen inside the boxes, not the outputs of those boxes, or the outcomes from what happens inside those boxes.

Focusing on the insides of boxes and excluding outcomes is hardly specific to financial regulations.

Educational institutional certifications are largely about how to certify teachers, less about educational outcomes. Cheese processing regulations are mostly about how to process milk in large state-monitored facilities, and include office space requirements for the regulators. The actual cheese quality measurements are left up to the officials, and are not found in the regulations. (This was true before a major overhaul of the New York State dairy regulations, and may be an out-of-date criticism, but you get the idea.)

Imagine an educational process where students create games on computers or watch videos, where there are no teachers, but where student outcomes far surpass those from traditional classrooms. Keep on imagining this, because although this has already been achieved in real life, it will never become the foundation for an accredited school. With no teachers and no published curriculum, it’s impossible to accredit. Do you have an incredible, award-winning cheese recipe? Make sure you stick with small artisanal batches of cheese. Otherwise you will have to make your cheese at a large state-monitored facility, with lower quality controls than those you use in your kitchen.

A funny side effect of this inside-the-box regulatory approach is that it protects incumbents and impairs innovation. When regulators write these rules, they ask the important players how they do things, and then codify a version of that. Every future competitor is forced to do something similar or face regulatory violations. What makes sense, what is best for the public, is not what counts.

The inside-the-box regulatory approach makes sense in a world where you can’t measure easily. In a world where you cannot measure stock trades, or student outcomes, or the bacteria levels in every individual block of cheese, forcing people to do things a certain way makes perfect sense.

That’s not our world anymore, is it? It has not been for quite a while.

In our infinite-free-bandwidth, big-data, precisely measured world, anything can be measured almost instantaneously at almost zero cost, and those measurements shared at the speed of light with literally any of several billion people with a smartphone.

Our inside-the-box regulatory framework has not caught up with the times. Why would you expect it to?

Except for one problem, a new problem.

How do you write rules to control what happens inside the box when there is nothing inside the box? No process, no people, no algorithms, nothing where someone can explain how the inputs are connected to the outputs?

What if nothing connects the inputs and the outputs except a set of numbers, like a very large spreadsheet that gets multiplied against all the inputs and then generates some outputs? And given the size of the spreadsheet, there is no way to make sense of how its cells even get used?

This is exactly the situation we are heading towards when it comes to systems or services based on machine intelligence. AI. Call it what you want. It’s inscrutable. You train a system on terabytes of data; no one could ever sort through all that training data. You apply your system to new sets of inputs, and you hope for the best.

You observe your trained system succeed better than a human, orders of magnitude better than a human, in every possible scenario for years, but you can’t explain to a regulator how it works. There is nothing inside the box that is explainable.

How will we regulate self-serve bank lending, powered by machine intelligence systems? How will hospitals certify automatic radiology services? How will we certify self-driving cars?

Can I trust an autonomous car anywhere near my teenage daughter? She does some wacky stuff behind the wheel. Are those programmers in Silicon Valley really that imaginative?

My daughter’s creative driving aside, we as a society feel the need to quantify trust. However imperfect, certification and regulatory frameworks are one way to create at least the illusion of this trust. A revenue-driven company’s Quality Assurance department, which reports to a CFO who might lose her job next quarter, is not.

I have heard talk about designing machine intelligence algorithms so that they can explain themselves to regulators. As an engineer who has had the misfortune to explain much less complicated input and output relationships to regulators, I am dubious that this can establish trust. I doubt the people who are talking about this idea have ever been through a regulatory audit when something bad has happened. It’s not an engineering process. It’s not even a rational process.

While I would call it a witch hunt, it might be fairer to say that the regulatory process is about politics. It’s much more about politics than safeguarding society. Creating software processes that can incorporate irrational politics may still be beyond our technical achievements.

I do not understand how existing regulatory and certification frameworks focused on inside-the-box descriptions will help us trust AI-powered systems.

A simpler approach is to not worry about explaining the inside of the box. Instead, define what you want outside of the box. Define it, test against it, measure against it in the real world, and penalize systems that cannot meet the defined outcomes.

Regulators will have to think more like software testers. Regulation will be much more like quality assurance, and less like legal work.

There is nothing difficult about implementing regulations that define inputs and outputs instead of descriptions of how things should work. It simply has not been the approach that regulators were motivated to take. Going forward, I am not sure there are any other real choices.

I am hopeful that once we realize how much easier, less expensive, and more efficient a new regulatory approach can be, and how much safer it leaves us, new regulatory approaches will change a lot of industries for the better.

Many will call me a dreamer. Maybe. Yet I don’t think regulators will think more like software testers because they want to, or because it’s better for their careers.

I think this will happen because there is simply no other way. There is no binder to add pages to. There is nothing inside the box.

Originally published on LinkedIn on January 3, 2019.