Consistencies in the Dynamics of Hidden Layers' Internal Representations During Neural Network Training
This repository contains the code, data processing pipelines, experiments, and supporting material developed for my Bachelor's Thesis in Physics.
The thesis investigates how the internal representations learned by artificial neural networks evolve during training. Rather than focusing solely on predictive performance, the work aims to characterize the geometric and statistical properties of hidden-layer activations and identify recurring patterns that emerge across different architectures, datasets, and training regimes.
The central research question is:
Are there general principles governing the evolution of internal representations during neural network training?
To address this question, a series of experiments were conducted to monitor and analyze hidden-layer activations throughout the training process.
The project explores several aspects of representation learning, including:
- Evolution of hidden-layer activations during gradient-based optimization.
- Emergence of class structure in representation space.
- Dimensionality reduction and manifold organization.
- Changes in inter-class and intra-class distances.
- Representation disentanglement throughout training.
- Comparison of dynamics across architectures (different width and depth of FFNN) and hyperparameter choices.
The goal is to understand the mechanisms through which neural networks progressively organize information internally.
Neural networks are trained on supervised binary classifications tasks while periodically recording hidden-layer activations.
- Distance (primarily) and radii of manifold on which internal representations of different classes lie are kept track of, from beginning to end of training.
- Ordering and intersections of distances are recorded and graphed.
- The analysis is repeated for tens of independent initializations on a hundresds of different structures of FFNN.
- The robustness of the results are tested across three different datasets.
These tools allow the evolution of the internal geometry of learned representations to be tracked throughout training.
The thesis investigates the existence of common qualitative behaviors in representation dynamics. Particular attention is given to:
- Early-stage organization of hidden representations.
- Presence of the inversion dynamics, already observed in shallow networks only, at all layers in deeper FFNNs (2-6 layers).
- Intersection of normalized distances concentrates around the point of inversion, indicating that "Stragglers" (see https://doi.org/10.1038/s42256-023-00772-9) have deeper consequences than previously thought.
A detailed discussion of the results can be found in the thesis manuscript.
Title: Generalities in the Dynamics of Hidden Layers' Internal Representations During Neural Network Training
Author: Giorgio Cottini
Degree: Bachelor of Science in Physics
Institution: University of Milan
Year: 2024
Source code is licensed under the MIT License.
The thesis manuscript and associated figures are licensed under CC BY 4.0.