January 20, 2026
Let’s discuss:
How does minimizing a loss function correspond to probability distributions?
What is an empirical distribution? How does MLE fit to the empirical distribution?
What does minimizing MSE correspond to in distributional terms? Binary cross entropy?
For linear models fit under MSE, what happens to \(\sigma^2\) as model complexity increases under MSE?
Why does MLE create pressure toward overfitting?
What is overfitting from a probabilistic perspective?
Maximizing the log-likelihood introduces a pressure on the model.
Since all we see is the empirical distribution, our goal is to place as much mass as possible at the observed locations
Respecting the assumed conditional distribution structure and the constraint that the mean of the distribution follows the mean function
For regression - \(f_{\theta}(\mathbf x) = \mathbf x^T \boldsymbol \beta\)
MLE methods solve a problem:
\[ \underset{\theta}{\max} \sum \limits_{i = 1}^N P(y_i | \mathbf x_i , \theta) \]
If the hypothesis class allows arbitrarily concentrated densities, the likelihood has no reason to stop decreasing!
Collapse is not bad behavior. It is the optimizer doing its job
If I give a dog a whole bag of food at once, I shouldn’t be mad if it eats it all!
The minimization algorithm is just minimizing the function to the best of its ability by placing as much mass as possible at the observed data points.
Quick note:
In Gaussian models, this manifests as \(\sigma^2\) shrinking to 0
This is not a pathology of Gaussian - it is generic to likelihood based estimation!
What will happen in logistic regression if we give it infinite capacity?
Question 1: Why do we even think that this is a bad thing?
Some reasons:
We have a finite sample size
Most mechanisms that map features to outcomes are not infinitely complicated
In the face of competing models with similar performance, choose the one that is simplest
All completely viable rationale.
The big one:
We have some beliefs about the way that world works.
We know that what we see is just a sample and may not be indicative of the true empirical distribution due to lack of coverage
But where do those beliefs come into play?
When we choose function classes
Regularization penalties
Etc.
Central claim:
If we truly had zero beliefs about how the world works, the degenerate MLE solution is correct.
This is not a criticism of MLE.
This is a statement about what happens when we impose no structure.
Let’s make this formal using Bayesian inference.
Bayes’ rule for parameters given data:
\[ p(\theta | \mathcal D) = \frac{p(\mathcal D | \theta) p(\theta)}{p(\mathcal D)} \]
Components:
The posterior:
\(p(\theta | \mathcal D)\)
is a proper probability density function
Defines a distribution over the values of the unknowns conditioned on the data we observed
Mean, variance, covariance, etc.
Sometimes, we only care about the most likely value of the unknowns conditioned on the data
The Maximum A Posteriori (MAP) estimate is defined as:
\[ \hat{\theta} = \max_{\theta} P(\mathcal D | \theta) P(\theta) \]
Drop the normalizing constant because we’re maximizing w.r.t. \(\theta\) and it doesn’t have anything to do with it
Think of this like a Bayesian MLE…
Suppose we use a flat (improper) prior:
\[ p(\theta) \propto 1 \quad \text{(constant everywhere)} \]
Maximum A Posteriori (MAP) estimation:
\[ \hat \theta_{\text{MAP}} = \underset{\theta}{\max} p(\theta | \mathcal D) = \underset{\theta}{\max} p(\mathcal D | \theta) p(\theta) \]
With \(p(\theta) \propto 1\):
\[ \hat \theta_{\text{MAP}} = \underset{\theta}{\max} \; p(\mathcal D | \theta) = \hat \theta_{\text{MLE}} \]
Exactly!
Interpretation: MLE is Bayesian inference under total epistemic neutrality.
\(p(\theta) \propto 1\) says:
This represents maximal epistemic neutrality.
Question: Is this realistic?
If we truly have no beliefs about \(\theta\):
Mass collapse reflects rational updating under complete epistemic neutrality.
The data are the only information we have.
The MLE solution is what probability theory prescribes when data are our only guide.
Objecting to overfitting is objecting to agnosticism.
The moment you want generalization, you are asserting structure that is not in the data.
Examples of structural assumptions:
These are beliefs, not observations.
We’ve established that we need priors to avoid collapse.
Now: How do priors work mechanically?
Key insight: Bayesian inference is regularized optimization with probabilistic semantics.
Let’s make this precise.
Start from Bayes’ rule:
\[ p(\theta | \mathcal D) = \frac{p(\mathcal D | \theta) p(\theta)}{p(\mathcal D)} \]
Take logarithms:
\[ \log p(\theta | \mathcal D) = \log p(\mathcal D | \theta) + \log p(\theta) - \log p(\mathcal D) \]
Since \(p(\mathcal D)\) doesn’t depend on \(\theta\):
\[ \log p(\theta | \mathcal D) = \log p(\mathcal D | \theta) + \log p(\theta) + \text{const} \]
Multiply by \(-1\):
\[ -\log p(\theta | \mathcal D) = -\log p(\mathcal D | \theta) - \log p(\theta) + \text{const} \]
Define two terms precisely:
\[ \mathcal{L}_N(\theta) = -\log p(\mathcal D | \theta) = -\sum_{i=1}^N \log p(y_i | \mathbf x_i, \theta) \]
\[ \mathcal{R}(\theta) = -\log p(\theta) \]
Then:
\[ -\log p(\theta | \mathcal D) = \mathcal{L}_N(\theta) + \mathcal{R}(\theta) + \text{const} \]
\[ -\log p(\theta | \mathcal D) = \underbrace{\mathcal{L}_N(\theta)}_{\text{Data/Likelihood}} + \underbrace{\mathcal{R}(\theta)}_{\text{Regularization/Prior}} + \text{const} \]
Data term \(\mathcal{L}_N(\theta)\):
Regularization term \(\mathcal{R}(\theta)\):
The prior \(p(\theta)\) encodes structural beliefs:
Different priors \(\Rightarrow\) different regularizers \(\Rightarrow\) different solutions
Regularization is not “added later.”
It is literally the negative log-prior.
\[ \mathcal{R}(\theta) = -\log p(\theta) \]
This means:
So far, we’ve established:
But which force wins?
Recall the negative log posterior:
\[ -\log p(\theta \mid \mathcal D) = \mathcal{L}_N(\theta) + \mathcal{R}(\theta) + \text{const} \]
where
\[ \mathcal{L}_N(\theta) = -\sum_{i=1}^N \log p(y_i \mid \mathbf x_i, \theta) \]
\[ \mathcal{R}(\theta) = -\log p(\theta) \]
Key observation:
This asymmetry is the entire story.
Each observation contributes a term:
\[ -\log p(y_i \mid \mathbf x_i, \theta) \]
So the total likelihood penalty is:
\[ \mathcal{L}_N(\theta) = \sum_{i=1}^N \ell_i(\theta) \]
This means:
\[ \mathcal{L}_N(\theta) = O(N) \]
The prior is specified once:
\[ p(\theta) \]
Its contribution to the objective is:
\[ \mathcal{R}(\theta) = -\log p(\theta) \]
This does not depend on \(N\).
\[ \mathcal{R}(\theta) = O(1) \]
Putting this together:
\[ \mathcal{L}_N(\theta) = O(N), \quad \mathcal{R}(\theta) = O(1) \]
As \(N\) grows, the likelihood term dominates the posterior geometry.
Recall MAP estimation:
\[ \hat\theta_{\text{MAP}} = \min_\theta \big[ \mathcal{L}_N(\theta) + \mathcal{R}(\theta) \big] \]
As \(N \to \infty\):
\[ \frac{1}{N}\mathcal{R}(\theta) \to 0 \]
Under standard regularity conditions:
\[ \hat\theta_{\text{MAP}} \;\longrightarrow\; \hat\theta_{\text{MLE}} \]
Priors disappear asymptotically.
Sample size is the ultimate regularizer.
Regularization exists because:
Without priors, inference is unstable.
In modern ML:
This is why regularization does not “go away” in practice.
Random values, \(x_i\), that we believe are generated from a normal distribution with variance 1
Belief: The mean of the distribution is 2.
This is great and all, but most of the time we aren’t placing priors on the values of parameters in our models because we have beliefs as to what they are
A lot of the time our models don’t even explicitly have coefficients (think tree methods and KNN)
But the lessons about priors still hold here
So what gives?
Instead of placing priors on the values of the coefficients, themselves, we want to place priors on the types of functions that can be learned
Functions not too wiggly, but can be wiggly is \(N\) is big
Functions of a fixed order should have a minimal coefficient budget
Etc.
In practice, there are two common strategies for regularizing function spaces:
Truncating the hypothesis class
Placing structural priors on parameters to encourage nice solution types
One way to regularize is to remove functions from consideration entirely.
Instead of saying “These parameters are unlikely,”
We say “These functions are impossible.”
Formally:
\[ p(f) = 0 \quad \text{for } f \notin \mathcal{H}_{\text{allowed}} \]
This is a hard prior on function space.
Many standard ML methods are function-class truncation in disguise.
These are priors on what kinds of functions can exist, not on coefficient values.
In practice, we often write models in linear form:
\[ f_\theta(\mathbf x) = \mathbf x^\top \boldsymbol\beta \]
But this does not mean we believe the world is linear.
It means:
The prior is where that belief lives.
Given limited data, we often believe:
These are beliefs about functions, expressed through parameters.
A common structural assumption:
\[ \beta_j \sim \mathcal N(0, \tau^2) \quad \text{independently} \]
This prior says:
This induces a prior geometry on the space of admissible functions.
Quick identity: the prior predictive distribution
\[ P(y | \mathbf x) = \int \limits_{\theta} P(y | \mathbf x, \theta) P(\theta) d(\theta) \]
With respect to the prior, what is the marginal distribution of \(y\) given a vector \(\mathbf x\).
We can easily simulate this distribution
The functional prior:
At the edges of the domain for our input, we don’t know and don’t have many opinions about what the function should look like
In the middle section where the bulk of the data will be our prior says that the function should essentially be flat
e.g. minimal complexity
Recall the collapse pressure:
The Gaussian prior pushes back by:
This is soft regularization of function space.
Our prior structure on the functional space causes the straight line to have lower loss than the 9th degree fit!
This is what we want because this is what we believe is true.
If we’re wrong, we need more data relative to the strength of our prior to offset this belief
The beautiful balance of Bayes’ works well for ML!
Okay. So now we know that this works.
The prior:
\[ P(\boldsymbol \beta) = \prod \limits_{j = 1}^P \frac{1}{2 \pi \tau^2} \exp \left[ - \frac{1}{2 \tau^2} \beta_j^2 \right] \]
The log prior:
\[ \log P(\boldsymbol \beta) \propto \sum \limits_{j = 1}^P - \frac{1}{2 \tau^2} \beta_j^2 \]
Dragging out the constant term and taking a negative (to get the negative log prior):
\[ -\log P(\boldsymbol \beta) \propto \frac{1}{2 \tau^2}\sum \limits_{j = 1}^P \beta_j^2 \]
The prior penalized negative log likelihood under MSE with normal priors:
\[ \|\mathbf y - \mathbf X \boldsymbol \beta\|^2 + \frac{1}{2 \tau^2}\sum \limits_{j = 1}^P \beta_j^2 \]
Look familiar?
The Ridge regression you’ve been doing is inherently Bayesian!
We choose a value of \(\lambda\)
\(\lambda = \frac{1}{2 \tau^2}\) implies \(\tau^2 = \frac{1}{2 \lambda}\)
This is the variance of our normal prior that is centered at 0!
Ridge isn’t heuristic structure
It’s a consequence of a specific assumption about the set of a priori admissible models
We’ve been using priors all along even though the world doesn’t always like to admit it (I’m looking at you economists…)
Different day, same story
This relationship runs deep
In general, our common regularization techniques that penalize functional complexity fall into this class of models:
Ridge and LASSO
Total variation priors for images
Explicit 2nd derivative penalization for splines and kernel based methods
But MAP based approaches aren’t going to answer all of our questions.
So far, we have focused on:
\[ \hat\theta_{\text{MAP}} = \arg\max_\theta p(\theta \mid \mathcal D) \]
This gives us:
But probability theory gave us a distribution, not a point.
The posterior contains:
\[ p(\theta \mid \mathcal D) \]
MAP keeps only:
\[ \max_\theta p(\theta \mid \mathcal D) \]
MAP discards:
MAP answers:
“What is the most likely explanation?”
It does not answer:
“How many explanations are plausible?”
Note that this is very closely related to the concept of generalization
Small changes to the input don’t result in large changes to the output!
Suppose we have two models with the same MAP estimates:
MAP can’t tell the difference between the two!
But Model B may:
We need to know something about the structure of the uncertainty
Our stated goal is not just prediction.
We want a generative model:
\[ p(x, y) \quad \text{or} \quad p(y \mid x) \]
that:
A single function is not a generative model.
Predictions under a Bayesian model are:
\[ p(y^\ast \mid x^\ast, \mathcal D) = \int p(y^\ast \mid x^\ast, \theta)\, p(\theta \mid \mathcal D)\, d\theta \]
MAP replaces this integral with:
\[ p(y^\ast \mid x^\ast, \hat\theta_{\text{MAP}}) \]
This ignores parameter uncertainty entirely.
Everything we’ve done so far has avoided:
\[ p(\mathcal D) = \int p(\mathcal D \mid \theta)\, p(\theta)\, d\theta \]
This is the marginal likelihood (evidence).
It answers:
MAP cannot answer these questions.
MAP was a necessary step.
But for generative modeling:
To reason probabilistically about models, we must reason about distributions over parameters.
That means:
The posterior — and the marginal likelihood — are the real objects of interest.