GULP: a prediction-based metric between representations

Enric Boix Adserà, Hannah Lawrence, George Stepaniants, Philippe Rigollet

Abstract: Comparing the representations learned by different neural networks has recently emerged as a key tool to understand various architectures and ultimately optimize them. In this work, we introduce GULP, a family of distance measures between representations that is explicitly motivated by downstream predictive tasks. By construction, GULP provides uniform control over the difference in prediction performance between two representations, with respect to regularized linear prediction tasks. Moreover, it satisfies several desirable structural properties, such as the triangle inequality and invariance under orthogonal transformations, and thus lends itself to data embedding and visualization. We extensively evaluate GULP relative to other methods, and demonstrate that it correctly differentiates between architecture families, converges over the course of training, and captures generalization performance on downstream linear tasks.

Introduction

The "black box" nature of deep neural networks remains a significant hurdle in machine learning research. To peer inside these models, researchers often compare their "representations"—the internal activations generated by data. The goal is to determine if different architectures or training regimes lead to similar conceptual understandings. However, defining "similarity" in high-dimensional activation space is non-trivial.

Traditional methods, such as Canonical Correlation Analysis (CCA) or Centered Kernel Alignment (CKA), focus on geometric alignment. While mathematically sound, these metrics often fail to account for the model's ultimate utility: its ability to perform downstream tasks. A model might possess a different geometric layout of data points while remaining functionally equivalent for transfer learning. This paper introduces GULP (Uniform Linear Probing), a metric designed to capture this functional similarity by measuring how representations perform across a spectrum of predictive tasks.

The GULP Metric

GULP defines the distance between two representations based on the maximum possible difference in their prediction performance across all possible $\ell_2$-regularized linear regression tasks. This "worst-case" approach ensures that if two representations are close under the GULP metric, they are guaranteed to perform similarly on any linear downstream task.

Key Features of GULP

  • The Resolution Parameter ($\lambda$): GULP incorporates a regularization parameter that acts as a "resolution" knob. A small $\lambda$ emphasizes fine-grained details, such as the rank of the feature matrix, whereas a larger $\lambda$ focuses on coarser, intrinsic structural properties.
  • Closed-Form Efficiency: Although defined as a supremum over infinite tasks, the authors demonstrate that GULP has a closed-form solution involving covariance and cross-covariance matrices. This allows for efficient estimation using standard plug-in estimators on finite data samples.
  • Mathematical Rigor: Unlike many heuristic similarity measures, GULP is a mathematically valid pseudo-metric. It satisfies the triangle inequality and maintains invariance under orthogonal transformations (e.g., rotations), making it highly suitable for visualization techniques like t-SNE or Multi-Dimensional Scaling (MDS).

Experimental Framework

The authors validated GULP across diverse architectures and domains to ensure its robustness:

  • Computer Vision: Evaluated 37 state-of-the-art pretrained models (ResNets, EfficientNets, ConvNeXts, MobileNets) on ImageNet and studied representation convergence using ResNet-18 models on CIFAR-10.
  • Natural Language Processing: Analyzed 110 BERT models (Base and Medium) trained on the Multi-Genre Natural Language Inference (MNLI) dataset.
  • Generalization and OOD: Used the HANS dataset to test sensitivity to out-of-distribution (OOD) generalization and the UTKFace dataset to evaluate cross-domain robustness for ImageNet-trained models.

Key Insights

Functional vs. Geometric Perspectives

GULP shifts the focus from how representations look to what they can do. By bridging the gap between geometry and utility, GULP acts as an interpolant between existing methods. At $\lambda=0$, it relates to CCA; as $\lambda$ increases, its behavior aligns more closely with CKA and Procrustes distance.

Architecture Fingerprinting

GULP is exceptionally effective at identifying architectural signatures. In t-SNE visualizations, GULP naturally clusters models by their family (e.g., grouping all EfficientNets together). This suggests that the specific constraints of an architecture impose a unique functional "fingerprint" on the learned representations, regardless of the specific weights.

Convergence of Independent Runs

A significant finding is that the GULP distance between identical architectures trained from different random seeds decreases over the course of training. This indicates that models, despite starting from different initializations, converge toward a shared functional understanding of the data.

Predicting Generalization

Empirical results show that GULP correlates more strongly with actual downstream linear task performance than CCA, CKA, or Procrustes. Furthermore, GULP (particularly with large $\lambda$) shows higher sensitivity to a model's ability to generalize to OOD data, where geometric metrics like CKA can sometimes be "blind" to functional discrepancies.

Limitations and Future Work

While GULP provides a powerful framework for representation analysis, it currently focuses on linear downstream tasks (ridge regression). The authors noted that its predictive power decreases when applied to non-linear probes, such as logistic regression. Additionally, while efficient for standard layers, computing GULP for the massive dimensionality of modern transformer models may require further optimization or kernel-based approximations.

Future research directions include extending GULP to non-linear kernels and exploring its application in Neural Architecture Search (NAS) and Knowledge Distillation to guide models toward more effective functional representations.

Summary updated

BibTeX
@inproceedings{adsera2022gulp,
  author = {Enric Boix Adserà and Hannah Lawrence and George Stepaniants and Philippe Rigollet},
  title = {{GULP: a prediction-based metric between representations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ns6lT9WNQp},
}
Figure