Detecting local communities in complex network via the optimization of interaction relationship between node and community

The goal of local community detection algorithms is to explore the optimal community with a reference to a given node. Such algorithms typically include two primary processes: seed selection and community expansion. This study develops and tests a novel local community detection algorithm called OIRLCD that is based on the optimization of interaction relationships between nodes and the community. First, we introduce an improved seed selection method to solve the seed deviation problem. Second, this study uses a series of similarity indices to measure the interaction relationship between nodes and community. Third, this study uses a series of algorithms based on different similarity indices, and designs experiments to reveal the role of the similarity index in algorithms based on relationship optimization. The proposed algorithm was compared with five existing local community algorithms in both real-world networks and artificial networks. Experimental results show that the optimization of interaction relationship algorithms based on node similarity can detect communities accurately and efficiently. In addition, a good similarity index can highlight the advantages of the proposed algorithm based on interaction optimization.


INTRODUCTION
Currently, the development of information technology has to the emergence of various complex networks, enriching application scenarios such as activist groups, schoolmate discovery, protein function identification and e-commence recommendation (Fang et al., 2020). Identifying the structure of communities is one of the most important fields in the research of complex networks and has attracted the attention of many researchers to participate (Mittal & Bhatia, 2020). In today's world, there exists various community structures, which consist of different types of entities, called nodes, and the connections between these entities are known as links (Pizzuti, 2018). Nodes within the same community are closely connected, while nodes between different communities are sparsely connected (Garza & Schaeffer, 2019).
In recent years, researchers have paid more attention to the study of community detection. The detection of community structure can help discover various groups in society, which in turn help people solve real-world problems. Local community detection aims to detect communities using only local topological information of nodes. This approach has a lower time complexity and is more convenient for accessing to information in complex networks than the approaches using global topological information.
Local community detection algorithms typically use a node as a seed and expand from this seed to identify a community based on optimizing a quality function (Kanawati, 2015;Zhang et al., 2015;Peng & Jing, 2016;Liakos, Ntoulas & Delis, 2016;Zhu, Chen & Zeng, 2020). The seed selection process and community expansion processes play critical roles in local community detection algorithms, and they have a significantly impact on the quality of resulting communities. Unfortunately, there are still problems that hinder the development of research in local community detection in terms of these two areas. First, the quality of the resulting communities detected by algorithms heavily depends on the seed node selected at the beginning, which is known as the seed dependence problem (Ding, Zhang & Yang, 2018). Second, some algorithms (Ding, Zhang & Yang, 2018;Lee et al., 2010;Li, Wang & Cui, 2014;Cheng et al., 2020;Luo et al., 2017;Ni et al., 2020;Malliaros & Vazirgiannis, 2013) search for alternative seed nodes that are more suitable for community expansion than the given node. However, the alternative seed node and the given node are not always in the same community, resulting in what is called the seed deviation problem. Third, the structural characteristics of resulting communities detected by algorithms are limited by the quality function, which is known as the quality function limitation problem (Ding, Zhang & Yang, 2020).
To address the first and second problems, this study presents an improved seed selection method called SSCS based on node centrality and node similarity. This novel seed selection method identifies the most similar neighbor node of a given node, which has higher node centrality than the given node, and takes this node as the alternative seed of the given node. This process is repeated iteratively until there are no neighbors that meet the above two conditions, and the final result is taken as the seed. To address the third problem, this study uses a novel local community detection algorithm called OIRLCD. It optimizes the interaction relationships between nodes and communities, also known as the interaction relationship, by deprecating the quality function. We introduced a series of similarity indices to measure the interaction relationship between nodes and communities and expanded communities by adding the node with the most important interaction relationship to the community.
The primary contributions of this article can be summarized as follows.
To address the seed dependence and deviation problems, this study develops an improved seed selection method based on node centrality and node similarity. The method identifies the core node of the community that the given node locates as the alternative seed. First, this method first compares the similarity between the target node and its neighbors, and then compares the node centrality between the target node and its neighbors. This process ensures that the alternative seed and the target node are in the same community as much as possible.
To measure the interaction relationship, this study uses a series of node similarity indices based on the local topological information of nodes. We also investigated the role of the similarity index in local community detection algorithms based on interaction relationships. To this end, we designed a series of similarity indices with various amounts of local topological information of nodes. We compared these indices with the other three basic similarity indices and the three latest similarity indices respectively under the same framework.
To avoid the quality function limitation problem, this study proposes a novel local community detection algorithm based on the optimization of interaction relationships, which leverages the seed selection method and community expansion method earlier.
We compared the proposed algorithm with different similarity indices on three groups of artificial networks and six real-world networks. Experimental results show that the proposed seed selection method can improve the accuracy of the algorithm; the proposed algorithm outperforms six existing community detection algorithms; and a good similarity index can highlight the advantages of algorithms based on interaction optimization.
The remainder of this article is outlined as follows. Related research of seed selection methods, community expansion and similarity indices are described in the "Related Works". "Motivations and Basic Definitions" presents the definitions related to this study and the detailed procedures of the proposed algorithm. "Experiments and Analysis" expounds on the experimental process and results in detail, and the results are analyzed. Finally, in "Conclusion", we concluded this study and outlook for the future research.

RELATED WORKS
The seed selection process and community expansion process are two critical steps in the local community detection algorithms. A good seed selection method can lead to highquality seeds, which improves algorithms accuracy and efficiency. A good community expansion method can efficiently identify node membership, generating the resulting community quickly and correctly. A good similarity index can accurately measure the relationships between two nodes, or between nodes and communities within low time complexity. This section introduces the latest methods related to the seed selection method and the community expansion method and similarity indices and shows their characteristics.

Seed selection
The goal of the seed selection method is to identify the core node of the community where the target node is located, which can improve the quality of the initial community (Wang et al., 2016). To obtain high-quality seeds as the initial community for expansion, a variety of seed selection methods, had been proposed by scholars. Lancichinetti, Fortunato & Kertész (2009) used a random selection method which is the simplest and most time-saving method to select nodes as seeds. However, the random selection method will make the algorithm unstable, which results in uncontrollable results. Similarly, Baumes et al. (2005) also used a random selection method, but instead of selecting random nodes, they replaced random edges as seeds. However, searching for random edges as seeds will generate many duplicate communities, which will lead to an increase in the algortithm's time complexity of the algorithm and thus require a lot of computation time. Lee et al. (2010) explored kclique, which is a complete subgraph with k vertices, of the target node as seeds. Based on the seed selection method, Lee et al. (2010) proposed a Greed Clique Expansion (GCE) algorithm. Furthermore, Li, Wang & Cui (2014) took maximum cliques as the seed, searched using depth and breadth search methods, and merged different communities into a larger sub-graph according to the given rules. To eliminate the influence of the seed quality on the local community detection algorithm, Ding, Zhang & Yang (2018) proposed a core member searching method that iteratively replaces the initial node with the candidate seed that has greater local influence and is most similar to the given node. Cheng et al. (2020) ranked nodes of networks according to the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS), and the node with the highest score was used as the seed. Ni et al. (2020) took with the NGC node (Luo et al., 2017), the nearest node with the greater centrality, and selected nodes with greater fuzzy relationships among their NGC nodes are considered to be the seeds.

Community expansion
The goal of the community expansion is to expand the initial community into the resulting community through an expansion mechanism. The commonly used expansion mechanisms are the quality function (Kanawati, 2015;Zhang et al., 2015;Peng & Jing, 2016;Liakos, Ntoulas & Delis, 2016;Zhu, Chen & Zeng, 2020) and influence spreading (Kloster & Gleich, 2014;Hu, Yang & Wong, 2016;He et al., 2015;Yao et al., 2016;You, Ma & Liu, 2020). The quality function is a measure of the quality of community division results derived from the definition of community structure. Newman & Girvan (2004) proposed modularity as the quality of the community for measuring the community quality. According to the definition of modularity, high-quality communities should have a tight internal structure and loose external links between communities. Guo et al. (2022) proposed an improved algorithm that takes the which take local modularity density as the quality function.
The influence spreading method expands the community by calculating the influence of nodes and spreading these influences throughout the network. Raghavan, Albert & Kumara (2007) proposed the Label Propagation algorithm (LPA) based on an epidemic spreading model. LPA assigns each node of the network a unique label and spreads these labels over the entire network.  proposed a novel similarity measure based on a two-level neighborhood (TNS). Using TNS as a basis, they also proposed an improved LPA algorithm.

Similarity index
Nodes within the same community exhibit high similarity, whereas those between communities are not typically similar (Malliaros & Vazirgiannis, 2013). Therefore, similarity index can also measure the memberships between nodes and communities. Ding, Zhang & Yang (2020) proposed the local expansion and boundary rechecking (LEBR) algorithm, which optimized the membership between nodes and communities to expand communities, rather than optimizing the quality function. Ding, Zhang & Yang (2020) demonstrated that LEBR is highly effective at detect communities with diverse structures; thus, the limitation problem caused by the quality function is avoided. Table 1 displays commonly used node similarity indices.
In recent years, scholars have proposed various node similarity indices, leading to progress in node similarity calculation accuracy. The similarity indices related to this article are as follows. Zhang, Ding & Yang (2019) reported that the similarity between two adjacent nodes increases as their k-core value grows larger. To distinguish between external and internal nodes of the community, they introduced the concept of local k-core value in their algorithm. Furthermore, the contribution of two adjacent nodes to their similarity should be different. The core similarity (CS) between two nodes is defined as follows.
where K Nðv i Þ\Nðv j Þ ðv i Þ is the local k-core value of node v i in the interaction of neighborhood of v i and v j , K V ðv i Þ is the k-core value of node v i in the whole network. Inspired by the RA index and local path (LP) similarity index (Zhou, Lü & Zhang, 2009), Xu, Guo & Yang (2020) proposed a novel similarity index based on a two-level neighborhood of nodes. RA makes full use of the topological information of nodes to improve the accuracy of similarity between nodes. LP similarity index and the two-level neighborhood similarity (TNS) index are defined as follows.
where S denotes the similarity matrix, A denotes the node adjacent matrix and a denotes the free parameter.

Similarity index name
Definition Formula References

Jaccard index
The ratio of the intersection of two nodes' neighbors to the union of two node`s neighbors.

Salton index
The ratio of the intersection of two nodes' neighbors to the radical sign of the product of the number of two nodes′ neighbors.
The sum of the reciprocal of degrees of all nodes within the intersection of two node neighbors. The size of intersection of two node neighbors. Liu et al. (2022) introduced a node similarity index named CN, which combines the common neighbors and degree of node. CN is defined as follows.

MOTIVATIONS AND BASIC DEFINITIONS Motivation
As described in "Related Works", researches in the field of seed selection methods, community expansion methods and similarity indices have made a lot of progress. However, there are still problems with the implementation of local community detection algorithms, which prevent accurate results from being obtained.
In the realm of community detection algorithms, one of the most significant challenges is the seed dependence problem. Essentially, the quality of the given node determines the accuracy of the resulting community partition. To address this issue, Ding, Zhang & Yang (2018) proposed a seed selection method called SSSC that effectively solves the seed dependence problem. This problem arises when the accuracy of the community detection algorithm depending heavily on the quality of the given seed. Specifically, the method involves comparing the centrality between the alternative seed and the given node, and then comparing the similarity between these two nodes with the maximum similarity obtained before. However, this method is correct only when the alternative seed and the given node are in the same community. In cases where the alternative seed and the given node are not in the same community, but the alternative seed has the greatest centrality and greater similarity with the given node, SSSC will still consider this node as the alternative seed of the given node. This leads to incorrect results, which we refer to as the seed deviation problem. As such, further research is required to address this issue and improve the accuracy of community detection algorithms.
Secondly, a local community detection algorithm typically optimize only one type of quality function during the process of community expansion. While this approach my yield satisfactory results for certain types of networks, it can lead to less efficient performance when dealing with other types of networks. In particular, a quality function that describes a community with only one structural feature may not be sufficient for more complex networks (Ding, Zhang & Yang, 2020). As a result, community detection algorithms may face the quality function limitation problem. As such, further research is required to address this issue and improve the accuracy of community detection.
To solve the problems of seed dependence and seed deviation, we propose an improve seed selection method that first considers similarity first. This ensures that the alternative seed and the given node are in the same community. We then calculate the node centrality. We consider the problem with a simple example in Fig. 1. As shown in Fig. 1, the similarity between v 3 and v 1 is lower than that between v 2 and v 1 , but v 3 has a greater node centrality (9) than v 2 , which has a centrality of (6). In this condition, SSSC considers v 3 as the alternative seed of v 1 under this condition. However, since v 2 is more similar to v 1 than v 3 is. Additionally, v 3, and v 1 are in the same community. Therefore, v 2 is actually the alternative seed of v 1 .
To mitigate the quality function limitations problem, a novel local community detection algorithm based on the optimization of the interaction relationships is proposed, which deprecates the quality function. The proposed motivation is to develop with precision similarity indices that can accurately calculate the interaction relationship. To achieve higher precision in measuring node similarity than existing measures, this study gradually obtains more neighbourhood information gradually.

Problem definition
This study focuses on a graph called G ¼ ðV; EÞ. The node set composed of all nodes in the graph is represented by V. The link set composed of all links between these nodes is represented by E, and A is a two-dimensional array called adjacent matrix that records whether two nodes are connected. A ij ¼ 1 denotes that there is a link between node i and node j that is connected; otherwise, A ij ¼ 0.
The given node denotes an initial node given in local community detection algorithms. A community C denotes a collection of nodes and their connected links, where C = {v 1 , v 2 , …, v j } (C ∈ C, v i ∈ V). The initial community denotes the community composed of seed and its part of neighbors. The expending community denotes the community in expanding. The result community denotes the community detected by algorithms. This study aims to detect a community C where the given node really locates.

Basic definitions
Definition 1 (Node neighbors). The node neighbors of node v are defined as follows: where A is the adjacent matrix of graph G, and if A uv = 1, it means that there is a link Figure 1 A sample of seed selection method. v 1 is the given node with node centrality 5, v 2 is the given node with node centrality 6, v 3 is the given node with node centrality 9. Full-size  DOI: 10.7717/peerj-cs.1386/ fig-1 between node v and node u. The definition of node neighbors is a set of nodes with links connected to the node. Definition 2 (Node influential scope). The node influential scope of node v is defined as follows: where N(v) denotes node neighbors defined in Definition 1. The definition of node influential scope is a set of nodes consists of node neighbors and node itself. Definition 3 (Community neighbors). The community neighbors of community C is defined as follows: NðCÞ ¼ fuju = 2 C; NðvÞ; 9v 2 C; ðu; vÞ 2 Eg; v 2 V; fuju 2 jC; 9v 2 C; ðu; vÞ 2 Eg (7) where E denotes the set of links of network G. The definlition of community neighbors is a set of external nodes that have links connected to the members of the community. Definition 4 (Node degree). The node degree of node v is defined as follows: The definition of node degree is the number of node links. Definition 5 (Local centrality). The local centrality of node v is defined as follows: We measure node centrality by examining links within the node's influential scope defined in Definition 2. The more links there are within the scope, the greater the node's centrality.
Definition 6 (Node similarity 1). The first similarity index proposed in this article between node v i and v j is defined as follows: We measure the similarity between the neighborhood of v m and v n by analyzing the links between them. The more links there are within the two nodes' influential scope, the greater their similarity. We can describe this similarity index with the simple example shown in Fig. 2, where S1ðv 1 ; v 2 Þ ¼ 14.
Definition 7 (Node similarity 2). The second similarity index proposed in this article between node v i and v j is defined as follows: The contribution of each link within the node influential scope to the similarity of two nodes is likely not the same. Therefore, we assign weights to the links based on the degree of nodes on both sides of the link. The similarity between nodes is then calculated as the degree sum of the nodes at both ends of the link within the common influence scope.
Definition 8 (Node similarity 3). The third similarity index proposed in this article between node v i and v j is defined as follows: The contribution of each node within the node influential scope compared to the similarity of two nodes is likely not the same. Thus, Definition 7 describes the similarity index within the influence scope of these two adjacent nodes. Based on Definition 7, we multiply the number of nodes within the influence scope of each node in the common influential scope of two adjacent nodes by the similarity index, and sum all that of nodes in the scope. We can show this similarity index with the simple example in Fig. 2 Definition 9 (Node community similarity). The node community similarity between node v and community C is defined as follows: where NSðu; vÞ represents a method of node similarity calculation. We calculate the similarity between node v and community C by sum the similarity between node v and each node in community which has a link with node v.

Proposed algorithm
Algorithm 1 shows the pseudocode of OIRLCD. To facilitate readers' understanding of the proposed algorithm, we provide flowcharts of the seed selection process and community expansion process in Figs. 3 and 4, respectively. This section provides a detailed description of the proposed algorithm.
Initialization (Lines 1-4). Line 2 initializes the empty community C, which will store the final result. Based on Definition 4, Line 3 calculates the node degree of each node in node set V. Based on Definition 5, Line 4 calculates the local centrality of each node in node set V.
Seed selection (Lines 4-21). The seed selection process searches for the core node of the community where the given node is located as the alternative seed. To find the alternative seed for a given node, two requirements must be met. First, the alternative seed must have the maximum similarity to the given node to ensure that they are in the same community. Algorithm 1 The local community detection algorithm based on optimization of interaction relationship (OIRLCD) Input: Graph G ¼ , V; E . , link set E, node set V, seed node v seed , Node influence measure Inf .
Output: Community C.

Process:
1: Initialization: 2: Initialize a community C; C ¼ f; Second, the alternative seed must have the greater local centrality than the given node to ensure that the alternative seed is closer to the center of the community than the given node. As shown in Algorithm 1, Line 7 sets max_similarity as zero to store the greatest similarity value. Line 10 obtains all neighboring nodes Nðv temp Þ of v temp based on Definition 1. Line 12 calculates node similarity based on Definition 8 to ensure that all the comparison algorithms with different similarity indices should have the same seed node for community expansion. For each node in Nðv temp Þ, the process will replace the previous  alternative seed (Line 16) if it satisfies the two conditions mentioned above. Executing the program until all nodes in Nðv temp Þ are calculated (Lines 11-19). Lines 8-20 search for the alternative seed until no neighboring nodes of the current alternative seed meet the conditions. Line 20 sets the current alternative seed as the seed and sends this seed to the community expansion process. Community expansion (Lines 21-39). For community expansion, the proposed algorithm gradually adds the community neighbors that meet specific conditions. An eligible community neighbor is one whose similarity to the community is greater than its similarity to the rest of the nodes in the network. As shown in Algorithm 1, Line 23 initializes the initial community C as the influential scope of the seed. Line 24 excluded nodes which is not meeting the conditions above. Line 29 obtains all community neighbors NðC temp Þ of C temp based on Definition 3. Line 33 calculates the node community similarity NCSðv i ; CÞ based on Definition 9 between node v i and the community C. The remaining nodes of the network G are regarded as community C. Line 34 calculates the node community similarity NCSðv i ; CÞ between node v i and the community C. When NCSðv i ; CÞ > NCSðv i ; CÞ, v i should be added to the community C. Executing the program until all nodes in NðC temp Þ are calculated (Lines 31-38). Lines 27-39 execute community expansion until no community neighboring nodes of the current community C meet the conditions. Line 20 returns the current community C. Time complexity analysis

EXPERIMENTS AND ANALYSIS
The experimental environment of this study is as follows: the proposed algorithm and the comparison algorithms are programmed in JAVA; all the programs involved in this study are running in a computer with AMD Ryzen 5 5600H with Radeon Graphics 3.30 GHz and 16 GB RAM. The experiments are implemented in the proposed algorithm and seven comparison algorithms on six real-world networks and three groups of different parameters artificial networks, and the experimental results using four commonly used local community indicators. Table 3 displays related symbols and their explanations.

Evaluation criteria
Normalized mutual information (Danon et al., 2005) (NMI) and F-score (Li, Wang & Wu, 2015) is two widely used methods for evluating community quality. This study verified the resulting communities of OIRLCD and comparison algorithms on these two indicators.
Normalized mutual information Danon et al. (2005) used information entropy to measure the quality of a cluster. This information entropy describes the uncertainty of possible events of an information source They called this method the normal mutual information (NMI) measure (Danon et al., 2005). In the definition of NMI, matrix N with rows are members from real-world communities and columns are members from the detected communities. Element N ij in matrix N represent the numbers of nodes that exist in both community i and community j (Danon et al., 2005). The formula for NMI is as follows: where |C A | denotes communities in real-world, C B denotes communities detected by the algorithms. Ni. and N.j denote the sums of the elements in row i and column j, respectively.  NMI can measure the similarity between clustering results and the real-world data. The greater the similarity between the communities detected by algorithms and the real-world communities, the higher the NMI. The maximum value of NMI is one when the results and real-world are identical.
F-score F-score (Li, Wang & Wu, 2015) is common used in the evaluation method of classification model. F-score is defined as follows: where C R denotes entities in ground-truth community and C D denotes entities in community detected by the algorithm. We calculate Recall by dividing the numbers of nodes correctly found by the size of the real-world community. We calculate Accuracy by dividing those nodes correctly found by the size of the community detected by the algorithm. F-Score considers both of these methods comprehensively.

Artificial networks
Lancichinetti Fortunato Radicchi (LFR) (Lancichinetti, Fortunato & Radicchi, 2008) is a widely used method in complex network research for generating artificial networks that have properties similar to real-world networks. To very the performance of the proposed algorithms and comparison algorithms, three groups of artificial networks generated by LFR are used. LFR generates different artificial networks by setting these parameters: µ is a mixing parameter that describes the difficulty of describing the network structure. The greater µ is, the more difficult it is to describe the community structure. jCj min represents the minimum community size in the network; d represents the mean degree of node and d max represents the maximum degree of node; O n represents the number of overlapping nodes and Om represents the overlap times of each overlapping node.
This study employs the control variable method to test the performance of the proposed algorithms and the comparison algorithms with different parameters. In this experiment, we change only one parameter at a time. Table 4 lists the settings of artificial networks generated by LFR, where the expression [a: b: c] are the value of parameter ranges from a to c with a span of b. The artificial network with a series of parameter µ is represented by LFRµ; that with a series of parameters d and d max is represented by LFR-α size ; and that with a series of parameters jCj min and jCj max is represented by LFR-α degree . To ensure experimental precision, we use LFR to generate 10 artificial networks under each set of parameters and calculate the average value of each group of results. Table 5 displays the characteristics of six widely used real-world networks involved in this study. The Karate Club network (Zachary, 1977) is the membership network of a karate club in an American university. The Football network is the result of 2,000 American College Football League (Girvan & Newman, 2002). RU, EN, ES and FR are derived from http://snap.stanford.edu/data/. To ensure completion of the experiment within the specified time, we remove the links with Hub Promoted Index (HPI) coefficients less than 0.8 in RU, EN, ES and FR of the network. The reason for these results is that for networks RU, EN, ES and FR with an HPI coefficient less than 0.8 reserved, most local community detection algorithms included in this study could not complete the test within the specified time.

Experimental settings
In this experiment, we refer to the proposed algorithms based on Definition 6, Definition 7 and Definition 8 as OIRLCDF, OIRLCDS and OIRLCDT respectively. Additionally, each algorithm has a version that uses SSCS called Algorithm1 and a version that uses SSSC called Algorithm 2. For example, OIRLCDF1 and OIRLCDF2 represent the algorithms that use SSCS and those that use SSSC, respectively. During the comparative experiments, we only replace the similarity indices of node similarity in the proposed algorithms. We name the corresponding algorithms based on the similarity index used. Three commonly used similarity indices involved in this experiment are the Jaccard similarity index (Jaccard, 1901), Salton similarity index (Salton & McGill, 1986) and RA similarity index (Zhou, Lü & Zhang, 2009). Three novel complex similarity indices involved in this experiment are CS (Zhou, Lü & Zhang, 2009), TNS  and CN (Liu et al., 2022).
In addition, we compare OIRLCD to five existing local community detection algorithms: LWP (Luo, Wang and Promislow) (Luo, Wang & Promislow, 2008), Chen (Chen, Zaï & Goebel, 2009), LS (link similarity) (Chen, Zaï & Goebel, 2009), LCD (local community detection based on maximum cliques) (Wu et al., 2012) and RTLCD (Zhang, Ding & Yang, 2019). Luo, Wang & Promislow (2008) proposed an improved quality function M based on the Clauset algorithm (Clauset, 2005). M is calculated by dividing the inner links of the community by the links between communities. Similar to the Clauset algorithm, the LWP algorithm expands the community by optimizing the quality function M. To manage outliers, Chen, Zaï & Goebel (2009) proposed a local community detection algorithm based on quality function L. The Chen algorithm rechecks the removed nodes to identify whether they optimize the quality function; this operation can reduce the effects of outliers. During seed selection stage, RTLCD searches the core node as the alternative seed of the given node, which solves the seed-dependent problem. In the community expansion stage, RTLCD expands the community by node relation strength, which maintains seed validity. Additionally, the proposed and other algorithms are applied to the dataset mentioned above, with the exception that any algorithm running for more than 24 h is stopped. Table 6 describes the performance of the proposed algorithms and five existing local community detection algorithms based on NMI, Recall, Precision, F-score and time metrics in six real-world networks. The best and the second-best values are marked in bold. Table 7 lists the percentage gains in terms of NMI and F-Measure for algorithms using SSCS compared to algorithms using SSSC.

Experimental results on real-world networks
From Table 6, we can observe that OIRLCDT outperforms OIRLCDS in the NMI, Recall, Precision, F-score metrics; and OIRLCDS outperforms OIRLCDT in these metrics. Improving the precision of the similarity index improves the performance of algorithms on each metric. This phenomenon demonstrates that enhancing the precision of the similarity index can increase the accuracy of detecting local communities. Notably, OIRLCDT outperforms all the other comparison algorithms, except LCD, on each metric of all six real-world networks. Therefore, OIRLCDT can effectively detect local communities and exhibit better performance than the existing algorithms tested in this study. However, LCD can achieve good performance, but it lacks scalability in three large real-world networks; these results indicate that LCD is not competitive in large real-world networks. It is further observed that OIRLCDF, OIRLCDS and OIRLCDT show gradual improvement in the time    metric, suggesting that it takes more time to enhance the accuracy of similarity indicators in detecting communities. Table 7 shows that, when using the same similarity index, the algorithm using SSCS outperforms the noe using SSSC. This result suggests that SSCS is more effective than SSSC in finding the core node. Table 6 shows that the algorithm using SSCS takes more time than the one using SSSC. For the Karate network, SSCS performs the same as SSSC because the Karate network is so small for different seed selection strategies to make a significant difference.

Experimental results on artificial networks
Experimental results on LFR-µ We evaluated the community identification ability of the algorithms by analyzing their results on the artificial network of LFR-µ. The performance of the proposed algorithms and the comparison algorithms on the NMI and F-score metrics are presented in Tables 8 and  9. The first column of the tables represents the parameter µ, ranging from 0.1 to 0.8, while the following columns show the performance of each algorithm under the corresponding µ. As demonstrated in Tables 8 and 9, the performance of all algorithms on NMI and F score metrics declines from top to bottom. This is because the mixing parameter µ describing the ratio of the number of neighboring nodes of a node outside the community to the number of all neighboring nodes of the node. The greater the value of µ, the more challenging it is to describe the community structure. As µ increases, the performance of the algorithms declines.
From Tables 8 and 9, we can observe that the performance of OIRLCDT is better than that of OIRLCDS on NMI and F-score metrics. Similarly, the performance of OIRLCDS is better than that of OIRLCDSF. This indicates that improving the precision of the similarity index can lead to better accuracy of detecting local communities. Moreover, the performance of Jaccard and RA is lower than that of the proposed algorithm, CS, TNS and CN. This shows that the higher the precision of the similarity index, the more precise the community detection result. However, the improvement in algorithm precision caused by the improvement in similarity index precision decreases with an increase in the parameter µ. This highlights that as the network becomes more complex, the improvement effect of  similarity index precision decreases, while the time consumption markedly increases, as shown in Table 10. Tables 8 and 9 indicate that when using the same similarity index, the algorithm using SSCS outperforms that using SSSC. Therefore, SSCS is more effective than SSSC when finding the core node. Table 10 shows that the time cost of the algorithm using SSCS is also higher than that using SSSC.
In all artificial networks with different µ, the performance of OIRLCDT2 on each metric is better than that of the comparison algorithms. This indicates that OIRLCDT detects local communities more effectively than the tested existing algorithms.

Experimental results on LFR-α degree
We evaluate the ability of different community identification algorithms to handle diverse node degrees by applying them to artificial networks generated with the LFR-α degree model. We list the performance of the proposed algorithms and the comparison algorithms on the NMI and F-score metrics in Tables 11 and 12. The first column of the tables indicate the mean node degree ranging from 10 to 30, while the second column represents the maximum node degree from 100 to 300. The performances of all algorithms on NMI and F score metrics improves from top to bottom because a greater mean network node degree represents a more diverse node. The more topological information of the node that we can use, the easier the community detection.
Tables 11 and 12 show that the performance of OIRLCDT is better than that of OIRLCDF in terms of NMI and F-score metrics, while the performance of OIRLCDF is better than that of OIRLCDS. This demonstrates that increasing the precision of the similarity index, the more accuracy of detecting local communities. In addition, CS, TNS and CN outperform Jaccard and RA, which suggests that the higher the precision of the similarity index, the more precise the community detection result. However, When d is greater than 20, the algorithm with the proposed seed selection method performs worse than the algorithm with the previous seed selection method. This is because, as the mean degree of the network increases, the centrality index becomes more important. Therefore, calculating the similarity index first, which leads to a decrease in algorithm precision. Finally, Table 13 shows that the time consumption has significantly increased.
Tables 11 and 12 show that, when using the same similarity index, the algorithm using SSCS outperforms the algorithm using SSSC. Therefore, SSCS is more effective than SSSC in finding the core node. Table 13 indicates that the algorithm using SSCS also takes longer than the one using SSSC.  In all artificial networks with different value of parameter d, OIRLCDT2 outperforms the other comparison algorithms across all metrics. This result shows that the proposed algorithm can effectively perform local community detection and is superior to existing algorithms tested in this study.

Experimental results on LFR-α size
We evaluated the ability of community identification algorithms to handle diverse community structures by testing them on the artificial networks of LFR-α size . The performance of the proposed algorithms and the comparison algorithms was measured using the NMI and F-score metrics, and the results are presented in Tables 14 and 15. The first column of the tables shows the minimum community size (ranging from 10 to 30), and the second column is the maximum size of the community (ranging from 100 to 300). As the community size increases, the structure of the network becomes more diverse, making community detection more challenging. Thus, the performance of all algorithms on NMI and F score metrics worsens from top to bottom. The reason for this phenomenon is as follows. As the maximum and minimum size of communities in a networkd increase, the community structure becomes more diverse. This increased diversity in the community structure makes community detection more difficult.
Tables 14 and 15 demonstrate that the performance of OIRLCDT is better than that of OIRLCDS in terms of NMI and F-score metrics, and the performance of OIRLCDS is better than that of OIRLCDF. Thus, increasing the precision of the similarity index improves the performance of algorithms on each metric. This phenomenon highlights that improving the precision of similarity helps to increase the precision of the local community detection algorithm. Furthermore, the performance of Jaccard and RA is lower than that of the proposed algorithm, CS, TNS and CN. This shows that the higher the precision of similarity index, the more precise the community detection result. As the community size increases, the algorithm using SSSC outperforms the one using SSCS. This phenomenon occurs because the similarity index become more important as the community size increase. Therefore, calculating the similarity index first is more effective than calculating the centrality index first, leading to an increase in algorithm precision. However, this also markedly increases the time consumption, as shown in Table 16.
Tables 14 and 15 show that when using the same similarity index, the algorithm using SSCS performs better than that using SSSC. This result indicates that SSCS is more effective  than SSSC in finding the core node. Table 16 shows that the time cost of the algorithm using SSCS also takes more time than that using SSSC. In all artificial networks with different α size , OIRLCDT2 outperforms the other comparison algorithms on each metric. These results show that the proposed algorithm can effectively perform local community detection better than existing algorithms tested in this study.

CONCLUSION
This study proposes a novel local community detection algorithm called OIRLCD, based on the optimization of the interaction relationships between nodes rather than using the quality function. First, during seed selection process, a novel seed selection method is used to search for the alternative seeds of the given node. This method iteratively searches the most similar neighbor node of the given node, which has the greater node centrality than the given node. The final result is taken as the seed. Second, in the community expansion process, a novel similarity index to used measure the interaction relationship between nodes and community, and communities are expanded communities by adding the node with the most significant interaction relationship to the community.
The proposed similarity index to added to the same algorithm with the other three basic similarity indices and the three latest similarity indices. The proposed algorithm is then compared with five existing local community algorithms in both real-world networks and artificial networks. Experimental results show that the optimization of interaction relationship algorithms based on node similarity can detect communities accurately and efficiently, and a good similarity index can highlight the advantages of the algorithm based on interaction optimization. In addition, the advantages of algorithms with the precision similarity index decrease with the increasing network complexity and are not affected by the parameter mean degree and community size of the network. The advantages of algorithms with the proposed SSCS decreases as the parameter mean degree increases; increases as the parameter community size increases; and are not affected by network complexity.
However, there are still some areas that need optimization in this field of study, including finding the optimal balance of time consumption and similarity precision.

ADDITIONAL INFORMATION AND DECLARATIONS Funding
The authors received no funding for this work.
Jing Yang conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft. Xiaoyu Ding conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft. Meng Zhao conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Data Availability
The following information was supplied regarding data availability: The raw data are available in the Supplemental File. The third-party data is available at Twitch Social Networks: https://snap.stanford.edu/data/twitch-social-networks.html.