Representational Alignment Across Model Layers and Brain Regions with Multi-Level Optimal Transport

Shaan Shah, Meenakshi Khosla

TL;DR

The paper introduces Multi-Level Optimal Transport (MOT), a novel framework that globally aligns the representations of different neural networks or brain regions simultaneously across all layers. By optimizing a soft, many-to-many layer coupling alongside neuron-level alignments, MOT naturally handles networks of different depths and uncovers clean, emergent hierarchical structures that greedy, layer-wise methods completely miss.

What Problem Does This Paper Address?

When comparing how different AI models (or artificial models and human brains) represent the world, researchers typically use "layer-wise matching." They take a layer from a source network and search greedily for the single best-matching layer in a target network using metrics like Centered Kernel Alignment (CKA) or Representational Similarity Analysis (RSA).

However, this standard approach has glaring flaws:

  1. Rigid One-to-One Constraints: It assumes a single layer maps perfectly to another single layer, which fails when networks have different depths or when features are distributed across multiple layers.
  2. Asymmetry and Lack of Global Context: Matching layer $A$ to network $B$ doesn't yield the same mapping as matching $B$ to $A$, and it fails to provide a single, unified global alignment score for the entire network comparison.
  3. Overfitting to Noise: By optimizing each layer pair independently, greedy methods ignore the global activation structure, often leading to noisy, collapsed mappings where multiple source layers mistakenly map to the exact same target layer.

Methods

The authors propose Multi-Level Optimal Transport (MOT), a hierarchical optimization framework that operates at two distinct levels:

  • Inner Level (Neuron-to-Neuron): For every possible pair of layers, MOT computes a soft neuron-level transport plan using optimal transport (OT) based on neuron tuning dissimilarities (correlation distance). This allows neurons to match fractionally even if layer widths differ.
  • Outer Level (Layer-to-Layer): Using the costs derived from the inner level, MOT solves a second, global optimal transport problem to couple the layers themselves. Crucially, it enforces mass conservation constraints: every source layer must distribute 100% of its representational "mass" across target layers, ensuring a balanced, globally consistent alignment.
Figure 1: Left: Pairwise OT. Layers are matched independently, so multiple target layers can be mapped to the same source while other sources remain unused, yielding asymmetric, unbalanced mappings. Right: Multi-Level OT. MOT infers a globally consistent transport plan where each source layer distributes all its mass and each target layer receives exactly one unit, ensuring balanced, symmetric alignments and handling depth mismatches.

The authors also introduce two powerful extensions:

  • MOT + R (Rotation-Invariant MOT): Incorporates orthogonal Procrustes transformations to align representations embedded in rotated subspaces—a feature critical for Vision Transformers.
  • Three-Level MOT: Extends the framework to include a third optimization layer over training checkpoints, allowing the alignment of entire training trajectories.

Datasets

The framework was evaluated across three distinct domains using well-established datasets:

  • Large Language Models (LLMs): Evaluated on 2,552 prompts from the STSB dataset, comparing models of varying scales from the LLaMA-3.2 and Qwen-2.5 families.
  • Human Brain Data: Evaluated on fMRI recordings from the Natural Scenes Dataset (NSD), utilizing responses from 4 human subjects viewing 1,000 shared natural images.
  • Vision Models: Evaluated on 20,000 images from the ImageNet validation set, comparing DINOv2 and ViT-MAE architectures across multiple scales.

Key Insights and Ideas

  • Emergent Hierarchical Structure: Without being forced by explicit ordering constraints, MOT naturally recovers smooth, diagonal layer-to-layer correspondences (early layers map to early layers, deep to deep). Greedy methods, by contrast, yield noisy and fractured mappings.
  • Visualizing Computational Dilation: When comparing a shallower network to a deeper one, MOT reveals that a single layer in the shallow network distributes its mass across multiple consecutive layers in the deeper network. This beautifully visualizes how deeper models decompress and refine computations across more processing steps.
  • The Importance of Rotation in ViTs: While vanilla MOT struggles to align Vision Transformers due to their lack of privileged coordinate axes, adding rotation invariance (MOT+R) dramatically unlocks hidden geometric alignments, outperforming all baseline metrics.

Key Results

  • LLM Alignment: MOT consistently achieved higher reconstruction correlation scores on held-out data compared to independent pairwise OT. For instance, aligning LLaMA-3.2 1B to LLaMA-3.2 3B yielded a score of 0.558 for MOT versus 0.505 for Pairwise Best OT.
  • Brain-to-Brain Alignment: MOT successfully recovered the expected homologous region-to-region correspondences across different human subjects (e.g., V1 to V1, V4 to V4), maintaining reconstruction performance on par with greedy methods while providing vastly superior interpretability.
  • Vision Model Alignment (MOT+R): In Vision Transformers, MOT+R achieved massive performance leaps. Aligning DINOv2 Small to DINOv2 Large jumped from a standard MOT score of 0.353 to 0.778 when rotation-augmented.
Figure 2: Transport plans for LLM alignment. Multi-Level OT (left) versus pairwise OT (right) for two cross-model comparisons: (a) Qwen-2.5 0.5B ↔LLaMA-3.2 3B and (b) LLaMA-3.2 1B ↔Qwen-2.5 3B. MOT reveals smooth, diagonal correspondences across layers, while pairwise OT produces noisier and less structured mappings.

Limitations and Future Work

The primary bottleneck of MOT is its computational complexity. Solving the inner neuron-level OT scales cubically with the number of neurons ($O(n^3 \log n)$), making the overall procedure scale as $O(L^2 n^3 \log n)$ for a network with $L$ layers. This makes scaling to massive, modern wide-layer models challenging without further algorithmic approximations (such as Entropic Regularization or Sliced Wasserstein distances).

Additionally, the current work focuses entirely on quantifying and characterizing alignment rather than explaining the underlying causal mechanisms of why certain models or biological systems converge on these shared representations. The authors suggest that incorporating structural priors (like smoothness constraints) into the transport plan represents a promising avenue for future work.

Summary updated

BibTeX
@inproceedings{shah2026representational,
  author = {Shaan Shah and Meenakshi Khosla},
  title = {{Representational Alignment Across Model Layers and Brain Regions with Multi-Level Optimal Transport}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=xz3hPommuG},
}
Figure