Abstract
Recent advancements in network neuroscience are pointing in the direction of considering the brain as a smallworld system with an efficient integrationsegregation balance that facilitates different cognitive tasks and functions. In this context, community detection is a pivotal issue in computational neuroscience. In this paper we explored community detection within brain connectomes using the power of quantum annealers, and in particular the Leap’s Hybrid Solver in DWave. By reframing the modularity optimization problem into a Discrete Quadratic Model, we show that quantum annealers achieved higher modularity indices compared to the Louvain Community Detection Algorithm without the need to overcomplicate the mathematical formulation. We also found that the number of communities detected in brain connectomes slightly differed while still being biologically interpretable. These promising preliminary results, together with recent findings, strengthen the claim that quantum optimization methods might be a suitable alternative against classical approaches when dealing with community assignment in networks.
Similar content being viewed by others
Introduction
Network neuroscience is an emerging discipline that tries to examine brain organizing principles using network science tools. It was made possible by the intersection of networks science and neuroscience^{1}. This allows the merging of two worlds which have shown tremendous advancements in recent years. The first world is given by complex system studies through graph analysis^{2}; the second is given by neuroimaging, which permits modeling of brain structure and function even representing relevant information as a graph^{3}. Community (also called cluster or module) detection is an explored yet not solved task in many fields using graph representations^{4}. Previous research has demonstrated how a modular structure can be used to highlight links between topological and functional aspects of complex networks that are not trivial^{5}.
The human brain is a complex network made up of physically connected areas that can be activated when performing certain tasks or while at rest. Indeed, in network neuroscience, the most used connectivity representations are the functional and structural representations, though other representations exist, as the effective connectivity which attempts to combine these two. More specifically, functional connectivity represents the covarying activity of spatially separated brain areas observed in time series data as functional magnetic resonance imaging or electroencephalogram^{6}. A graph is then built defining nodes as brain regions and edges according to the correlation of brain activity. Structural connectivity is referred to the physical pathways bridging brain areas, typically evaluated invivo by diffusionweighted imaging^{7}, or exvivo with staining and histological imaging^{8}. In this case, a graph is defined as nodes also given by the brain regions and edges are the physical neuronal pathways. Effective connectivity refers to the impact one neurological system has over another, either at the level of individual neurons or entire brain regions. Hence, it naturally incorporates structural and functional information as it combines the neuronal activities related by physical pathways^{9}. We do not focus particularly in this last type of connectivity as many recent criticisms raised concerns about its validity, as it can be seen as just temporal correlation^{10}. The most plausible structural organization describing the complexity of brain functions is emerging as the integration of segregated regions (communities)^{11}. Therefore, detecting communities in all types of connectivity is relevant, even though what community means in neuroscience is still an open question lacking absolute groundtruth or based on specific characteristic gathering group of neurons^{5}.
Previous research in this context has focused on representing properties of isolated brain networks focusing on network features important to brain function. Those include variants of Newman’s modularity function^{2}, and its maximization through Louvainlike algorithms^{12} for the detection of clusters of regions^{13}. More advanced approaches have expanded this considering brain networks as dynamic and not static networks^{14}, and information flow at different time scales^{15}. Indeed defining communities in absolute terms has been discouraged in many fields^{16} especially considering possible nodes which can overlap communities and mislabeling. Truly, the brain is not composed by strictly segregated regions with defined regions as Broadmann introduced in 1909^{17}, but by a more intricate and integrate complex of segregated networks with smooth borders^{18}.
The present work is not focused on defining the ideal community detection algorithm in brain connectomes, but rather we investigate if better clustering results can be achieved using quantum devices. This is motivated by the fact that modularity maximization heuristics have a demanding optimization problem at their core. Moreover, optimal solutions have been shown to be elusive to classical computing devices^{19}.
Optimization problems in quantum devices rely on minimization and sampling from energybased models via combinatorial techniques. The 2communities modularity maximization problem is closely related to an Isinglike model^{20,21}. Furthermore, its generalization to a kstate Potts model is exploitable for Simulated Annealing^{22} as well as its quantum partner, namely Quantum annealing (QA) algorithms^{23} (but see also a comprehensive review^{24}). Consequently, we start by formulating the relationship between modularity and energy functions to later exploit them for detecting multiple communities in structural and functional brain graphs. Considering the Louvain algorithm as a reliable stateoftheart estimate of the true result, we compare its performance in a desktop computer with results obtained with the DWave quantum computer^{20}. More specifically, we tested on a real quantum annealer device, and not on simulators. Lastly, we consider networks with deterministic connections on quantum devices, and not quantum inspired networks on classical computing^{25,26}.
Methods
In this section we first revise in detail how modularity is defined and how it is mapped into energy based model for both quantum and classical computing (sections “Modularity” and “Mapping to energybased models”). Then we clarify how our community detection is implemented inside the quantum annealer (section “kcommunity detection with a QA processor”).
Let us define a brain connectome as \(G=(V,E)\) a weighted graph with nodes \(i,j \in V\) and edges \((i,j) \in E\). With V being brain regions defined by an atlas, and E edges a set of either physical neuronal pathways or correlation of brain activity, such that the corresponding adjacency matrix \({\textbf {A}}\) is defined as follows:
with \(w_{ij}\) representing the weight for edge between nodes i and j. These weights are the representation of number of neuronal fiber bundles or intensity of activity correlation. In our case, we define \(w_{ij} \in \{0, 1\}\) as a binary variable taking into account the existence of a connection between two nodes i and j. Moreover, the degree of a node is defined as \(g_i = \sum _{j} A_{ij}\), and it measures the number of connections for the node i quantified by summing over all its neighbors.
Modularity
Suppose that a graph contains \(V=n\) vertices and is divided into k communities or clusters denoted as \(\{C_1, \ldots , C_k\}\). Given a specified partition, the modularity is defined as^{22,27}
where \(2m = \sum _{i}g_i\) is the total number of edges,
is the number of links between nodes inside cluster \(C_s\) and
is the sum of the degrees of the nodes belonging to the cluster \(C_s\). The resolution parameter \(\gamma \) defines the arbitrary tradeoff between intra and intergroup edges^{28}. Conveniently^{29}, and without loss of generality it can be set to 1, although we comment on other cases in later sections. The modularity as expressed in Eq. (2) is very convenient if the communities present in the graph are already known. However, if the number of communities k is unknown, the summation over s becomes a problem. To bypass this limitation, one can define a binary variable identifying nodes and/or links that are part of the same cluster. The most widely used proposal was defined in^{2}.
For the sake of clarity, we start by having only two communities \(\{C_1, C_2\}\). In this simple case, let \(s_i = 1\) if vertex i belongs to community \(C_1\) and \(s_i = 1\) if it belongs to community \(C_2\). We can now define a variable \(\frac{1}{2}(s_is_j+1)\) that returns 1 if and only if vertices i, j belong to the same community and 0 otherwise. Thus, the total number of existing edges between nodes in the same community can be rewritten as
where the \(\frac{1}{2}\) factor has been added to avoid double counting. Moreover, the sum of the degrees in all communities can be easily replaced using the same procedure.
where the double summation over ij has been used instead of \(\left( \sum _{i \in s}g_i\right) ^2\) for completeness. With these changes we can express the modularity Q in Eq. (2) as
where the rightmost equality follows from \(2m=\sum _{i}g_i=\sum _{ij}A_{ij}\).
Despite replacing a single summation for two, Eq. (5) has two main advantages, the first one being its easy interpretability. In a graph, if edges are placed at random, the expected number of links between two nodes i and j can be shown to be precisely \(\frac{g_ig_j}{2m}\)^{2}. Hence, the modularity Q can be understood as the difference between the actual number of edges and those expected by chance inside all the different communities. Second, proposing different sets of two communities is now straightforward. According to Eq. (5), modifying the variable \(s_i\) of even a single node yields a completely different partition and corresponding modularity. Hence, to cluster nodes by in ways that increases the modularity of a network can be achieved by trying out (i.e., sampling) different combinations of the variables \(s_i\) and keeping track of the resulting communities. Note that when sampling, the network’s nodes and connections do not change, but rather the community to which they belong do. We will explore the latter in more detail in the following section.
Furthermore, in many graphs, and especially in brain networks, the number of communities is expected to be considerably higher than just a couple. A straightforward generalization can be achieved by replacing the binary variable in the case of just two communities \(\frac{1}{2}(s_is_j+1)\) for a community agnostic Kronecker delta function \(\delta (c_i,c_j)\). Then the modularity is expressed as
where \({\mathbf {B}}\) is known as the modularity matrix whose elements are given by
and \(\delta (c_i, c_j)\) is one if two nodes belong to the same cluster \(C_s\).
Eventually, the partition in k communities is chosen by the maximum modularity score Q as a function of k. Note that permutation of the rows and columns of an adjacency matrix \({\mathbf {A}}\) does not alter the graph nor its modularity. However, the output of an algorithm whose goal is to find the partition with highest modularity, could depend on how this adjacency matrix was defined initially. Interestingly, results on many test cases in the literature show that the ordering of the nodes tends to not have a significant influence on the outcomes therefore showing rather deterministic behaviors^{12,27}.
Mapping to energybased models
The conundrum of community detection aims at finding the graph partition that maximizes the modularity Q which, for the case of binary and undirected networks, lies between \(\frac{1}{2}\) and 1. The problem can be solved using brute force by simply trying out all possible combinations of the variables \(s_i\), \(s_j\) (or \(\delta (c_i,c_j)\) for more than two communities), computing the associated modularities and eventually choosing the highest one. However, even for rather small graphs, this approach becomes unfeasible due to a rapid growth in complexity.
Alternative algorithms, such as the ones we use in the current work, use heuristic reasoning^{12} or exploration of state and energy spaces^{21,22}. To use the latter, one needs to map the modularity function to a physical system. The simplest of such systems is known as an Ising model, shown to be very useful to study properties of phase transitions in magnetic systems. Consider a system with N particles whose magnetic spin is characterised by a discrete variable \(s_i \in \{1, 1\}\). The energy of the given system immersed in an external magnetic field \({\mathbf {h}}\) is given by
where \(s_i\) are the spins of each particle, \(h_i\) are the local magnetic fields and \(J_{ij}\) encodes the couplings strengths that encode the interactions between particles i and j. Usually, Eq. (8) is defined in a regular lattice only considering interactions between 1st neighbours. Note, nonetheless, that the formulation is agnostic towards the specific spatial topology of the system. Taking this into consideration, it is direct to see that the modularity in Eq. (5) corresponds to an Ising system defined in a nonregular graph, with no external field and coupling matrix \({\mathbf {J}}=\frac{1}{2m}{\mathbf {B}}\).
Furthermore, an Ising model can be easily extended to include more than two states. In this case, each ith particle is fully characterised by a discrete variable \(s_i \in \{0, \ldots , k1\}\) where \(k \in {\mathbb {Z}}^{+}\) is a positive integer denoting the number of possible states.
where \(h_i\) is the local magnetic field and the Kronecker function is 1 when two particles are in the same state (i.e., \(s_i=s_j\)). Once again, the modularity in Eq. (6) straightforwardly matches a physical system known as Potts model with the same coupling constant \({\mathbf {J}}=\frac{1}{m}{\mathbf {B}}\) and no external field. A physical system is said to be in thermodynamic equilibrium if the energy of the configuration, given by the successive spin variables \(s_i\), rests at a minimum. The problem of how to find this ground state has been widely studied and solved using different methods including, but not limited to, QA. In this subsection, we have reviewed how computing the modularity of a certain network organization is equivalent to obtaining the energy of a given magnetic system. Thereafter, we use the same procedures and strategies to find partitions that maximized the modularity or, alternatively, minimized its opposite in Eqs. (5) and (6). That is, we explored configurations \(C_s\) such that the corresponding modularity \(Q^*\) satisfied:
kcommunity detection with a QA processor
QA^{23,24} relies on the preparation of a physical quantum system whose Hamiltonian evolves according to
where the ground state of \({\mathscr {H}}_0\) is “easy” to prepare and to measure experimentally. The functions \(\Gamma \) and \(\Lambda \) are both continuous and monotonously decreasing and increasing respectively such that \({\mathscr {H}}(0)={\mathscr {H}}_0\) and \({\mathscr {H}}(T)={\mathscr {H}}_p\). If initially the system is prepared in a way that lies at the ground state of \({\mathscr {H}}_0\), the process in Eq. (11) is adiabatic and \([{\mathscr {H}}_0,{\mathscr {H}}_p]\ne 0\) (i.e., the Hamiltonians do not commute), given the adiabatic theorem of quantum mechanics, the system should remain in the ground state at all times, thus ending up in the minimum of \({\mathscr {H}}p\). In this state, any measurement of the system’s elements shall return this ground state configuration. We provide a simplified description of this process in Fig. 1a.
The DWave hardware, known as a Chimera graph, consists of \(i=1,\ldots ,N\) qubits coupled with weights \({\mathbf {J}}\) whose energetic state \({\mathscr {H}}_p\) is described with an Ising Hamiltonian^{20}. Therefore, any optimization problem to be solved using quantum annealing necessitates the reduction (or embedding) from its original description (e.g., (6)) to an enclosed embedded form of Eq. (8) in the Chimera graph (i.e., a mapping from G to \({\mathscr {H}}_p\)). The DWave platform autonomously embeds the problem to the processor^{30} (see Fig. 1b).
The modularity maximization problem naturally maps to a Potts model, also known as a Discrete Quadratic Model (DQM). However, a DQM variable \(s_i\) takes 1 of k possible discrete positive values which is not exactly an Ising spin. Yet, an alternative representation using onehot encodings facilitates the previously mentioned reduction. A vector \({\mathbf {x}}_i\) is defined such that \(x_{iu}=1\) if \(s_i=u\) and 0 otherwise. This way we obtain a quadratic model subject to the constraint \(\sum _u x_{iu}=1\) that is easily transformed to an Ising representation with the mapping \(s_{iu}=2x_{iu}1\). Below, we provide snips of the Python code that reduces the original network object to an Ising model with which the DWave system performs the optimization to better understand how it is implemented. Fortunately, the DWave platform provides a straightforward way to do this. We used Networkx^{31} to compute the modularity matrix from an adjacency matrix \({\mathbf {A}}\) in Eq. (1). The reduction is based on the modularity matrix \({\mathbf {B}}\) in Eq. (7) and the expression of the coupling matrix \({\mathbf {J}}\) for the quadratic term in Eq. (9). Recall that the external field \({\mathbf {h}}\) need not be added. The DiscreteQuadraticModel class contains this model, and its methods provide convenient utilities with the specific representation of a problem.
The nested loop is used to express all the possible communities a single node can be assigned to as well as to set the corresponding coupling weight given by B_{ij}. Note that the total number of edges m is constant and thus it does not modify the relevant ground state. The code, also skips selfreferenced nodes. The token can be obtained by logging into https://cloud.dwavesys.com/leap/. The final result is a sample set assigning each node to a particular community.
We have used the Leap Hybrid Solver developed by DWave. In contrast to the DWave 2000Q, this solver service can read and accommodate very large problems. The classical part allocates quantum processing units to specific parts of the problem to optimize, these parts being different algorithm steps. This approach leverages unique problemsolving capabilities of the quantum processing units and extends these capabilities to larger and more varied types of inputs. It can be called through the DWave Ocean application programming interface (API) hence facilitating its usage to nonspecialists.
In our experiments we investigated how similar the detected communities were to an external proxy both using classical and quantum computing. Where no groundtruth is available, we considered the results of the eigengap, from spectral communities analysis, to be the aforementioned proxy. With the eigengap heuristic, the number of communities is usually given by the value of k that maximizes the difference between two consecutive eigenvalues. We kept track of the three largest eigengaps. Then, we computed the modularity index obtained by 100 runs. The third eigengap acted as a limit to see whether the optimization identified the same number of communities or reached higher modularities with less communities.
Finally, we run the same calculation using the Louvain Community Detection Algorithm (LCDA) to solve the community detection problem. The Louvain Community Detection Algorithm is a stateoftheart heuristic to extract the community structure of a network based on modularity optimization^{12}. Given the nature of one of the datasets described later as representing a debated groundtruth^{16}, we consider both the case of known and unknown number of communities for this dataset. As in previous similar studies^{32,33,34}, we consider higher modularities as a proxy for better results. Statistical significance is also investigated.
Data and code availability
In this study, we performed experiments using 2 datasets. The first is a wellknown dataset (Zachary karate club^{35}) which has been investigated in several community detection studies (e.g.^{27}). The second dataset is given by the brain connectomes comprised in the BrainNet Viewer Toolbox defined from atlases^{36}, which are the main focus of the study. Both datasets are based on previously acquired data from previous studies, and our analysis represents a numerical simulation study for which no ethical approval was required. The karate club dataset was created by Zachary by observing 34 members of a karate club over a period of 2 years, where a partition of the members happened, and a network of friendships between members of the club was observed. This was previously done by Zachary et al. in accordance with relevant guidelines and regulations^{35}, for more details and contacts on their ethical approval please find all information in their original paper^{35}. The dataset has been traditionally defined as a groundtruth subdivision of 2 communities^{35} as shown in Supplementary Fig. 1. However, communities defined by a specific groundtruth labeling can be misleading and not necessarily reflect the network topology^{16}, and in fact higher number of communities in this dataset have been investigated^{37}. Therefore, we consider both the cases whether this labeling should be restricted to 2 communities and not. This toy example is really useful to validate the modularity in case of a known information flow example. The dataset is freely available at the URL https://networkrepository.com/sockarate.php.
The brain connectivity dataset are obtained from the examples of BrainNet Viewer and freely available at the URL https://www.nitrc.org/projects/bnv/. More specifically, the Automated Anatomical Labeling (AAL) which is the most common atlas for structural connectivity^{38} comprising 90 regions of interest and the Dosenbach atlas which is a functional atlas with 160 regions of interest. For the details of how those regions are used as nodes to construct the networks within BrainNet Viewer, we refer to their paper^{36}. There is no particular reason to use this dataset apart the fact that those are brain connectomes publicly available. The basic properties of the networks used in the experiments are reported in Supplementary Table 1.
The code was written in Python version 3.9.7, and it is available at the repository https://github.com/alecrimi/clusteringdwave, it comprises a series of custom scripts and the usage of the Networkx library version 2.8.3^{39}, and the Dwavesystem library version 1.10 with all initialization parameters for the NetworkX implementation of LCDA were left empty.
The used hardware were respectively for quantum and classical computing: the DWave 2000Q with Chimera edges, and a powerful workstation with 11th Gen Intel(R) Core(TM) i911900KF @ 3.50GHz processor.
Results
In this section, we report the results obtained by using the aforementioned tools on the 2 datasets. We report here first the resulting eigengap for both datasets, the communities are defined by modularity and the value of modularity.
Karate club dataset
Computing the eigengap Fig. 3a within the karate club dataset we found that the highest gaps were related to \(k=3,4,2\). The highest eigengap was given by \(k=4\), while the original defined number of communities is \(k=2\)^{35}.
Forcing both the classical and quantum community detection algorithm to look for 2 communities, both algorithms were able to assign correctly all members of the defined communitiesm (as shown in Supplementary Fig. 1. It is relevant to mention that to reach this goal, the resolution parameter \(\gamma \) in Eq. (2) had to be set smaller than 1. For all other experiments, we considered the more standard value \(\gamma =1\).
Following the experiments in an unsupervised manner as described in the previous section, the classical and quantum algorithm showed different results. In Fig. 2 we show the differences of the communities obtained by using classical and quantum computing. It can be seen that only 2 communities (depicted in red and blue) have different grouping. In Table 1 we can see summarized the modularity index for both classical and quantum device. As shown in literature^{12,27}, the methods behave in a rather deterministic manner and as our results show the quantum hardware noise were close to zero even considering a large number of repeated experiments. Results are shown in Table 1. Note that the results of the LCDA as implemented in NetworkX^{31} slightly differ from what is found in the literature^{12,32} (see also Supplementary Fig. 2).
Brain connectivity
The eigengaps for the two brain connectome are depicted in Fig. 3b and c. We found some high eigengaps at the end of the spectrum, namely where we consider each node as a cluster. This might make sense as nodes in brain atlases represent an already relatively large region of interest according to functional activation of cytoarchitecture. Namely, those are already clusters of neurons or brain activity. However, this will not be interesting given the research question of this paper. The 3 largest eigengaps were, respectively, for the AAL and Dosenbach atlas: 4,5,11 and 7,11,27. Comparing the modularity obtained on classical and quantum devices with AAL90 and Dosembach brain connectivity graphs, we found different modularity indices reported in Table 2. The resulting communities are shown in Figs. 4 and 5 respectively for the AAL and Dosenbach atlas. The computational times for each algorithm are also reported in Table 2.
For the AAL atlas connectome, if we look for 5 communities as depicted in Fig. 4, those appear to be almost the traditional brain lobe subdivision: subcortical regions (yellow), occipital lobe (red), temporal medial (cyan), frontotemporal medial including the default mode network (blue), frontotemporal lateral (green). The parietal lobe was spread across the neighbouring.
For the Dosenbach parcellation, despite the difficulties of the methodology for identifying meaningful partitions, a largescale pattern was observed, which mostly differentiated visual, sensorymotor and dorsal attention regions. More specifically, in Fig. 5 we can see nine clusters depicted: the visual network comprising the occipital lobe but also some parietal regions (yellow) as previously described^{40}, lateral temporalparietal (mild green), extended default mode network (DMN) (dark blue), mostly thalamus and basal ganglie (magenta), cerebellum, anterior cingulate cortex and supplementary motor area (orange), superior temporal (light green), some region of postinsula and temporal (dark green). The red cluster connected only two regions in the occipital lobe, and the light blue cluster only two regions in the parietal lobe. The acronyms of the brain regions are the same as reported in^{38}. Statistical significance for all three dataset is depicted in Fig. 6.
Discussion
The human brain exhibits an organization of a smallworld network, with segregated modular regions integrated by some hub nodes^{11}. The use of connectomes as biomarkers has seen increasing use, and clustering features have also been introduced as both functional and structural network changes according to brain diseases^{41}. Indeed, data driven approaches have being increasingly implemented to investigate relationships between brain connectivity pathology, for instance Alzheimer’s disease^{42}. Therefore, it is crucial to increase the precision of clustering brain connectivity representations.
In the presented work we investigated the capacity of a quantum annealer to perform clustering on brain connectivity data. We focused on comparing the clusters obtained with the same data by using classical and quantum computing on a DWave machine. The modularity metric was used to assess the quality of a community organization. This metric has values between \(\frac{1}{2}\) and 1, where the highest value is considered an indicator of better topological organization^{2,33}.
The maximum number of clusters to detect is a parameter required by both algorithms we tested. Yet, in both cases, the algorithm was free to assign each node to any module which, in some cases, resulted in empty communities. In practice, this meant that both classical and quantum approaches could partition the graph into any number of communities only bounded by the maximum number of modules allowed. Communities obtained using the quantum device showed consistent and observable higher modularity indices, as shown in Fig. 6. Indeed, higher modularity indices are often considered as a measure of superiority for community detection algorithms^{34,43}. This is in agreement with previous work comparing clustering with different datasets and similar settings^{21}.
Interestingly, the number of modules found by the quantum device was consistently smaller despite reaching higher modularity. We might argue that LCDA overestimated the number of clusters, resulting in fewer edges between nodes within a given community. Were this to occur, the modularity index would decrease, since the number of edges expected by chance, as quantified in Eq. (5), remains unaltered. Furthermore, in the two brain graphs tested, the kth eigengap corresponding to the assignment of k clusters was higher (Fig. 3b and c), which might be indicative of the significance of the obtained partition. Nonetheless, the lack of groundtruth for brain cases represents a limitation. We chose to compare QA to LCDA because the latter is considered as the stateoftheart method despite being developed more than 10 years ago. However, alternative algorithms have recently been proposed that seem to show significant potential (see for example traversalbased methods^{44} or variations of LCDA^{43,45}). Those address issues such as computational speed, detection of small communities compared to the average communities in the network and robustness to different initializations.
A puzzling question arises when trying to understand why QA finds higher modularity indices. To this end, we note that by enforcing both QA and LCDA to find 2 communities in the Karate club graph, the results were identical. We may hypothesize that the energetic landscape to explore in these limited conditions is simple, hence both algorithms successfully find the unique isolated minimum (e.g., minimum of a parabolic function). However, the unsupervised problem (i.e., not imposing a fixed number of communities) or the presence of large networks may add significant complexity^{46}. Crucially, QA does not travel through the exact shape of the landscape^{23} hence providing a possible bypass to this issue (Fig. 1a).
Compared to previous studies based on the binary subdivision of hierarchical clustering^{21,47}, our approach can handle odd numbers of clusters and settings where the value k is not a power of 2. Moreover, it is worth mentioning that the quantum results are stable even considering potential hardware problems known in this type of devices^{48}, indeed we found a close to zero standard deviation repeating the experiments 100 times.
In our experiments with brain connectomes, we used two different types of brain connectome (both structural and functional) to test our algorithm by investigating differences. Interestingly, in both cases, the quantum algorithm obtained higher modularity. In this study, we avoided investigating the clinical outcomes related to clustering either structural or functional brain connectomes, as this is beyond the focus of this paper. Nevertheless, the brain communities obtained on the quantum device significantly resembled the conventional subdivision of brain structures.
Connectivitybased approaches tend to generally find at least 6 minimal clusters^{49}. As we also found, one cluster is generally represented by the visual system (occipital cluster). In fact, even at coarse scale (4–6 clusters), the visual system generally represented a separate community from the somatosensory system and others^{50}. Somatomotor communities usually remains connected. As in our results, there is a cluster spanning several midlines (medial prefrontal cortex and posterior cingulate cortex), defining the socalled default mode network: A popular network involved in wakeful rest, daydreaming and mindwandering^{51}. This division was present in both the structural and functional atlasbased connectomes of our experiments.
A concerning limitation of the proposed approach was the computational time. We noticed that the quantum annealer took a considerably larger amount of time than its classical counterpart. The speed was not dependent on the communication between the client and the quantum computer, but we believe it was related to the current configuration of the qubits and the solver. Successfully performing QA in system of qubits relies on smooth, adiabatic transitions (i.e., quantum tunneling) between the ground states of two energetic landscapes (see Eq. (11)). Eventually, these transitions govern the computational complexity and time^{52}. Several factors can influence this complexity, including the number of nodes in a graph. However, solutions found through QA were more stable than expected, with not much noise and even achieving higher scores. Physical limitations on the DWave platforms currently in use include finite precision, sparse connectivity, and a finite amount of qubits which are connected in a Chimera graph. It can be hypothetized that having more qubits during computation and increased connectivity will improve the performance of this technique. In our approach, the community detection problem for the Zachary graph problem has been solved by using a more elegant solution than in the paper^{21}. In that approach, a challenging aspect was also given splitting the graph into pieces supported by the combined effect of qbsolv^{53} and the annealing process.
Another group of quantum optimization techniques employ a quantum version of a network model from the early 1980s commonly used to model associative memory^{54}. This approach differs from ours in that the optimization problem is encoded in a Hopfield network instead of an Isinglike system^{55,56}. In practice, the resulting Hopfield encoding can be optimized by any available procedure including but not limited to QA^{57} and have, in fact, already been implemented on actual quantum processing units^{58}. Successful applications of this approach include image restoration^{59}, patternrecalling^{60} and recognition of genetic sequences^{56}. As far as we know, nonetheless, its application to community detection problems remains unexplored. New optimization strategies such as the Hopfield network encoding and the usage of alternative quantum processing units deserve further study^{58,61}. Moreover, in future studies we will expand individual analysis of brain connectomes to multilayer connectomes^{14} and to common eigenspaces of networks from population studies^{9}.
Conclusion
In this article, we rigorously described how sampling spinlike variables can be used to find communities that yield high modularity organizations in networks. We have explored the potential of quantum computing for brain community detection, utilizing a quantum annealer to tackle an NP hard optimization problem. The analysis show that the quantum computer is capable of rendering a highly efficient community structure with a modularity superior to classical computing. One of the most noteworthy results from applying this QA process is that the community structure is obtained “all at once” in the technique within the annealing period and we can compute any number of clusters in contrast with previous approaches which could compute only power of 2 number of clusters.
References
Bassett, D. S. & Sporns, O. Network neuroscience. Nat. Neurosci. 20, 353–364 (2017).
Newman, M. E. Modularity and community structure in networks. Proc. Natl. Acad. Sci. 103, 8577–8582 (2006).
Sporns, O. Networks of the Brain (MIT press, Uk, 2016).
Porter, M. A. et al. Communities in networks. Not. AMS 56, 1082–1097 (2009).
Puxeddu, M. G., Petti, M. & Astolfi, L. A comprehensive analysis of multilayer community detection algorithms for application to eegbased brain networks. Front. Syst. Neurosci. 15, 624183 (2021).
Fox, M. D. & Greicius, M. Clinical applications of resting state functional connectivity. Front. Syst. Neurosci. 2010, 19 (2010).
Jeurissen, B., Descoteaux, M., Mori, S. & Leemans, A. Diffusion mri fiber tractography of the brain. NMR Biomed. 32, 56 (2019).
Oh, S. W. et al. A mesoscale connectome of the mouse brain. Nature 508, 207–214 (2014).
Crimi, A., Dodero, L., Sambataro, F., Murino, V. & Sona, D. Structurally constrained effective brain connectivity. Neuroimage 239, 118288 (2021).
Etkin, A. Addressing the causality gap in human psychiatric neuroscience. JAMA Psychiat. 75, 3–4 (2018).
Deco, G., Tononi, G., Boly, M. & Kringelbach, M. L. Rethinking segregation and integration: Contributions of wholebrain modelling. Nat. Rev. Neurosci. 16, 430–439 (2015).
Blondel, V. D., Guillaume, J.L., Lambiotte, R. & Lefebvre, E. Fast unfolding of communities in large networks. J. Stat. Mech: Theory Exp. 2008, P10008 (2008).
Sporns, O. Structure and function of complex brain networks. Dialog. Clin. Neurosci. 2013, 558 (2013).
Mucha, P. J., Richardson, T., Macon, K., Porter, M. A. & Onnela, J.P. Community structure in timedependent, multiscale, and multiplex networks. Science 328, 876–878 (2010).
SanchezRodriguez, L. M., IturriaMedina, Y., Mouches, P. & Sotero, R. C. Detecting brain network communities: Considering the role of information flow and its different temporal scales. Neuroimage 225, 117431 (2021).
Chakraborty, T., Cui, Z. & Park, N. Metadata vs. groundtruth: A myth behind the evolution of community detection methods. In Companion Proceedings of the The Web Conference 2018 45–46 (2018).
Brodmann, K. Vergleichende Lokalisationslehre der Grosshirnrinde in ihren Prinzipien dargestellt auf Grund des Zellenbaues (Barth, 1909).
Pessoa, L. The Entangled Brain: How Perception, Cognition, and Emotion are Woven Together (MIT Press, Uk, 2022).
Good, B. H., De Montjoye, Y.A. & Clauset, A. Performance of modularity maximization in practical contexts. Phys. Rev. E 81, 046106 (2010).
Johnson, M. W. et al. Quantum annealing with manufactured spins. Nature 473, 194–198 (2011).
UshijimaMwesigwa, H., Negre, C. F. & Mniszewski, S. M. Graph partitioning using quantum annealing on the Dwave system. ACM Proc. SC 22, 22–29 (2017).
Guimera, R., SalesPardo, M. & Amaral, L. A. N. Modularity from fluctuations in random graphs and complex networks. Phys. Rev. E 70, 025101 (2004).
Farhi, E. et al. A quantum adiabatic evolution algorithm applied to random instances of an npcomplete problem. Science 292, 472–475 (2001).
Rajak, A., Suzuki, S., Dutta, A. & Chakrabarti, B. K. Quantum annealing: An overview. Phil. Trans. R. Soc. A 381, 20210417 (2023).
Akbar, S. & Saritha, S. K. Towards quantum computing based community detection. Comput. Sci. Rev. 38, 100313 (2020).
Akbar, S. & Saritha, S. K. Quantum inspired community detection for analysis of biodiversity change driven by landuse conversion and climate change. Sci. Rep. 11, 1–13 (2021).
Newman, M. E. & Girvan, M. Finding and evaluating community structure in networks. Phys. Rev. E 69, 026113 (2004).
Reichardt, J. & Bornholdt, S. Statistical mechanics of community detection. Phys. Rev. E 74, 016110 (2006).
Newman, M. E. Equivalence between modularity optimization and maximum likelihood methods for community detection. Phys. Rev. E 94, 052315 (2016).
DQM Dwave description (accessed 22 Dec 2022); https://docs.ocean.dwavesys.com/en/stable/concepts/dqm.html (2022).
Hagberg, A., Swart, P. & S Chult, D. Exploring network structure, dynamics, and function using networkx. Tech. Rep., Los Alamos National Lab.(LANL), Los Alamos, NM (United States) (2008).
Negre, C. F. A., UshijimaMwesigwa, H. & Mniszewski, S. M. Detecting multiple communities using quantum annealing on the dwave system. PLoS ONE 15, e0227538–e0227538 (2020).
Shaydulin, R., UshijimaMwesigwa, H., Safro, I., Mniszewski, S. & Alexeev, Y. Network community detection on small quantum computers. Adv. Quant. Technol. 2, 1900029 (2019).
Duch, J. & Arenas, A. Community detection in complex networks using extremal optimization. Phys. Rev. E 72, 027104 (2005).
Zachary, W. W. An information flow model for conflict and fission in small groups. J. Anthropol. Res. 33, 452–473 (1977).
Xia, M., Wang, J. & He, Y. BrainNet viewer: A network visualization tool for human brain connectomics. PLoS ONE 8, e68910. https://doi.org/10.1371/journal.pone.0068910 (2013).
Perry, M. B. On the detection of transitive clusters in undirected networks. J. Appl. Stat. 46, 364–384 (2019).
TzourioMazoyer, N. et al. Automated anatomical labeling of activations in spm using a macroscopic anatomical parcellation of the mni mri singlesubject brain. Neuroimage 15, 273–289 (2002).
Hagberg, A. & Conway, D. Networkx: Network analysis with python. https://networkx.github.io (2020).
Damoiseaux, J. S. et al. Consistent restingstate networks across healthy subjects. Proc. Natl. Acad. Sci. 103, 13848–13853 (2006).
Rasero, J., Diez, I., Cortes, J. M., Marinazzo, D. & Stramaglia, S. Connectome sorting by consensus clustering increases separability in group neuroimaging studies. Netw. Neurosci. 3, 325–343 (2019).
Yu, M., Sporns, O. & Saykin, A. J. The human connectome in alzheimer diseaserelationship to biomarkers and genetics. Nat. Rev. Neurol. 17, 545–563 (2021).
Traag, V. A., Waltman, L. & Van Eck, N. J. From louvain to leiden: Guaranteeing wellconnected communities. Sci. Rep. 9, 5233 (2019).
Basuchowdhuri, P. et al. Fast detection of community structures using graph traversal in social networks. Knowl. Inf. Syst. 59, 1–31 (2019).
Zhang, J., Fei, J., Song, X. & Feng, J. An improved louvain algorithm for community detection. Math. Probl. Eng. 2021, 1–14 (2021).
Lee, C. & Cunningham, P. Community detection: Effective evaluation on large social networks. J. Compl. Netw. 2, 19–37 (2014).
Zahedinejad, E., Crawford, D., Adolphs, C. & Oberoi, J. S. Multicommunity detection in signed graphs using quantum hardware. arXiv:1901.04873 (2019).
Zaborniak, T. & de Sousa, R. Benchmarking hamiltonian noise in the dwave quantum annealer. IEEE Trans. Quant. Eng. 2, 1–6 (2021).
Akiki, T. J. & Abdallah, C. G. Determining the hierarchical architecture of the human brain using subjectlevel clustering of functional networks. Sci. Rep. 9, 1–15 (2019).
Felleman, D. & Van Essen, D. Distributed hierarchical processing in the primate cerebral cortex. Cereb. Cortex 1, 1–47 (1991).
Anticevic, A. et al. The role of default network deactivation in cognition and disease. Trends Cogn. Sci. 16, 584–592 (2012).
Lucas, A. Ising formulations of many np problems. Front. Phys. 5, 89 (2014).
Booth, M. et al. Qci qbsolv delivers strong classical performance for quantumready formulation. arXiv:2005.11294 (2020).
Hopfield, J. J. Neural networks and physical systems with emergent collective computational abilities. Proc. Natl. Acad. Sci. 79, 2554–2558 (1982).
Cheng, K.S., Lin, J.S. & Mao, C.W. The application of competitive hopfield neural network to medical image segmentation. IEEE Trans. Med. Imaging 15, 560–567 (1996).
Rebentrost, P., Bromley, T. R., Weedbrook, C. & Lloyd, S. Quantum hopfield neural network. Phys. Rev. A 98, 042308 (2018).
Cai, F. et al. Powerefficient combinatorial optimization using intrinsic noise in memristor hopfield neural networks. Nature Electron. 3, 409–418 (2020).
Miller, N. E. & Mukhopadhyay, S. A quantum hopfield associative memory implemented on an actual quantum processor. Sci. Rep. 11, 23391 (2021).
Inoue, J.I. Application of the quantum spin glass theory to image restoration. Phys. Rev. E 63, 046114 (2001).
Inoue, J.I. Patternrecalling processes in quantum hopfield networks far from saturation. In Journal of Physics: Conference Series, vol. 297 012012 (IOP Publishing, 2011).
Nembrini, R., Carugno, C., Ferrari Dacrema, M. & Cremonesi, P. Towards recommender systems with community detection and quantum computing. In Proceedings of the 16th ACM Conference on Recommender Systems 579–585 (2022).
Acknowledgements
This research is supported by the European Union’s Horizon 2020 research and innovation programme under grant agreement Sano no 857533, and by the International Research Agendas programme of the Foundation for Polish Science, cofinanced by the European Union under the European Regional Development Fund. This research was tested on DWave quantum computing.
Author information
Authors and Affiliations
Contributions
M.W.: visualization, investigation, formal analysis, writing—original draft. J.F.R.: investigation, formal analysis, writing. A.C.: visualization, formal analysis, investigation, writing.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Wierzbiński, M., FalcóRoget, J. & Crimi, A. Community detection in brain connectomes with hybrid quantum computing. Sci Rep 13, 3446 (2023). https://doi.org/10.1038/s4159802330579y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s4159802330579y
This article is cited by

Investigating the relationship between CSAT scores and prefrontal fNIRS signals during cognitive tasks using a quantum annealing algorithm
Scientific Reports (2024)

A depthfirst search approach to detect the community structure of weighted networks using the neighbourhood proximity measure
International Journal of Data Science and Analytics (2024)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.