Papers › Learning sparse features can lead to overfitting in neural networks

Learning sparse features can lead to overfitting in neural networks

24 Jun 2022arXiv:2206.12314archive 2025-07-28

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

It is widely believed that the success of deep networks lies in their ability to learn a meaningful representation of the features of the data. Yet, understanding when and how this feature learning improves performance remains a challenge: for example, it is beneficial for modern architectures trained to classify images, whereas it is detrimental for fully-connected networks trained for the same task on the same data. Here we propose an explanation for this puzzle, by showing that feature learning can perform worse than lazy training (via random feature kernel or the NTK) as the former can lead to a sparser neural representation. Although sparsity is known to be essential for learning anisotropic data, it is detrimental when the target function is constant or smooth along certain directions of input space. We illustrate this phenomenon in two settings: (i) regression of Gaussian random functions on the d-dimensional unit sphere and (ii) classification of benchmark datasets of images. For (i), we compute the scaling of the generalization error with number of training points, and show that methods that do not learn features generalize better, even when the dimension of the input space is large. For (ii), we show empirically that learning features can indeed lead to sparse and thereby less smooth representations of the image predictors. This fact is plausibly responsible for deteriorating the performance, which is known to be correlated with smoothness along diffeomorphisms.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2206.12314")

Code

Syntology Ran 1 of 18 code samples harvested from 1 repository linked to this paper; 17 have no recorded run. Of those that ran: 1 ran · honoured contract.

By repository: official repository: 18 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

pcsl-epfl/regressionsphere officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 1 ran; 1 honoured the contract we drafted; 17 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
17unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from pcsl-epfl/regressionsphere. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

int_sin_m pcsl-epfl/regressionsphere/arch/fibonacci.py official repository ran · honoured contract fingerprinted MIT (permissive) · 0c55dfd2474acb2e · report
activations2hash pcsl-epfl/regressionsphere/arch/counting_atoms.py official repository unverified MIT (permissive) · 343074dc7a6a3c99 · report
atoms_dict pcsl-epfl/regressionsphere/arch/counting_atoms.py official repository unverified MIT (permissive) · 71b4b044f07081ec · report
center_normalize pcsl-epfl/regressionsphere/dataset/utils.py official repository unverified MIT (permissive) · a3cbe2ad9c5c502c · report
ckp_init pcsl-epfl/regressionsphere/utils.py official repository unverified MIT (permissive) · cb2578da62e48947 · report
compute_atoms_norm pcsl-epfl/regressionsphere/arch/counting_atoms.py official repository unverified MIT (permissive) · f72f872d399d4f2a · report
dataset_to_tensors pcsl-epfl/regressionsphere/dataset/utils.py official repository unverified MIT (permissive) · 76f93f9f3b586130 · report
fibonacci_lattice pcsl-epfl/regressionsphere/arch/fibonacci.py official repository unverified MIT (permissive) · fe93f8b312493d15 · report
fibonacci_sphere pcsl-epfl/regressionsphere/arch/utils.py official repository unverified MIT (permissive) · a7dc348e1fc8ec14 · report
format_time pcsl-epfl/regressionsphere/utils.py official repository unverified MIT (permissive) · ea165c25ef2a0e6e · report
inverse_increasing pcsl-epfl/regressionsphere/arch/fibonacci.py official repository unverified MIT (permissive) · a880819237db04b3 · report
k0 pcsl-epfl/regressionsphere/dataset/gaussian_random_fields.py official repository unverified MIT (permissive) · 2b8873eb94ee34ab · report
k1 pcsl-epfl/regressionsphere/dataset/gaussian_random_fields.py official repository unverified MIT (permissive) · 47c678f57539f602 · report
k2 pcsl-epfl/regressionsphere/dataset/gaussian_random_fields.py official repository unverified MIT (permissive) · 87c75ddd40e70ca5 · report
kernel_regression pcsl-epfl/regressionsphere/main_krr.py official repository unverified MIT (permissive) · 8c0e5c40d76bdafc · report
lambda_decay pcsl-epfl/regressionsphere/loss.py official repository unverified MIT (permissive) · adc267f0c196b663 · report
pca pcsl-epfl/regressionsphere/dataset/utils.py official repository unverified MIT (permissive) · b580ad0adf4a4d17 · report
perturb pcsl-epfl/regressionsphere/stability.py official repository unverified MIT (permissive) · d9794cc8e3c1bcb9 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections