{'fraction_non_alphanumeric': 0.033742176458711894, 'fraction_numerical': 0.017438925903492834, 'mean_word_length': 5.114969135802469, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
DFC: Anatomically Informed Fiber Clustering with Self-supervised Deep Learning for Fast and Effective Tractography Parcellation

White matter fiber clustering (WMFC) is an important strategy for white matter parcellation, which enables quantitative analysis of white matter connections in health and disease. WMFC is usually performed in an unsupervised manner without the need of labeled ground truth data. While widely used WMFC approaches have shown good performance using classical machine learning techniques, recent advances in deep learning reveal a promising direction towards fast and effective WMFC. In this work, we propose a novel deep learning framework for WMFC, Deep Fiber Clustering (DFC), which solves the unsupervised clustering problem as a self-supervised learning task with a domain-specific pretext task to predict pairwise fiber distances. This enables the fiber representation learning to handle a known challenge in WMFC, i.e., the sensitivity of clustering results to the point ordering along fibers. We design a novel network architecture that represents input fibers as point clouds and allows the incorporation of additional sources of input information from gray matter parcellation. Thus DFC makes use of combined information about white matter fiber geometry and gray matter anatomy to improve anatomical coherence of fiber clusters. In addition, DFC conducts outlier removal in a natural way by rejecting fibers with low cluster assignment probability. We evaluate DFC on three independently acquired cohorts, including data from 220 individuals across genders, ages (young and elderly adults), and different health conditions (healthy control and multiple neuropsychiatric disorders). We compare DFC to several state-of-the-art WMFC algorithms. Experimental results demonstrate superior performance of DFC in terms of cluster compactness, generalization ability, anatomical coherence, and computational efficiency.


INTRODUCTION
Diffusion magnetic resonance imaging (dMRI) tractography is an advanced imaging technique that uniquely enables in vivo mapping of the brain's white matter (WM) connections at macro scale (Basser et al., 2000;Mori et al., 1999). Tractography enables quantitative analysis of the brain's structural connectivity in many applications such as neurological development, aging, and brain disease (Ciccarelli et al., 2008;Essayed et al., 2017;Piper et al., 2014;Yamada et al., 2009;Zhang et al., 2022b). However, when performing whole brain tractography, hundreds of thousands to millions of fibers (or streamlines) 1 are generated, which are not directly useful to clinicians or researchers. Therefore, to enable fiber tract quantification and visualization, it is essential to perform tractography parcellation where the massive number of tractography fibers is divided into multiple subdivisions.
Many methods have been proposed for WMFC (see (Zhang et al., 2022b) for a review of methods). Often, WMFC methods compute distances between fibers then group fibers into clusters using computational clustering methods. Several methods have been designed for rapid clustering of tractography from an individual subject, e.g. to create a compact representation of whole-brain tractography for further processing (Garyfallidis et al., 2016(Garyfallidis et al., , 2012Guevara et al., 2011;Vázquez et al., 2020b). For example, QuickBundles (QB) clusters fibers by computing geometric similarities using the minimum average direct-flip (MDF) distance and employing a linear-time clustering algorithm (Garyfallidis et al., 2012), while FFClust generates compact clusters with high efficiency by clustering fiber points first and then using this information to group fibers into clusters (Vázquez et al., 2020b). Other WMFC methods are designed to cluster tractography from multiple subjects (O'Donnell and Westin, 2005) to create population-based tractography atlases O'Donnell and Westin, 2007;Tunç et al., 2016Tunç et al., , 2014Zhang et al., 2018b). For example, in WhiteMatterAnalysis (WMA), the mean distance between pairs of closest fiber points is used to enable groupwise spectral clustering of tractography (Zhang et al., 2018b). Finally, other WMFC methods are designed to cluster fibers based on information from an anatomical parcellation of the brain. In an early approach, anatomical information from a white matter parcellation was used to guide clustering of fiber tracts (Maddah et al., 2008). More recently, the "connectivity-driven" WMFC method (Tunç et al., 2016(Tunç et al., , 2014(Tunç et al., , 2013 clusters fibers based on the connectivity of the voxels through which they pass, and the AnatomiCuts method (Siless et al., 2020(Siless et al., , 2018 quantifies fiber similarities utilizing anatomical information (the Freesurfer regions (Fischl, 2012) through which each fiber passes).
Though existing WMFC methods have shown good performance, several key challenges remain. First, it is computationally expensive to calculate all pairwise fiber similarities considering the large number of fibers in whole brain tractography. Second, the computed fiber similarities can be sensitive to the order of points along the fibers. This is a problem because a fiber can equivalently start from either end (Garyfallidis et al., 2012;Zhang et al., 2020). Third, false positive fibers are prevalent in tractography and outliers may exist in obtained fiber clusters (Legarreta et al., 2021;Maier-Hein et al., 2017). Therefore, outlier removal methods are needed to remove undesired fibers from cluster results. Fourth, current methods mostly use descriptions of either white matter fiber geometry (i.e., fiber point spatial coordinates (Brun et al., 2004;Chen et al., 2021;Corouge et al., 2004;Garyfallidis et al., 2012;Ngattai Lam et al., 2018;Vázquez et al., 2020b;Zhang et al., 2018b) or gray matter anatomical parcellation (i.e., cortical and subcortical segmentations (Siless et al., 2018)) for fiber clustering. It is a challenge to combine both white matter fiber geometry and gray matter anatomical parcellation information to improve the clustering results. Finally, it is important to identify cluster correspondences across subjects for group-wise analysis. To achieve this goal, some studies perform WMFC across subjects to form an atlas and predict clusters of new subjects with correspondence to the atlas (O'Donnell and Westin, 2007;Tunç et al., 2014;Zhang et al., 2018b), while other approaches first perform within-subject WMFC then match the fiber clusters across subjects (Garyfallidis et al., 2012;Guevara et al., 2012;Huerta et al., 2020;Siless et al., 2020Siless et al., , 2018.

Unsupervised feature learning and clustering
In recent years, deep learning has demonstrated superior performance in computer vision tasks such as object classification, detection and segmentation Ronneberger et al., 2015;Simonyan and Zisserman, 2014). Deep-learning-based clustering has also been extensively studied as an unsupervised learning task (Károly et al., 2018). An intuitive way to perform unsupervised deep clustering is to extract feature embeddings with neural networks and then perform clustering on these embeddings to form clusters. Auto-encoder networks are widely used to learn unsupervised feature embeddings because they do not require ground truth labels (Xie et al., 2016) . The representative work is the Deep Embedding Clustering (DEC) framework, which performs simultaneous embedding of input data and cluster assignments in an end-to-end way (Xie et al., 2016). Deep Convolutional Embedded Clustering (DCEC) extends DEC from 1D feature vector clustering to 2D image clustering .
Another promising approach of learning feature embeddings is self-supervised learning, which is a subclass of unsupervised learning that shows advanced performance in many applications (Kolesnikov et al., 2019;van den Oord et al., 2018). Deep embeddings are obtained by designing a pretext task such as predicting context (Doersch et al., 2015) or image rotation (Komodakis and Gidaris, 2018) and generating pseudo labels from the input data to guide network training, without involving any manual annotations. The learned feature embeddings (usually referred to as the high-level feature representations) can then be transferred to downstream tasks such as clustering.
Recently, attempts have been made to apply supervised deep learning approaches for tractography segmentation (T. V. Gupta et al., 2017;Liu et al., 2019Liu et al., , 2022Ngattai Lam et al., 2018;Wasserthal et al., 2018;Xue et al., 2022;Xu et al., 2019;Zhang et al., 2020). In these studies, fibers from the whole brain are classified into anatomically meaningful fiber tracts based on labeled training datasets. To alleviate the requirement of ground truth labels, one recently proposed method (Xu et al., 2021) has shown the potential of using unsupervised deep learning for fiber clustering; however, it requires complex feature extraction procedures to generate inputs of the neural network. We proposed a novel unsupervised deep learning framework in our MICCAI work (Chen et al., 2021), where we adopted self-supervised learning to achieve fast and effective WMFC. However, it also requires an extra step to generate inputs of the neural network (FiberMaps (Zhang et al., 2020)) from the fiber points.
In tractography data, each fiber is encoded as a set of points along its trajectory, and therefore it could be intuitive and efficient to represent and process fiber data as point clouds, which is an important geometric data format. In addition, each fiber could naturally be represented as a graph, where points are considered to be nodes. In these ways, original fiber point coordinates could be processed directly with point-based neural networks or Graph Neural Networks (GNNs), which have demonstrated successful applications in geometric data processing Qi et al., 2017;Welling and Kipf, 2016). Another benefit of these representations for tractography data is that the point cloud or graph representation of a fiber is not sensitive to the point ordering along the fiber. In recent studies, fibers have been represented as point clouds for tractography-related supervised learning tasks (Astolfi et al., 2020;Logiraj et al., 2021;Xue et al., 2022), contributing to superior performance and high efficiency. In the computer vision community, unsupervised point cloud and graph clustering have been achieved in several studies by learning representations of inputs first and then performing traditional clustering on learned embeddings (Hassani and Haley, 2019;Tian et al., 2014). However, we have found no related work using point clouds or graphs for unsupervised WMFC tasks yet.

Contributions
In this study, we propose a novel deep learning framework for fast and effective WMFC.
The whole framework is trained in an end-to-end way with fiber point coordinates as inputs and cluster assignments of fibers as outputs. Using a point cloud representation of input fibers, our framework learns deep embeddings by pretraining the neural network in a self-supervised manner and then fine-tunes the network in a self-training manner (Xie et al., 2016) with the task of updating cluster assignments. After training, at the inference stage the trained fiber clustering pipeline can be applied to parcellate independently acquired datasets.
The paper has five contributions. First, input fibers are represented as point clouds, which are compact representations and improve efficiency via adopting point-based neural networks.
Second, self-supervised learning is adopted in our pipeline with a designed pretext task to obtain feature embeddings insensitive to fiber point ordering for input fibers, enabling subsequent clustering. Third, white matter fiber geometric information and gray matter anatomical parcellation information are combined in the framework during cluster assignment to obtain spatially compact and anatomically coherent clusters. Fourth, outliers are removed after cluster assignment by rejecting fibers with low soft label assignment probabilities. Fifth, our approach automatically creates a multi-subject fiber cluster atlas that is applied for white matter parcellation of new subjects.
The preliminary version of this work, referred to as DFC conf , was published in MICCAI 2021 (Chen et al., 2021). In this paper, we extend our previous work by: 1) adopting a new fiber representation (i.e., point cloud), with a comprehensive evaluation of different representations of tractography data including point clouds, graphs, and images; 2) adding cortical surface parcellation information in addition to anatomical region information to further improve cluster anatomical coherence; 3) a new cluster-adaptive outlier removal process to filter anatomically implausible fibers while maintaining good generalization across subjects; and 4) demonstrating robustness of our method on additional datasets with different acquisitions, ages, and health conditions.

METHODS
The overall pipeline of DFC is shown in Fig. 1. Its training process includes two stages: pretraining and clustering. In the pretraining stage, neural networks are trained to perform a self-supervised pretext task and obtain feature embeddings of a pair of input fibers (point clouds), followed by k-means clustering (Likas et al., 2003) to obtain initial clusters. In the clustering stage, based on the neural network initialized in the pretraining stage, a clustering layer is added and clustering results are fine-tuned via a self-training manner (Xie et al., 2016).
During inference, for each fiber represented as a point cloud, an embedding is predicted by the trained neural network, and the fiber is assigned to the closest cluster by calculating the distances between its embedding and all cluster centroids. By performing cluster assignment with the trained neural network, our method automatically achieves cluster correspondence across subjects. Fig. 1. Overview of our DFC framework. A self-supervised learning strategy is adopted with the pretext task of pairwise fiber distance prediction. In the pretraining stage, input fibers are encoded as embeddings with the Siamese Networks. In the clustering stage, based on the neural network of the pretraining stage, a clustering layer is connected to the embedding layer and generates soft label assignment probabilities q (as shown in the orange dashed box). During training, a prediction loss (L p ) and a KL divergence loss (L c ) are combined for network optimization. During inference, an input fiber is assigned to cluster c with the maximum soft label assignment probability, which is calculated from the trained neural network.

Input fiber geometry and anatomical information
In this work, we adopt point clouds as representations of fibers. Considering that the neighborhood relationship among points along a fiber could provide contextual information for clustering, we adopt the Dynamic Graph Convolutional Neural Network (DGCNN) model (Wang et al., 2019). The DGCNN model contains an edge feature engineering module, EdgeConv, which was proposed to capture the local geometric structure formed by points and their neighbors. Considering that fiber points are distributed along a fiber, we construct a graph with edges connecting each set of k nearest points along a fiber (instead of edges connecting k nearby points based on Euclidean distance as in the original DGCNN method) (Astolfi et al., 2020).
To provide anatomical context to improve performance at the fiber clustering stage (Section 2.3), we augment the white matter fiber geometry information with gray matter anatomical parcellation information. This information includes anatomical regions and cortical parcellations obtained from Freesurfer (Fischl, 2012) using the Desikan-Killiany Atlas (Desikan et al., 2006). To describe the anatomical regions through which each fiber passes, each point in a fiber is assigned the label of the anatomical region it intersects. Similarly, fiber endpoints are associated with the cortical parcellation label of the closest point on the cortical surface.

Pretraining with self-supervised deep embedding
In the pretraining stage, we propose a novel self-supervised learning approach to obtain deep embeddings of fibers. A pretext task is designed to obtain pairs of embeddings with distances similar to their corresponding fiber distances, enabling subsequent clustering in embedding space. Specifically, the pretext task is to predict the distance between a pair of input fibers, where their self-supervised pseudo label is given as the pairwise fiber distance between their pointwise spatial coordinates. To calculate the fiber distance, we adopt the MDF distance which is widely applied in WMFC (Garyfallidis et al., 2012;Zhang et al., 2018b). This fiber distance considers the order of points along the fibers, and it remains the same when a fiber is equivalently represented starting from either endpoint. With fiber distances as pseudo labels, the network is guided to produce similar embeddings for similar fibers, even in the presence of flipped fiber point orderings.
To perform the pretext task of fiber distance prediction, we adopt a Siamese Network (Chopra et al., 2005), which has two subnetworks with shared weights. Generally, a pair of inputs is put into the subnetworks, respectively, and a pair of deep embeddings is generated from the subnetworks. In this work, a pair of fibers (point cloud sets) is used as the input to the point-cloud-based neural network. We employ DGCNNs as subnetworks of the Siamese Network to obtain feature embeddings. Each DGCNN subnetwork is composed of 5 EdgeConv layers followed by 3 fully connected layers. The subnetworks output a pair of deep embeddings corresponding to the input pair.
In the general use of Siamese Network, a fully connected layer follows the subnetworks and outputs a similarity score. In our work, we replace the last fully connected layer with a direct calculation of the pairwise Euclidean distance between the learned deep embeddings. The mean squared error between the predicted distance and fiber distance (pseudo label) is calculated as the distance prediction loss L p .

Clustering integrating anatomical information
After the pretraining stage, the weights of the Siamese Network are initialized with the pretrained weights and initial clusters are obtained by performing k-means clustering (Likas et al., 2003) on the generated embeddings. The clustering stage of our method is developed from the DCEC model . Following the DGCNN subnetwork, a clustering layer is designed to encapsulate cluster centroids as its trainable weights and compute soft label assignment probabilities q ij using Student's t-distribution (Maaten L. V. D, 2008): where z i is the embedding of fiber i and µ j is the centroid of cluster j. q ij is the probability of assigning fiber i to cluster j. The network is trained in a self-training manner and its clustering loss L c is defined as a KL divergence loss (Xie et al., 2016). The distance prediction loss is retained in the clustering stage, and the total loss is L = L p + λL c , where λ is the weight of L c .
During inference, a fiber i is assigned to the cluster with the maximum q ij referred to as q m .
We improve the clustering stage described above by incorporating gray matter anatomical parcellation information into the neural network. We design a new soft label assignment probability definition, which extends (1) to encourage grouping of fibers that pass through the same anatomical regions and cortical parcels: ( 2) where is the Dice score between the set of anatomical regions pass through by fiber i and those pass through by cluster j. To define this set of anatomical regions, we use the Tract Anatomical Profile (TAP) method that includes regions intersected by over 40% of fibers as in (Garyfallidis et al., 2012;Zhang et al., 2018b).

Cluster-adaptive outlier removal
After initial clustering, outlier fibers may have distinctly different position and shape from most fibers in the cluster, and we empirically found that these outliers often exist in obtained clusters. Therefore, outlier removal is an essential step to filter anatomically implausible fibers (Astolfi et al., 2020;Guevara et al., 2011;Legarreta et al., 2021;Mendoza et al., 2021;Zhang et al., 2018b). In our previous work (Chen et al., 2021), we removed outliers by directly rejecting fibers with a label assignment probability q m lower than an absolute threshold.
This method could potentially remove plausible fibers, as it ignores the variability of q m across clusters with different anatomy.
Therefore, we propose a novel cluster-adaptive outlier removal method. It is also based on the maximum label assignment probability q m , considering that fibers with higher q m tend to have higher confidence of belonging to the corresponding clusters and are thus less likely to be outliers. In this method, fibers are removed if their soft label assignment probabilities are over n standard deviations lower than the cluster mean probability.

Implementation details
In the pretraining and clustering stages, our model is trained for 50k iterations with a learning rate of 1e-4 and another 1k iterations with a learning rate of 1e-5. The batch size of training is 1024 and Adam (Kingma and Ba, 2014) is used for optimization. All methods were tested on a computer equipped with a 2.1 GHz Intel Xeon E5 CPU (8 DIMMs; 32 GB Memory) and deep-learning-based methods were run on a NVIDIA RTX 2080Ti GPU using Pytorch (v1.7.1) (Paszke et al., 2019). The weight of clustering loss λ is set to be 0.1, as suggested in . Source code and trained model will be made available at https://github.com/SlicerDMRI/DFC.

Experimental datasets and preprocessing
We used dMRI data from three datasets that were independently acquired from different populations using different imaging protocols and scanners, as shown in For each subject, whole-brain tractography was performed using a two-tensor unscented Kalman filter (UKF) method (Malcolm et al., 2010;Reddy and Rathi, 2016). Fibers shorter than 40 mm were removed to avoid any bias towards implausible short fibers (Guevara et al., 2012;Jin et al., 2014). All tractography data were co-registered using a tractography-based registration method (O'Donnell et al., 2012). In order to obtain gray matter anatomical parcellation information (i.e., which anatomical regions each fiber passes through and which cortical region each fiber connects to), we performed Freesurfer parcellation (Fischl, 2012) on the T1w data, which was then registered to the dMRI data. (Note: for HCP data, we used the provided Freesurfer parcellation that has been co-registered with dMRI data; for the CNP and PPMI data, we performed a non-linear registration using ANTs (Avants et al., 2009).
During model training, 10,000 fibers were randomly selected from each training subject, generating a training dataset of 1 million samples. Then, the trained model was applied to the whole-brain tractography of each testing subject for subject-specific WMFC. For fast and efficient processing of the large number of fiber samples during model training and inference, fibers were downsampled to 14 points before being input into the network. All anatomical region labels (from all fiber points) were preserved for input into the network without any downsampling.

Experimental metrics
We adopted four metrics to quantitatively evaluate WMFC results.

Davies-Douldin (DB) index. DB index is a commonly used metric in unsupervised
clustering tasks (Xu and Tian, 2015), and it has been recently adopted for fiber clustering evaluation (Vázquez et al., 2020b). It simultaneously measures within-cluster scatter and between-cluster separation, as the ratio of intra-and inter-cluster fiber distances , where n is the number of clusters, α i and α j are mean intra-cluster distances, and d(c i , c j ) is inter-cluster distance (MDF distance between centroids c i and c j of cluster i and j, where the centroid is defined as the fiber with minimum average distance to all other fibers in the cluster). A smaller DB index indicates better separation between clusters.

White Matter Parcellation Generalization (WMPG). WMPG measures the percentage of
successfully detected clusters in an individual subject (Zhang et al., 2018b). Clusters with over 20 fibers are considered to be successfully detected (Zhang et al., 2018b).

Tract Anatomical Profile Coherence (TAPC).
This metric measures if fibers within the same cluster pass through the same anatomical regions (Zhang et al., 2018b). It is calculated as the Dice score between each fiber's intersected anatomical regions and its assigned cluster's anatomical regions (TAP of the cluster), where a high value suggests a high anatomical region coherence of the cluster. The TAPC of a cluster is calculated as the mean of Dice scores across all fibers within the cluster, and the TAPC score of a subject is computed as the mean TAPC of all clusters.

Tract Surface Profile Coherence (TSPC).
We propose a new metric, TSPC, to evaluate the coherence of cortical terminations of fibers within a cluster. The TSPC is defined as the average TSP across the cortical regions intersected by fiber endpoints within the cluster. A higher TSPC indicates that fibers within a cluster terminate in a smaller set of cortical parcels.
The TSPC of a subject is computed as the mean TSPC of all clusters.

Experiments and results
We performed five experimental evaluations, including 1) comparison to state-of-the-art (SOTA), 2) comparison to baseline DCEC, 3) ablation study, 4) evaluation of input representations and network architectures, and 5) evaluation of outlier fiber removal. Experiment results of 1) and 2) are reported using the three testing datasets and those of 3), 4) and 5) are reported using the HCP testing dataset.

Comparison to SOTA methods
We compared the proposed DFC with three SOTA methods: WMA (Zhang et al., 2018b), QB (Garyfallidis et al., 2012) and DFC conf (Chen et al., 2021). WMA is an atlas-based WMFC method that shows good performance and strong correspondence across subjects. QB is a widely used WMFC method that performs clustering within each subject and achieves group correspondence with post-processing steps. We used open-source software packages WMA v0.3.0 (github.com/SlicerDMRI/whitematteranalysis) and Dipy v1.3.0 (dipy.org) with default settings to implement WMA and QB, respectively. DFC conf is the preliminary version of this work that adopts FiberMap (Zhang et al., 2020), which is a 2D multi-channel feature descriptor that encodes spatial coordinates of points along each fiber, as representation of input fibers.
Cluster correspondence across subjects is automatically generated by DFC and DFC conf . For each method, we performed WMFC to output 800 clusters, which has been suggested to be a good whole brain tractography parcellation scale (Wu et al., 2021;Zhang et al., 2018b).   Fig. 2 gives a visualization of clusters obtained from each method. Cluster correspondence is built by finding the closest cluster from all comparison methods to each cluster from DFC. In general, DFC, DFC conf and WMA obtain visually similar clusters, while the clusters from DFC appear to be more compact and anatomically reasonable than those from the other methods. QB tends to include some apparent outlier fibers. Fig. 3 gives a visualization of three example clusters and their connected Freesurfer regions. The clusters from DFC are more anatomically coherent, connecting to the same cortical regions.  In addition to the visualization of clusters from individual subjects, we also provide a visual comparison of population-wise clusters to demonstrate the methods' performance for tractography atlas creation. To do so, we compare the DFC and WMA methods, which are explicitly designed to perform groupwise clustering to create tractography atlases. For DFC, the population-wise atlas is derived from our training process, where fiber clusters from the training subjects are formed. For WMA, we use the anatomically curated white matter atlas that was created using WMA (Zhang et al., 2018b). Fig. 4 gives a visual comparison of results from DFC and WMA. Example clusters are shown in regions of the arcuate fasciculus, corpus callosum and superficial fronto-parietal tracts. It can be seen that the DFC method obtains population-wise clusters that are more separated and compact, where cluster subdivisions better respect terminating anatomical regions. We also compared the computational time of each method to perform WMFC on one randomly selected HCP subject (about 500k fibers). DFC and DFC conf were the most efficient (~100s) due to the use of GPU computation. QB was also computationally efficient (~240s) due to its simplicity. WMA took the longest computational time (~3200s) due to the expensive pairwise fiber similarity computation between the subject and atlas tractography data. Note that loading of data is included in these overall computational times (approximately 90 seconds), and the actual execution time of DFC after data loading is ~10 seconds.

Comparison to DCEC baseline
We compare the proposed DFC method with the DCEC baseline method, which is a widely used auto-encoder model for unsupervised clustering in computer vision . The inputs of DCEC are expected to be images, and thus we used FiberMap (Zhang et al., 2020) to represent input fibers as images (Chen et al., 2021). Hyperparameters in DCEC were optimized to obtain the best performance.
As shown in Table 3, DFC has obviously improved performance in terms of DB index, TAPC and TSPC, while DCEC has a slightly higher WMPG score (attributed to the lack of outlier removal in DCEC). It is worth noting that, for the DB index, the baseline DCEC obtained an exceptionally large score due to its sensitivity to point order along fibers. Fig. 5

Ablation study
We performed an ablation study to investigate how different modules in the proposed DFC method influence WMFC performance. Evaluation of four models was performed, including DFC no−roi&cor&ro (DFC without anatomical region, cortical parcellation or outlier removal), DFC no−cor&ro (DFC without cortical parcellation or outlier removal but with anatomical region), DFC no−ro (DFC without outlier removal but with anatomical region and cortical parcellation) and our proposed DFC method.
As shown in

Comparison of input representations
We compared three kinds of representations for tractography fibers, i.e., FiberMap, graph and point cloud. For each representation, neural networks that can effectively process the input were used: CNNs for FiberMap, GCNs for graphs, and DGCNNs (proposed) for point clouds.
For each input representation and its network, the proposed self-supervised learning pipeline is applied to generate clusters, followed by the proposed outlier removal process. For fair comparison, we adjusted the threshold in each method so that they removed approximately the same number of fibers.
As shown in

Comparison of outlier removal methods
We provide a visual comparison between two outlier removal strategies: RO absolute that adopts an absolute removal threshold for all clusters (proposed in our conference paper version), and RO adaptive that adopts a cluster-adaptive threshold (proposed in the present work). For RO absolute , the threshold was set to 0.045 so that it removed a similar percentage of fibers as RO adaptive (0.2626 and 0.2571, respectively).
As shown in Fig. 6, results of RO adaptive are more anatomically plausible, while the compared RO absolute method tends to be overly strict (Fig. 6a) or not properly reject apparent outlier fibers (Fig. 6b). Fig. 6. Example clusters to compare previous (RO absolute ) and current outlier removal methods (RO adaptive ).
Results of two clusters (two rows) from no outlier removal (w/o RO), RO absolute and RO adaptive methods are displayed in column 1-3 respectively. The fiber color indicates the soft label assignment probability of the fiber (rainbow coloring with red indicating the smallest and purple the largest). The fourth column shows the soft label assignment probability distribution within the selected clusters. The red and green dashed lines indicate the thresholds of outlier removal for RO adaptive and RO absolute , respectively.

DISCUSSION
In this work, we proposed a novel end-to-end unsupervised deep learning framework, DFC, for fast and effective white matter fiber clustering (WMFC). Our clustering method leverages not only white matter fiber geometry information but also gray matter anatomical parcellation information. The performance of DFC was evaluated on three independently acquired datasets across genders, ages and health conditions. Several detailed observations about the experimental results are discussed below.
Our method demonstrated advanced performance compared to several SOTA methods in terms of cluster compactness, anatomical coherence, generalization ability and efficiency. WMA has demonstrated consistent WMFC across independently acquired datasets from different populations (Zhang et al., 2018b). Our results in the three testing datasets support this finding regarding the generalization of WMA. However, the computational time of WMA is much longer compared to the other SOTA methods (QB, DFC and DFC conf ). QB generated compact and well-separated clusters within each subject, but it was not designed to generalize to a population. Compared to DFC conf , the cortical anatomical coherence of clusters from DFC was improved due to the incorporation of cortical parcellation information. However, DFC showed slightly decreased TAPC compared to DFC conf , likely because the incorporation of cortical surface parcellation information reduces the contribution of anatomical region information in cluster assignment.
Our pipeline adopts the self-supervised learning strategy to learn deep embeddings for unsupervised fiber clustering. Many pretext tasks, such as predicting context (Doersch et al., 2015) or image rotation (Komodakis and Gidaris, 2018), have been proposed in the computer vision community (Chen et al., 2020;Liu et al., 2021;Zhang et al., 2016). For medical image computing tasks, novel pretext tasks are designed by harnessing knowledge from the medical domain instead of directly adopting pre-designed pretext tasks from the computer vision field (Matzkin et al., 2020;Shurrab and Duwairi, 2022;Spitzer et al., 2018;. In our DFC framework, we designed the pretext task of fiber distance prediction to obtain embeddings for subsequent clustering. The pretext task leverages domain-specific knowledge of fiber distance, which can provide the following advantages. First, the general idea of WMFC is to group fibers with low pairwise distances into the same group. By solving the pretext task of fiber distance prediction, our pipeline obtains embeddings whose pairwise distances are consistent with their corresponding fibers and thus benefits the performance of WMFC. Second, the proposed self-supervised learning strategy could guide the network to learn similar embeddings for spatially close fibers regardless of their fiber point orderings, enabling them to be grouped into the same cluster. This gives our method an advantage over the widely used auto-encoder based models Xie et al., 2016), which are sensitive to fiber point ordering because they learn embeddings by reconstructing the input itself.
We proposed a novel framework that enables combined use of white matter fiber geometry and gray matter anatomical parcellation information in WMFC. Most current WMFC methods group fibers into bundles by calculating the similarity of fibers based on their coordinates in Euclidean space (Garyfallidis et al., 2012;Vázquez et al., 2020b). On the other hand, a recent study performed WMFC based on the brain anatomical structures each fiber passes though instead of fiber spatial coordinates (Siless et al., 2018). Therefore, either source of information could make contributions to the WMFC task. In our method, we perform clustering leveraging both sources of information, including the spatial coordinates of fibers and gray matter anatomical parcellation information, to help identify anatomically meaningful clusters.
The results show that integrating gray matter anatomical parcellation information clearly improved the anatomical coherence within clusters. Our method shows the potential of combining multiple sources of information to improve WMFC.
The representation of tractography data for deep learning is an open challenge for tractography-related tasks. Previous studies performed tractography segmentation by working on 3D volumes instead of the tractography data (Liu et al., 2022;Lu et al., 2020;Wasserthal et al., 2018), but this neglects subject-specific fiber tractography information. Recently, FiberMap was proposed to represent a fiber as a 2D image (Zhang et al., 2020(Zhang et al., , 2019a, which is a sparse representation of fibers and needs an extra step to generate. In our work, we used point clouds to represent fibers. Point clouds are compact representations of the original fiber points and enable end-to-end learning of the neural network. In addition, point-based models are permutation invariant to input points and thus insensitive to point ordering along fibers. By representing fibers as point clouds, we adopted point-based neural networks, which show good clustering performance as well as efficiency. In this study, we propose a simple but effective outlier removal strategy to filter anatomically implausible fibers and improve WMFC performance. Our strategy is rapid, as it simply rejects outlier fibers with low cluster assignment probabilities, without any added computational burden of fiber distance computations (Zhang et al., 2018b) or convex optimization (Daducci et al., 2015). However, our simple strategy is only able to remove fibers that do not correspond well to a cluster. We expect that a combination of outlier removal methods may have the best performance for reducing the well-known impact of outliers on fiber tractography (Drakesmith et al., 2015).
Limitations and potential future directions of the current work are as follows. First, our proposed pipeline only combines two sources of information, i.e. white matter fiber geometry and gray matter anatomical parcellation information, to achieve WMFC. It is worth investigating incorporating additional sources of information such as functional MRI to obtain functionally meaningful clusters. Future work could also investigate more advanced neural networks and other self-supervised learning strategies such as contrastive learning (Chen et al., 2020) to potentially obtain better clustering results.

CONCLUSION
In this paper, we present a novel end-to-end unsupervised deep learning framework for WMFC. We adopt the self-supervised learning strategy to enable joint deep embedding and cluster assignment. Our method can handle several key challenges in WMFC methods including improving implementation efficiency, handling flipped order of points along fibers, combining fiber geometric and anatomical information, filtering anatomically implausible fibers and inter-subject correspondence of fiber clusters. Experimental results show that our proposed method achieves fast and effective WMFC and demonstrates advantages over state-of-the-art algorithms in terms of clustering performance as well as efficiency.