Effective degrees of freedom: a flawed metaphor

Lucas Janson, William Fithian, Trevor HastieBiometrika 2015 · DOI

Effective Degrees of Freedom: A Flawed Metaphor

Abstract

To most applied statisticians, a fitting procedure's degrees of freedom is synonymous with its model complexity, or its capacity for overfitting to data. In particular, it is often used to parameterize the bias-variance tradeoff in model selection. We argue that, on the contrary, model complexity and degrees of freedom may correspond very poorly. We exhibit and theoretically explore various fitting procedures for which degrees of freedom is not monotonic in the model complexity parameter, and can exceed the total dimension of the ambient space even in very simple settings. We show that the degrees of freedom for any non-convex projection method can be unbounded.

Introduction

In classical linear regression, the "degrees of freedom" (DF) is a straightforward concept: it equals the number of predictors ($p$). This value serves as a proxy for model complexity, indicating how much a model "fits the noise" and allowing for adjustments like Mallows' $C_p$ to estimate true prediction error. As statistical methods evolved to include non-linear techniques like smoothing splines or the Lasso, the concept of "effective degrees of freedom" was introduced to maintain this intuitive link between model size and flexibility. However, Janson, Fithian, and Hastie argue that this metaphor is fundamentally flawed, particularly for non-convex fitting procedures.

The Generalized Definition of Degrees of Freedom

The authors utilize Bradley Efron’s (1986) generalized definition of DF, which characterizes it as the sum of covariances between observed data points $y_i$ and their corresponding predictions $\hat{y}_i$, scaled by the noise variance $\sigma^2$: $$DF = \frac{1}{\sigma^2} \sum_{i=1}^n \text{Cov}(y_i, \hat{y}_i)$$ This definition captures the sensitivity of the model's predictions to perturbations in the data. A high covariance implies that the model is highly responsive to noise, which traditionally suggests overfitting.

The Geometry of Non-Convexity

The core of the paper's critique lies in the geometry of non-convex models, such as Best Subset Regression (BSR). In these models, the constraint set often contains "divots" or discontinuities. If the true mean of the data lies near one of these regions, a small change in noise can cause the model's prediction to "jump" across a gap to a distant part of the model space. This extreme sensitivity leads to massive covariance and, consequently, inflated degrees of freedom.

Evidence from Simulation

Through Monte Carlo simulations with $n=50$ observations and $p=15$ variables, the authors demonstrate that DF behaves in ways that defy common intuition. For both BSR and Forward Stepwise Regression (FSR), the degrees of freedom can be non-monotonic—meaning that adding a variable can sometimes decrease the DF. More strikingly, the DF can far exceed the total number of available predictors.

Degrees of freedom for Best Subset and Forward Stepwise Regression. For subset sizes between 10 and 14, the DF frequently exceeds the total number of variables (15), indicated by the horizontal dashed line.

As shown in Figure 3, for subset sizes of 10–14, the DF for BSR and FSR often exceeds 25, despite there being only 15 predictors in total. This suggests that the "search" process involved in selecting the best subset contributes significantly more to overfitting than the number of parameters alone would suggest.

The 2D Pathological Case

To further illustrate this, the authors present a 2D toy model where the goal is to choose the "best" 1-variable model out of two. Intuition might suggest the DF should lie between 1 and 2. However, the mathematical reality is quite different.

Degrees of freedom in a 2D toy model. The heatmap shows that as the data moves further from the origin, the DF for a simple "best of two" univariate model can reach values as high as 7.

In this simple scenario, the DF can reach 7 and continues to grow as the data mean moves further from the origin. The authors mathematically prove in Theorem 2 that for any fitting technique minimizing squared error over a non-convex closed set, the DF can be made arbitrarily large (unbounded) by reducing the noise level.

Conclusion

The paper serves as a critical warning: degrees of freedom is not a reliable proxy for model "size" or complexity in modern, non-convex settings. While it remains a useful theoretical tool, its application as a simple parameter for model selection can be misleading. The "folk intuition" that DF measures flexibility fails to account for the aggressive search and geometric sensitivities inherent in many popular algorithms.

Summary updated

Abstract

To most applied statisticians, a fitting procedure's degrees of freedom is synonymous with its model complexity, or its capacity for overfitting to data. In particular, it is often used to parameterize the bias-variance tradeoff in model selection. We argue that, on the contrary, model complexity and degrees of freedom may correspond very poorly. We exhibit and theoretically explore various fitting procedures for which degrees of freedom is not monotonic in the model complexity parameter, and can exceed the total dimension of the ambient space even in very simple settings. We show that the degrees of freedom for any non-convex projection method can be unbounded.
BibTeX
@inproceedings{janson2015effective,
  author = {Lucas Janson and William Fithian and Trevor Hastie},
  title = {{Effective degrees of freedom: a flawed metaphor}},
  booktitle = {Biometrika},
  year = {2015},
  doi = {10.1093/biomet/asv019},
}
Figure