Skip to main content
QUICK REVIEW

[Paper Review] Representation Topology Divergence: A Method for Comparing Neural Network Representations

Serguei Barannikov, Ilya Trofimov|arXiv (Cornell University)|Dec 31, 2021
Cell Image Analysis TechniquesBiochemistry, Genetics and Molecular Biology9 citations
TL;DR

This paper introduces Representation Topology Divergence (RTD), a novel method for comparing neural network representations by measuring multi-scale topological dissimilarity between two point clouds with a one-to-one correspondence, even when embedded in different ambient spaces. RTD outperforms CKA, SVCCA, and IMD in capturing structural differences, showing strong correlation with model prediction disagreement and sensitivity to topological features like clusters and voids.

ABSTRACT

Comparison of data representations is a complex multi-aspect problem that has not enjoyed a complete solution yet. We propose a method for comparing two data representations. We introduce the Representation Topology Divergence (RTD), measuring the dissimilarity in multi-scale topology between two point clouds of equal size with a one-to-one correspondence between points. The data point clouds are allowed to lie in different ambient spaces. The RTD is one of the few TDA-based practical methods applicable to real machine learning datasets. Experiments show that the proposed RTD agrees with the intuitive assessment of data representation similarity and is sensitive to its topological structure. We apply RTD to gain insights on neural networks representations in computer vision and NLP domains for various problems: training dynamics analysis, data distribution shift, transfer learning, ensemble learning, disentanglement assessment.

Motivation & Objective

  • To address the lack of a principled, topologically-informed method for comparing neural network representations without relying on downstream task performance.
  • To develop a metric sensitive to structural differences such as clusters, voids, and cavities in learned representations.
  • To provide a practical, scalable approach based on Topological Data Analysis (TDA) applicable to real-world machine learning datasets in vision and NLP.
  • To evaluate RTD across diverse scenarios including training dynamics, distribution shift, transfer learning, and disentanglement.

Proposed method

  • The method constructs an R-Cross-Barcode from two point clouds P and P̃ with a one-to-one correspondence, representing their shared topological features across multiple scales.
  • It uses persistent homology to track topological features (e.g., connected components, loops, voids) across a range of distance thresholds.
  • The Representation Topology Divergence (RTD) score is computed as the L2 norm of the difference between the R-Cross-Barcode vectors, quantifying topological dissimilarity.
  • The approach is invariant to linear transformations and sensitive to non-linear topological structure, unlike CCA-based methods.
  • It allows point clouds to lie in different ambient spaces, overcoming a key limitation of prior topological comparison methods.
  • The method is implemented efficiently and open-sourced, enabling application to real-world deep learning benchmarks.

Experimental results

Research questions

  • RQ1How can we compare neural network representations in a way that captures their underlying topological structure, such as clusters and voids, beyond linear or kernel-based similarity?
  • RQ2To what extent does RTD correlate with human or model-based intuition about representation similarity, especially in cases where representations are structurally different but similar in linear correlation?
  • RQ3Can RTD detect meaningful changes in representation topology during training, data distribution shifts, or fine-tuning, where other metrics fail?
  • RQ4How does RTD perform in evaluating disentanglement in generative models, particularly when comparing slices of the latent space along interpretable vs. random directions?
  • RQ5Does RTD outperform established metrics like CKA, SVCCA, and IMD in capturing structural differences in representations across vision and NLP tasks?

Key findings

  • RTD shows high correlation with model prediction disagreement, indicating it captures meaningful differences in representation that affect generalization.
  • In training dynamics, RTD reveals structural changes in representations that are not captured by CKA, such as the emergence of topological features like voids.
  • On the CIFAR-100 to CIFAR-10 fine-tuning task, RTD outperforms CKA, SVCCA, and IMD in detecting representation shifts.
  • For disentanglement evaluation on dSprites, RTD shows significantly lower dissimilarity along interpretable factors (e.g., shape, position) compared to random directions, confirming its sensitivity to meaningful factors.
  • In layer-wise analysis of ResNet-50 and ConvNeXt-tiny, RTD better reveals the block structure of the network than CKA or SVCCA, highlighting architectural design in representation topology.
  • RTD performs poorly on CKA-like metrics when applied to UMAP-reduced MNIST, indicating it captures topological incoherences that linear or RBF-based CKA miss.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.