Quantum Computing in Community Detection for Anti-Fraud Applications Authors: Yanbo (Justin) Wang, Xuan Yang, Chao Ju, Yue Zhang, Jun Zhang, Qi Xu, Yiduo Wang, Xinkai Gao, Xiaofeng Cao, Yin Ma, Jie Wu Published: 2024 ABSTRACT Fraud detection within transaction data is crucial for maintaining financial security, especially in the era of big data. This paper introduces a novel fraud detection method that utilizes quantum computing to implement community detection in transaction networks. We model transaction data as an undirected graph, where nodes represent accounts and edges indicate transactions between them. A modularity function is defined to measure the community structure of the graph. By optimizing this function through the Quadratic Unconstrained Binary Optimization (QUBO) model, we identify the optimal community structure, which is then used to assess the fraud risk within each community. Using a Coherent Ising Machine (CIM) to solve the QUBO model, we successfully divide 308 nodes into four communities. We find that the CIM computes faster than the classical Louvain and simulated annealing (SA) algorithms. Moreover, the CIM achieves better community structure than Louvain and SA as quantified by the modularity function. The structure also unambiguously identifies a high-risk community, which contains almost 70% of all the fraudulent accounts, demonstrating the practical utility of the method for banks’ anti-fraud business. 1. Introduction 1.1. Quantum Computing for Anti-Fraud Applications In modern society, fraud has become a serious threat to the financial security of individuals and businesses, resulting in billions of dollars of financial losses worldwide every year. This not only causes economic losses to the victims but also has an immeasurable impact on the social credit system. Among all sectors, the financial industry, due to its concentration of funds, has become a major target for fraudulent activities. Effective anti-fraud measures call for not only efficient algorithms for uncovering the hidden organizations among the crime units but also rapid implementation of the algorithms enabled by sufficient computational resources. The application of quantum computing in community detection algorithms is ideal for fulfilling this requirement. Quantum computing (QC) is a rapidly growing research field that promises a novel paradigm to solve challenging computational problems. It was first introduced in the early 1980s by physicist Paul Benioff [1,2] and independently by Feynman [3]. Quantum computers utilize quantum bits (qubits) as the fundamental units of information storage [4], which can exist in superposition states of both |1〉 and |0〉, enabling them to hold exponentially more information compared to traditional computers. It has been argued that quantum computers could offer advantages in addressing specific problems such as NP-hard combinatorial optimization, often described as the superiority of quantum computing. There are many different paradigms and hardware implementations that can be used to build quantum computers. The two leading paradigms are gate-based QC [5] and adiabatic quantum computation (AQC) [6]. However, gate-based QC requires stringent environment control and sophisticated error correction, while AQC faces the main obstacle of improving the connection density between qubits, which will affect the efficiency of problem solving [7]. Recently, there have been some applications of quantum computing in fraud detection, mainly focusing on quantum algorithms. For example, Schuman et al. explored the use of Quantum Boltzmann Machines for unsupervised anomaly detection in fraud scenarios [8]. Bikku et al. [9] proposed a novel Quantum Neural Network (QNN) model that originated from the principles of the social learning theory to detect fraudulent reviews. Innan et al. presented a novel approach employing Quantum Graph Neural Networks (QGNNs) for financial fraud detection [10]. A comprehensive study examining the application of quantum algorithms to combat financial crimes was provided by Weinberg et al. [11]. Despite these latest advances in algorithms, no one has addressed the hardware challenges in applying quantum computing to fraud detection. A Coherent Ising Machine (CIM) is a quantum computer developed according to optical parametric oscillation and spontaneous symmetry breaking principle [12,13,14,15,16,17,18] which can work at room temperature and solve large-scale problems, such as compression sensor problems [19] and polyhedron problems [20]. CIM searches for the ground state energy of an Ising model by using the phases of laser pulses to represent the spin directions of spins in the Ising model. The resulting phase configuration corresponds to the optimal solution of the problem equivalent to the Ising model. CIM has been used to solve optimization problems in various industrial sectors [21,22,23] and academic disciplines [24]. Current CIM research focuses on optimizing measurement feedback, pump rate and quantum state squeezing to improve the time-to-solution and success rate of solutions. This study focuses on fraud detection in commercial banks and aims to construct a graph network structure. It seeks to employ community detection techniques implemented by CIM to effectively identify groups of accounts exhibiting fraudulent behavior so as to provide robust support for subsequent business decisions regarding the fraud risk of accounts within these communities. 1.2. Community Detection Algorithms While AI-based supervised fraud detection methods abound, there are also many unsupervised techniques for detecting fraud. One such approach is clustering, which helps identify similarities among data samples and can reveal potential fraud features. In this context, we will focus on another unsupervised approach—community detection—which uncovers hidden community structures within a network for fraud detection. Community detection is a fundamental task in network analysis aimed at uncovering the underlying structure of networks by identifying groups of nodes, known as communities, that are more densely connected internally than with the rest of the network. Over the years, numerous algorithms have been developed to tackle this problem, each with its strengths and limitations, reflecting the diverse nature of networks and the varying objectives of community detection. One of the most widely used algorithms is the Louvain algorithm, which operates by optimizing modularity—a measure that quantifies the density of connections within communities relative to connections between communities. The Louvain method is particularly valued for its efficiency and scalability, making it suitable for large networks. However, although efficient, it has some notable drawbacks. For example, it is sensitive to initial conditions, such as the starting partition of the network, which leads to variability in the detected communities. Moreover, it is heuristic-based, meaning it may yield different results on different runs, even with the same input data, because the algorithm’s outcome can depend on the order in which nodes are processed. The QUBO (Quadratic Unconstrained Binary Optimization) model for maximizing modularity can be considered another approach to community detection. In this context, the QUBO model is used to formulate the problem of modularity maximization as an optimization problem, where each binary variable indicates whether a node belongs to a particular community. The objective function is then formulated in such a way that its maximization corresponds to maximizing modularity. The QUBO model is flexible and can be adapted to different forms of modularity and constraints, allowing for customization based on specific requirements. Various optimization techniques can be employed to solve the QUBO model, such as simulated annealing (SA). In particular, the QUBO formulation is particularly well suited for quantum computing approaches, which can explore large solution spaces efficiently. In this paper, we solve the QUBO model by finding the ground state of its corresponding Ising model using Coherent Ising Machine (CIM). 1.3. The QUBO Model for Community Detection Modularity is a measure to evaluate the quality of community division within a network. Modularity can be interpreted as the degree to which the connections within a community are more organized than those between communities. If the connections within a community are significantly more numerous than those between communities, the modularity value will be relatively high (ref. Figure 1 below). Therefore, the problem of community detection can be transformed into a problem of maximizing modularity in a network. 1.4. The Numerical Simulation To define the modularity function, first consider the adjacency matrix Avw where the element Avw=1 indicates a connection between node v and node w; otherwise, Avw=0. Let the sum of all elements in Avw be m, which represents the total number of edges (i.e., m=∑Avw/2). The basic idea behind modularity-based community detection is to maximize the number of edges within a community while minimizing the number of edges between communities. One assumes the network is divided into several communities and Cv represents the community to which node v belongs. δ(Cv,Cw)=1 if Cv=Cw (i.e., node v and node w are in the same community) and δ(Cv,Cw)=0 otherwise. Then, the modularity function M is defined as follows:(1)M=12m∑v,wAvw−kvkw2mδ(Cv,Cw) Here, the first term, Avw, represents the actual number of edges between nodes v and w. The term kv is defined as the degree of the node, which is the number of edges connected to v:(2)kv=∑wAvw Therefore, kvkw/2m is the expected number of edges between nodes v and w in a randomly connected network. The difference Avw−kvkw2m reflects the deviation of the actual network from a random network. Thus, the modularity function M quantifies the extent to which the actual network structure is more modular (i.e., has more edges within communities) compared to a random network. In summary, modularity M can be used to determine the degree of community organization in a network. To formulate the problem of maximizing modularity as a Quadratic Unconstrained Binary Optimization (QUBO) model, a binary decision variable xvc is defined, where xvc=1 indicates that node v is assigned to community c; otherwise, it is 0. The modularity function M can then be expressed as (3)M=12m∑v,w,cAvw−kvkw2mxvcxwc Our goal is to maximize the modularity M. Since each node can only belong to one community, there is a constraint for any node. That is, (4)∑cxvc=1 Combining the above objective and constraint linearly, we arrive at the following QUBO formulation:(5)minx−12m∑c∑v∑wAvw−kvkw2mxvcxwc+P∑v∑cxvc−12 where P represents the penalty for violating the constraint, which is set to be sufficiently large to ensure the fulfillment of the constraint yet not too large to adversely affect the optimization of the objective. Note that the number of binary variables or qubits required equals the number of nodes multiplied by the number of communities. Note that if there are only two communities, the above QUBO model can be simplified to the following form without constraint terms:(6)minx−12m∑v∑wAvw−kvkw2mxvxw+(1−xv)(1−xw) In this case, the number of binary variables or qubits needed is equal to the number of nodes instead of being twice the number of nodes. 1.5. The Equivalence Between the QUBO and Ising Models A QUBO problem looks for a binary vector x=(x1,x2,…,xn)T, where xi∈{0,1}, to minimize the following objective function:(7)f(x)=xTQx where Q is a symmetric matrix of size n×n and xT is the transpose of x. An Ising model is a physical model used to describe magnetic materials. It defines the energy of a set of spin variables s=(s1,s2,…,sn), where si∈{−1,+1}. The energy function of their Ising model is expressed as follows:(8)E(s)=−∑i10% vs. 1% for Louvain and 0% for SA). Additionally, the resulting community structure holds substantial business value, particularly in the clear identification of high-risk communities and its coverage of fraudulent accounts (≈70%). It highlights the great potential of quantum computing in solving complex real-world problems, especially in the financial sector. This study also expands the application of the Ising machine, extending its use beyond federated learning [25], incremental learning [26] and quantum annealing [27]. These AI-based methods, once implemented by the CIM, could lead to more applications of quantum computing for fraud detection in the future.