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.
Figures & tables
Figure 1: Learning a connection between trained computations and representation geometry. A representation site is determined by its upstream computation, but symmetry-related parameterizations can induce equivalent computations. Representational correspondence can also extend beyond these parameter symmetries: different computations may produce the same representation geometry under a chosen relation.
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.
Figure 3: Same function, different parameterization. The graph only changes by a relabeling.
Figure 5: Predicted correspondence between networks of different depths: between 27 ResNet56 sites (columns) and nine ResNet20 sites (rows), ordered from earlier to later sites. Darker green indicates stronger correspondence.
Figure 6: Spearman correlation ( ↑ ) between predicted and ground-truth representation relations across ResNet and ViT populations on CIFAR-10 and CIFAR-100.
Figure 7: Layer retrieval across model populations, measured by Mean Regret@5 ( ↓ ) for retrieving representation sites from a candidate bank spanning multiple test models.
Figure 8: Stitching candidate selection for ResNet-to-ResNet and ViT-to-ViT connections on CIFAR-10 and CIFAR-100. Performance is measured by the stitching penalty ( ↓ ).
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: Representation-score prediction performance of various model population sizes.
Figure 10: Cross graph interaction analysis. PARIS -Ind-MLP replaces the independent estimator’s calibrated metric head with a symmetric MLP while retaining partner-independent site embeddings. The MLP improves prediction scores but does not close the gap to PARIS -Joint.
Figure 11: Complementary regression and ranking supervision. Representation-score prediction ( ↑ ) for PARIS -Ind and PARIS -Joint using combined regression and ranking pair supervision, regression alone, or ranking alone.
Figure 12: Effect of reference-sample size on predicted-reference correlation. Correlation between predicted and activation-derived reference dissimilarities for PARIS -Ind and PARIS -Joint.
Figure 13: Per-representation score correlation between predicted and reference dissimilarities.
Figure 14: Per-representation score MAE between predicted and reference dissimilarities.
Figure 15: Per-representation score RMSE between predicted and reference dissimilarities.
Figure 16: Representation-score prediction under same-family and diverse meta-training. Mean Spearman correlations for DMC, Graph Metanetwork, PARIS -Ind, and PARIS -Joint on held-out ResNet and ViT populations trained on CIFAR-10 and CIFAR-100.
Figure 17: Out-of-distribution generalization across architecture configurations.
Figure 18: Cross-task correlation under partially overlapping label spaces. We partition each parent dataset’s classes into 30% task-A-only, 40% shared, and 30% task-B-only subsets. Each task contains 70% of the original classes. For pairs containing one site from each task-specific base-model population, entries report aggregate correlation between predicted and activation-derived reference dissimilarities.
Figure 19: Score-prediction performance under compensated positive ReLU rescaling.
Figure 19
Figure 22: Representation similarity prediction across modalities using pretrained CLIP models.
Figure 23: Scalability of stitching-candidate selection under same-family and diverse-family meta-training.
Figure 24: Representation-score prediction on pretrained CLIP vision encoders evaluated on Flowers-102.
As modern deep learning architectures grow in complexity, representational ambiguity emerges as a critical barrier to their interpretability and reliable merging. For ReLU networks, identical functional mappings can be achieved through entirely different weight configurations due to algebraic symmetries: neuron permutation and positive diagonal scaling. Consequently, traditional parameter-based comparison methods exhibit extreme instability to slight weight perturbations during training. This paper proposes a mathematically grounded approach to constructing a stable canonical representation of neural networks and a robust functional similarity metric. We shift focus from comparing raw weights to analyzing the topology of neuron activation regions. The algorithm first eliminates scaling ambiguity via L2-normalization of weight vectors with subsequent layer compensation. Next, discrete approximations of activation regions are generated as binary functional signatures evaluated over a data sample. To overcome the computational bottleneck of comparing large binary vectors, we adapt Locality-Sensitive Hashing, specifically MinHash, providing a fast and statistically precise approximation of the Jaccard index. The final cross-network neuron matching is formulated as a linear sum assignment problem solved via the Hungarian algorithm. We demonstrate theoretically and experimentally that our metric mitigates the neuron "flickering" effect and exhibits exceptional robustness to minor weight perturbations. This framework provides a solid foundation for model merging, transfer learning, objective assessment during pruning, and Explainable AI paradigms.
Neural models learn representations of high-dimensional data on low-dimensional manifolds. Multiple factors, including stochasticities in the training process, model architectures, and additional inductive biases, may induce different representations, even when learning the same task on the same data. However, it has recently been shown that when a latent structure is shared between distinct latent spaces, relative distances between representations can be preserved, up to distortions. Building on this idea, we demonstrate that exploiting the differential-geometric structure of latent spaces of neural models, it is possible to capture precisely the transformations between representational spaces trained on similar data distributions. Specifically, we assume that distinct neural models parametrize approximately the same underlying manifold, and introduce a representation based on the pullback metric that captures the intrinsic structure of the latent space, while scaling efficiently to large models. We validate experimentally our method on model stitching and retrieval tasks, covering autoencoders and vision foundation discriminative models, across diverse architectures, datasets, and pretraining schemes.
Hanlin Yu, Berfin Inal, Georgios Arvanitidis +3
University of Helsinki · University of Amsterdam · DTU +1
Statistical learning in high dimensions suffers from the curse of dimensionality. Fortunately, many functions of practical interest are compositionally sparse, meaning they admit a composition of local functions, each depending on only a few variables, allowing sample complexity to depend on local arity rather than ambient dimension. Yet realizing this benefit requires exploiting hidden compositional structure, which theory does not establish for practical gradient-based training. We study this gap with CSFRBench, a controlled benchmark that hides the target's compositional computation during training but retains it for diagnosis, and find that dense networks and sparsity-based baselines leave much of that benefit unrealized. Inspired by the spatial organization of biological neural circuits, we introduce Learned Wiring (LeWi): each neuron has a learned low-dimensional embedding, only nearby neurons connect, and embeddings and weights are trained jointly. LeWi improves sample efficiency on targets with hierarchical structure, intermediate reuse, or independent modules. Across 32 additional targets generated by independently sampled computation graphs, LeWi is the most sample-efficient method not given the target graph, with 27% lower mean learning-curve area than dense networks. Dense networks perform better on targets with a single high-arity function. LeWi's representations and connectivity align with the target computation. On 17 world-model prediction tasks spanning control, navigation, and manipulation, LeWi beats the dense baseline on 16 and wins 99/119 baseline comparisons. These results show that jointly learning connectivity and weights can exploit computational structure to improve sample efficiency.
Hangyu Zhou, Constantine Dovrolis, Stephen Mussmann
Georgia Institute of Technology · University of Cyprus