Quantifying Differences in Neural Population Activity With Shape Metrics

João Barbosa, Amin Nejatbakhsh, Lyndon Duong, Sarah E. Harvey, Scott L. Brincat, Markus Siegel, Earl K. Miller, Alex H. WilliamsbioRxiv 2025

Abstract

Quantifying differences across species and individuals is fundamental to many fields of biology. However, it remains challenging to draw detailed functional comparisons between large populations of interacting neurons. Here, we introduce a general framework for comparing neural population activity in terms of shape distances. This approach defines similarity in terms of explicit geometric transformations, which can be flexibly specified to obtain different measures of population-level neural similarity. Moreover, differences between systems are defined by a distance that is symmetric and satisfies the triangle inequality, enabling downstream analyses such as clustering and nearest-neighbor regression. We demonstrate this approach on datasets spanning multiple behavioral tasks (navigation, passive viewing of images, and decision making) and species (mice and non-human primates), highlighting its potential to measure functional variability across subjects and brain regions, as well as its ability to relate neural geometry to animal behavior.

Introduction: The Challenge of Neural Comparison

In modern neuroscience, high-density recordings allow us to monitor thousands of neurons simultaneously. However, comparing these recordings across different animals, brain regions, or even the same animal over time remains a significant hurdle. Because neurons are randomly sampled and labeled differently in each recording, direct point-to-point comparison is impossible.

Comparing neural activity across animals, brain regions, and time.

Existing methods like Representational Similarity Analysis (RSA) or Canonical Correlation Analysis (CCA) provide some relief but often lack the formal properties of a metric space—specifically symmetry and the triangle inequality. Without these properties, researchers cannot easily perform robust downstream tasks like hierarchical clustering to identify functional similarities between brain regions or k-nearest neighbor regression to predict behavior based on neural geometry.

Methods: A Geometric Framework for Shape Metrics

The proposed framework treats the activity of $N$ neurons over $M$ experimental conditions as a set of points in $N$-dimensional space, forming a "shape" or manifold. To compare two systems, the authors define Shape Distances based on geometric alignments:

  1. Procrustes Distance: Aligns manifolds using only rotations and reflections, preserving the internal geometry of the population.
  2. Linear Shape Distance: Incorporates a "whitening" step to allow for flexible linear transformations (like stretching) while maintaining metric properties.
  3. Permutation-Invariant Distance: A stricter metric allowing only the reordering of neurons, testing if specific neural tuning is critical.
The alignment process and the resulting Manifold Shape Space.

By satisfying the triangle inequality, these distances allow every recording session to be mapped as a single point in a high-dimensional "Shape Space." In this space, standard machine learning tools like Multidimensional Scaling (MDS) and k-Nearest Neighbors (k-NN) can be applied to visualize and predict neural properties.

Key Insights and Results

The "shape" of neural activity serves as a functional fingerprint. The framework was validated across diverse datasets, including simulated 1D tuning curves, mouse head direction data, the Allen Brain Observatory, and multi-region recordings from non-human primates.

  • Predictive Power: In simulations, 3-nearest-neighbor regression in shape space predicted neural acuity with an $R^2$ of 0.95.
  • Anatomy and Geometry: Shape metrics automatically clustered 56 brain regions according to known anatomical hierarchies (e.g., separating thalamic from cortical regions).
  • Zero-Shot Decoding: By aligning a new animal to a common reference shape space, the researchers decoded head direction using a decoder trained entirely on other subjects.
  • Behavioral Correlation: In the International Brain Lab (IBL) dataset, neural geometric distance significantly correlated with differences in behavioral psychometric curves ($r = 0.19, p = 0.01$).

Discussion and Future Directions

While powerful, the current framework primarily relies on trial-averaged responses. Future work is needed to extend these metrics to single-trial dynamics and trial-to-trial noise. Additionally, while the framework treats time points as landmarks, it does not yet explicitly model the continuous causal flow of neural trajectories.

In summary, this work transitions neural population analysis from comparing lists of neurons to comparing geometric objects, providing a rigorous mathematical foundation for large-scale, multi-subject neuroscience.

Summary updated

BibTeX
@misc{barbosa2025quantifying,
  author = {João Barbosa and Amin Nejatbakhsh and Lyndon Duong and Sarah E. Harvey and Scott L. Brincat and Markus Siegel and Earl K. Miller and Alex H. Williams},
  title = {{Quantifying Differences in Neural Population Activity With Shape Metrics}},
  year = {2025},
  doi = {10.1101/2025.01.10.632411},
  howpublished = {bioRxiv},
}
Figure