Source-linked AI summary
Do Wide and Deep Networks Learn the Same Things? Uncovering How Neural Network Representations Vary with Width and Depth
Thao Nguyen, Maithra Raghu, Simon Kornblith
TL;DR
The paper investigates how network depth and width affect learned representations beyond accuracy, using CKA-based analyses of scaled ResNets on image-classification datasets. It finds that larger capacity relative to the training set produces a distinctive block structure tied to propagation of a dominant principal component, while architectures can share other features yet make different mistakes.
Problem
Limited evidence characterizes how changing neural-network depth and width affects learned representations, hidden features, and outputs beyond final performance.
Method
The paper analyzes width- and depth-varied ResNets on CIFAR-10, CIFAR-100, and ImageNet using minibatch CKA, linear probes, and principal-component analysis.
Results
Larger capacity relative to the training set produces a block structure whose layers preserve and propagate a dominant principal component; other features can be shared across architectures, while block representations remain model-specific.
Takeaways & Limitations
Wide and deep models can have similar representational properties and accuracy yet exhibit distinctive internal block structures and systematically different example-level errors.
Abstract
from arXiv · showhide
A key factor in the success of deep neural networks is the ability to scale models to improve performance by varying the architecture depth and width. This simple property of neural network design has resulted in highly effective architectures for a variety of tasks. Nevertheless, there is limited understanding of effects of depth and width on the learned representations. In this paper, we study this fundamental question. We begin by investigating how varying depth and width affects model hidden representations, finding a characteristic block structure in the hidden representations of larger capacity (wider or deeper) models. We demonstrate that this block structure arises when model capacity is large relative to the size of the training set, and is indicative of the underlying layers preserving and propagating the dominant principal component of their representations. This discovery has important ramifications for features learned by different models, namely, representations outside the block structure are often similar across architectures with varying widths and depths, but the block structure is unique to each model. We analyze the output predictions of different model architectures, finding that even when the overall accuracy is similar, wide and deep models exhibit distinctive error patterns and variations across classes.
1 INTRODUCTION
The paper asks how changing network depth and width affects learned representations, hidden features, and outputs beyond final performance. It develops a CKA-based analysis and identifies distinctive internal structures and output behaviors associated with scaling.
- Motivation: Varying depth and width can produce state-of-the-art networks, but their effects on learned representations beyond performance remain poorly understood.The paper frames this gap as important because substantial compute is devoted to designing and training new architectures.
- Research questions: The study examines how depth and width affect hidden representations, intermediate features, and outputs across ResNets trained on CIFAR-10, CIFAR-100, and ImageNet.The experiments use families of models with systematically varied depths and widths.
- Approach: A minibatch CKA method measures hidden-representation similarity efficiently across wide and deep networks.The method is applied across architectures to characterize how representations vary with scaling.
- Main findings: Larger-capacity models exhibit a characteristic block structure in which many hidden layers have highly similar representations, primarily when models are overparameterized.The paper connects this structure to model capacity relative to the training set.
- Main findings: The block structure reflects a dominant principal component propagated across layers, while representations outside it can remain similar across architectures and the block itself is model-specific.The paper also reports that wide and deep models make systematically different example-level mistakes despite similar overall accuracy.
2 RELATED WORK
Prior work has characterized depth and width through expressivity, approximation, and accuracy, but provides limited evidence about learnability and learned functions on finite datasets. Empirical architecture studies also suggest that comparable accuracy can arise from different width–depth choices.
- Expressivity and approximation: Universal approximation and functional-expressivity studies show what networks can represent, but not whether they learn those functions from finite datasets.This leaves the behavior of trained models insufficiently characterized.
- Architecture design: Empirical CNN architecture studies typically find that optimal accuracy balances width and depth.Related work also examines error sets and the effects of pruning.
- Architecture design: Narrower or shallower networks can sometimes attain similar accuracy to larger networks, motivating analysis beyond accuracy alone.The supplied related-work passage presents this as a recurring empirical observation.
3 EXPERIMENTAL SETUP AND BACKGROUND
The experiments use width- and depth-scaled ResNets on standard image-classification datasets and analyze representations with CKA. The setup is designed to compare architectures beyond their accuracy, while minibatch estimation makes similarity measurement practical for large models.
- Experimental setup: The study trains families of ResNets with varying widths and depths on CIFAR-10, CIFAR-100, and ImageNet.These datasets provide the experimental setting for analyzing functions learned by high-performance image-classification models.
- Experimental setup: CIFAR ResNets scale width by increasing channels and depth by increasing layers across three stages.Channels increase by a factor of two between successive stages.
- Experimental setup: ImageNet experiments scale only the width or depth of the 14 × 14 stage, whose layer count distinguishes ResNet-50 from ResNet-101.The passage notes that additional training details and model accuracies appear in Appendix B.
- Experimental objective: Increasing depth and width improves model performance while also producing characteristic differences in internal representations and outputs beyond comparable accuracies.The comparison is explicitly not limited to final performance.
- Representational similarity: Linear CKA compares activation representations through centered example-similarity matrices and is invariant to neuron permutations and orthogonal transformations.The method is suitable for distributed features and layers with different neuron counts.
- Minibatch CKA: The paper estimates CKA by averaging unbiased HSIC scores over minibatches, reducing memory use while making the estimate independent of batch size.Activations for corresponding minibatches are represented by X_i and Y_i.
- Minibatch CKA: The minibatch procedure uses minibatches of size n = 256 and iterates over the test dataset 10 times while sampling without replacement within each iteration.The procedure converges to the value obtained when the entire dataset is treated as one minibatch.
4 DEPTH, WIDTH AND MODEL INTERNAL REPRESENTATIONS
As networks become wider or deeper, their hidden representations develop a contiguous block of highly similar layers. Reducing the training set causes the same structure to appear in narrower models, linking the phenomenon to capacity relative to available data.
- 4 DEPTH, WIDTH AND MODEL INTERNAL REPRESENTATIONS: CKA is used to measure pairwise similarity among hidden layers and track how representations evolve through different architectures.The analysis asks how similar layers are within a model and how those similarities change with scaling.
- 4 DEPTH, WIDTH AND MODEL INTERNAL REPRESENTATIONS: Wider or deeper networks develop a block structure consisting of many nearly consecutive hidden layers with highly similar representations.The structure emerges as model capacity increases.
- 4.1 INTERNAL REPRESENTATIONS AND THE BLOCK STRUCTURE: Figure 1 heatmaps encode CKA similarity between every pair of layers, with both axes indexing layers from input to output.Increasing width or depth produces a high-similarity contiguous region in the heatmap.
- 4.1 INTERNAL REPRESENTATIONS AND THE BLOCK STRUCTURE: The initial checkerboard pattern reflects greater similarity between post-residual representations than between representations inside ResNet blocks.With greater width or depth, this pattern gives way to a distinctive high-similarity block.
- 4.1 INTERNAL REPRESENTATIONS AND THE BLOCK STRUCTURE: The block structure appears across random seeds, although its exact size and position can vary between training runs.This variation does not remove the structure from the observed runs.
- 4.2 THE BLOCK STRUCTURE AND MODEL OVERPARAMETRIZATION: Reducing the training-set size makes the block structure appear in narrower, lower-capacity networks, indicating dependence on capacity relative to data rather than absolute size alone.The experiment holds architecture fixed while decreasing the amount of training data.
5 PROBING THE BLOCK STRUCTURE
The block structure in wide and deep networks reflects preservation and propagation of a dominant first principal component across layers. Its presence is associated with limited probe improvement and with blocks that can sometimes be removed with little accuracy loss.
- The block structure and the first principal component: Block structure arises when layers preserve and propagate a dominant first principal component across their representations.In networks with block structure, this component explains a large fraction of variance and remains aligned across constituent layers.
- The block structure and the first principal component: Removing the first principal component nearly eliminates the block structure in CKA heatmaps.This contrast supports the interpretation that the structure is driven by propagation of that component.
- The block structure and the first principal component: Despite high CKA and similar principal components, layers inside the block structure still compute nonlinear transformations.Their ReLU activations occupy both linear and saturating regimes, similarly to activations elsewhere.
- Linear probes and collapsing the block structure: Linear probe accuracy improves little inside the block structure, while residual connections help preserve its representations.Models without the block structure instead show a monotonic increase in probe accuracy through the network.
- Linear probes and collapsing the block structure: Deleting blocks from the middle residual stage has little impact on test accuracy when residual connections remain intact.The accuracy drop across seeds appears related to the size and clarity of the block structure.
- Linear probes and collapsing the block structure: Block structure may indicate redundant modules whose similar representations could support model compression.The paper frames this as a suggestion based on pruning results, rather than as a demonstrated compression method.
6 DEPTH AND WIDTH EFFECTS ON REPRESENTATIONS ACROSS MODELS
The paper compares hidden representations across training runs and architectures to determine which effects of width and depth are shared. Representations outside the block structure are broadly similar, whereas block-structure representations remain model-specific.
- Across training runs: Across random initializations, narrow shallow models lack block structure, while wider and deeper models show it consistently.For the smaller model, cross-seed CKA resembles within-model similarity; for wider and deeper models, block-structure representations differ across seeds.
- Across architectures: Across architectures controlled for accuracy, representations without block structure are broadly similar at corresponding proportional depths.This similarity does not extend to representations inside the block structure.
- Across architectures: Block-structure representations remain unique to each model across both training runs and architectures.This distinguishes the block structure from representation patterns shared outside it.
7 DEPTH, WIDTH AND EFFECTS ON MODEL PREDICTIONS
Wide and deep architectures can achieve similar overall accuracy while producing different example-level errors and systematic class-level performance differences.
- Across populations, architectures more similar in structure have more similar output predictions, while ImageNet-wide models show a small scene-identification advantage over object identification.The paper reports considerable individual-example prediction diversity on CIFAR-10 and ImageNet.
- Wide and deep models with statistically indistinguishable average accuracy tend to make substantially different errors on individual CIFAR-10 examples.This pattern exceeds what is expected from random initialization alone.
- As networks become wider or deeper, accuracy increases on many examples, especially those smaller models often—but not always—classify correctly.Some examples become less likely to be classified correctly by larger models.
- 419/1000 ImageNet classes show statistically significant accuracy differences between wide and deep models, accounting for 11% of example-level accuracy-difference variance.The comparison uses Welch’s t-test with p < 0.05.
- Wide models are more accurate on 68 structure or geological-formation classes, whereas deep models are more accurate on 62 consumer-goods classes.Wide models achieve 74.9% ± 0.05 versus 74.6% ± 0.06; deep models achieve 72.4% ± 0.07 versus 72.1% ± 0.06.
8 CONCLUSION
The paper concludes that increasing width or depth relative to dataset size produces a characteristic representational block structure, while other features and prediction behavior remain architecture-dependent.
- Across CIFAR-10, CIFAR-100, and ImageNet, larger width or depth relative to dataset size produces a characteristic block structure in hidden representations.The structure reflects similarity of a dominant first principal component propagated across many hidden layers.
- The block structure is unique to each model, whereas other learned features are shared across different initializations and architectures, particularly at corresponding relative depths.
- The paper leaves open how the block structure arises during training and how width and depth insights can inform task-specific model design.
- The supplied convergence passages define minibatch HSIC as an average over minibatches and analyze its relationship to the full-dataset U-statistic through tuple-selection probabilities and bounded indicator variables.The argument uses expectations, finite variance, and the law of large numbers.
B TRAINING DETAILS
Training details vary depth and width across CIFAR and ImageNet model families, using multiple random seeds and reduced-data experiments to study representations and predictions.
- CIFAR experiments use fixed-width deep networks with depths 32–224 and wide networks with width multipliers 1–10 across depths 14–38.CIFAR-100 includes additional depths 218 and 224 because block structure appears later.
- Each CIFAR depth and width configuration uses 10 seeds for CKA analysis and 200 seeds for model-prediction comparisons.
- ImageNet experiments start from ResNet-50, vary width or depth only in the third stage, train for 120 epochs, and use 100 seeds for prediction comparisons.Training uses SGD with momentum 0.9, cosine-decay learning rates, and batch size 256.
- Reduced-data CIFAR experiments subsample the original training set while preserving equal samples per class, then compute CKA on the full CIFAR test set.
- Table B.1 reports the accuracy of the examined neural networks on CIFAR-10 and CIFAR-100.
C BLOCK STRUCTURE IN A DIFFERENT ARCHITECTURE
Additional analyses show that block structure is robust across architecture variants, dataset sizes, widths, depths, and random initializations, and is tied to a dominant principal component rather than ReLU sparsity.
- Removing residual connections does not eliminate block structure, although only increasing-width models are shown because residual removal harms deep-network task performance.
- Block structure varies in size and position across random initializations but remains visible across all displayed seeds.
- Block structure appears in shallower and narrower models when the training dataset is reduced, indicating that smaller data can increase capacity relative to the task.This pattern is shown on CIFAR-10 and CIFAR-100 for depth and width changes.
- Models exhibiting block structure have a top principal component explaining a large fraction of activation variance across the last two stages.The figure compares increasing-depth and increasing-width configurations across random seeds.
- Removing the first principal component significantly reduces block structure in large-capacity models while having negligible impact on other representational structure.
- In networks without block structure, the first principal component explains only a small fraction of representation variance.
- ReLU activations are similarly sparse inside and outside the block structure, so linear behavior alone does not explain the observed similarity.
- Without block structure, representations at the same relative depths align across models of different widths and depths; with block structure, that comparison changes.
F.1 EFFECT OF VARYING WIDTH AND DEPTH ON CIFAR-10 PREDICTIONS
The figures compare per-example accuracies across ResNet models with different depths and widths on CIFAR-10, using groups of independently trained networks. They also compare these differences with variation among architecturally identical models.
- Figure F.1 compares predictions from 200 ResNet-62 (1×) and ResNet-14 (2×) models with statistically indistinguishable CIFAR-10 accuracy.Mean ± SEM accuracy was 94.09 ± 0.01 versus 94.08 ± 0.01, with t(199) = 0.73 and p = 0.47.
- Figures F.2 and F.3 plot per-example accuracies for pairs of ResNet architectures differing in depth or width.Blue dots compare two groups of 100 networks with different architectures, while orange dots show architecturally identical-model distributions.
- Figure F.4 extends the per-example accuracy comparison to ImageNet using 50 vanilla ResNet-50 models and deeper or wider variants.The compared variants increase depth from 6 to 17 blocks or increase width 2.8× in the third stage.
F.3 EFFECT SIZES FOR CLASS-LEVEL EFFECTS
The analysis uses nested logistic-regression models and residual-variance comparisons to quantify how model identity and class membership explain prediction variability. Model comparisons are statistically significant according to nested-model tests.
- The analysis fits three logistic-regression models to separate example-level effects, wide-versus-deep model effects, and class-related effects.Model A includes example ID and whether the prediction came from a wide or deep model; subsequent models add further factors.
- Residual variance is computed from binary correctness outcomes and logistic-regression output probabilities across examples and models.The residual variance is VarQ = Pn i=1(yi −πi)^2/n, where yi indicates correctness and πi is the model-Q output probability.
- The nested logistic-regression models have highly significant χ2 comparisons, with p-values equal to zero within machine precision.AIC values are also compared for models A, B, and C.