Scalable and Interpretable Representation Alignment with Ordinal Similarity

Diogo Soares, Pankhil Gawade, Andrea Dittadi, Ewa Szczurek

Evaluating how well different neural network representations align is a fundamental challenge in modern machine learning. Whether comparing how a Vision Transformer (ViT) processes an image to how a text model interprets its description, or tracking a model's convergence over time, researchers rely on representation alignment metrics. However, traditional tools for this task suffer from significant theoretical and practical limitations.

This paper introduces a novel ordinal-similarity framework, instantiated by the Triplet Similarity Index (TSI) and Quadruplet Similarity Index (QSI). By focusing on the order of distances rather than their exact values, these metrics provide a robust, interpretable, and highly scalable alternative to existing alignment measures.

The Limitations of Existing Metrics

Currently, metrics like Centered Kernel Alignment (CKA) and Canonical Correlation Analysis (CCA) dominate the field of representation alignment. Despite their popularity, they present three major challenges:

  1. Lack of Interpretability: They produce raw scores that lack a clear probabilistic or physical meaning. A CKA score of 0.7, for instance, does not translate to an intuitive understanding of geometric similarity, largely due to shifting baselines.
  2. Fragility to Outliers: Traditional metrics are highly sensitive to noise. A small number of outlier data points can drastically distort the perceived alignment, making two perfectly aligned models appear completely different.
  3. Computational Intractability: As datasets scale to millions of points, computing exact alignment becomes computationally impossible. Researchers are forced to rely on heuristic batch approximations that often lack rigorous theoretical guarantees.

Ordinal Similarity: TSI and QSI

To overcome these hurdles, the authors propose shifting from nominal similarity (evaluating exact distance values) to ordinal similarity (evaluating rankings). The framework introduces two primary indices:

  • Triplet Similarity Index (TSI): This metric evaluates local neighborhood structures. It asks: "If point A is closer to B than to C in the first representation, is that relative ranking preserved in the second representation?" TSI effectively measures the probability that relative distances from an anchor point remain consistent.
  • Quadruplet Similarity Index (QSI): This metric captures a more global structure. It asks: "Is the distance between points A and B smaller than the distance between points C and D in both models?"

The Scalability Breakthrough

Unlike previous methods that require computing full distance matrices, the authors introduce a Monte Carlo approximation scheme for TSI and QSI. They mathematically prove that these scores can be accurately estimated using a fixed number of random samples. Consequently, the computation time is entirely independent of the dataset size. Whether analyzing 10,000 or 10 million data points, the computational cost to achieve a reliable estimate remains constant, offering precision levels orders of magnitude higher than standard batching techniques.

Key Findings and Empirical Validation

The researchers validated TSI and QSI across a variety of settings, including synthetic hypercubes, CIFAR-10 for tracking ViT training dynamics, and ImageNet for evaluating multimodal alignment in CLIP models across different scales.

The "Universal Baseline"

A major theoretical contribution of this work is the proof of a universal baseline. For any two completely independent (random) representations, the TSI and QSI scores will always converge to approximately 0.5. This provides practitioners with a reliable "North Star" for dissimilarity, regardless of model architecture or embedding dimensionality.

Robustness by Design

Because TSI and QSI depend only on the sign of distance differences rather than their magnitudes, they are naturally immune to "hubness"—a phenomenon in high-dimensional spaces where a single extreme outlier disrupts the entire neighborhood structure. In perturbation tests where 2% of the data was corrupted, traditional metrics like CKA and Mutual Nearest Neighbors saw their scores collapse toward zero. In contrast, TSI and QSI remained remarkably stable, clinging closely to their unperturbed values.

Exposing CKA's Blind Spot

The ordinal framework also highlights critical flaws in existing metrics. In experiments evaluating CLIP models, CKA scores counter-intuitively dropped when moving to the largest, most accurate model (ViT-L/14). Meanwhile, TSI and QSI correctly reflected an increase in multimodal alignment, demonstrating their reliability across varying embedding dimensions.

Multi-scale Neighborhoods

The paper establishes a formal mathematical equivalence showing that perfect TSI alignment is identical to having perfectly matching Mutual Nearest Neighbors across every possible scale (from $k=1$ to $N$). This bridges the gap between global ordinal consistency and local neighborhood structures.

Limitations and Future Directions

While the ordinal similarity framework offers a massive leap forward, the authors note a few areas for ongoing research:

  • Geometric Constraints: In 1-dimensional spaces, the triangle inequality makes it mathematically impossible to reach a similarity score of exactly zero, forcing some baseline level of ordinal consistency. The authors hypothesize this phenomenon generalizes to higher dimensions but have yet to formally prove a practical lower bound for all spaces.
  • Distance Proxies: The metrics are theoretically robust to any distance function, but the choice of distance (e.g., Euclidean versus Cosine) still dictates the semantic meaning of the resulting alignment.
  • Differentiable Alignment: Looking forward, the authors suggest adapting this framework into a differentiable loss function. This could allow models to be explicitly trained to align their internal representations with human-like ordinal consistency.

By focusing on the fundamental order of data rather than its exact geometry, TSI and QSI provide a scalable, robust, and interpretable lens through which to understand the inner workings of modern neural networks.

Summary updated

BibTeX
@inproceedings{soares2026scalable,
  author = {Diogo Soares and Pankhil Gawade and Andrea Dittadi and Ewa Szczurek},
  title = {{Scalable and Interpretable Representation Alignment with Ordinal Similarity}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=G4D0YzzZEk},
}

Loading related content...

Figure