2

1

Learning sparse features can lead to overfitting in neural networks

Leonardo Petrini,*   Francesco Cagnetta,*   Eric Vanden-Eijnden,   Matthieu Wyart

1

1

2

1

Learning in high dimensions with neural nets

  • Intuition: deep nets are able to solve high-dimensional tasks by learning relevant and low-dimensional features of the data

 

 

 

 

  • Theory: learning sparse features beneficial for FCNs when task depend on few variables, \(f^*(x_1\dots, x_5) = f^*(x_1, x_2) \)
f(x_1, x_2)
\rightarrow f_\theta(\mathbf x)

initialization (dense)

x_1\\x_2\\.\\.\\.\\x_5
f(x_1\dots, x_5)

trained (sparse)

Drawbacks of learning features

  • Evidence: on images, feature learning in FCNs and for gradient descent is outperformed by the corresponding kernel method.



     
  • Hypothesis: 
    1. image classes vary smoothly along small deformations;
    2. high smoothness requires a continuous distribution of neurons;
                 follows that sparsity is detrimental for performance.

 Geiger et al. (2020a,b); Lee et al. (2020)

Figure. Kernel predictor is smoother along diffeomorphisms for image classification.

more smooth

Supervised regression on the sphere

Task: regression with \(n\) training points \(\{\bm x\}_{i=1}^n\) uniformly sampled from the hyper-sphere \(\mathbb{S}^{d-1}\) and target function of controlled smoothness \(\nu_t\):
$$\| f^*(\bm{x})-f^*(\bm{y})\| \sim \|\bm{x}-\bm{y}\|^{\nu_t} $$

High smoothness
(large \(\nu_t\))

Low smoothness
(small \(\nu_t\))

log test error

log train set size

log test error

log train set size

feature learning

kernel regime

Training regimes and sparsity

Architecture: one-hidden-layer fully-connected with ReLU activations,$$f(\bm{x}) = \frac{1}{\mathcal{N}} \sum_{h=1}^H w_h \sigma( \bm{\theta}_h\cdot\bm{x}) $$

\(H\to\infty\): the choice of the normalization constant \(\mathcal{N}\) controls the training regime, $$\qquad\qquad\mathcal{N} = H \qquad \qquad \qquad\qquad\qquad\qquad\qquad \mathcal{N} = \sqrt{H}$$

feature learning

kernel regime

 Jacot et al. (2018); 

Bach (2018); Mei et al. (2018);

Rotskoff, Vanden-Eijnden (2018)...

Generalization error in the two regimes

Atomic solution: the feature regime predictor takes the following form,$$f^{\text{FEATURE}}(\bm{x}) =  \sum_{i=1}^{n_A} w^*_i \sigma( \bm{\theta}^*_i\cdot\bm{x}) , \quad n_A = O(n),$$

Kernel trick: while the kernel predictor can be written as (with \(K\) the NTK), $$f^{\text{LAZY}}(\bm{x}) =\sum_{i=1}^n g_i K(\bm{x}_i\cdot \bm{x}).$$

 Boyer et al. (2019); 

Notice that \(K\) is smoother than the ReLU function \(\sigma\), leading to a smoother predictor.

The scaling of generalization error is controlled by the smoothness of \( \sigma, \, K\):

predictor

0
\pi
2\pi
\bm x
0
\pi
2\pi
\bm x

target

predictor

training point

Conclusions and open questions

  • Central result: learning features can be detrimental as it leads to a sparse representation not suited for all tasks, e.g. if target function varies smoothly along some directions in input space (for FCNs: rotations, translations, diffeomorphisms);

 

  • Open question: what are the benefits of learning features in modern architectures?

Thank you.

 

  • In passing we show how to compute the generalization error for one-hidden-layer FCNs based on the atomic solution of empirical risk minimization and relate it to the smoothness of the activation function;
Made with Slides.com