Learning Distinct Features Helps, Provably

Firas Laakom, Jenni Raitoharju, Alexandros Iosifidis, Moncef Gabbouj

Abstract

We study the diversity of the features learned by a two-layer neural network trained with the least squares loss. We measure the diversity by the average $L_2$-distance between the hidden-layer features and theoretically investigate how learning non-redundant distinct features affects the performance of the network. To do so, we derive novel generalization bounds depending on feature diversity based on Rademacher complexity for such networks. Our analysis proves that more distinct features at the network's units within the hidden layer lead to better generalization. We also show how to extend our results to deeper networks and different losses.

Introduction

Deep neural networks are notoriously over-parameterized, often having far more parameters than training data points. While this allows them to learn complex functions, it frequently leads to overfitting. Researchers have long suspected that "redundant" neurons—units that learn essentially the same thing—contribute to poor generalization. While empirical strategies like Dropout or decorrelation penalties help, a rigorous theoretical link between feature diversity (how different the activations of neurons are) and generalization (the gap between training and test error) has been largely missing. This paper shifts the focus from weight diversity to the actual representations the network learns.

Theoretical Framework

The authors define feature diversity as the average pairwise $L_2$ distance between the outputs of hidden-layer units for a given input. They introduce a diversity factor, $d_{min}$, which acts as a lower bound for this distance.

To link this to performance, the study utilizes Rademacher complexity. The core technical contribution involves deriving a novel bound for the hypothesis class of a two-layer network that incorporates the $d_{min}$ term. Theorem 1 proves that the generalization error bound is inversely proportional to the diversity factor, mathematically confirming that higher diversity leads to a lower generalization bound. This theory is extended from simple regression to complex scenarios, including multi-layer networks and multi-class classification using cross-entropy.

Empirical Validation

The authors used benchmarks like MNIST, CIFAR-10, and ImageNet to validate their findings. A significant insight is the implicit bias of SGD: standard training naturally pushes neurons to learn distinct features over time, even without explicit diversity penalties.

Evolution of feature diversity over training epochs for ResNet architectures on CIFAR-10.

As illustrated in the figure above, feature diversity consistently increases during the training process across various ResNet architectures. This universal trend suggests that learning distinct features is a fundamental part of how neural networks solve tasks. Interestingly, the figure also highlights that while depth generally breeds diversity, the relationship is complex; for instance, ResNet34 exhibits higher diversity than the deeper ResNet50 in this context, supporting the paper's observation that more parameters do not always equate to higher diversity.

Key Results and Future Work

  • High Correlation: In experiments on MNIST, the proposed theoretical bound showed a correlation of > 0.99 with the actual observed generalization gap.
  • Universal Trend: Across different architectures and datasets, feature diversity consistently increases during training.
  • Open Problems: The authors acknowledge that while depth often increases diversity, it is not a guaranteed rule. They pose the "More Parameters Paradox" as an open problem: identifying the exact conditions under which increasing parameters leads to higher diversity. Additionally, they speculate that diverse representations may enhance adversarial robustness, a topic left for future research.

Summary updated

BibTeX
@inproceedings{laakom2021learning,
  author = {Firas Laakom and Jenni Raitoharju and Alexandros Iosifidis and Moncef Gabbouj},
  title = {{Learning Distinct Features Helps, Provably}},
  booktitle = {ECML/PKDD},
  year = {2021},
}
Figure