Philosophical Perspectives on Machine Learning


Philosophical Perspectives on Machine Learning

Simon
In this episode, we’re taking a big-picture look at machine learning: not just how particular methods work, but how to think about them alongside economics, econometrics, and other social sciences. There are already plenty of tutorials, software, and videos that teach individual methods. The goal here is to help us understand why different fields approach problems differently—and how to bring those perspectives together.

Hope
And there’s plenty of room to go deeper after this conversation. The lecturer mentions recorded courses, YouTube lectures, and interactive tutorials you can download, run, and modify. Some of that material focuses especially on causal inference. But for now, let’s build the conceptual map.

Simon
A useful starting point is that machine learning includes several kinds of methods, but two broad categories are especially common: supervised and unsupervised learning. This discussion focuses mostly on supervised learning, which is designed for prediction or classification when we have independent observations and a relatively stable environment.

Hope
Let’s unpack those two tasks. In regression or prediction, the outcome is usually continuous. In classification, the outcome is a category—perhaps a yes-or-no outcome, or one of several discrete labels. That makes supervised learning feel familiar to anyone who has taken econometrics.

Simon
Unsupervised learning starts from a different place: we give an algorithm objects and ask it to group similar ones, without first telling it which categories matter. Imagine feeding it a collection of news articles. It might cluster articles that resemble one another, and then a person could read the groups and label them as earnings news or macroeconomic news.

Hope
So the algorithm discovers patterns, but the human may interpret them afterward. And a limitation is that similar things aren’t necessarily similar in a way that matters for your actual question. A cluster of articles can be internally coherent and still tell you little about the outcome you care about.

Simon
Exactly. If the real goal is to understand how news relates to stock prices, it can be better to use a supervised approach when possible. You can use an outcome related to stock prices to find the features of the text that help predict that outcome, rather than grouping text according to whatever similarities happen to be most prominent.

Hope
There are also hybrid approaches. You might reduce the dimensions of a complicated data set or find common themes, but choose the themes because they help with a prediction or classification task. Once the outcome guides what information is useful, the approach is moving into supervised learning.

Simon
There are reasons to use unsupervised learning on its own—for example, someone may want the groups to be formed without being influenced by a particular outcome or macroeconomic variable. But economists don’t have a wholly separate version of unsupervised learning. The distinctive connections to economics tend to show up more in regression, classification, and causal questions.

Hope
Classification itself isn’t new to economics. Predicting a zero-or-one outcome, such as whether something belongs to one category or another, is familiar from logistic regression. The important development in machine learning was its ability to handle complicated inputs—especially inputs like images—without requiring people to manually describe every useful feature.

Simon
Images make that change easy to see. A picture can be represented numerically: each pixel has brightness values for different colors, such as red, green, and blue. Those pixel values become the inputs, or the X variables, and the task is to predict a label such as ‘cat’ or ‘dog.’

Hope
Before neural networks became effective at this, a person might have tried to design the process by hand. You could reason about ears, paws, or other shapes, then try to build a way to recognize those shapes in the pixels. But that raises a hard question: how does the computer know that a patch of pixels is an ear in the first place?

Simon
The key advance was that a neural network could learn useful features from the pixels itself. Instead of telling it to look for ears, noses, or whiskers, you give it the numerical image data and let it find combinations that help predict the label. One way to picture this is outsourcing feature generation to a robotic research assistant.

Hope
That assistant tries many possible ways of combining the inputs, then favors the ones that perform well. The method is a flexible functional form: it can represent many complicated relationships between pixels and the label. It’s not magic so much as an approach that can search for useful patterns without a person specifying every feature in advance.

Simon
A public image data set helped make progress especially rapid. Researchers could test their methods on a shared collection of images and compare how well they classified cats and dogs. When a community agrees on a common problem and a measurable definition of success, it can make a kind of research horse race possible.

Hope
And the measurable part is essential. You can hold some labeled images aside, let different models learn from the rest, and then check how well each model classifies the held-out pictures. If the goal is accurate cat-and-dog predictions, a model that performs well on new examples can be useful even if we don’t know every detail of how it found its answer.

Simon
That helps explain why machine learning can sometimes be used without beginning from a long list of statistical assumptions. If you can directly evaluate predictions on a test set, that gives you a practical way to see whether a model works for that task. Understanding why it works can still be helpful, but testing performance can be central.

Hope
But ‘it works on this test set’ doesn’t mean ‘it will work everywhere, forever.’ A flexible model can use anything in the data that helps prediction, including patterns that happen to be present now but may not remain stable. Machine learning can pick up those patterns without knowing which ones make sense to a person.

Simon
Consider pictures of cats and dogs. Suppose the collection contains many cats playing pianos because that’s a popular trend. A model might learn that piano-related visual patterns predict cats. If a new trend features piano-playing dogs, that relationship could stop helping. The model doesn’t automatically know to prioritize pointy ears over a piano or a T-shirt; it uses features that are predictive in the data it sees.

Hope
That’s both a strength and a weakness. The model can exploit lots of information and perform very well in the current environment, but it doesn’t necessarily have common sense about which patterns are important, stable, or likely to generalize. A highly predictive detail today might become misleading tomorrow.

Simon
A marketing example makes the same point. Imagine predicting whether customers will churn using two inputs called Driver A and Driver B. A simple logistic regression might draw a relatively straightforward boundary between customers predicted to churn and those predicted not to. A more flexible model might produce a much more complicated boundary and fit the current data better.

Hope
But if you hold Driver A fixed and vary Driver B, that complicated model might predict that churn rises, then falls, then rises again. Perhaps that pattern reflects a complicated web of correlations among many inputs, rather than a relationship that would remain true if the data changed. The model can exploit fine details of the joint distribution, so a shift in that distribution could make its predictions unreliable.

Simon
This brings us to the central supervised-learning objective: prediction in a stable environment. A common goal is to minimize mean squared error on data the model hasn’t used for fitting—a test set. The model’s performance there gives us a direct way to judge how well it predicts beyond its training examples.

Hope
Doing that well involves a bias–variance tradeoff. In a traditional econometrics course, you may have learned that ordinary least squares is the best linear unbiased estimator under particular conditions. But unbiasedness isn’t always free: when we use very rich models, insisting on fitting the training data in a way that is unbiased can worsen predictions on new data.

Simon
A classroom example shows why. If there are forty students and you use a model with forty dimensions, you could potentially fit the observed answers about who had coffee perfectly. But that doesn’t mean the model would predict coffee drinking well in tomorrow’s class. A very rich model can memorize the data it has rather than capture a pattern that generalizes.

Hope
That’s overfitting: doing too well on the data at hand and then doing poorly elsewhere. When a model is simple and there are many observations, unbiasedness may not cost much. But machine learning often considers very flexible models, so choosing how rich a model should be becomes a major part of the method.

Simon
A typical strategy is to consider a family of models, from relatively simple to quite rich, and use the data to select among them. Those choices are often called tuning parameters. Cross-validation is one way to make that selection: split the data into folds, fit a model on some folds, and evaluate its mean squared error on a fold it hasn’t used for fitting.

Hope
For example, divide the data into ten folds. Fit on nine-tenths and evaluate on the remaining tenth, repeating the process so each fold takes a turn as the held-out portion. Then compare how well different model choices perform on data kept out of their fitting process.

Simon
This illustrates a broader contrast with traditional econometrics. Econometricians often study settings with many more observations than parameters, where in-sample error can be a good approximation to out-of-sample error. Machine learning more often pushes toward richer models, so separately checking performance on held-out data becomes especially important.

Hope
And the questions economists ask are often different from pure prediction. We may want to know the causal effect of immigration on Miami, a change in the minimum wage, or COVID lockdowns. We may also want counterfactual predictions: what would have happened under another lockdown, or if vaccinations had arrived earlier?

Simon
Those questions bring identification to the foreground. Identification asks whether, even with unlimited data, we could determine the quantity we care about. A test set can show whether predictions are accurate for held-out observations, but it cannot by itself tell us whether a relationship is causal.

Hope
Take prices and sales. During periods of unusually high demand, firms may raise prices, and they may also sell more. That can create a positive correlation between price and quantity, even if the correlation doesn’t reveal the causal effect of changing price. You could see the same misleading pattern in both your training set and your test set.

Simon
So splitting the data doesn’t solve the underlying problem. To understand the price–sales relationship, economists look for something like a natural experiment, an exogenous source of variation, or a supply shock. Those strategies aim to isolate variation that helps identify the causal relationship.

Hope
That is why causal methods may deliberately give up some goodness of fit. Rather than use every bit of variation that helps prediction, they focus on the variation that identifies the parameter of interest. Prediction and causal inference can use some of the same tools, but they’re not trying to optimize the same thing.

Simon
That difference helps organize how economics and machine learning have come together. First, machine learning can help economists estimate flexible functional forms: after thinking about identification, use machine learning to find a useful way to represent the relationship in the data.

Hope
Second, economics already had substantial theory on semiparametric models and flexible functional forms, even when the computational methods in practice weren’t performing as well as desired. Machine learning offered better-performing computational tools and functional forms, while economic and statistical theory also helped advance machine-learning methods once the goal shifted from prediction toward estimation.

Simon
Third, regularization and model selection can create a problem for causal work: they might discard variables that are important to control for. A variable can look unhelpful for prediction and still matter for a causal analysis. So causal researchers don’t simply throw every variable into a machine-learning model and assume the result is suitable.

Hope
Instead, they can break the problem into pieces and use machine learning for particular parts, while changing the objective or the way the optimization is done to address the causal question. The goal is not to abandon machine learning, but to use it in a design that respects what causal estimation requires.

Simon
Fourth, causal and statistical work has brought techniques such as sample splitting and cross-fitting into these problems. The broader idea is to use data carefully so that the parts of a procedure used for estimation and evaluation don’t simply reuse the same information in the same way.

Hope
Fifth, economists can use knowledge of the structure of a problem to improve counterfactual predictions. Structural economics and other economic insights may help guide how flexible machine-learning tools are used in the nonparametric parts of an analysis.

Simon
And sixth, evaluating causal methods is difficult because causal effects aren’t directly visible for individuals. If Matteo drank coffee, we can observe how alert he was afterward—but we cannot observe how alert he would have been at that same moment without the coffee. That missing counterfactual makes it hard to grade a causal prediction the way we grade a cat-or-dog classifier.

Hope
So the big picture is that supervised machine learning is especially useful when we can define an outcome and check predictions on held-out data. Its flexibility can uncover useful patterns, but it can also overfit or rely on relationships that won’t last. Economics adds questions about identification, causal interpretation, counterfactuals, and uncertainty—questions a test set alone cannot answer.

Simon
Exactly. The two perspectives complement each other: machine learning can help us build and estimate flexible models, while econometrics helps us ask what the data can actually identify and what conclusions the analysis supports. Keeping prediction and causation distinct is the key to using these tools thoughtfully.

Ask anything
We've read this whole study set, so questions about it get the best answers.