Exploring brain artery trees with Giotto-tda
By: Matteo Caorsi
Tags: Topological Data Analysis, Stroke, Brain, Vascular, Machine Learning

How topological data analysis can help in discovering new insights about brain artery trees. Blog post co-author: R. Andreeva.

Introduction

Changes in the network of blood vessels (also known as vasculature) are often the first signs of development of diseases like cancer or stroke. If we are able to develop methods aimed at identifying these alterations, we will be better equipped to treat early these conditions and to develop preventative therapies. Studying the vasculature of the brain is of crucial significance in predicting stroke and brain cancer. With ageing, brain vasculature changes and it is important to be able to recognise and quantify such changes.

(Image of the author) Prevalence of stroke in the western population. Data from the National Health and Nutrition Examination Survey: 2009–2012

The main methodological focus of this work is on topological data analysis (TDA). This rather novel technique extract numerical features that quantify the shape of point clouds. A point cloud may have different connected components, loops, voids,… all these peculiar structures can be extracted via TDA techniques. Given the geometric nature of our task at hand (see below for more details), it seems like a very natural choice.

If you are new to TDA, I recommend you read the following blogpost as an introduction on getting started with Giotto-tda [4].

For this purpose, we would like to first study how brain vasculature changes with age for people without accompanying brain conditions. Brain vasculature has been found to be correlated with age from 2 different analysis methods — statistical and TDA. Methods from the former have found age to be correlated with total artery length [3], which forms the basis of our benchmark classification model, together with age, gender and handedness of the subjects. On the other hand, TDA has been useful in identifying correlation between age and the positions of arteries in space in a way that statistical analysis is not capable of discovering [2]. We would focus on calculating the persistence diagrams of the brain artery trees and building a machine learning model capable of distinguishing between brain artery trees coming from 2 different age groups.

An example of a reconstructed image of an artery tree is shown below (image taken from [2]).

An example of an artery tree. Picture taken from [2].

The Jupyter notebook with the detailed computations associated to this blogpost associated to this blog post can be found here.

Overview of the task

In this study we are comparing the arteries between non-pathological cases of 98 brains belonging to individuals of age between 18 and 79.

We will explore the point clouds of brain artery trees, extract topological features which would allow us to quantify looping and branching at multiple levels and train a classifier to distinguish between 2 age groups: group 0 with people younger than 45, and group 1 with people older than 45. It has been suggested in [2] and in this blogpost that topological features can help in identifying the age of a person’s brain, with younger people having significantly longer total artery length and more loops in it. Giotto-tda [4] plays an essential role in this analysis for plotting, calculating persistence diagrams and transforming them into useful feature vectors for the subsequent ML analysis.

Dataset

The dataset can be found here. It consists of 98 artery trees which are the result of applying a tube-tracking algorithm to the 3-dimensional Magnetic Resonance Angiography (MRA) images of the brain. Each tree consists of approx. 120000 vertices, branches and edges. For the purpose of this analysis, we have only used a point cloud of all the vertices for initial visualisation and we have randomly downsampled to 500 vertices per tree in order to reduce the computational time. The labels in the dataset depend on the age of the subject: label 0 means that the subject is younger than 45 while label 1 means that the subject is older than 45.

(Image of the author) In this picture two artery trees are displayed. (Left) the artery tree of a 20 years old subject. (Right) much elderly subject.

Comparing visually the 2 plots, we notice that the left tree of the 20-year-old subject appears to be very dense with numerous loops forming, while the right tree of the elderly subject is more sparse with less obvious loops forming. This leads us to develop the intuition that calculating the persistent homology in dimension 0, which counts the number of connected components, and persistent homology in dimension 1, which counts the number of loops could be useful for distinguishing between the 2 brains.

Persistent homology

The core of topological data analysis are persistence diagrams. These complicated two dimensional diagrams describe the topological properties of a point cloud in a scale-invariant way. We proceed by calculating the persistence diagrams for homology dimension 0 (which accounts for the connected components) and 1 (which is linked to 1-dimensional loops) only, as higher homology groups require a lot of time for computation.

(Image of the author) In this persistent diagram of a 20-years old patient we see how the class of H1 has many significant features (i.e. the green points far from the diagonal).

(Image of the author) In this persistent diagram of a 79 years old subject we see how the class of H1 has less significant features than the previous diagram (i.e. the green points far from the diagonal).

For homology in dimension 1, we can see that there are more points further away from the diagonal in the case of the younger brain. This signifies that there are more loops and the structure of the arteries is loopier than that of the older brain.

Afterwards, we convert each diagram to a 2-dimensional vector with persistent entropy [1]. This generates 2 topological features per persistent diagram: one persistent entropy per homology dimension.

(Image of the author) Scatter plot of the persistent entropies of the young and old patients.

We are thus able to generate simple numerical feature out of the persistence diagram of a brain. In the plot above, there aren’t any distinct clusters: as a result we cannot expect to have great classification performance based on only these two topological features. What we could try is to add more topological features in order to improve the performances.

Integration with machine learning

Thanks to topology, we have been able to create new features, such as the persistent entropy one discussed above. These features are associated to each data entry: it implies that we can easily enlarge the number of features in the dataset using Giotto-tda [4]!

We decided to add four different topological features: they are called amplitudes. The amplitude of a persistent diagram is the result of computing the distance — in a given metric — of such digram from the empty diagram. Depending on which metric is used in the diagram space, such amplitude value may differ. We consider four different metrics to compute a vector of amplitudes for each persistence diagram:

"bottleneck", "wasserstein", "landscape", "persistence_image"

We also add, to complete the feature engineering step, the number of off-diagonal points per homology dimension. Our intuition relies on the geometric nature of the problem: we believe that to improve the results of a classification tasks, we can add topological features to the dataset. Let’s see what we can do!

We use RandomForestClassifier for classification after the feature engineering step. The final classification accuracy is:

0.735

Comparison with a reasonable benchmark

We compare the classifier with topological features with a simple baseline based on a geometric measure — the total artery length. We add two more features, which are gender and handedness (which is tendency to use either the right or the left hand more naturally than the other) which we have available for the dataset.

The accuracy of the same RandomForestClassifier is:

0.714

We note a 2% increase in performance in the topological features compared to the baseline. However, it should be noted that the original dataset contained more than 120K points. The choice to downsample was for computational reasons so that the code can run in less than 15 mins. Attempts with 3000, 2000, 1000 points were made, but the time it took was substantially longer. The results are expected to be better when we have more data points.

We can also add more topological features, try other classifiers and perform hyper-parameters tuning, and use techniques such as boosting to improve the performance.

Conclusion

In this blogpost we have obtained interesting results regarding the relationship between brain artery trees and age, and developed a useful classification model which distinguishes between younger and older brains with 73.4% accuracy. The topological features slightly outperform the geometric measurement of total brain artery length in the age classification task. However, we are only using a small subsample of 500 of the available vertices (out of 120k), which suggests that there might be more accurate classification when one includes more points. It would be interesting to see if adding more points to the point clouds would change the accuracy and of how much. The caveat will be a longer time to produce the full set of persistence diagrams, with approximately 1 minute per diagram for a point cloud of 3000 points, which would result in 90 mins for the entire dataset. Further methods for speeding up this process could be investigated, together with a more accurate sampling procedure, as we used random subsampling. Moreover, in further analysis we should also calculate the homology of dimension 2, as that could provide additional insight.

We have considered the ageing effect on healthy individuals’ brain arteries. In future work it would be of clinical interest to develop topological techniques for detecting brain abnormalities linked to brain conditions such as stroke and brain cancer. Giotto-tda played the central role in this analysis [4], and it could be used to further add more topological features and for useful interpretations of linking biological biomarkers with the topology of the brain arteries.

References

[1] N. Atienza et al., Persistent entropy: a scale-invariant topological statistic for analyzing cell arrangements, ArXiv1902.06467

[2] P. Bendich et al., Persistent Homology Analysis of Brain Artery Trees, PMID: 27642379

[3] J. Gutierrez et al., Brain arterial aging and its relationship to Alzheimer dementia, Neurology. 2016 Apr 19; 86(16): 1507–1515.

[4] G. Tauzin et al., giotto-tda: A Topological Data Analysis Toolkit for Machine Learning and Data Exploration, ArXiv2004.02551