Functional Risk Minimization

Ferran Alet, Clement Gehring, Tomás Lozano-Pérez, Joshua B. Tenenbaum, Leslie Pack Kaelbling

TL;DR

Standard machine learning assumes data is generated by a single "true" function corrupted by simple noise in output space (e.g., Gaussian pixel noise). This paper introduces Functional Generative Models (FGMs) and Functional Risk Minimization (FRM), which instead assume that every individual data point comes from its own function drawn from a distribution over function space. This perspective subsumes Empirical Risk Minimization (ERM), naturally captures structured real-world noise, and provides a fresh lens on why over-parameterized models generalize despite memorizing training data.

What Problem Does This Paper Address?

Traditional Empirical Risk Minimization (ERM) assumes an underlying process: $y = f_{\theta^*}(x) + \epsilon$, where $\epsilon$ is unstructured output noise (such as Gaussian noise for MSE or multinomial noise for cross-entropy).

However, real-world variations are rarely unstructured. For example, moving a light source or shifting an image by two pixels creates massive, structured changes in pixel space, yet represents a very simple variation in function space (e.g., slightly perturbing a convolutional filter). Forcing a single model to average out these differences in output space often fails when noise is heteroscedastic or structured.

Furthermore, classic statistical theory struggles to explain benign overfitting—why modern over-parameterized neural networks generalize remarkably well even when they interpolate/memorize training data completely.

Methods

  1. Functional Generative Models (FGMs): Instead of a fixed function $f_{\theta^*}$, FGMs assume each sample $(x_i, y_i)$ is generated by its own function $f_{\theta_i}$ sampled from an unknown prior $P(\theta)$, such that $y_i = f_{\theta_i}(x_i)$ deterministically.
  2. Subsuming ERM: The authors prove that standard ERM with common loss functions (MSE, $L_1$, 0-1 classification, and cross-entropy) is mathematically equivalent to maximum likelihood under an FGM where uncertainty is artificially restricted solely to output parameters (such as the bias or logits).
  3. Functional Risk Minimization (FRM): Rather than comparing predictions directly in output space, FRM matches probability distributions in function space. The training objective seeks a central parameter $\theta^*$ that minimizes the expected cross-entropy between the data-induced function distribution and an approximating distribution centered at $\theta^*$.
  4. Tractable Approximation via Over-Parameterization: Exact integration over the parameter manifold fitting $y_i = f_{\theta_i}(x_i)$ is intractable. By leveraging over-parameterization (fitting a single point requires only a tiny parameter perturbation $\Delta_i$), the authors apply a Laplace approximation and a first-order Taylor expansion. This yields a closed-form surrogate objective weighted by local Jacobians and the loss Hessian: $$\arg \min_{\theta^*} \sum_{i=1}^n (y_i - f_{\theta^*}(x_i))^T \left( J_i^T H_{f, \mathcal{L}}^{-1} J_i \right)^{-1} (y_i - f_{\theta^*}(x_i)) + \sum_{i=1}^n \log |J_i^T H_{f, \mathcal{L}}^{-1} J_i|$$ To scale computation, the authors use implicit differentiation and Hessian-vector products via JAX.

Datasets

The authors evaluate FRM across several synthetic and standard benchmark variations:

  • Synthetic Linear Regression: 1-D and 10-D tasks with varying ratios of offset noise vs. slope noise.
  • Mountain Car Domain: Offline value estimation using a 1-step temporal difference (TD) loss over radial basis functions (RBFs) arranged in uniform vs. distorted grids.
  • CIFAR-10: A small-data regime (only 8 labels provided) using a 4-layer CNN regressor to test memorization.
  • MNIST Variants: Representation learning using a CNN-based VAE evaluated on standard MNIST, Colored MNIST, Translated MNIST, and Colored & Translated MNIST.

Key Insights and Ideas

  • ERM is a Rigid Subset of FGM: Standard loss functions merely assert that noise lives in the final bias/logit layer. FGM frees noise to live across any parameter in the architecture, enabling structured variations.
  • A Principled Interpretation of "Benign Overfitting": Over-parameterized ERM implicitly acts like FRM: it seeks the simplest collection of per-datapoint models $\{\theta_1, \dots, \theta_n\}$ that fit the data, penalizing their divergence from a central model $\theta^*$. This connects directly to Occam’s razor—generalization occurs because we find the minimal functional adaptation required to explain every training example.
  • Input-Dependent Metric Weighting: In linear regression, FRM reduces to reweighting squared errors by $[x_i, 1] H^{-1} [x_i, 1]^T$, natively downweighting points where functional perturbations have disproportionately large effects.

Key Results

  • Linear Regression under Heteroscedastic Noise: When noise is isolated to the slope (rather than the bias), ERM test error is up to 40% higher in 1-D and $4\times$ higher in 10-D compared to FRM, even though ERM achieves lower training error.
  • Reinforcement Learning (Value Estimation): On the Mountain Car environment with non-uniform RBF features, FRM outperforms ERM by over 20% RMSE.
  • Small-Data CNNs: In the 8-label CIFAR-10 task, ERM achieved zero training error but overfitted (test error 0.125–0.130), whereas FRM retained a higher training loss (~0.052) but achieved significantly lower test error (0.084–0.085).
  • Disentangling Visual Variations: When applied to VAE decoders, FRM significantly improved downstream classification accuracy across Colored and Translated MNIST, where variations are naturally captured by convolutional filter shifts rather than pixel-level Gaussian noise.

Limitations and Future Work

  • Computational Complexity: Computing and inverting Hessian-vector products per iteration is computationally demanding. While feasible on small architectures and linear models, running full FRM on deep networks (e.g., ResNet-50) is currently bottlenecked by iteration speed.
  • Multi-Class Scaling: For multi-class classification, computing the Gaussian integral over intersections of half-spaces is non-trivial and currently relies on approximations like $n$ binary classification problems or joint softmax linearization.
  • Future Directions: Developing faster, memory-efficient approximations that capitalize on the idea that per-point models $\theta_i$ only need to be instantiated dynamically on the fly, which could yield dramatic efficiency benefits on massive datasets ($n > 10^6$).

Summary updated

BibTeX
@inproceedings{alet2023functional,
  author = {Ferran Alet and Clement Gehring and Tomás Lozano-Pérez and Joshua B. Tenenbaum and Leslie Pack Kaelbling},
  title = {{Functional Risk Minimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=9D5FH6LFbRu},
}
Figure