A Neural Tangent Kernel Perspective on Function-Space Regularization in Neural Networks

Zonghao Chen, Xupeng Shi, Tim G. J. Rudner, Qixuan Feng, Weizhong Zhang, Tong ZhangOPT @ NeurIPS 2022

TL;DR

This paper introduces a novel function-space regularization technique for neural networks that leverages the Neural Tangent Kernel (NTK) to penalize the complexity of learned functions. This approach demonstrably improves generalization on challenging tasks, achieving state-of-the-art results in areas like continual learning and protein homology detection, especially in low-data regimes.

What Problem Does This Paper Address?

Deep neural networks, while powerful, are prone to overfitting, especially when data is scarce or expensive. Traditional regularization methods like L2 weight decay primarily focus on the network's parameters, but recent research suggests this is an indirect way to control the complexity of the functions the network learns. The "double descent" phenomenon and other empirical observations indicate that parameter-space regularization might not be the most effective way to ensure good generalization in highly over-parameterized models. This paper aims to bridge this gap by proposing a regularization method that directly targets the function space induced by the neural network.

Methods

The core idea is to regularize the norm of the neural network's output function in a Reproducing Kernel Hilbert Space (RKHS) associated with the Neural Tangent Kernel (NTK). The authors draw on theoretical results showing that wide neural networks trained to convergence behave like kernel regression under the NTK. They then propose to approximate the RKHS norm of the network's function using the NTK.

Key methodological contributions include:

  • Function-Space Regularizer: They define a regularizer based on the RKHS norm of the function induced by the neural network, approximated using the NTK. This is formulated as minimizing the loss plus a term proportional to $f(X)^T \Theta^{-1}(X, X) f(X)$, where $f(X)$ are the network's predictions on a context set $X_c$ and $\Theta(X_c, X_c)$ is the empirical NTK.
  • Theoretical Justification: They provide theoretical guarantees showing that neural networks trained with this regularizer are arbitrarily close to kernel ridge regression solutions under the NTK and derive a generalization error bound.
  • Scalable Approximation: To handle the computational cost of NTK computation, they use an empirical NTK and a sampled context set $X_c$ for the regularization term, making it tractable for practical use.

Datasets

The paper evaluates its method on several standard datasets:

  • MNIST: Used for demonstrating generalization from small datasets and for ablation studies.
  • CIFAR-10 and CIFAR-100: Used for demonstrating generalization from small datasets and for evaluating MLP-Mixer performance.
  • Protein Homology Detection Dataset (SCOP v1.67): A benchmark for evaluating performance on small-data, sequence-based classification tasks.
  • Continual Learning Datasets: Permuted MNIST (single-head) and Split MNIST (multi-head) are used to evaluate the method's ability to prevent catastrophic forgetting.

Key Insights and Ideas

  • Direct Function Regularization is Key: The paper strongly suggests that directly regularizing the function space, rather than just the parameters, is crucial for achieving better generalization, especially in complex, over-parameterized models.
  • NTK as a Bridge: The NTK acts as a powerful theoretical bridge, connecting the behavior of wide neural networks to well-understood kernel methods. This connection allows for principled function-space regularization.
  • Empirical NTK Suffices: While analytic NTK is theoretically appealing, the empirical NTK, when approximated appropriately, is sufficient for practical regularization and achieves strong results.
  • Small Data Advantage: The proposed method shows a significant advantage in low-data regimes, where traditional methods struggle with overfitting.

Key Results

  • Improved Generalization on Small Datasets: On MNIST and CIFAR-10 with limited training samples, the proposed method ($K^\phi$) consistently outperformed baseline methods (MAP, Dropout, $K_{L2}$, $K_J$) in terms of test accuracy.
  • State-of-the-Art in Continual Learning: The method achieved state-of-the-art performance on both Permuted MNIST and Split MNIST for continual learning tasks, outperforming established methods like EWC, SI, VCL, FROMP, FRCL, and $K_{L2}$.
  • Competitive Performance on MLP-Mixer: When applied to the highly over-parameterized MLP-Mixer model on CIFAR-10/100, the proposed regularization improved predictive accuracy and reduced negative log-likelihood compared to a baseline without function-space regularization.
  • Best Performance in Protein Homology Detection: On the protein homology detection task, the proposed method achieved the highest auROC50 score, outperforming other regularization techniques.
  • Scalability: The use of an empirical NTK and a sampled context set for the regularizer allows the method to scale to large neural network architectures.

Limitations and Future Work

  • Computational Cost: While approximations are made, computing the NTK and its inverse can still be computationally intensive, especially for very large networks and datasets. The paper notes that their method is slower than MAP and Dropout but comparable to other kernel-based methods.
  • Approximation Accuracy: The effectiveness of the method relies on the approximation of the function norm using the NTK. The paper includes an ablation study (Figure 4) showing that this approximation is good when the context set size is sufficiently large.
  • Future Research: The authors hope their work will inspire further research into general-purpose function-space regularization methods for deep learning, as well as tailored methods for specific challenging downstream tasks. They also suggest exploring further improvements in the scalability of their proposed method.

Summary updated

BibTeX
@inproceedings{chen2022neural,
  author = {Zonghao Chen and Xupeng Shi and Tim G. J. Rudner and Qixuan Feng and WEIZHONG ZHANG and Tong Zhang},
  title = {{A Neural Tangent Kernel Perspective on Function-Space Regularization in Neural Networks}},
  booktitle = {OPT @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=E6MGIXQlKw},
}
Figure