# Topological Sholl descriptors for neuronal clustering and classification

Reem Khalil, Sadok Kallel, Ahmed Farhat, Pawel Dlotko

► To cite this version:

Reem Khalil, Sadok Kallel, Ahmed Farhat, Pawel Dlotko. Topological Sholl descriptors for neuronal clustering and classification. PLoS Computational Biology, 2022, 18 (6), pp.e1010229. 10.1371/journal.pcbi.1010229. hal-04435634

HAL Id: hal-04435634

https://hal.science/hal-04435634v1

Submitted on 2 Feb 2024

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

Public Domain
RESEARCH ARTICLE

# Topological Sholl descriptors for neuronal clustering and classification

Reem Khalil<sup>1*</sup>, Sadok Kallel<sup>2</sup>, Ahmad Farhat<sup>3</sup>, Pawel Dlotko<sup>3</sup>

1 American University of Sharjah, Department of Biology Chemistry and Environmental Sciences, Sharjah, United Arab Emirates, 2 American University of Sharjah, Department of Mathematics, Sharjah, United Arab Emirates, 3 Dioscuri Centre in Topological Data Analysis, Mathematical Institute, Polish Academy of Sciences, Warsaw, Poland

* rkhalil@aus.edu

<figure><img src="image_1.png" /></figure>

## Abstract

Neuronal morphology is a fundamental factor influencing information processing within neurons and networks. Dendritic morphology in particular can widely vary among cell classes, brain regions, and animal species. Thus, accurate quantitative descriptions allowing classification of large sets of neurons is essential for their structural and functional characterization. Current robust and unbiased computational methods that characterize groups of neurons are scarce. In this work, we introduce a novel technique to study dendritic morphology, complementing and advancing many of the existing techniques. Our approach is to conceptualize the notion of a Sholl descriptor and associate, for each morphological feature, and to each neuron, a function of the radial distance from the soma, taking values in a metric space. Functional distances give rise to pseudo-metrics on sets of neurons which are then used to perform the two distinct tasks of clustering and classification. To illustrate the use of Sholl descriptors, four datasets were retrieved from the large public repository https://neuromorpho.org/ comprising neuronal reconstructions from different species and brain regions. Sholl descriptors were subsequently computed, and standard clustering methods enhanced with detection and metric learning algorithms were then used to objectively cluster and classify each dataset. Importantly, our descriptors outperformed conventional morphometric techniques (L-Measure metrics) in several of the tested datasets. Therefore, we offer a novel and effective approach to the analysis of diverse neuronal cell types, and provide a toolkit for researchers to cluster and classify neurons.

<figure><img src="image_2.png" /></figure>

OPEN ACCESS

**Citation:** Khalil R, Kallel S, Farhat A, Dlotko P (2022) Topological Sholl descriptors for neuronal clustering and classification. PLoS Comput Biol 18(6): e1010229. https://doi.org/10.1371/journal.pcbi.1010229

**Editor:** Hermann Cuntz, Ernst-Strungmann-Institut, GERMANY

**Received:** August 26, 2021

**Accepted:** May 19, 2022

**Published:** June 22, 2022

**Copyright:** © 2022 Khalil et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability Statement:** The MATLAB code for all descriptors is available on Github https://github.com/reemkhalilneurolab/morphology, Python notebook is available at https://github.com/reemkhalilneurolab/morphology-figures. All the data needed to reproduce the results is available at https://doi.org/10.5281/zenodo.6118983.

**Funding:** R.K. and S.K acknowledges the support of grants from the Biosciences and Bioengineering Research Institute (BBRI) grant# AS0214, Faculty Research Grant (FRG) grant# AS0204, and in part, by the Open Access Program from the American

## Author summary

Variations in the three-dimensional shape (i.e morphology) of neuronal populations reflect underlying functional differences. Thus, accurate description and classification of neuron morphology are essential for functional characterization. We introduce a new method for clustering and classification of neurons based on dendritic morphology, leveraging concepts from topological data analysis. In doing so, we develop mathematical descriptors that quantitatively and objectively assess structural differences among neuronal cell types and thus classify them. Each Sholl descriptor that is assigned to a neuron is a
University of Sharjah (AUS). P.D. acknowledges the support of Dioscuri program initiated by the Max Planck Society, jointly managed with the National Science Centre (Poland), and mutually funded by the Polish Ministry of Science and Higher Education and the German Federal Ministry of Education and Research. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests:** The authors have declared that no competing interests exist.

function of a distance from the soma with values in real numbers or more general metric spaces. We retrieved neuronal reconstructions from different animal species and brain regions using the large public repository https://neuromorpho.org/ for clustering and classification tasks. The results reveal that certain descriptors, thus key morphological features, can reliably differentiate particular cell classes in agreement with expert assignment. Given that our method discriminates among different cell types, as well as reveal subclasses of cells, its utility may be extended to other species and brain regions.

# 1 Introduction

Neuronal morphology dictates how information is processed within neurons [1], as well as how neurons communicate within networks [2]. Thus, given the large diversity in dendritic morphology within and across cell classes, quantifying variations in morphology becomes fundamental to elucidate neuronal function. Neurons in the mammalian cerebral cortex have traditionally been divided into two major groups: spiny and smooth neurons [3]. In the adult, spiny neurons are excitatory neurons, whereas smooth neurons are inhibitory neurons [4]. Furthermore, spiny neurons are typically classified according to the lamina where their soma is located and by dendritic morphologies. Consequently, this classification scheme allows for further subdivision and identification of pyramidal neurons and spiny stellate neurons. Pyramidal cells play a critical role in circuit structure and function, and are the most abundant type in the cerebral cortex (70–80% of the total neuronal population) [5]. The dendritic morphology of pyramidal cells can vary substantially among cortical areas within a species [6–9], across species [10, 11], and even across development [12–14]. Developmental changes in the dendritic morphology of pyramidal cells is mirrored by structural changes in connectivity [15–18].

Similarly, neocortical GABAergic interneurons are important in shaping cortical circuits, accounting for 10–30% of all cortical neurons [19, 20]. Classification of GABAergic interneurons has proved to be especially challenging due to their diverse morphological, electrophysiological, and molecular properties [4, 21]. Importantly, morphological differences among classes and subclasses of pyramidal cells and interneurons are presumed to be functionally relevant. Moreover, changes in dendritic morphology is thought to underlie various neurodevelopmental [22], and acquired [23–27] disorders. Thus, given the key role of pyramidal cells and interneurons in cortical function in health and disease, it is important to differentiate among their subclasses through objective descriptors and classification tools.

Neuronal morphological descriptors take as an input a digital reconstruction of a neuron. Standard descriptors, including L-measure metrics, return a real-valued measurement describing chosen spatial feature of such a reconstruction. Conventional Sholl analysis [28] associates a function which counts the number of dendritic crossings of a given sphere of radius *r* centered at the soma. In general, the obtained neuronal features are then used to quantitatively assess and cluster cell classes using standard supervised [21, 29, 30], and unsupervised [31–33] clustering algorithms.

In recent years, the field of computational topology has become increasingly more popular in the characterization of tree structures, including neurons. The value of a topological descriptor is a persistence diagram; a structure that potentially carries more information than conventional numerical invariants. For example, [34] developed a new algorithm called “Topological morphological descriptor”, or TMD, which is based on topological data analysis methods (i.e. persistence diagrams) to classify families of neurons. In a more recent study [35],
the authors use TMD to classify cortical pyramidal cells in rat somatosensory cortex. The topological classification was largely in agreement with previously published expert assigned cell types. Furthermore, [36] present a framework based on persistence homology to compare and classify groups of neurons. An alternate technique to study neuronal morphology was presented in [37] which assesses neuronal arbor morphology through sequence representation.

The relative success of topological methods has encouraged us to develop new, more elaborate descriptors that can advance the current methods. The approach we suggest, and then pursue, is to view a morphological feature describing a neuron as a function of distance from the soma which takes values in some relevant metric space. This is effectively an extension of the original approach of Sholl [28] which is based on tracking changes in branching information as one moves away from the soma, and which proved quite successful in the field (see [38, 39]).

By choosing neurobiologically meaningful features such as wiring (total dendritic length), branching pattern, tortuosity, taper rate, root angle, and others, we can monitor the trajectory of dendrites as they radiate from the soma. Consequently, this enables us to extract more detailed information available in the neuronal reconstruction. A “Sholl Descriptor” is then a rule that associates to each neuron, and for a given feature, a function with values in the real numbers, or in the metric space of persistence diagrams or in even more general metric spaces. This association must be both isometry invariant and *stable* (details in the text). The advantage is that Sholl descriptors endow the set of isometric neurons with *pseudo-metrics*, and this is a very convenient way to tackle the problem since the closer the neurons are in the underlying descriptor metric, the more of this feature they share. This method provides an objective and interpretable tool to compare and analyze neuronal morphologies.

In this paper, we develop eight Sholl descriptors, representing eight morphological features. Our clustering results were consistently better in separating different neuronal cell types than clustering methods based on raw morphometric L-measure data. Certain descriptors result in complete separation of selected groups of neurons. Importantly, specific features that play a major role in differentiating a group of neurons can be identified.

## 2 Methods

In this study, we develop a toolkit of eight descriptors, labeled as *tortuosity*, *leaf index*, *flux*, *branching pattern*, *energy*, *wiring*, *Sholl-TMD and taper rate*, and then propose their implementation. We did not run the taper rate descriptor on the tested datasets since information about diameter of dendrites was not available. Therefore, only seven descriptors were used in this study.

The descriptors are used to differentiate among and classify different neuronal cell types using a wide range of methods; starting from dendrogram analysis to more advanced machine learning techniques (Fig 1). Given one of our eight morphological features, denoted by the Greek letter $\phi$, we associate to such a feature a “Sholl descriptor” $\Phi$ which is a map from the set of neurons to a metric space of functions that is invariant under isometries and has stability properties (Definition 2.2). Each such Sholl descriptor $\Phi$ gives rise to a pseudo-metric $d_{\phi}$ on the set of all neurons §2. This (Sholl) $d_{\phi}$ measures proximity of neurons with respect to the particular feature $\phi$. Specifically, the closer the neurons are under that metric, the more of the features captured by $\phi$ they share.

Sholl descriptors have to be combined in order to optimize both clustering and classification. We present three different methods of combining the descriptors, each with its own merits. The first combination method is unsupervised in that it does not depend on the way we subdivide our dataset into classes (C.2 in S1 Text). It is based on combining the different
<figure><img src="image_3.png" /><figcaption>**Fig 1.** A process diagram to generate and cluster morphological data. Reconstructions of neuronal cell types are encoded in Sholl descriptors which are then used for clustering and classification. A representation of each Sholl descriptor is depicted in steps **a-h**. The process of clustering different neuronal cell types is shown in steps 1–6. Once neurons are vectorized based on descriptor metrics, we apply metric learning techniques to obtain classification (steps **i-iii**).</figcaption></figure>

https://doi.org/10.1371/journal.pcbi.1010229.g001

representations of each neuron by means of vectorization of its Sholl descriptor function. The second method combines distances between multiple features into a new metric. The combination is obtained by optimizing coefficients of a linear combination of distances by taking the coefficients of such a combination from an equi-spaced grid with the aim to maximize separation of classes (C.1 in S1 Text). If a reasonable combination cannot be produced, the classes are indistinguishable under all used morphological descriptors. The third combination method is a *supervised classification* technique which is achieved by means of metric learning.

In this criterion, a *detection algorithm* is introduced to measure the effectiveness of the considered features in differentiating groups of neurons (see §2.3 and D in S1 Text), and used to pre-select Sholl descriptors that are most effective in differentiating a given set of neurons (i.e. ones with highest detection rates). Those descriptors are then used to vectorize neurons. Once vectorized, a metric learning algorithm is applied to obtain an optimal Euclidean metric that can differentiate between the representation of the considered neurons. The second and third methods are checked for ‘overfitting’ (E.1 in S1 Text). The new metric obtained this way effectively reveals how close in features a random neuron is to the given classes.

## 2.1 Representation of neurons and terminology

We model a neuron *N* as a tree embedded in 3-dimensional space ℝ³. The tree is composed of a collection of rooted binary trees, all having a common root (the soma). Consequently, all branchpoints in a neuronal tree, with exception of the soma, have degree two. We assume that the root is located at the origin in the considered coordinate system. These rooted tree are also called the “primary” trees.
<figure><img src="image_4.png" /><figcaption>**Fig 2.** Representation of a neuronal tree structure. Schematic of a neuron illustrating key definitions used in the present work.</figcaption></figure>

https://doi.org/10.1371/journal.pcbi.1010229.g002

All 3D neuronal reconstructions used in this paper were acquired from the public repository NeuroMorpho.org [40]. The morphological structure of individual neurons is retrieved from an SWC file which contains a digital representation of the neuron as a tree structure that consists of points in $R^3$ joined by edges. Each marker has associated properties such as 1) its 3D spatial coordinates, 2) its radius denoting the thickness of the branch segment at a specific 3D location 3) a node type indicating whether it is soma, axon or dendrite, and 4) one parent marker to which it directly connects through neuronal arbors. The soma is always located at the origin of a reference frame.

We will use the following notation and terminology, some of which are illustrated in (Fig 2):

* Capital letter N represents a neuron seen as a tree in 3-space.

* A class C of neurons is a set containing a selection of neurons of a particular type.

* A node in a neuron N is either the soma, bifurcation point, or a termination point.

$$ \{\text{Nodes}\} = \{\text{Bifurcations}\} \cup \{\text{Soma}\} \cup \{\text{Terminations}\} $$

A branchpoint can be used interchangeably with bifurcation point. A leaf can be used interchangeably with a termination point.
* The number of terminal nodes in a tree is denoted as degree which is a proxy for tree complexity. The number of branches of a tree is twice the degree of that tree minus one, while the number of bifurcations is degree minus 1.

* Radial distance means Euclidean distance as measured from a point to the soma.

* Path distance is the distance from a point to the soma along a dendrite.

* A branch is a part of the dendrite that lies between two branchpoints, between one branch-point and a termination point, or exiting the soma.

* Two nodes are parent-child related if they are adjacent on a branch. The node closer to the soma in path distance is called the parent, and the node farther away from the soma is called the child.

* A neuron has span $R(N)$ if it can fit in a ball centered at the soma of radius $R(N)$, and in no smaller ball. In practice and almost always, $R(N)$ is the largest radial distance from soma to any of the nodes.

* $L(N)$ is the length of the longest dendrite stemming from soma and ending at a termination point.

* A neuronal feature is denoted by the Greek letter $\phi$. It is always topological or morphological in nature, and its associated (Sholl) descriptor will also be denoted by $\phi$.

* A feature $\phi$ gives rise to a metric on the set of neurons which is denoted by $d_{\phi}$.

## 2.2 Sholl descriptors

Below we introduce Sholl descriptors and their basic constructions. All technical details appear in A and B in S1 Text.

**Definition 2.1** A "Sholl descriptor" is any rule $\Phi$ that associates to a given neuron $N$ (represented as a tree embedded in $\mathbb{R}^3$) a compactly supported function $\tilde{\phi}_N$ whose independent variable is either path or radial distance from the soma, and whose values are in a metric space $X$. We further require this function to be both isometry invariant and stable with respect to reconstruction errors.

All our Sholl functions are maps $\tilde{\phi}_N : I \to X$, for each given neuron $N \subset \mathbb{R}^3$, where $I$ is either the interval $[0, R(N)]$ or $[0, L(N)]$ (see §2.1 for definitions of $R(N)$ and $L(N)$) and $X$ is a metric space. To ensure that our constructions are independent of scale, the domains of all functions are normalized to an interval $[0, 1]$, and the normalized Sholl function is written $\phi$. The $\phi$ is stable as described in F in S1 Text. Isometry invariance means that if $N'$ is obtained from $N$ by a linear isometry (i.e. a rotation or reflection by a plane passing through the soma), then $\tilde{\phi}_N$ and $\tilde{\phi}_{N'}$ are identical functions.

The following are Sholl descriptors that we discuss in this paper.

1. **Branching pattern:** This is an integer-valued descriptor equals the number of bifurcations minus the number of leaves in a distance $r$ from the soma. As the radius $r$ changes, this number evolves. This fundamental construction is presented in Fig 3, and the branching pattern function is depicted for a simple tree. The value of the descriptor for that neuron is the step function on the right. Note that a different (branching) Sholl descriptor is obtained when a radial distance is replaced with a path distance from the soma. The branching
a

<figure><img src="image_5.png" /></figure>

b

<figure><img src="image_6.png" /><figcaption>**Fig 3.** Sholl descriptor using branching pattern. (a) A neuron *T* embedded in R². The root of *T*, representing the soma, is located at the center of the disk. The concentric circles, centered at the root, are determined by the branch points they go through at distances *r*₁, ..., *r*₈ from the soma. At radius *r*, the Sholl function φₜ (b) counts the number of nodes in a ball or a radius *r* centered at the root.</figcaption></figure>

https://doi.org/10.1371/journal.pcbi.1010229.g003

structure of a neuron is important for determining function. For example, in primary visual cortex, branching structure is related to orientation and direction selectivity of neurons.

2. **Tortuosity:** Tortuosity of a given path is defined as the ratio of the path length by the Euclidean distance of its endpoints. The tortuosity descriptor at a distance *r* from the soma measures the mean tortuosity of all branches connected to the soma within the sphere of a radius *r* centered at the soma. This descriptor informs about the dendrite's growth mechanisms and its method of reaching synaptic targets.

3. **Flux:** This descriptor starts with a sphere of a radius *r* centered at the soma. For all the dendrites intersecting that sphere it associates to *r* the sum of the angles between dendrites and normal directions to the sphere. The flux construction can be viewed as a parameterized version of the root-angle construction in [41]. This construction associates to a leaf the angle between the radial normal and the main branch ending at that leaf. This measure quantifies centripetal bias which is based on the branching characteristics of dendrites.

4. **Taper Rate:** This construction is based on the width of dendritic segments at bifurcations, taken as a function of path distance to the soma. To be precise, the branching nodes are ordered according to their path distance to the soma. The value of the Taper Rate, for a radius *r*, is equal to the dendritic diameter at the closest node in a distance at most *r* from the soma (see B.2 in S1 Text). Dendritic tapering is a measure of the change in width along a dendritic segment from node to node. Dendritic tapering towards the terminal tips maximizes current transfer and thus leads to enhanced integration of synaptic inputs at different locations.

5. **Leaf Index:** This construction counts the number of leafs that can be reached from a given node using paths that goes away from the soma. If the node is taken to be the soma, this
number is the total number of leaves in the tree. If the node is taken to be a leaf, the value is one (that leaf). The Leaf Index considers branching nodes as a function of radial distance. For a given value $r$, consider the last branchpoint $b$ that is not farther away from soma than $r$. The value of Leaf Index at the radius $r$ is equal to the number of leafs reachable from $b$. This measure quantifies centripetal bias which is based on the branching characteristics of dendrites

6. **Energy.** This descriptor is based on the idea of viewing the nodes as charged electrons that generate electric fields. Using the superposition principle, the resulting vector field at the soma is recorded. Its length is an isometry invariant quantity. For any given radius $r$, we can carry out the same construction using only those nodes not further away from soma than $r$, and take the sum of their contributions at the soma. The energy vector and strength give a measure of how the nodes are distributed relative to the soma. If we divide space in octants, with the soma at the origin, then the more nodes present in the same octant, the greater the energy. This is similar to caulescence which refers to a prominence of a main path in a tree structure to reveal tree asymmetry [42]. We can use the Energy vector very conveniently to identify polarized neurons. This is explained and illustrated in C.3 in S1 Text.

7. **Total Wiring.** Take a tree being a connected component of a neuron that contains soma, restricted to a ball of a radius $r$. This construction measures the total path length of this tree. This is the sum of the path distances of all dendritic segments and it is related to the notion of Arbor Density or Arbor Territory [43]. Greater total wiring dendritic length means greater invaded space which render the dendrites available to more incoming connections and greater connectivity.

8. **TMD.** This is the Topological Morphological Descriptor of [34] (see B.7 in S1 Text for details) redesigned to be a Sholl function. It assigns to a given value $r$, the TMD of the connected component of the tree, that contains the soma, intersected with a ball of a radius $r$ centered in the root. Hence, the Sholl-TMD can be seen as a $r$-varying persistence diagram where the changes happens on a discrete set of $r$-values. The metric used in this case is the integral of Wasserstein metric $W^p$. More specifically, suppose we want to compute the difference between two Sholl-TMD functions $f_1$ and $f_2$ where $f_1$ is changing on points $r_1^1, \dots, r_n^1$ and $f_2$ is changing on $r_1^2, \dots, r_k^2$. To compute the distance, we take $r_1, \dots, r_{n+k}$ being the union of $r_1^1, \dots, r_n^1$ and $r_1^2, \dots, r_k^2$. Then the distance between $f_1$ and $f_2$ is then given by

$$ \sum_{i=1}^{n+k} W^p(f_1(r_i), f_2(r_i)) $$

**Example 2.2** In Fig 4, Tree structures of two different neurons are chosen (A) pyramidal and (B) stellate. The corresponding Sholl descriptor functions reveal obvious difference (C). The red curve which depicts the branching pattern of the pyramidal cell reveals that branching occurs rapidly close to the soma, but much slower as you move further away from the soma. Conversely, branching for the stellate cell is changing uniformly and steadily as you move away from the soma.

## 2.3 Sholl analysis

Sholl Descriptors can be used to cluster and classify datasets of neurons. In this paper, we use them combined with standard hierarchical clustering methods, a detection algorithm (introduced in this paper, used for feature selection), grid search, and metric learning functions.
<figure><img src="image_7.png" /><figcaption>**Fig 4.** Representative neurons and their corresponding step functions. (a) Pyramidal and (b) stellate cell. (c) The step functions for each neuron generated from the branching pattern Sholl descriptor. The branching Sholl functions show that neuron (a) is branching quickly near the soma, and leaves appear much closer to the soma than for neuron (b). The number of primary branches for each neuron is the value of the corresponding function at 1. (d) Pyramidal cell in secondary motor cortex (M2) and (e) in medial prefrontal cortex (mPFC). (f) The step functions for neurons (d) and (e) generated from the wiring Sholl descriptor. The sharp increase towards the end for the wiring Sholl function for cell d. reveals the existence of an apical</figcaption></figure>
tuft. (g) Interneuron and (h) Purkinje cell. (i) The step functions for each neuron generated from the energy Sholl descriptor. (j) Martinotti and (k) Retinal ganglion cell (RGC). (l) The step functions for each neuron generated from the tortuosity Sholl descriptor. The red dot represents the soma and the turquoise dot is the barycenter of all nodes.

https://doi.org/10.1371/journal.pcbi.1010229.g004

Note that this is just an example of the used-cases for Sholl descriptors. All technical details associated to this section are deferred to S1 Text. In this paper, we present the following analysis:

1. Analysis based on a single descriptor:

* (Clustering) Given a dataset of unlabeled neurons we can use a particular descriptor in order to cluster them according to that descriptor. For example, if $\phi = T$ is tortuosity, we can set the distance matrix for the associated Sholl pseudo-metric $d_T$ and then run standard hierarchical clustering to obtain dendrograms. The obtained dendrogram reveals whether neuronal cell types differ according to their tortuosity (i.e. cluster together), or if their tortuosity is comparable (cells from different neuron types will be intermingled).

* (Detection) It is a simple distance-based measure designed for the purpose of this paper. It assesses the performance of a given descriptor in identifying neurons with a given label within a dataset. Its idea is to find a ball $B$ that contains at least $p\%$ of all neurons with the label $l$ and, in addition, the neurons of the label $l$ compose at least $p\%$ of all neurons in $B$. Detection rates can be used as feature selection when running classification schemes (see Table 1).

2. Analysis based on a combination of descriptors:

* (Vectorization in unsupervised setting C.2 in S1 Text). A given neuron can be converted into a vector using our descriptor functions. Once neurons are converted into vectors, standard clustering and regression algorithms can be applied to them.

* (Combination with weights C.1 in S1 Text). By linearly combining metrics originating from various descriptors, new clustering metric that separates neurons of different types

<table><caption>**Table 1. Detection rates applied to all datasets based on all descriptors.** Numbers represent percentages. Green represents complete detection of a class (90%-100%), while pink represents detection rates between 80%-89%.</caption><thead><tr><th>Set</th><th>Description</th><th>Energy</th><th>Flux</th><th>Leaf index</th><th>Branching</th><th>Wiring</th><th>Tortuosity</th><th>TMD Sholl</th><th>TMD classical</th></tr></thead><tbody><tr><td rowspan="4">1</td><td>retinal ganglion (48)</td><td>75</td><td>85</td><td>100</td><td>88</td><td>94</td><td>96</td><td>71</td><td>77</td></tr><tr><td>hippocampal pyramidal (45)</td><td>64</td><td>69</td><td>43</td><td>71</td><td>71</td><td>93</td><td>82</td><td>84</td></tr><tr><td>somatosensory spiny stellate (43)</td><td>76</td><td>67</td><td>98</td><td>71</td><td>72</td><td>91</td><td>63</td><td>61</td></tr><tr><td>primary visual Martinotti (20)</td><td>40</td><td>48</td><td>95</td><td>45</td><td>30</td><td>100</td><td>60</td><td>55</td></tr><tr><td rowspan="4">2</td><td>cerebellar purkinje (60)</td><td>93</td><td>83</td><td>63</td><td>92</td><td>69</td><td>92</td><td>77</td><td>77</td></tr><tr><td>primary visual interneuron (66)</td><td>44</td><td>99</td><td>79</td><td>96</td><td>78</td><td>77</td><td>94</td><td>94</td></tr><tr><td>hippocampal granule (77)</td><td>60</td><td>84</td><td>84</td><td>96</td><td>84</td><td>87</td><td>62</td><td>62</td></tr><tr><td>spinal cord interneuron (77)</td><td>40</td><td>74</td><td>73</td><td>84</td><td>51</td><td>68</td><td>76</td><td>78</td></tr><tr><td rowspan="3">3</td><td>somatosensory pyramidal (20)</td><td>40</td><td>100</td><td>60</td><td>95</td><td>75</td><td>70</td><td>90</td><td>90</td></tr><tr><td>medial prefrontal pyramidal (46)</td><td>80</td><td>98</td><td>100</td><td>96</td><td>77</td><td>93</td><td>85</td><td>89</td></tr><tr><td>secondary motor pyramidal (30)</td><td>65</td><td>90</td><td>74</td><td>83</td><td>94</td><td>82</td><td>63</td><td>73</td></tr><tr><td rowspan="2">4</td><td>human hippocampal pyramidal (54)</td><td>57</td><td>85</td><td>87</td><td>78</td><td>89</td><td>83</td><td>81</td><td>75</td></tr><tr><td>mouse hippocampal pyramidal (50)</td><td>63</td><td>96</td><td>53</td><td>90</td><td>96</td><td>88</td><td>96</td><td>94</td></tr></tbody></table>

https://doi.org/10.1371/journal.pcbi.1010229.t001
can be obtained. More precisely, given a collection of neurons $N_1, ..., N_k$ with labels $l_1, ..., l_k$ we compute a number of distance matrices $M_1, ..., M_n$. The matrix $M_i$ is a distance of $\phi_i$ descriptors of the considered neurons. In this method a joint distance matrix $M = \alpha_1 M_1 + \alpha_2 M_2 + ... + \alpha_n M_n$ is constructed. The coefficients $\alpha_1, ..., \alpha_n$ are chosen to maximize the combined distance between neurons of different labels, and minimize distance of those with the same label.

* (Classification) Given a dataset of neurons distributed among a number of classes, and given a number of morphological features, we can determine with which class a newly introduced neuron is associated; that is, with which class it shares the most morphological features. More precisely, suppose we are given classes of neurons $C_i$, $1 \le i \le n$, and morphological descriptors $\phi_j$, $1 \le j \le k$, which can be measured for all neurons. Given a newly introduced neuron $N$, we can determine with measurable likelihood the class $C_i$ closer to $N$ in the pseudo-metrics $d_{\phi_1}, ..., d_{\phi_k}$. To that end, we turn neurons into vectors, as described in C.2 in S1 Text and then devise an optimal Euclidean metric $D_{ML}$, out of the $d_{\phi_j}$'s using a metric learning algorithm [44]. The optimality here means that $D_{ML}$ maximizes distance between neurons in different classes, and minimizes it between neurons of the same class. The smallest $d_N$ distance between $N$ and the given classes indicates which class the neuron should belong to.

# 3 Results

We propose seven descriptors based on the morphological features listed above. A schematic of each descriptor is illustrated in steps a-h in Fig 1, and all terms are defined in §2.2. We illustrated the discriminative accuracy of our Sholl descriptors on four datasets, providing evidence that relevant Sholl descriptors can reliably discriminate among different classes of neurons in agreement with previously published assignment. The tested datasets were chosen to cover diverse types and subtypes of neurons across different regions and animal species.

## 3.1 Distinguishing among classes based on a single feature

The first two datasets that we analyzed consisted of neuronal classes that appear visually different to the naked eye. The aim was to test the discriminative power of individual Sholl descriptors in differentiating easily discernible cell types, and thus cluster them. A representative neuron type from each dataset is shown in Fig 5a-5c. We applied our Sholl descriptors on **Dataset 1**, comprising four neuronal cell types in the mouse brain: retinal ganglion cells (n = 48) [45], pyramidal cells (n = 45) [46], spiny stellate cells (n = 43) [47], and Martinotti cells (n = 20) [48]. Seven different Sholl functions were computed on this set (all but taper-rate since the information about diameter of dendrites was not available) and distance matrices between neurons were computed for each Sholl function.

Table 1 reports the detection rates (see §2.3 and D in S1 Text) for all descriptor functions for all datasets. For convenience, we briefly explain how to read the table: detection rates are correlated to standard clustering dendrograms. If a rate of 90% appears as an entry corresponding to a class of neurons and a particular feature $\phi$, this means that 90% of all neurons in that class are within a ball in the $d_{\phi}$ metric, and within that ball, less than 10% of neurons are outside that class. Detection rates highlighted in pink are above 80% while rates of 90% and higher are highlighted in green. Therefore, we say a class has been detected by a descriptor $\phi$ if the rate of detection for that class is at least 90%.

As shown in this table, the performance of all descriptors was high in that each class was completely detected by at least two descriptors. Remarkably, the leaf index and tortuosity
<figure><img src="image_8.png" /><figcaption>**Fig 5.** Hierarchical clustering trees for selected descriptors. Representative neuronal reconstructions of (a) interneuron (b) purkinje, and (c) cortical pyramidal cell, in blue, magenta, and green colors respectively. Representative dendrograms based on descriptors for (d) Leaf index and (e) tortuosity for Dataset 1, (f) Flux for Dataset 3, and (g) wiring for Dataset 4. For the reconstructions (a,b,c), the red dot represents the soma and the turquoise dot is the barycenter of all nodes. Scale bar in a = 10 µM, b = 25 µM, and c = 50 µM.</figcaption></figure>

https://doi.org/10.1371/journal.pcbi.1010229.g005
descriptors detected three and four classes respectively, suggesting that these descriptors alone are sufficient in differentiating among neuronal types in this particular dataset. Retinal ganglion cells was detected by five out of seven Sholl descriptors. The dendrogram based on the leaf index and tortuosity descriptors are shown in Fig 5d and 5e respectively. The horizontal axis of the dendrogram represents all the neurons in this dataset while the vertical axis represents the distance between clusters. Interestingly, pyramidal and stellate cells each formed a distinct cluster in the leaf index dendrogram (Fig 5d), while retinal ganglion cells and spiny stellate cells each formed their own cluster in the tortuosity dendrogram (Fig 5e). The fact that retinal ganglion cells were fully detected by five out of seven descriptors Table 1, suggests that this cell type is characterized by a unique set of morphological features.

To validate this finding and illustrate the consistency in performance of our Sholl descriptor, we included **Dataset 2**, again testing whether individual descriptors can differentiate among very different cell types. This dataset consisted of mouse cerebellar purkinji cells (n = 60) [49], primary visual cortical interneurons (n = 66) [50], hippocampal granule (n = 77) [51], and spinal cord interneurons (n = 77) [52]. Table 1 reveals that the branching and flux descriptors yielded high detection rates. Furthermore, the performance of the TMD Sholl descriptor was comparable to that of the classical version in detecting all cell classes, both of which returned a high detection rate for the cortical interneurons (detection = 94%). In contrast, the wiring and leaf index descriptors performed poorly in separating three of the four neuronal cell types, as evidenced by the low detection rates. This suggests that these particular morphological features are largely uniform across these cell types, while other descriptors allow for better separation of the considered classes of neurons.

## 3.2 Subclustering within a neuronal class

To ensure sufficient coverage of neuron types, we also tested our Sholl descriptors in clustering pyramidal cells from different cortical areas in the rat brain. Therefore, **Dataset 3** consisted of rat pyramidal cells in layer 5 of somatosensory (S1) (n = 20) [53], secondary motor cortex (M2) (n = 30) [54], and medial prefrontal cortex (mPFC) (n = 46) [55]. The discriminative accuracy in separating the three neuron types with many of the descriptor functions was very high. For example, the cluster analysis based on the flux descriptor shown in the dendrogram in Fig 5f resulted in nearly perfect clustering. The detection rate was highest in both medial prefrontal (98% detection) and somatosensory cortex (100% detection), followed by secondary motor cortex (90% detection). Likewise, the branching pattern, tortuosity, and TMD Sholl descriptors performed equally well as shown in (Table 1). Interestingly, the majority of pyramidal cells in secondary motor cortex formed their own distinct cluster, while several of these cells were clustered with other pyramidal cells in primary somatosensory cortex Fig 5f. This suggests the existence of two sub-populations of pyramidal cells in secondary motor cortex. Indeed, when we visually examined these neurons, we found striking similarities in morphology with pyramidal cells in primary somatosensory cortex. Similarity in morphology between cells in primary somatosensory cortex and secondary motor cortex could be due to proximity of these two cortical areas, as variation in neuronal morphology has been shown to be less pronounced between cortical areas that are close. For example, in the chimpanzee neocortex, total dendritic length, segment count, as well as spine number of pyramidal cells do not differ significantly between primary somatosensory cortex (area 3b) and primary motor cortex (area 4) [56]. Additionally, [57] showed that pyramidal cells in two proximal cortical areas in the mouse brain (secondary somatosensory cortex S2 and secondary motor cortex M2) are comparable in terms of total dendritic nodes (bifurcations and endings), and total dendritic endings. We note that there is also evidence to suggest major differences in pyramidal cell
morphology even within a single cortical area [58]. Whether differences in pyramidal cell mor-
phology in close cortical areas is more pronounced or subtle could have evolved to serve spe-
cies specific adaptive behavior.

**Dataset 4** comprises reconstructions of hippocampal CA1 pyramidal cells taken from human (n = 54) and mouse (n = 50) [46]. In this study, the authors document important structural differences with respect to several morphometric features between the two species. For example, they show that human hippocampal CA1 pyramidal cells have double the number of stems (primary) basal dendrites and double the number of basal terminal endings. Additionally, human pyramidal cells have longer dendritic segments than in mouse. Therefore, as a proof of concept we sought to recapitulate these findings by running our descriptors on this dataset. We expected to at least cluster pyramidal neurons based on the branching pattern and wiring descriptors. Remarkably, all seven descriptors resulted in excellent detection of mouse pyramidal cells, with the exception of the leaf index descriptor. However, the leaf index descriptor returned very good detection of human pyramidal cells (87%). Furthermore, detection rates were generally higher for the mouse pyramidal cells versus the human pyramidal cells (Table 1). Indeed, the dendrogram in Fig 5g based on the wiring descriptor reveals two distinct clusters with excellent separation of mouse and human pyramidal cells. There was however some intermingling of neurons between the two groups. Similarly, as seen in (Table 1) the branching pattern descriptor resulted in excellent detection of mouse pyramidal cells (90%), while this descriptor returned reasonable detection of human pyramidal cells (89%). The TMD Sholl also proved to be effective in detecting mouse (96%) and (81%) human pyramidal cells, performing slightly better than the Classical TMD. Taken together, our findings are commensurate with the structural differences previously shown in [46]. Importantly, we illustrate that using a single descriptor can result in effective separation of pyramidal cells from different species.

**3.3 L-measure metrics versus Sholl descriptors**

Given that individual Sholl descriptors performed well distinguishing certain neuronal classes, we then combined our descriptors in order to optimize clustering and to compare our methods to standard L-Measure metrics in separating neuronal classes. We ran two clustering algorithms. We first combined the metrics associated to our seven descriptors into an optimal one and setup its distance matrix. Then, for each given neuron, we extracted meaningful parameters from the Sholl functions and vectorized them as detailed in C.2 in S1 Text. A hierarchical cluster analysis algorithm was then applied using Ward's linkage method and the Euclidean distance metric. Next, for each given neuron, we extracted all 43 morphological parameters available in the L-Measure software [59], combined them into a vector, and applied the same cluster analysis algorithm. Our clustering results for all datasets are presented in Fig 6. Neurons are color coded according to morphological type.

In **Dataset 1**, cluster analysis based on the L-Measure method returned six clusters with some intermingling of neurons from the four types Fig 6a, whereas analysis based on features captured by the Sholl descriptors resulted in clear separation of classes into four clusters Fig 6b. Additionally, pyramidal cells and retinal ganglion cells were found to populate two distant clusters with the L-measure method, while they constituted a single cluster in the dendrogram using our Sholl descriptors Fig 6b. Lastly, our vector method yielded reasonable separation of classes Fig 6c with slightly worse performance than our combined method, but remained somewhat better than the L-Measure method. Similarly, in **Dataset 2**, cluster analysis based on features captured by the Sholl descriptors resulted in excellent discrimination of classes comprising four clusters Fig 6e with some intermingling of neurons. However, clustering based on
<figure><img src="image_9.png" /><figcaption>**Fig 6.** Hierarchical clustering trees comparing the L-Measure method, our combined Sholl descriptors, and our vector for all datasets. Representative dendrograms for morphological parameters extracted from (a) L-measure software, (b) Combined Sholl descriptors, and (c) our vector for dataset 1. Dendrograms for dataset 2 are presented in (d,e,f), dataset 3 (g,h,i), and dataset 4 (j,k,l). The “distance matrix” clustering is based on the distance matrix of the combined Sholl pseudo-metrics C.1 in S1 Text, while “vector clustering” is based on our unsupervised vectorization C.2 in S1 Text and Euclidean metric.</figcaption></figure>

https://doi.org/10.1371/journal.pcbi.1010229.g006
the L-Measure methods revealed two separate clusters for the spiny neurons and spinal cord interneurons Fig 6d. Moreover, some of the purkinji cells were clustered with the spinal cord interneurons. Clustering based on our vector returned reasonable separation of classes Fig 6f, with slightly poorer performance than our distance matrix.

For **Dataset 3**, the L-Measure method performed very well in separating the three classes albeit with two separate clusters of secondary motor cortex pyramidal cells Fig 6g. Cluster analysis based on our Sholl descriptors returned complete separation of classes Fig 6h, which was commensurate with results from our vector Fig 6i. Lastly, for dataset **Dataset 4**, the L-Measure method performed optimally in separating this dataset into two distinct clusters Fig 6j. Likewise, our Sholl descriptors discriminated pyramidal cells in humans from that in mouse with some intermingling from the two Fig 6k. Our clustering method based on our vector performed slightly better, but still clustered a few of the human pyramidal cells with the mouse ones Fig 6l. Taken together, the results demonstrate that our combined descriptor method and vectorization yield very good separation of classes, in some instances performing better than conventional methods in clustering different neuronal cell types. It is important to note that the L-measure vector is in $R^{43}$ while our vector is in $R^{24}$.

## 3.4 Classification and metric learning

We applied our descriptors to **Dataset 1** comprising a total of 156 neurons from four neuronal cell types in the mouse brain in order to classify them (retinal ganglion cells (n = 48), pyramidal cells (n = 45), spiny stellate cells (n = 43), and Martinotti cells (n = 20)). We applied all our Sholl descriptors on this dataset (energy, flux, leaf index, branching, wiring, tortuosity, and Sholl TMD). Next, we vectorized the neurons (C.2 in S1 Text) based on these descriptors, resulting in classes of vectors in Euclidean space (in $R^{24}$). We then used a t-SNE plot to visualize our high dimensional descriptor vectors in 2D space (Fig 7a). Some neurons from different classes in this dataset are clearly overlapping and poorly separated. The data was then fitted and transformed into a new metric space which learns a Mahalanobis distance metric in the K-Nearest Neighbor (KNN) classification setting [44] (see E in S1 Text). Fig 7b displays the improved t-SNE plot which shows clear separation of the classes.

Classification models were built for all datasets using the following technique. In order to cross validate the model and to prevent overfitting 70% of data is randomly selected for the training phase and the rest is used for test. In order to test for overfitting we used repeated stratified k-fold cross validation with 10 folds technique where the training set is split into k equal sets or folds. The stratified k-fold ensures that we have the same number of samples for each class. Each k fold is used as a validation set and the k-1 remaining folds are used for training. A k-Nearest Neighbors (KNN) classifier is used in all models. Accuracy and Standard Deviations for the models in all datasets are: dataset1: 92.893 (6.596), dataset2: 94.022 (3.190), dataset3: 99.667 (2.333), dataset4: 98.294 (2.737).

## 4 Discussion

In this work we introduced novel descriptor functions of tree structures and applied them for classification and clustering of neuronal cell types. Notably, our methods complement and advance many of the existing techniques currently used to study neuronal morphology. Effectively, we construct a function with values in some metric space (Sholl function) for every neuron. This Sholl function captures the evolution of a particular morphological feature as distance from the soma increases. Sholl functions of different neurons can be compared and the distance between them informs of how similar given neurons are with respect to a particular morphological feature captured by the applied Sholl functions. We illustrate that certain
<figure><img src="image_10.png" /><figcaption>**Fig 7. Classification and Metric learning for Dataset 1.** Each dot represents a neuron which is color coded according to its class. tSNE was performed to reduce dimensions. (a) Vectorized neurons in Euclidean space. (b) Large Margin Nearest Neighbor (LMNN) classification for metric learning classification in the new metric space.</figcaption></figure>

https://doi.org/10.1371/journal.pcbi.1010229.g007

descriptor functions can effectively cluster classes of neurons with subtle morphological varia-
tions, as well as discriminate among widely different classes of neurons in agreement with
expert assignment. Additionally, we provide evidence that a single descriptor function can per-
form better in separating particular neuronal cell types than conventional L-Measure metrics,
with enhanced performance using our combined descriptor metrics. Lastly, we leverage metric
learning techniques to provide more robust classification. Our framework is powerful enough
to separate diverse classes of neurons across different brain regions and species. Our results
reveal several key findings regarding the considered datasets.

The four representative datasets used in this study, derived from different areas, layers, and
species, were chosen to ensure morphological diversity and prove wide applicability of the pre-
sented techniques. In Dataset 1 (different types of neurons taken from different regions of the
mouse brain), we show that the leaf index and tortuosity descriptors performed very well in
recovering the clusters corresponding to neurons from different brain regions. Specifically,
based on the tortuosity descriptor the Martinotti and pyramidal cells each formed their own
cluster Fig 5e. Interestingly, dendritic tortuosity has been shown to vary among different non-
pyramidal neuron classes in the rat brain, whereby Martinotti cells in layer II/II and V of the
frontal cortex have higher tortuosity than other cell types [60]. In the mouse brain, dendritic
tortuosity increases as a function of increasing branch order on apical dendrites of hippocam-
pal CA1 pyramidal cells [61]. Additionally, dendritic tortuosity of layer II/III pyramidal cells
appears to increase from caudal to rostral regions in mouse cortex [62]. Our tortuosity descrip-
tor is therefore robust in detecting subtle differences in dendritic tortuosity among neuron
groups. The upper limit for tortuosity values appears to be 2, which is consistent with prior
reports [60]. Importantly, we improved discrimination accuracy by using a combination of
descriptors which effectively assigns weights to the function with the best separation results.
As shown in Fig 6b, the combination of descriptors resulted in complete separation of neuron types in this dataset.

Anatomical studies have shown that interneuron morphology is highly diverse in the cerebral cortex. For example, interneurons with similar somatodendritic morphology may differ in axonal arborization patterns [21]. Therefore, axonal morphometric features are typically required for accurate classification of interneurons as they have been shown to capture important differences among interneuron subtypes [63]. We did not analyze axonal features using our descriptors. However, based on dendritic features alone some of our descriptors (leaf index, tortuosity, and combined) were able to reliably distinguish interneuron subtype (Martinotti) from other neuronal cell types such as purkinje, retinal ganglion cells, and pyramidal cells (Dataset 1). Given the challenge associated with distinguishing among interneuron subtypes, we were intrigued as to whether our descriptors could separate a dataset comprised of only interneuron subtypes. Therefore, we performed additional analysis of a dataset comprising basket, aspiny, and bipolar cells. We found that the branching pattern descriptor worked well in distinguishing the cortical bipolar cells from the aspiny and basket cells. Likewise, the leaf index descriptor singled out the basket cells from the aspiny and the bipolar cells. The combined descriptor resulted in better separation of the three neuron types, albeit with some intermingling of neurons between the groups. In general, since the descriptors were designed for analysis of dendritic morphology, loss of axonal information in the analysis was an important constraint in the complete separation of the interneuron subtypes. Therefore, in a future study, we will focus our efforts on developing descriptors to incorporate important axonal features for a more robust classification scheme.

Collectively, the results highlight the robust nature of our framework in quantitatively characterizing and discriminating among different neuronal cell types. Certain morphological features and thus specific descriptors are better suited in separating distinct neuronal cell types. For instance, the branching pattern descriptor appears to perform very well in detecting most neuronal cell types. Conversely, the energy descriptor, which reveals the distribution of nodes around the soma, appears to reliably detect retinal ganglion cells, purkinje, and interneurons. Importantly, our use of metric learning techniques resulted in more optimal classification (Fig 7). Progress in the development of unbiased clustering methods to distinguish among groups of neurons will further our understanding of the relationship between brain structure and function. The toolkit of morphological descriptors introduced here, and the development of new methods will potentially lead to the discovery of novel sub-classes of neurons [64]. Additionally, our descriptors will aid efforts to uncover differences between normal and aberrant neuron morphology which is commonly associated with various disease states. For instance, changes in dendritic morphology have previously been described in a number of disease states, including Alzheimer's disease [23], schizophrenia [65], and mental retardation [66]. Revealing morphological aberrations resulting from neurodevelopmental and acquired disorders is an important step in understanding the pathophysiology of these diseases. However, rigorous methods are needed to detect potential subtle differences between normal and aberrant neuron morphology. Therefore, given that our tool kit of descriptors discriminated among different types of cells as well as revealing subclasses of cells, its utility may be extended to the study of brain diseases potentially identifying which subtypes may be affected in various disease states.

In future work we will refine the functional metrics on Sholl descriptors, and further conceptualize and rigorously develop the notion of morphological versus morphometric descriptors (i.e. shape versus size). What is important in clustering and classification is not only to differentiate between groups of neurons, but also to identify which features are different. Furthermore, ongoing work will integrate several descriptors in a toolkit, making it easily retrievable and usable by researchers in the field. Since all the required neuron information is
currently available from the SWC-files, our toolkit would be a useful companion for neuro-
morpho.org. Finally, and importantly, researchers looking to cluster and classify neurons can
conveniently find our source codes and descriptors in a github repository, and can use them to
analyse both the Sholl and the L-measure descriptors. We made all material accessible, and fur-
ther tools will be added online as our work progresses.

**Supporting information**

**S1 Fig. TMD as a Sholl-type descriptor.** (a) Example of TMD-path decomposition on a simple planar tree. The soma marked with 1 is the root. Equicentered circles reveal the distances of nodes from the root. The furthest node is node 8. The paths from the TMD-path decomposition are: {[5, 4, 2], [3, 2, 1], [8, 6, 1], [7, 6]} (b), The tree *T* with a single path *x* starting at the root *R*. When using TMD as a Sholl-type descriptor by considering TMD of *T* ∩ *B*(*R*, *r*) we will only see the final barcode [0, *d*(*R*, 6)] for *r* ≥ *d*(*R*, 4). For the radii *r* between *d*(*R*, 6) and *d*(*R*, 4) the endpoint of the persistence interval will be equal *r*. When *r* reaches *d*(*R*, 4) the endpoint of the persistence interval it will then jump down to *d*(*R*, 6).

(TIF)

**S2 Fig. Dendrogram of a bipolar interneuron.** A representative bipolar cell is shown in (a). The "energy angle matrix" is used to separate the nodes into two clusters as shown in (b). The dendrogram can be read as follows: the angles between pairwise energy vectors associated to red nodes are small as is for the blue nodes. However, the angles between energy vectors of blue and red nodes are much larger.

(TIF)

**S3 Fig. Detection rate method.** Method used to determine detection rate. Each circle is the boundary of a disk in the Euclidean metric.

(TIF)

**S4 Fig. Representation of isomorphic trees.** Representative isomorphic trees with entirely different (a) branching pattern and (b) tortuosity.

(TIF)

**S5 Fig. Representative trees in the Hausdorff metric.** Representative tree (a) and similar trees (b) and (c) that are close to tree (a) in the Hausdorff metric.

(TIF)

**S6 Fig. Instability.** Instability behavior for tortuosity descriptor.

(TIF)

**S1 Text. Supporting information.** A: Sholl Descriptors: Definitions, B: Sholl Descriptors: Constructions, C: Clustering Methods, D: Detection and Feature Selection, E: Metric Learning and Supervised Classification, F: Stability. Fig A: TMD as a Sholl-type descriptor. (a) Example of TMD-path decomposition on a simple planar tree. The soma marked with 1 is the root. Equicentered circles reveal the distances of nodes from the root. The furthest node is node 8. The paths from the TMD-path decomposition are: {[5, 4, 2], [3, 2, 1], [8, 6, 1], [7, 6]}, (b), The tree *T* with a single path *x* starting at the root *R*. When using TMD as a Sholl-type descriptor by considering TMD of *T* ∩ *B*(*R*, *r*) we will only see the final barcode [0, *d*(*R*, 6)] for *r* ≥ *d*(*R*, 4). For the radii *r* between *d*(*R*, 6) and *d*(*R*, 4) the endpoint of the persistence interval will be equal *r*. When *r* reaches *d*(*R*, 4) the endpoint of the persistence interval it will then jump down to *d*(*R*, 6). Fig B: Dendrogram of a bipolar interneuron. A representative bipolar cell is shown in (a). The "energy angle matrix" is used to separate the nodes into two clusters as shown in
(b). The dendrogram can be read as follows: the angles between pairwise energy vectors associ-
ated to red nodes are small as is for the blue nodes. However, the angles between energy vec-
tors of blue and red nodes are much larger. Fig C: Detection rate method. Method used to
determine detection rate. Each circle is the boundary of a disk in the Euclidean metric. Fig D:
Representation of isomorphic trees. Representative isomorphic trees with entirely different (a)
branching pattern and (b) tortuosity. Fig E: Representative trees in the Hausdorff metric. Rep-
resentative tree (a) and similar trees (b) and (c) that are close to tree (a) in the Hausdorff met-
ric. Fig F: Instability. Instability behavior for tortuosity descriptor.

(PDF)

Acknowledgments

We thank Mohammad Rowaizak for his help with Figs 1 and 2 illustrations.

Author Contributions

Conceptualization: Reem Khalil, Sadok Kallel, Ahmad Farhat.

Data curation: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Formal analysis: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Funding acquisition: Reem Khalil, Sadok Kallel.

Investigation: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Methodology: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Project administration: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Resources: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Software: Ahmad Farhat, Pawel Dlotko.

Supervision: Reem Khalil, Sadok Kallel.

Validation: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Visualization: Ahmad Farhat, Pawel Dlotko.

Writing – original draft: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

Writing – review & editing: Reem Khalil, Sadok Kallel, Ahmad Farhat, Pawel Dlotko.

References

1. Vetter P, Roth A, Hausser M. Propagation of action potentials in dendrites depends on dendritic morphology. J Neurophysiol. 2001; 85:926-937. https://doi.org/10.1152/jn.2001.85.2.926 PMID: 11160523

2. Brette R, et al. Simulation of networks of spiking neurons: A review of tools and strategies. J Comput Neurosci. 2007; 23:349-398. https://doi.org/10.1007/s10827-007-0038-6 PMID: 17629781

3. Shepherd G. The Synaptic Organization of the Brain. Oxford Scholarship Publishers; 2004.

4. (PING PING. Petilla terminology: nomenclature of features of GABAergic interneurons of the cerebral cortex. Nature reviews Neuroscience. 2008; 9:7.

5. DeFelipe J, Farinas I. The pyramidal neuron of the cerebral cortex: morphological and chemical characteristics of the synaptic inputs. Prog Neurobiol. 1992; 39(6):563-607. https://doi.org/10.1016/0301-0082(92)90015-7 PMID: 1410442

6. Lund JS, Yoshioka T, Levitt JB. Comparison of intrinsic connectivity in different areas of macaque monkey cerebral cortex. Cerebral Cortex. 1993; 3(2):148-162. https://doi.org/10.1093/cercor/3.2.148 PMID: 8490320
7. Elston GN, Rosa MG. The occipitoparietal pathway of the macaque monkey: comparison of pyramidal cell morphology in layer III of functionally related cortical visual areas. Cerebral cortex. 1997; 7(5):1991. https://doi.org/10.1093/cercor/7.5.432 PMID: 9261573

8. Elston GN, Rosa MG. Pyramidal Cells, Patches and Cortical Columns: a Comparative Study of Infragnular Neurons in TWO, TE and the Superior Temporal Polysensory Area of the Macaque Monkey. Journal of Neuroscience. 2000; 20:1–5. https://doi.org/10.1523/JNEUROSCI.20-24-j0003.2000

9. Luebke JI, Medalla M, Amatrudo JM, Weaver CM, Crimins JL, Hunt B, et al. Age-related changes to layer 3 pyramidal cells in the rhesus monkey visual cortex. Cerebral cortex. 2015; 25(6):1454–1468. https://doi.org/10.1093/cercor/bht336 PMID: 24323499

10. Elston GN, Rosa MG. Morphological variation of layer III pyramidal neurones in the occipitotemporal pathway of the macaque monkey visual cortex. Cerebral cortex (New York, NY: 1998; 8(3):1991. PMID: 9617923

11. Elston GN. cognition and the cell: new insights into the pyramidal neuron and prefrontal function. Cereb Cortex. 2003; 13(11):1124–1138. https://doi.org/10.1093/cercor/bhg093 PMID: 14576205

12. Elston GN, Oga T, Fujita I. Spinogenesis and Pruning Scales across Functional Hierarchies. Journal of Neuroscience. 2009; 29(10):3271–3275. https://doi.org/10.1523/JNEUROSCI.5216-08.2009 PMID: 19279264

13. Elston GN, Fujita I. Pyramidal cell development: postnatal spinogenesis, dendritic growth, axon growth, and electrophysiology. Frontiers in Neuroanatomy. 2014; 8. https://doi.org/10.3389/fnana.2014.00078

14. Khalil R, Farhat A, Dlotko P. Developmental Changes in Pyramidal Cell Morphology in Multiple Visual Cortical Areas Using Cluster Analysis. Frontiers in Computational Neuroscience. 2021; 15. https://doi.org/10.3389/fncom.2021.667696 PMID: 34135746

15. Khalil R, Levitt JB. Zinc histochemistry reveals circuit refinement and distinguishes visual areas in the developing ferret cerebral cortex. Brain Structure and Function. 2012; 218(5):1293–1306. https://doi.org/10.1007/s00429-012-0458-6 PMID: 23052548

16. Khalil R, Levitt JB. Developmental remodeling of corticocortical feedback circuits in ferret visual cortex. Journal of Comparative Neurology. 2014; 522(14):3208–3228. https://doi.org/10.1002/cne.23591 PMID: 24665018

17. Khalil R, Contreras-Ramirez V, Levitt JB. Postnatal refinement of interareal feedforward projections in ferret visual cortex. Brain Structure and Function. 2018; 223(5):2303–2322. https://doi.org/10.1007/s00429-018-1632-2 PMID: 29476239

18. Khalil R, Gonzalez C, Alsuwaidi S, Levitt JB. Developmental refinement of visual callosal inputs to ferret area 17. Journal of Comparative Neurology. 2021; 530(5):804–816. https://doi.org/10.1002/cne.25246 PMID: 34611910

19. Beaulieu C. Numerical data on neocortical neurons in adult rat, with special reference to the GABA population. Brain research. 1993; 609(1-2):284–292. https://doi.org/10.1016/0006-8993(93)90884-P PMID: 8508310

20. Gabbott PLA, Bacon SJ. Local circuit neurons in the medial prefrontal cortex (areas 24a, b, c, 25 and 32) in the monkey: II. Quantitative areal and laminar distributions. Journal of Comparative Neurology. 1996; 364(4):609–636. https://doi.org/10.1002/(SICI)1096-9861(19960122)364:4%3C609::AID-CNE2%3E3.0.CO;2-7 PMID: 8821450

21. DeFelipe J, López-Cruz PL, Benavides-Piccione R, Bielza C, Larrañaga P, Anderson S, et al. New insights into the classification and nomenclature of cortical GABAergic interneurons. Nature Reviews Neuroscience. 2013; 14(3):202–216. https://doi.org/10.1038/nrn3444 PMID: 23385869

22. Hrvoj-Mihic B, Hanson KL, Lew CH, Stefanacci L, Jacobs B, Bellugi U, et al. Basal Dendritic Morphology of Cortical Pyramidal Neurons in Williams Syndrome: Prefrontal Cortex and Beyond. Frontiers in neuroscience. 2017; 11:419. https://doi.org/10.3389/fnins.2017.00419 PMID: 28848376

23. Arendt T, Zvegintseva HG, Leontovich TA. Dendritic changes in the basal nucleus of Meynert and in the diagonal band nucleus in Alzheimers disease—A quantitative golgi investigation. Neuroscience. 1986; 19:1265–1278. https://doi.org/10.1016/0306-4522(86)90141-7 PMID: 3822121

24. Kaufmann WE, Moser HW. Dendritic anomalies in disorders associated with mental retardation. Cereb Cortex. 2000; 10:981–991. https://doi.org/10.1093/cercor/10.10.981 PMID: 11007549

25. Verret L, Mann EO, Hang GB, Barth AMI, Cobos I, Ho K, et al. Inhibitory interneuron deficit links altered network activity and cognitive dysfunction in Alzheimer model. Cell. 2012; 149(3):708–721. https://doi.org/10.1016/j.cell.2012.02.046 PMID: 22541439

26. Marin O. Interneuron dysfunction in psychiatric disorders. Nature Reviews Neuroscience. 2012; 13:107–120. https://doi.org/10.1038/nrn3155 PMID: 22251963
27. Williams PA, Thirgood RA, Oliphant H, Frizzati A, Littlewood E, Votruba M, et al. Retinal ganglion cell dendritic degeneration in a mouse model of Alzheimer's disease. Neurobiol Aging. 2013; 34:1799-1806. https://doi.org/10.1016/j.neurobiolaging.2013.01.006 PMID: 23465714

28. Sholl D. Dendritic organization in the neurons of the visual and motor cortices of the cat. J Anat. 1953; 87:387-406. PMID: 13117757

29. Laturnus S, Kobak D, Berens P. A Systematic Evaluation of Interneuron Morphology Representations for Cell Type Discrimination. Neuroinformatics. 2020; 18(4):591-609. https://doi.org/10.1007/s12021-020-09461-z PMID: 32367332

30. Gillette T, Ascoli G. Measuring and Modeling Morphology: How Dendrites Take Shape. Springer; 2012.

31. Guerra L, McGarry LM, Robles V, Bielza C, Larranaga P, Yuste R. Comparison between supervised and unsupervised classifications of neuronal cell types: a case study. Dev Neurobiol. 2011; 71(1):71-82. https://doi.org/10.1002/dneu.20809 PMID: 21154911

32. Polavaram S, Gillette TA, Parekh R, Ascoli GA. Statistical analysis and data mining of digital reconstructions of dendritic morphologies. Frontiers in neuroanatomy. 2014; 8:138. https://doi.org/10.3389/fnana.2014.00138 PMID: 25538569

33. Hasse JM, Bragg EM, Murphy AJ, Briggs F. Morphological heterogeneity among corticogeniculate neurons in ferrets: quantification and comparison with a previous report in macaque monkeys. J Comp Neurol. 2019; 527(3):546-557. https://doi.org/10.1002/cne.24451 PMID: 29664120

34. Kanari L, Dlotko P, Scolamiero M, et al. A Topological Representation of Branching Neuronal Morphologies. Neuroinform. 2018; 16:3-13. https://doi.org/10.1007/s12021-017-9341-1 PMID: 28975511

35. Kanari L, Ramaswamy S, Shi Y, Morand S, Meystre J, Perin R, et al. Objective morphological classification of neocortical pyramidal cells. Cerebral Cortex. 2019; 29(4):1719-1735. https://doi.org/10.1093/cercor/bhy339 PMID: 30715238

36. Li Y, Wang D, Ascoli GA, Mitra P, Wang Y. Metrics for comparing neuronal tree shapes based on persistent homology. PloS one. 2017; 12:8. https://doi.org/10.1371/journal.pone.0182184 PMID: 28809960

37. Gillette TA, Ascoli GA. Topological characterization of neuronal arbor morphology via sequence representation: I-motif analysis. BMC bioinformatics. 2015;. https://doi.org/10.1186/s12859-015-0604-2 PMID: 26156313

38. Cuntz H, Forstner F, Borst A, Häusser M. One Rule to Grow Them All: A General Theory of Neuronal Branching and Its Practical Application. PLOS Computational Biology. 2010; 6(8):1-14. https://doi.org/10.1371/journal.pcbi.1000877 PMID: 20700495

39. Garcia-Seguraa LM, Marquez JP. A new mathematical function to evaluate neuronal morphology using the Sholl analysis. Journal of Neuroscience Methods. 2014; 226(15):103-109. https://doi.org/10.1016/j.jneumeth.2014.01.016

40. Ascoli GA, Donohue DE, Halavi M. NeuroMorpho.Org: A central resource for neuronal morphologies. J Neurosci. 2007; 27(35):9247-51. https://doi.org/10.1523/JNEUROSCI.2055-07.2007 PMID: 17728438

41. Bird AD, Cuntz H. Dissecting sholl analysis into its functional components. Cell reports. 2019; 27(10):3081-3096. https://doi.org/10.1016/j.celrep.2019.04.097 PMID: 31167149

42. Brown KM, Gillette TA, Ascoli GA. Quantifying neuronal size: summing up trees and splitting the branch difference. Seminars in cell and developmental biology. 2008; 19(6):485-493. https://doi.org/10.1016/j.semcdb.2008.08.005 PMID: 18771743

43. Sümbül U, Song S, McCulloch K, M B, J S, R M, et al. A genetic and computational approach to structurally classify neuronal types. Nature Communications. 2014; 3512(5). https://doi.org/10.1038/ncomms4512 PMID: 24662602

44. de Vazelhes W, Carey CJ, Tang Y, Vauquier N, Bellet A. metric-learn: Metric Learning Algorithms in Python. Journal of Machine Learning Research. 2020; 21:1-6.

45. Coombs J, van der List D, Wang GY, Chalupa LM. Morphological properties of mouse retinal ganglion cells. Neuroscience. 2006; 140(1):123-136. https://doi.org/10.1016/j.neuroscience.2006.02.079 PMID: 16626866

46. Benavides-Piccione R, Regalado-Reyes M, Fernaud-Espinosa I, Kastanauskaite A, Tapia-González S, León-Espinosa G, et al. Differential Structure of Hippocampal CA1 Pyramidal Neurons in the Human and Mouse. Cerebral Cortex. 2019;. https://doi.org/10.1093/cercor/bhz122

47. Huang JY, Lynn Miskus M, Lu HC. FGF-FGFR Mediates the Activity-Dependent Dendritogenesis of Layer IV Neurons during Barrel Formation. Journal of Neuroscience. 2017; 37(50):12094-12105. https://doi.org/10.1523/JNEUROSCI.1174-17.2017 PMID: 29097598

48. Jiang X, Shen S, Cadwell CR, Berens P, Sinz F, Ecker AS, et al. Principles of connectivity among morphologically defined cell types in adult neocortex. Science. 2015; 350(6264):aac9462. https://doi.org/10.1126/science.aac9462 PMID: 26612957
49. Nedelescu H, Abdelhack M, Pritchard AT. Regional differences in Purkinje cell morphology in the cerebellar vermis of male mice. Journal of Neuroscience Research. 2018; 96(9):1476-1489. https://doi.org/10.1002/jnr.24206 PMID: 29319237

50. Madisen L, Garner AR, Shimaoka D, Chuong AS, Klapoetke NC, Li L, et al. Transgenic Mice for Inter-sectional Targeting of Neural Sensors and Effectors with High Specificity and Performance. Neuron. 2015; 85(5):942-958. https://doi.org/10.1016/j.neuron.2015.02.022 PMID: 25741722

51. Conti M, Spulber S, Raciti M, Ceccatelli S. Depressive-like phenotype induced by prenatal dexamethasone in mice is reversed by desipramine. Neuropharmacology. 2017; 126:242-249. https://doi.org/10.1016/j.neuropharm.2017.09.015 PMID: 28916331

52. Dickie AC, Bell AM, Iwagaki N, Polgár E, Gutierrez-Mecinas M, Kelly R, et al. Morphological and functional properties distinguish the substance P and gastrin-releasing peptide subsets of excitatory interneuron in the spinal cord dorsal horn. Pain. 2018; 160(2):442-462. https://doi.org/10.1097/j.pain.0000000000001406

53. Chen JR, Wang BN, Tseng GF, Wang YJ, Huang YS, Wang TJ. Morphological changes of cortical pyramidal neurons in hepatic encephalopathy. BMC Neuroscience. 2014; 15(1). https://doi.org/10.1186/1471-2202-15-15 PMID: 24433342

54. Hirai Y, Morishima M, Karube F, Kawaguchi Y. Specialized Cortical Subnetworks Differentially Connect Frontal Cortex to Parahippocampal Areas. Journal of Neuroscience. 2012; 32(5):1898-1913. https://doi.org/10.1523/JNEUROSCI.2810-11.2012 PMID: 22302828

55. Kougias DG, Nolan SO, Koss WA, Kim T, Hankosky ER, Gulley JM, et al. Beta-hydroxy-beta-methylbutyrate ameliorates aging effects in the dendritic tree of pyramidal neurons in the medial prefrontal cortex of both male and female rats. Neurobiology of Aging. 2016; 40:78-85. https://doi.org/10.1016/j.neurobiolaging.2016.01.004 PMID: 26973106

56. Bianchi S, Stimpson CD, Duka T, Larsen MD, Janssen WGM, Collins Z, et al. Synaptogenesis and development of pyramidal neuron dendritic morphology in the chimpanzee neocortex resembles humans. Proceedings of the National Academy of Sciences. 2013; 110(supplement_2):10395-10401. https://doi.org/10.1073/pnas.1301224110 PMID: 23754422

57. Benavides-Piccione R, Hamzei-Sichani F, Ballesteros-Yáñez I, DeFelipe J, Yuste R. Dendritic Size of Pyramidal Neurons Differs among Mouse Cortical Regions. Cerebral Cortex. 2005; 16(7):990-1001. https://doi.org/10.1093/cercor/bhj041 PMID: 16195469

58. Fletcher LN, Williams SR. Neocortical Topology Governs the Dendritic Integrative Capacity of Layer 5 Pyramidal Neurons. Neuron. 2019; 101(1):76-90.e4. https://doi.org/10.1016/j.neuron.2018.10.048 PMID: 30472076

59. Scorioni R, Polavaram S, Ascoli G. L-Measure: a web-accessible tool for the analysis, comparison and search of digital reconstructions of neuronal morphologies. Nat Protoc. 2008; 3:866-876. https://doi.org/10.1038/nprot.2008.51 PMID: 18451794

60. Kawaguchi Y, Karube F, Kubota Y. Dendritic branch typing and spine expression patterns in cortical nonpyramidal cells. Cereb Cortex. 2006; 16(5):696-711. https://doi.org/10.1093/cercor/bhj015 PMID: 16107588

61. Keith RE, Azcarate JM, Keith MJ, Hung CW, Badakhsh MF, Dumas TC. Direct Intracellular Signaling by the Carboxy terminus of NMDA Receptor GluN2 Subunits Regulates Dendritic Morphology in Hippocampal CA1 Pyramidal Neurons. Neuroscience. 2019; 396:138-153. https://doi.org/10.1016/j.neuroscience.2018.11.021 PMID: 30471357

62. Benavides-Piccione R, Hamzei-Sichani F, Ballesteros-Yáñez I, DeFelipe J, Yuste R. Dendritic size of pyramidal neurons differs among mouse cortical regions. Cereb CortexJul.; 2006; 16(7):990-1001. https://doi.org/10.1093/cercor/bhj041 PMID: 16195469

63. Mihaljević B, Benavides-Piccione R, Guerra L, DeFelipe J, Larrañaga P, Bielza C. Classifying GABAergic interneurons with semi-supervised projected model-based clustering. Artificial intelligence in medicine. 2015; 65(1):49-59. https://doi.org/10.1016/j.artmed.2014.12.010 PMID: 25595673

64. Boldog E, Bakken TE, Hodge RD, et al. Transcriptomic and morphophysiological evidence for a specialized human cortical GABAergic cell type. Nat Neurosci. 2018; 21:1185-1195. https://doi.org/10.1038/s41593-018-0205-2 PMID: 30150662

65. Flores G, Morales-Medina JC, Diaz A. Neuronal and brain morphological changes in animal models of schizophrenia. Behav Brain Res. 2016; 301:190-203. https://doi.org/10.1016/j.bbr.2015.12.034 PMID: 26738967

66. Kaufmann WE, Moser HW. Dendritic anomalies in disorders associated with mental retardation. Cerebral cortex. 2000; 10(10):981-991. https://doi.org/10.1093/cercor/10.10.981 PMID: 11007549