Learning to Compare Neural Representations from Parameterized Computation Graphs

Ya-Wei Eileen Lin, Daniel Herbst, Stefanie JegelkaarXiv 2026 · arXiv

Comparing neural networks is a fundamental task in modern AI. Whether you're trying to understand if two models have learned the same features, or you're looking for a specific layer to "stitch" into a new architecture, you need a way to measure representational similarity. Traditionally, this requires running both models on a shared "probe" dataset and comparing their internal activations—a process that is computationally expensive and requires access to data.

In their paper, "Learning to Compare Neural Representations from Parameterized Computation Graphs," Lin et al. propose a way to skip the data entirely. They introduce PARIS (Parameter-based Analysis for Relational Inference of Sites), a framework that predicts representational similarity directly from a model's weights and architecture.

TL;DR

PARIS uses graph metanetworks to predict the similarity between neural representations (like CKA or GULP scores) using only the models' parameterized computation graphs. By learning the mapping from "how a feature is computed" to "what its geometry looks like," it enables fast, data-free search and retrieval of corresponding layers across large populations of trained models.

What Problem Does This Paper Address?

As we move toward a world of "model zoos"—vast collections of pre-trained models—we need efficient ways to navigate them. If you have a specific representation in one model, how do you find its counterpart in another?

The current gold standard involves activation-based metrics like Centered Kernel Alignment (CKA). However, direct measurement has a "bottleneck": you must perform a forward pass on a reference dataset for every candidate model. This is slow and memory-intensive. PARIS asks: Can we learn to predict these similarity scores using only the architecture and trained weights?

The challenge is that neural networks have massive parameter symmetries. You can permute the hidden units of a layer or change the basis of an attention mechanism without changing the underlying function. A naive comparison of weights will fail because the same computation can be represented by many different weight configurations.

Figure 1: Learning a connection between trained com- putations and representation geometry. A representa- tion site is determined by its upstream computation, but symmetry-related parameterizations can induce equiva- lent computations. Representational correspondence can also extend beyond these parameter symmetries: differ- ent computations may produce the same representation geometry under a chosen relation.

Methods

The authors treat this as a "metanetwork" learning task. Their framework, PARIS, consists of several key components:

  1. Upstream Computation Graphs: Instead of looking at a single layer in isolation, PARIS represents each "site" (a specific location in the network) by the entire graph of operations and parameters that produced it.
  2. Symmetry-Aware Encoding: To handle permutations, they use a Graph Metanetwork (GMN) that is naturally invariant to node relabeling. For attention mechanisms, they encode "composed operators" (the QK and VO circuits) which remain invariant even when the internal basis of the attention head changes.
  3. Two Comparison Variants:
  4. PARIS-Ind: Encodes each site into a reusable embedding. This is extremely fast for searching large banks because you only encode each model once.
  5. PARIS-Joint: Uses cross-attention between the two site graphs for a more expressive, but slower, pair-wise comparison.
  6. Supervised Training: The metanetwork is trained to minimize the difference between its predicted score and the actual activation-based similarity measured on a training set of models.
Figure 2: Overview of PARIS. We consider a population of trained models. Each site is described by a graph of its upstream computation. PARIS-Ind encodes each site independently and compares reusable embeddings using relation-specific distance heads. PARIS-Joint allows the two site graphs to interact before predicting their relation. Both are trained with internal representation similarity and rank candidate sites in unseen models without collecting new base-model activations. Our metanetworks can guide the selection of sites and be used for adapter fitting.

Datasets

The authors evaluated PARIS on several diverse populations:

  • ResNet and ViT Zoos: Thousands of models with varying widths and depths trained on CIFAR-10 and CIFAR-100.
  • Multimodal Encoders: Pre-trained CLIP checkpoints (image and text encoders) to test cross-modality prediction.
  • Transfer Learning: Evaluated on Flowers-102 to see if representations learned on one dataset generalize to another.

Key Insights and Ideas

  • Computation Defines Representation: The core "aha" moment is that representational geometry is a predictable consequence of the upstream computation. If you know the "recipe" (the graph and weights), you can guess the "taste" (the representation) without eating it.
  • Invariance is Essential: By explicitly accounting for attention-basis transformations and coordinate permutations, PARIS can recognize functionally identical computations that look different in weight space.
  • Generalization Across "Species": Remarkably, a PARIS model trained on ResNets can provide useful signals for ViTs, and vice versa, suggesting it learns fundamental properties of how parameters shape information.

Key Results

  • High Predictive Accuracy: PARIS achieves strong Spearman correlations (up to 0.9+) with ground-truth activation metrics like CKA across various architectures.
  • Efficient Retrieval: In a "layer retrieval" task (finding a matching layer in a bank of unseen models), PARIS significantly outperforms baselines that rely on architectural metadata or simple weight statistics.
  • Zero-Shot Stitching: PARIS can identify high-quality "stitching" points between models—connections that preserve accuracy—without ever being trained on stitching outcomes. It approaches the performance of a "full search" while being orders of magnitude faster.
  • Speed and Memory: At search time, PARIS-Ind is 37x faster and uses 11x less peak memory than direct activation-based comparison.

Limitations and Future Work

While powerful, PARIS has some constraints:

  • Upfront Training Cost: Training the metanetwork requires a large "zoo" of models and their activations, which is a significant one-time investment.
  • Distribution Shift: The predictions are still tied to the reference distribution (e.g., CIFAR) used during training. Future work could explore more "universal" representational predictors.
  • Complex Symmetries: While it handles permutations and attention basis changes, it doesn't perfectly account for all symmetries, such as the positive-rescaling invariance in ReLU networks.

In conclusion, PARIS turns the "black box" of neural weights into a searchable map, paving the way for more automated and efficient model composition and analysis.

Summary updated

Abstract

Comparing internal representations across trained models is important for identifying corresponding layers and selecting components for model reuse. Yet, direct comparisons at inference require evaluating candidate models on known reference inputs and collecting their internal activations. In this paper, we study whether internal representation similarity measured across independently trained models can instead be learned to predict in unseen models from their parameterized computations. We introduce a framework that applies a graph metanetwork for mapping each internal site to an embedding derived from its upstream computations while accounting for hidden-coordinate permutation and internal attention-basis transformations. We analyze the structural properties of our estimators and derive conditional guarantees for layer retrieval and stitching candidate selection. Empirically, we find that the learned predictors support relation estimation and low-regret layer retrieval. They also select useful stitching connections while not being trained on stitching outcomes. This opens up a new way to study representation similarity directly from trained neural networks: representational relations learned across a collection of trained models can generalize to new computations, and that the predicted relations can guide candidate selection before direct measurement or adapter fitting for functional evaluations.
BibTeX
@misc{lin2026learning,
  author = {Ya-Wei Eileen Lin and Daniel Herbst and Stefanie Jegelka},
  title = {{Learning to Compare Neural Representations from Parameterized Computation Graphs}},
  year = {2026},
  eprint = {2611.26081},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.26081},
}
Figure