Source-linked AI summary

Sparse Prototype Code Underlies Classification and Prediction Across Modalities

Yehonatan Avidan, Daniel D. Lee, Haim Sompolinsky

arXiv:2608.15632v1cs.LGcond-mat.dis-nncs.AIstat.ML

TL;DR

The paper asks how complex high-dimensional representations can be understood geometrically for multiclass prediction. It analyzes prototype classification and derives a sparse mean-field theory based on centroid-aligned variability and radius renormalization. Across modalities and scales, the theory predicts accuracy while identifying geometric reorganization associated with improved performance.

  • Problem

    Interpreting high-dimensional neural representations remains difficult, and a predictive geometric theory of multiclass accuracy with class competition and rich within-class statistics is missing.

  • Method

    The paper uses prototype-based classification and derives a sparse mean-field theory from variability along true- and rival-class centroid directions plus a global radius renormalization.

  • Results

    Across vision, audio, and language models, the theory’s geometric ingredients improve with model scale and mirror gains in classification accuracy.

  • Takeaways & Limitations

    Classification accuracy is governed by a sparse, centroid-aligned code embedded within the full representation space.

  • Takeaways & Limitations

    The framework assumes high-dimensional isotropic geometry and jointly Gaussian projection coefficients in parts of its analysis.

Abstract

from arXiv · show

Neural representations have become a central tool for studying the internal mechanisms of modern AI models, yet their complex high-dimensional structure makes them difficult to interpret. We show that classification tasks give rise to a universal representational geometry, shared across state-of-the-art models in vision, audio, and language processing. The key structure is that within-class variability is not random in representation space. Instead, its classifier-relevant component has strong and structured correlations with the class's own centroid and with the centroids of its competing classes. Building on this observation, we derive an analytical mean-field theory governed mainly by the variability along true-class and rival-class centroid coordinates, together with a global renormalization of the class radius that compensates for the non-Gaussian statistics of real representations. The theory accurately predicts classification accuracy across architectures and modalities. The relevant geometric quantities improve systematically with model scale, mirroring the observed gains in accuracy. A striking feature of the theory is its sparsity: accurate prediction requires only a small set of centroid coordinates associated with the true class and its strongest rivals - connecting our framework to sparse-feature extraction approaches such as sparse autoencoders. Together, these results provide a parsimonious predictive theory of neural representations and suggest that classification in deep networks is governed by a sparse, centroid-aligned structure embedded within the full high-dimensional representation space.

1 Introduction

The paper develops a geometric account of multiclass classification that links interpretable centroid-aligned variability to accuracy across modalities and model scales. Its key simplification is that a sparse set of rival-centroid coordinates captures the relevant structure.

  • Motivation and approach: A predictive geometric theory of multiclass accuracy is developed using prototype-based classification, relating accuracy directly to representation geometry.The approach addresses competition among multiple classes and rich within-class statistics.
  • Universal geometry: Within-class variability is strongly correlated with the true-class centroid and competing-class centroids across vision, language, and audio backbones.Rotations that remove these correlations while preserving other geometric properties drive per-class accuracy to essentially 100%.
  • Sparsity of competition: For each class, centroid-aligned correlations concentrate on a small set of active rivals sufficient to recover the geometric picture and reproduce predicted per-class accuracy.These rivals also carry semantically meaningful relations to the true class.
  • Predictive theory: The mean-field theory uses variability along true- and rival-class centroid directions plus a global radius renormalization for heavy-tailed representation statistics.This sparse centroid basis predicts per-class accuracy across classes, architectures, and modalities.
  • Scaling: The theory’s geometric ingredients improve systematically with model scale, mirroring gains in accuracy without requiring the smallest overall within-class variance.The identified measures characterize how larger models reorganize representational geometry.

2 Setup and Notation

The setup represents each input as a hidden-layer vector and evaluates classes through normalized empirical centroids. Experiments use frozen representations from vision, language, and audio models across architectures and training objectives.

  • Representation and task: Each input is represented by a vector from a neural-network layer and assigned to one of P classes.The paper studies how representation geometry determines classification accuracy.
  • Prototype classification: Prototype classification uses each class centroid—the empirical mean of its representations—as a normalized readout vector.Centroids are estimated from labeled data, and inference compares an example against all class prototypes using leave-one-out estimation.
  • Experimental setup: Frozen representations span vision, language, and audio backbones, including transformer and convolutional architectures and supervised, self-supervised, and contrastive objectives.Language examples are organized by lemma, retaining lemmas with at least 1000 examples.
  • Manifold geometry: A class manifold is the point cloud for one class, with each representation decomposed into its centroid plus a zero-mean residual vector.The class radius measures overall within-class variance, while σ²_µ measures residual variance along a centroid direction.

3 Isotropic Uncorrelated Model

The isotropic uncorrelated model provides a baseline in which centroids and residuals are independent Gaussian variables in a high-dimensional regime. Its theory predicts how class radius controls accuracy, from near-perfect separation to chance-level classification.

  • Model assumptions: The baseline model draws independent isotropic Gaussian centroids and class residuals, with examples given by x = c_k + δx.Residuals have covariance set by the class radius R²I_N.
  • Model assumptions: The analysis assumes N →∞, P = N^O(1) classes, and a radius R that may scale with dimensionality.These assumptions define the high-dimensional isotropic model.
  • Accuracy theory: Theorem 3.3 derives isotropic-model accuracy using Gaussian-limit results for centroid overlaps and prototype logits.The proof relies on a centroid-overlap CLT, self-averaging, and a joint Gaussian logit distribution.
  • Predictions: For R = O(1), accuracy approaches 1, whereas as R/√N →∞, accuracy collapses to 1/P.Large isotropic residuals overwhelm class information, making all classes equally likely.
  • Predictions: Non-perfect accuracy requires R = Ω(√(N/ln P)), and accuracy variance across centroid realizations is O((PR²)^−1).The high-dimensional accuracy is self-averaging.

4 Empirical Results

Empirical representations deviate sharply from isotropic predictions: accuracy depends on class-specific, centroid-aligned variability rather than radius alone. Rotational manipulations show that residual–centroid correlations, especially with the true centroid, dominate classification geometry, while centroid–centroid correlations contribute little.

  • Accuracy changes on an O(1) radius scale: Accuracy falls from 100% to 61% across the narrow empirical radius range R ∈[0.4, 4.3], contradicting isotropic-model predictions.The isotropic model predicts decline only at R = Ω(N/ ln P) ∼20, far beyond the observed range.
  • Large class-to-class variability at fixed radius: At R ∈[1.2, 1.3], 89 classes span 61.8%–99.6% accuracy despite similar radii, showing that radius alone cannot explain performance.The mean accuracy in this radius range is 90.4%.
  • Strong residual–true-centroid correlations: Variability inflation leaves accuracy at 39.2% as R⋆→∞, far above chance at 0.1%, because residuals remain strongly correlated with the true centroid.The true-class projection variance exceeds every rival's in 93% of classes; those classes average 87.4% accuracy versus 60.1% otherwise.
  • Geometric manipulations: Randomly rotating residuals preserves radii, centroid relations, and example-example structure while breaking residual–centroid correlations.This manipulation isolates the correlations most directly implicated in classification errors.
  • Breaking residual–centroid correlations recovers the isotropic model: After residual rotation, accuracy follows the isotropic model with MSE = 1.26 × 10−3 and reaches chance at R⋆→∞, while per-class variability shrinks by an order of magnitude.The per-class standard deviation falls from 1.7 × 10−2 to 2.3 × 10−3.
  • Centroid-centroid correlations play a minor role: Breaking centroid–centroid correlations adds little, with the full-rotation curve differing from residual rotation by only MSE = 2.0×10−5.The results identify a sparse centroid-aligned geometry dominated by the true-class centroid.

5 Centroid-Aligned Variability Model

The paper models classification using centroid-aligned residual variability concentrated on a sparse set of rival directions. A global radius renormalization accounts for heavy-tailed projections, enabling accurate per-class predictions across modalities.

  • Removing only residual–centroid correlations drives per-class accuracy to approximately 100%, while breaking centroid–centroid correlations has only a secondary effect.
  • The model represents residuals using true- and rival-centroid directions within a restricted rival support whose centroid Gram matrix is assumed invertible.
  • The accuracy theory uses class radius R, rival projected variances {σµ}, centroid overlaps {gµ}, and residual correlation terms ρµ measured directly from representations.
  • 5.1 Sparsity: 6 rivals come within 3% of full P-way accuracy, 12 within 2%, and 37 within 1%, showing that prediction depends on a sparse competitor set.
  • 5.1 Sparsity: 14.4 rivals cover 90% of examples on average, while one rival accounts for more than half; selected rivals often have semantic or visual relations to the true class.
  • 5.2 Non-Gaussian tails and a global radius renormalization: A global transformation R → λR compensates for heavy-tailed projection extremes; λ⋆ correlates with inverse tail exponent 1/ν across 36 models at r = 0.90.
  • 5.2 Non-Gaussian tails and a global radius renormalization: The λ-rescaled theory predicts per-class accuracy accurately in vision and language, with MSE=1.83 × 10^-3 and 4.43 × 10^-3, respectively.
  • 5.3 Shared geometry across architectures and modalities: Across 36 vision, audio, and language backbones, the centroid-aligned geometry persists, including sparse rivals, heavy tails, and near-perfect accuracy after δ-rotation.

6 Geometry and Accuracy Across Model Scales

Across model families, accuracy gains track systematic reorganizations of centroid-aligned geometry rather than uniformly reduced within-class variability. The theory isolates these geometric measures across scales and modalities.

  • Larger models improve the theory’s geometric ingredients alongside accuracy, identifying reorganizations associated with improved classification performance.
  • Qwen3 accuracy rises from 41% to 57% while mean radius grows from 1.98 to 2.20 between 0.6B and 32B models.
  • In DINOv3, ViT-7B has a mean radius 0.21 larger than ViT-H+ yet matches its accuracy, showing that reduced variability does not explain the scale trend.
  • Across scale, variability aligns more with the true centroid, less with the hardest rival, while centroid and residual-projection correlations decrease.
  • Representations become more heavy-tailed with scale, with ν decreasing from 19.3 to 4.5 in vision and from 21.9 to 11.4 in language.
  • In autoregressive models, the best prototype classification is consistently found 1–3 layers before the final layer.

7 Discussion

Across modalities and architectures, classification accuracy is governed by a sparse, centroid-aligned code rather than undifferentiated high-dimensional variability. The theory quantifies this structure, tracks its changes with model scale, and complements existing geometric frameworks.

  • Prototype accuracy is controlled by variability along the true-class centroid and a small set of rival-centroid coordinates.
  • As models scale, accuracy improves through geometric reorganization rather than reduced class variance.Variability shifts toward the true-class coordinate, strongest-rival correlations decrease, and centroid directions become more decorrelated.
  • The theory tracks standard linear classification as well as prototype classification, with close agreement except for a larger gap in bidirectional language models.
  • The framework complements manifold-capacity theory by treating centroid-aligned within-class variability as dominant in this task, while random intercentroid-overlap fluctuations have little effect.
  • The sparse class-supervised directions connect the framework to interpretability methods such as sparse autoencoders and dictionary learning.
  • The compact geometric ingredients may support representation-quality diagnostics, model selection for fine-tuning, and geometry-aware training or distillation objectives.

A.1 Prototype classification and linear readout comparison

The authors test whether prototype classification is a useful proxy for standard linear readouts using a held-out comparison. The methods align closely overall, but the correspondence is weaker for bidirectional language models.

  • A 90%/10% train-validation split compares a max-margin Crammer–Singer SVM with prototype scores computed from training centroids.
  • The mean accuracy gap is 0.047 in vision and 0.063 in autoregressive models, indicating close agreement between the two classifiers.
  • Bidirectional language models show a larger mean accuracy gap of 0.121 and lower per-class correlation, r = 0.58.The corresponding correlations are r = 0.87 in vision and r = 0.76 in autoregressive models.
  • Figure 5 reports that the gap between centroid and trained linear-readout accuracy is small.
  • The comparison uses frozen pretrained representations spanning modalities and architecture families without fine-tuning or modifying the backbones.

B.1 Datasets

The study evaluates frozen representations from a broad roster of pretrained vision, language, and audio backbones on classification tasks. The datasets and preprocessing define modality-specific class labels and extracted features.

  • Datasets: The evaluation uses ImageNet-1K for vision, TinyStories token prediction for language, and VGGSound for audio.ImageNet-1K contains 1000 classes and approximately 1.28M images; VGGSound uses 310 classes and 183,630 clips.
  • Language preprocessing: Language classes are restricted to content-word lemmas, including NOUN, PROPN, VERB, ADJ, and ADV.Tokens sharing a lemma are unified into one class.
  • Language preprocessing: Masked-word models use the final hidden state at a masked content-word position, while autoregressive models use the preceding hidden state for the next predicted word.
  • Model roster: The canonical roster contains 36 pretrained backbones across the four modality groups, including transformer and convolutional architectures.
  • Feature extraction: Representations are taken from final-layer or pre-classifier pooled features, depending on the backbone family.
  • Preprocessing: Each representation dimension is z-scored before analysis using its empirical mean and standard deviation.

C.1 Isotropic model

The isotropic model treats centroids and within-class fluctuations as uncorrelated Gaussian variables, yielding analytical accuracy predictions and self-averaging results. The centroid-aligned model instead retains classifier-relevant rival coordinates and evaluates accuracy over a sparse rival set.

  • Isotropic baseline: The isotropic baseline assumes iid Gaussian centroids and isotropic Gaussian within-class fluctuations, retaining only N, P, and the noise-to-signal radius R.It discards correlations between centroids and fluctuations.
  • Prototype classification: The prototype classifier predicts the class whose unit centroid has the largest dot product with the input representation.Centroids are empirical class means normalized to unit vectors; normalized logits preserve the argmax.
  • Analytical consequences: For R = O(1), isotropic classes are asymptotically separable and accuracy approaches 1; for large residual radius, accuracy collapses to chance, 1/P.The isotropic model also identifies a critical-radius scaling for non-perfect accuracy.
  • Centroid-aligned model: The centroid-aligned model represents each rival logit as a centroid overlap plus radius-scaled projected variability, then computes correctness as an orthant probability.The conditional-independence assumption factorizes this probability into rival-wise Gaussian terms.
  • Sparse rivals: The centroid-aligned theory evaluates only a small rival set because its error saturates around K ≈10–20 rather than requiring all P classes.This sparse restriction is motivated by the observation that only a small number of classes are genuine competitors.

E.2 Convergence of the K-way classification accuracy

The theory converges rapidly as the rival set grows: a small number of strongest competitors reproduces full classification accuracy, while heavy-tailed projections require global radius rescaling. Across modalities, the rescaled theory substantially improves prediction fidelity.

  • Rival selection: Margin and variance selectors reach full P-way accuracy with the fewest rivals, and projection variance is adopted because it is cheaper to measure and interpret.The conclusion is consistent across modalities; projection variance and conditional margin perform comparably within five rivals at every band.
  • Convergence: At K = 20, the theory’s mean error is within 0.003 of its large-K floor for 31 of 36 backbones.The median number of rivals needed to come within 0.001 of the floor is 20.
  • Heavy-tailed projections: The standardized centroid projections have pronounced positive tails, which increase extreme rival scores and make a Gaussian theory over-optimistic.A smaller Student-t exponent ν indicates a heavier tail.
  • Heavy-tailed projections: The fitted global rescaling R → λR compensates for heavy-tailed projections by enlarging the effective within-class radius.The rescaling is fitted per model.
  • Rescaling validation: Without rescaling, predicted accuracy is high by 6% on average; with fitted λ, the error falls to 0.5%.The fitted rescaling is therefore retained in the main theory.
  • Rescaling validation: Across backbones, heavier tails correlate strongly with larger rescaling factors, with global Pearson r = 0.90 between λ and 1/ν.The reported within-family correlations are 0.89, 0.95, 0.81, and 0.89.

G Depth analysis

Prototype classification depends on representation depth in a modality-specific way. Language models peak before the final block, whereas vision models generally peak at the final block.

  • Language: For autoregressive language models, content-word prototype accuracy is consistently highest a few blocks before the final layer and drops at the last block.The analysis identifies the best layer before measuring the geometry of the largest language models.
  • Vision: For vision models, the final block gives the best prototype accuracy, with a plateau in DINOv3 7B.The comparison spans six Qwen3 autoregressive models and six DINOv3 vision transformers.
  • Geometric measures: The class radius R does not predict the overall best accuracy across depth.Depth analysis therefore tracks additional geometric measures, including hardest-rival projection statistics and centroid overlap.

H Theoretical Predictions Across Models and Modalities

The centroid-aligned theory is tested unchanged across 36 state-of-the-art models spanning vision, language, and audio. It predicts per-class prototype accuracy strongly across modalities, while richer covariance corrections provide only a modest improvement at substantial parameter cost.

  • Cross-modal evaluation: The evaluation covers 15 vision encoders, 14 autoregressive language models, 4 masked language models, and 3 audio encoders across varied architectures and training methods.Vision uses ImageNet, language uses TinyStories, and audio uses VGGSound.
  • Cross-modal evaluation: Per-class theory–empirical correlations are r = 0.951 for vision, 0.946 for autoregressive language, 0.943 for masked language, and 0.948 for audio.Mean per-modality RMSE ranges from 0.047 to 0.076, with mean bias between 0.002 and -0.009.
  • Cross-modal evaluation: The theory tracks both the overall radius trend and, often, individual per-class accuracy patterns across backbones.The figures compare predicted and empirical per-class accuracy against the dashed y = x line.
  • Theory variants: The main theory uses a rank-one true–rival correlation structure, while the cluster expansion adds off-diagonal covariance corrections.Both variants are evaluated with K = 20 rivals and separately fitted global rescaling factors.
  • Theory variants: The cluster expansion fits slightly better but adds K(K −1)/2 covariance parameters and is less transparent, so it is not used in the main text.It is presented as an additional theoretical result on the 36 tested backbones.
Loading 2608.15632v1…