[Paper Review] Measuring and regularizing networks in function space
This paper proposes measuring and regularizing neural network optimization directly in function space using $L^2$ distance, showing that parameter and function space distances diverge during training. It introduces Hilbert-constrained gradient descent (HCGD) and $L^2$-based multitask regularization, both of which improve generalization by minimizing disruptive changes to learned functions, with HCGD outperforming SGD on sequential tasks like permuted MNIST.
To optimize a neural network one often thinks of optimizing its parameters, but it is ultimately a matter of optimizing the function that maps inputs to outputs. Since a change in the parameters might serve as a poor proxy for the change in the function, it is of some concern that primacy is given to parameters but that the correspondence has not been tested. Here, we show that it is simple and computationally feasible to calculate distances between functions in a $L^2$ Hilbert space. We examine how typical networks behave in this space, and compare how parameter $\ell^2$ distances compare to function $L^2$ distances between various points of an optimization trajectory. We find that the two distances are nontrivially related. In particular, the $L^2/\ell^2$ ratio decreases throughout optimization, reaching a steady value around when test error plateaus. We then investigate how the $L^2$ distance could be applied directly to optimization. We first propose that in multitask learning, one can avoid catastrophic forgetting by directly limiting how much the input/output function changes between tasks. Secondly, we propose a new learning rule that constrains the distance a network can travel through $L^2$-space in any one update. This allows new examples to be learned in a way that minimally interferes with what has previously been learned. These applications demonstrate how one can measure and regularize function distances directly, without relying on parameters or local approximations like loss curvature.
Motivation & Objective
- To investigate the relationship between parameter space and function space trajectories during neural network optimization.
- To develop a direct metric for measuring changes in the input-output function of neural networks, independent of parameters.
- To propose new optimization strategies that regularize learning by constraining movement in function space, improving generalization and mitigating catastrophic forgetting.
- To demonstrate that function space regularization can outperform traditional parameter-based regularization in multitask and sequential learning settings.
Proposed method
- Measures distance between neural network functions using the $L^2$ norm: $\|f - g\|^2 = \mathbb{E}_X[|f(x) - g(x)|^2]$, approximated via mini-batch inference.
- Empirically compares $L^2$ function space distances with $\ell^2$ parameter space distances along SGD optimization trajectories.
- Proposes Hilbert-constrained gradient descent (HCGD), which penalizes large $L^2$ changes in the function per optimization step.
- Introduces $L^2$-based multitask regularization that limits function change on previous tasks by storing a working memory of past inputs.
- Uses empirical expectations over data batches to estimate $L^2$ distances, enabling efficient computation without explicit function representation.
- Combines HCGD with Adam optimizer (Adam+HC) to improve performance on sequential learning tasks like permuted MNIST.
Experimental results
Research questions
- RQ1How do trajectories in function space differ from those in parameter space during SGD optimization?
- RQ2To what extent is the $\ell^2$ distance between parameters a reliable proxy for the $L^2$ distance between functions?
- RQ3Can direct regularization of function space movement improve generalization in multitask learning?
- RQ4Does constraining function space movement via HCGD improve test performance compared to standard SGD?
- RQ5How does the $L^2/\ell^2$ ratio evolve during training, and what does it reveal about optimization dynamics?
Key findings
- The $L^2/\ell^2$ ratio decreases during training and stabilizes when test error plateaus, indicating a nontrivial relationship between parameter and function space movement.
- Hilbert-constrained gradient descent (HCGD) improves test accuracy on the sequential MNIST task, outperforming standard SGD and Adam.
- The $L^2$-based multitask regularization method achieves better data efficiency than retraining on stored examples from previous tasks.
- Combining HCGD with Adam (Adam+HC) yields state-of-the-art performance on recurrent tasks, suggesting improved generalization through controlled function space movement.
- The $L^2$ distance estimator is reliable with moderate batch sizes, showing low variance and good empirical approximation quality.
- HCGD is conceptually related to the natural gradient, as both constrain changes in function space, but via different divergences (Kullback-Leibler vs. $L^2$).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.