Function-space Parameterization of Neural Networks for Sequential Learning

Aidan Scannell, Riccardo Mereu, Paul Edmund Chang, Ella Tamir, Joni Pajarinen, Arno Solin

Abstract

Deep learning models excel at complex pattern recognition but struggle with sequential learning tasks, often suffering from catastrophic forgetting and poor uncertainty quantification. While Gaussian Processes (GPs) provide a robust framework for function-space modeling and uncertainty, they fail to scale to large datasets. This paper introduces Sparse Function-space Representation (SFR), a novel method that bridges the gap between neural networks and GPs. By employing a dual parameterization and sparsification technique, SFR enables neural networks to scale to millions of data points, provide high-quality uncertainty estimates, and incorporate new information through rapid algebraic updates without the need for full retraining.

Introduction

Standard neural networks (NNs) operate primarily in "weight space," where learning involves adjusting millions of parameters to minimize a loss function. This approach has two significant drawbacks: it is prone to catastrophic forgetting—where new information overwrites previous knowledge—and it lacks a principled way to represent uncertainty. When a model is "unsure," it often provides overconfident, incorrect predictions, which is a critical failure in domains like Reinforcement Learning (RL) or medical diagnostics.

Gaussian Processes (GPs) offer an alternative by operating in "function space," modeling the mapping between inputs and outputs directly. However, GPs face a computational bottleneck, as their complexity grows cubically ($O(N^3)$) with the number of training points $N$. Existing attempts to combine NNs and GPs often rely on simple subset approximations that discard data or require expensive retraining. This paper presents SFR as a scalable solution that preserves the expressive power of NNs while adopting the robust uncertainty and sequential learning capabilities of GPs.

Methodology

The SFR framework transforms a pre-trained neural network into a sparse GP through a three-step process:

  1. Linearization: The neural network is linearized around its optimal weights using a first-order Taylor expansion. This process effectively treats the NN as a kernel, specifically a Neural Tangent Kernel (NTK), allowing the model to be treated as a linear model in a high-dimensional feature space.
  2. Dual Parameterization: Rather than using the standard GP formulation, the authors introduce dual parameters, $\alpha$ and $\beta$. These parameters represent the statistical contributions of training points to the model's mean predictions and uncertainty, respectively.
  3. Sparsification: To overcome the $O(N^3)$ scaling issue, SFR projects these dual parameters onto a small set of $M$ "inducing points." This reduces computational complexity to $O(M^3)$, where $M \ll N$. Unlike traditional coreset methods that simply select a subset of data, SFR uses these inducing points to summarize the information contained within the entire dataset.

Dual Updates

A key advantage of this parameterization is the ability to perform "Dual Updates." When new data is encountered, the $\alpha$ and $\beta$ values can be updated using closed-form algebraic rules. This allows the model to learn incrementally without performing gradient descent, making the incorporation of new information orders of magnitude faster than standard retraining.

Experimental Evaluation

The authors tested SFR across several demanding benchmarks to evaluate its scalability, uncertainty, and adaptability.

Large-Scale Regression

On the HouseElectric dataset, which contains over one million data points, SFR was compared against state-of-the-art Variational Sparse GPs (SVGP). SFR not only achieved superior predictive density (NLPD) but also performed updates nearly twice as fast as SVGP, demonstrating its efficiency in high-data regimes.

Continual Learning

In continual learning tasks such as Split-MNIST and Permuted-MNIST, SFR was used to prevent catastrophic forgetting. By applying function-space regularization—penalizing the model if its output deviates from the "memory" of previous tasks—SFR outperformed established methods like Elastic Weight Consolidation (EWC) and Variational Continual Learning (VCL), particularly when memory resources were highly constrained.

Reinforcement Learning

In the MuJoCo "Cartpole Swingup" task characterized by sparse rewards, SFR’s uncertainty estimates were used to guide exploration. By identifying regions of the state space where the model was most uncertain, the SFR-equipped agent converged significantly faster than agents using standard NNs or ensembles, which often struggle to explore effectively without a clear reward signal.

Discussion and Key Insights

SFR represents a shift from "sampling" data to "summarizing" data. By using dual parameters to capture the statistical essence of the training set, the model maintains a high-fidelity representation of the function space even with a small number of inducing points. Furthermore, the transition from weight-space regularization to function-space regularization proves to be a more effective strategy for maintaining knowledge over time.

However, the method has limitations. The linearization is a local approximation; if the underlying data distribution shifts so radically that the original NN architecture is no longer appropriate, the linearized prior may fail. Additionally, the GP prior is currently tied to the NN architecture, meaning the kernel cannot be easily swapped for other types (like RBF) without altering the network itself.

Conclusion

Sparse Function-space Representation (SFR) provides a mathematically rigorous yet computationally efficient way to imbue neural networks with the benefits of Gaussian Processes. By enabling fast updates, robust uncertainty quantification, and effective continual learning, SFR addresses some of the most persistent challenges in modern deep learning, paving the way for more reliable and adaptable AI systems.

Summary updated

BibTeX
@inproceedings{scannell2024function,
  author = {Aidan Scannell and Riccardo Mereu and Paul Edmund Chang and Ella Tamir and Joni Pajarinen and Arno Solin},
  title = {{Function-space Parameterization of Neural Networks for Sequential Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=2dhxxIKhqz},
}
Figure