Next Article in Journal
Recent Advances of Hybrid Nanogenerators for Sustainable Ocean Energy Harvesting: Performance, Applications, and Challenges
Previous Article in Journal
Quantum Transport in GFETs Combining Landauer–Büttiker Formalism with Self-Consistent Schrödinger–Poisson Solutions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Temporal Multi-Query Subgraph Matching in Cybersecurity

National Key Laboratory of Information Systems Engineering, National University of Defense Technology, Changsha 410073, China
*
Authors to whom correspondence should be addressed.
Technologies 2025, 13(8), 335; https://doi.org/10.3390/technologies13080335
Submission received: 5 June 2025 / Revised: 14 July 2025 / Accepted: 30 July 2025 / Published: 1 August 2025
(This article belongs to the Section Information and Communication Technologies)

Abstract

Regarding attack scenarios as query graphs and conducting subgraph matching on the data system is an important approach to identify and detect cyber threats. However, existing subgraph matching methods are not suitable for detecting time-evolving attacks since they either focus on single-query graphs or ignore the temporal constraints between multiple queries. In this paper, we model the time-evolving attack detection as a novel temporal multi-query subgraph matching problem and propose an efficient algorithm to address this problem. We first give a compact representation of the temporal query graph by merging all queries into one. Based on the temporal query graph, we propose a concise auxiliary data structure to maintain partial solutions. In addition, we employ a query matching tree to generate an efficient matching order and enumerate matchings based on the order. Extensive experiments over real-world datasets confirm the effectiveness and efficiency of our approach.

1. Introduction

Cyber security is one of the most significant technical challenges in current times. Detecting cyber attacks and preventing the spread of threat is a high priority for commercial companies and government agencies around the world. In a study titled “Data Breach Investigations Report”, US communications company Verizon analyzed 100,000 security incidents from the past decade and concluded that 90% of the incidents fell into ten attack patterns [1]. A number of these attacks can be described as subgraph patterns. This motivates us to model cyber attack detection as a subgraph matching problem.
Recently, some graph-matching-based cyber attack detection methods have been proposed [2,3,4,5,6,7]. These studies extract attack behavior patterns from Cyber Threat Intelligence (shorted as CTI) reports and conduct graph pattern matching to hunt suspicious threats. However, all of these methods only focus on the detection of single static attack patterns and ignore the time-evolving characteristic of attacks, which is very critical for attack detection. With the fast development of cyber attack technologies, in some attack scenarios, attackers choose to change attack patterns over time in order to evade detection. For example, Figure 1 shows an attack scenario where attack patterns change over time. In this case, attack behavior cannot be regarded as a single query graph but a series of query graphs with specified temporal constraints. Such a time-evolving cyber attack detection variant task can be modeled as a temporal multi-query subgraph matching (shorted as TMQSM) problem.
An intuitive idea to handle TMQSM is to separately search for matchings of each query pattern using existing methods and then check whether the matching result satisfies the specified temporal constraints. However, this method faces obvious drawbacks. First, it is costly to search for matchings of each query separately as it is NP-hard to conduct subgraph isomorphism. Moreover, a lot of candidate matchings cannot satisfy the specified temporal constraints, so searching for these false candidates and checking temporal constraints on these false candidate matchings waste both time and memory. Therefore, a novel and efficient subgraph matching method is critical and in demand.
In this paper, we propose a novel and efficient temporal multi-query subgraph matching approach. First, as stated above, it is not sensible to search for matchings of each query separately. Thus, we want to search for all matchings of multiple queries simultaneously. We introduce a compact representation of multiple queries. We merge all query graphs into a single graph and record temporal constraints on the edges. The merged graph is regarded as a new query graph for subsequent subgraph matching. Then, we design a novel index structure called a temporal candidate graph (shorted as TCG) to store the candidate results for enumerating matchings. In general, TCG is a directed temporal graph where vertices are the same as the data graph and a directed edge u v indicates v appearing in at least one partial match of u. If two vertices u and v coexist in a match of a query graph, there must be a bidirectional edge between u and v (i.e., u v ). In addition, each bidirectional edge is associated with a time set that denotes the timestamps of the edge existing and satisfying specified temporal constraints. This can be used as an efficient pruning rule for subsequent enumerating process. In addition, we develop an efficient subgraph matching enumerating algorithm based on the TCG. We first generate an effective matching order by constructing a query matching tree. Then, we enumerate all matchings by expanding partial matchings following the matching order.
In summary, the major contributions include the following: (1) We propose a novel temporal multi-query subgraph matching problem by considering the temporal constraints between multiple queries. (2) We design an efficient index structure TCG to maintain candidate results and support subsequent enumeration processes. (3) We build a query matching tree to generate an efficient matching order, which helps to efficiently enumerate subgraph matchings. (4) We conducted comprehensive experiments to evaluate our techniques.

2. Preliminaries

In this section, we define the problem and review related work.

2.1. Problem Definition

In this paper, we focus on undirected and vertex-labeled graphs. Our techniques can be easily extended to edge-labeled and directed graphs. Let 𝒢 = ( 𝒱 , E , 𝓛 ) be a temporal graph with | 𝒱 | vertices and | E | temporal edges, and  𝓛 : 𝒱 Σ is a function that assigns a label to each vertex, where Σ is a set of labels. Each temporal edge e E is a triplet ( u , v , t ) , where u and v are vertices in 𝒱 , and t is the timestamp. We use t ( u , v ) to represent the existence of the timestamps of ( u , v ) . Let N ( u ) = { v V | ( u , v ) E } be the set of neighbor vertices of u, and  d ( u ) = | N ( u ) | be the degree of u. A graph 𝒢 S = ( 𝒱 S , E S , 𝓛 S ) is a temporal subgraph of 𝒢 if 𝒱 S 𝒱 , E S E , and 𝓛 S = 𝓛 . A temporal graph 𝒢 can be extracted into a series of snapshots 𝒢 = { G 1 , G 2 G | 𝒯 | } , where 𝒯 = { t | ( u , v , t ) E } is the set of timestamps. Figure 2a,b show a temporal graph and its snapshots within the time span [ 1 , 6 ] .
Definition 1
(Subgraph isomorphism). Given a query graph q = ( V q , E q , L q ) and a data graph g = ( V g , E g , L g ) , q is subgraph isomorphic to g if and only if there exists an injective mapping M : V q V g , such that (1)  u V q , L q ( u ) = L g ( M ( u ) ) , and (2)  ( u , v ) E q , ( M ( u ) , M ( v ) ) E g .
We call the subgraph induced by M a matching of q in g.
There is only one query graph in the traditional subgraph matching problem. In this paper, we consider multiple queries with the temporal constraints between queries. Let Q = { Q 1 , , Q n } ( n 2 ) be a set of query graphs. And  F : Q N is a function defined to specify the temporal constraints of queries. Note that F defines orders and time intervals between queries. We call ( Q = { Q 1 , , Q n } , F ) a temporal query set. Figure 3 shows a temporal query set containing three query graphs. The function F defines the temporal order and time intervals between queries. That is, query Q 1 appears before Q 2 with time interval F ( Q 2 ) F ( Q 1 ) = 3 1 = 2 , and Q 2 appears before Q 3 with time interval F ( Q 3 ) F ( Q 2 ) = 4 3 = 1 .
Definition 2
(Temporal multi-query subgraph isomorphism). Given a temporal query set ( Q = { Q 1 , , Q n } , F ) and a temporal graph 𝒢 = { G 1 , G 2 G | 𝒯 | } , we check whether a graph set M = { M i 1 , M i 2 M i n } satisfies the following: (1) j { 1 , , n } , M i j is a subgraph of G i j and M i j is subgraph isomorphic to Q j ; (2) j { 2 , , n } , i j i j 1 = F ( Q j ) F ( Q j 1 ) ; and (3) j , k { 1 , , n } , v j V Q j , v k V Q k , and if  v j = v k , then v j = v k , where v j V M i j and v k V M i k are matchings of v j and v k . If so, we call M a temporal multi-query matching of ( Q = { Q 1 , , Q n } , F ) .
Problem Statement. 
Given a temporal query set ( Q = { Q 1 , , Q n } , F ) and a data graph 𝒢 , the problem of temporal multi-query subgraph matching is to find all temporal multi-query matchings of ( Q = { Q 1 , , Q n } , F ) in 𝒢 .
Example 1.
Consider the temporal query set in Figure 3 and temporal graph snapshots in Figure 2b. The subgraphs marked in red and the subgraphs marked in blue are two temporal multi-query matchings that not only match the query graphs in the temporal query set but also satisfy the temporal constraints. Thus, we obtain two matching results, i.e.,  { < u 1 , v 1 > , < u 2 , v 2 > , < u 3 , v 3 > , < u 4 , v 4 > , < u 5 , v 10 > } and { < u 1 , v 5 > , < u 2 , v 7 > , < u 3 , v 9 > , < u 4 , v 8 > , < u 5 , v 12 > } .

2.2. Related Work

We summarize the related work as follows.
Graph-Matching-based Attack Detection. Prior works have implemented graph matching methods to detect cyber attacks. ThreatRaptor [8] extracts threat behaviors from open source Cyber Threat Intelligence as the query graph and conducts exact query matching to hunt threats. POIROT [5] formulates threat hunting as a graph pattern matching problem and conducts approximation matching. DeepHunter [7] detects APTs using graph similarity matching between extracted subgraphs and attack query graphs. MEGR-APT [2] discovers APTs by conducting subgraph matching between a provenance graph and query graph. ACMA [4] applies subgraph matching techniques to detect cyber attacks in smart cities. However, those systems only focus on a single-attack query scenario, which cannot meet the needs of complex time-evolving attack detection.
Subgraph Matching on Static Graph. A lot of subgraph matching algorithms have been proposed on static graphs in recent decades. Ullmann [9] first proposed a backtracking algorithm to solve this problem in 1976, which iteratively maps the vertices from a query graph to a data graph by following the given order of query vertices. The VF2 algorithm [10] generates the matching order by selecting a vertex connected to an already matched one, which can prune many false-positive candidates early. QuickSI [11] determines the matching order using the infrequency information of vertices and edges to filter invalid candidates efficiently. GraphQL [12] and SPath [13] exploit a neighborhood-based filtering strategy to prune infeasible candidates of query vertices. TurboISO [14] defines the concept of neighborhood equivalence class and merges similar vertices to avoid useless computations. BoostIso [15] further improves the performance of TurboISO by compressing the data graph. CFL-Match [16] converts the query graph into a spanning tree to find candidates for query vertices and applies path-ordering techniques to postpone Cartesian products. DAF [17] uses a directed acyclic graph instead of a spanning tree to obtain candidates and utilizes the knowledge gained from past computations to prune redundant computations. VEQ [18,19] leverages vertex equivalence to reduce the candidate matching space. RI+ [20] improves the matching time using candidate region-based decomposition and ordering techniques. SUFF [21] generates a structure filtering framework to prune the search space using historical matching results. However, the algorithms mentioned above were adapted to static graphs and cannot be directly used to solve the subgraph matching problem on temporal graphs.
Multi-query Subgraph Matching. Recently, some solutions have been proposed to process multiple queries. GraphflowDB [22] calculates subgraph matching for multiple query graphs using a worst-case optimal join algorithm. The performance heavily relies on the decomposition of the multi-query graph and join order. TRIC+ [23] decomposes queries into a series of minimum covering paths and tries to index the common parts of those paths. It maintains materialized views to store intermediate matching results and conducts join operations to obtain matching results. However, this method is limited by the expensive join cost and maintenance cost of materialized views. IncMQO [24] merges all queries into a large query graph and uses a tree index to store intermediate results. But it still enumerates each query graph separately to obtain matching results. MQ-Match [25] proposes a data-centric index structure to store partial results and uses the computation-sharing method to calculate matchings. However, none of the above methods take temporal constraints between multiple queries into consideration, and the definition of our problem is different from those of the above problems, so none of these existing methods can be applied to solve our problem.

3. Overview of Our Algorithm

To solve TMQSM, we first give a compact representation of the temporal query set and then give an overview of our algorithm for finding matchings.
As stated in Section 1, it is not advisable to search for matchings of each query separately. Therefore, we want to compute matchings of all queries simultaneously using a compact representation of a temporal query set. Inspired by [26], we merge all queries in the temporal query set into a single graph and record the temporal constraints on the edges. We call the merged graph the temporal query pattern, and regard the temporal query pattern as a new query q. Specifically, ( Q = { Q 1 , , Q n } , F ) can be represented as a graph q = ( V q , E q , L q ) , where V q = V Q , E q = i = 1 , , n E Q i . Each edge e E q is associated with a time set T e . T e is obtained as follows. Initially, T e is empty. Next, for each Q i Q , T e T e + F ( Q i ) if e E Q i . Figure 4 shows the representation of the temporal query pattern generated by the temporal query set in Figure 3. Note that the time set on the edges of the temporal query pattern only represents the temporal constraints and does not specify the concrete time instances. For example, the set [ 1 , 3 , 4 ] on edge ( u 1 , u 2 ) indicates that the edge ( u 1 , u 2 ) exists in three queries where the time intervals between these queries is 2 and 1, respectively. In the rest of this paper, we use q to represent the temporal query pattern.
Example 2.
Reconsider the temporal graph in Figure 2a and temporal query pattern in Figure 4, where the temporal multi-query matchings are marked in red and blue. And the corresponding timestamps on the data edges that satisfy the temporal constraints defined on the query edges are also colored red and blue.
Given query q and data graph 𝒢 , Algorithm 1 summarizes our TMQ algorithm for finding matchings, which consists of two phases:
  • Phase 1 (Construction of index structure). In this phase, we build a novel index structure called the temporal candidate graph based on the query graph and data graph. The TCG stores all necessary information required for enumerating matchings. The details about Phase 1 will be presented in Section 4.
  • Phase 2 (Enumeration of matchings). In this phase, we first construct a query matching tree for generating a matching order. Then, we enumerate all matchings on the TCG by following the matching order. Details about Phase 2 will be presented in Section 5.
Algorithm 1: TMQ( ( Q = { Q 1 , , Q n } , F ) , 𝒢 )
Input: A temporal query set ( Q = { Q 1 , , Q n } , F ) and a data graph 𝒢 .
Output : All matchings of ( Q = { Q 1 , , Q n } , F ) in 𝒢 .
1 
q the new query graph merged by ( Q = { Q 1 , , Q n } , F ) ;
2 
T C G BuildTCG(q, 𝒢 );
3 
Q T BuildQueryMatchingTree(q, T C G );
4 
SearchMatch( Q T , T C G );

4. Construction of Index Structure

Previous studies [11,12,14,15,16] have proved that index structure is crucial to improve the performance of searching for candidates. A good index structure should be (1) compact and memory-friendly, (2) powerful in filtering unpromising candidates, and (3) complete enough to support matching enumeration. In this section, we propose the temporal candidate graph, a concise and efficient index structure with which to maintain valid candidates for enumeration.
In general, TCG is a directed temporal graph where vertices are the same as in the data graph and a directed edge u v indicates v appearing in at least one partial match of u. If two vertices u and v coexist in a match of the query graph, there must be a bidirectional edge between u and v. In addition, each bidirectional edge is associated with a time set, which denotes the existing timestamps of an edge and satisfies specified temporal constraints. Thus, a data vertex is a valid candidate if it has at least one bidirectional edge in the TCG. In this section, we first determine the state of candidate vertices and then construct the TCG.

4.1. Vertex State Determination

We designed a novel auxiliary data structure, called the temporal neighborhood matching graph (TNMG), to determine the state of vertices in the data graph.
Definition 3
(Temporal Neighborhood Matching Graph (shorted as TNMG)). Given a query q and a data graph 𝒢 , for a vertex v 𝒢 , the TNMG of v, denoted as T N M ( v ) = ( V 1 , L , V 2 , T , E ) , is constructed as follows:
1. 
V 1 : A set of query vertices with the same label as v, i.e.,  V 1 = { u | u V q L ( u ) = L ( v ) } .
2. 
L : A label set of neighbors of vertices in V 1 , i.e.,  L = { L ( w ) | w N ( u ) u V 1 } .
3. 
V 2 : A set of neighbors of v in 𝒢 that have a label in L , i.e.,  V 2 = { w | w N ( v ) L ( w ) L } .
4. 
T : A time set recording the timestamps of the edge connecting v and each vertex in V 2 , i.e.,  T = { t ( w , v ) | w V 2 } .
5. 
E : First, for each vertex w V 2 , add an edge ( w , t ( w , v ) ) between w and its time set in T if t ( w , v ) passes through the  TE - Filter   check; then, add an edge ( L , w ) between w and its label L L if w is connected with a time set; then, for each vertex u V 1 and its neighbors’ label L L , add an edge ( u , L ) if L has at least τ neighbors in V 2 , where τ is the number of neighbors of u with label L in the query graph.
Here, TE - Filter is a pruning technology used to check the temporal constraints on an edge, which is defined as follows.
Definition 4
(Temporal Edge Filter (TE-Filter)). Given an edge ( u 1 , u 2 ) in the query q, let { t 1 q , , t k q } be the time set on the edge. Let { t 1 , , t m } be the time set on the data edge ( v 1 , v 2 ) . We have L ( v 1 ) = L ( u 1 ) and  L ( u 2 ) = L ( v 2 ) . We say ( v 1 , v 2 ) passes through the TE - Filter when { t 1 , , t m } satisfies the following conditions: 1) k m and 2) there exists at least one subset { t i 1 , , t i k } { t 1 , , t m } such that t i j t i j 1 = t j q t j 1 q for any j { 2 , , k } .
Note that, it is not clear that a data edge ( v 1 , v 2 ) will be matched to a query edge when searching for candidates. So, we use a relaxed TE - Filter to check temporal constraints when constructing the TNMG. Specifically, given an edge ( u 1 , u 2 ) in query q, ( L ( u 1 ) , L ( u 2 ) ) is the label edge of ( u 1 , u 2 ) . Let { t 1 q , , t k q } be the time set on the label edge ( L ( u 1 ) , L ( u 2 ) ) . A label edge might correspond to multiple query edges. Thus, there will be multiple time sets on a label edge. In this case, we say a data edge passes through the TE - Filter if it satisfies the above conditions with at least one time set on the label edge.
Example 3.
Consider the temporal data graph in Figure 2a and query graph in Figure 4, where the temporal neighborhood matching graphs of vertices v 4 and v 6 are constructed as in Figure 5. For v 4 , V 1 = { u 2 , u 4 } because u 2 and u 4 have the same label B with v 4 . Then, because the neighbors of u 2 and u 4 are { u 1 , u 3 , u 4 } and { u 2 , u 3 } , we have L = { A , B , C } by collecting the labels of these neighbors. Next, we obtain the neighbors of v 4 with label A, B, or C; thus V 2 = { v 2 , v 3 , v 6 } . Then, we record the timestamps of ( v 2 , v 4 ) , ( v 3 , v 4 ) , and ( v 4 , v 6 ) in T , respectively. Lastly, we add edges into T N M ( v 4 ) . For  ( v 2 , v 4 ) , the label edge of ( v 2 , v 4 ) is ( B , B ) . For the query graph in Figure 4, the time set on the label edge ( B , B ) is [ 1 , 3 ] . Because the timestamps of edge ( v 2 , v 4 ) is [ 1 , 2 , 3 ] , which successfully passes through TE - Filter , an edge between v 2 and [ 1 , 2 , 3 ] is added. For edge ( v 3 , v 4 ) with label edge ( B , C ) , there exist two time sets [ 1 , 3 , 4 ] and [ 1 , 4 ] on the query label edge ( B , C ) . The timestamp of ( v 3 , v 4 ) is [ 1 , 4 ] , which can pass through TE - Filter   with one time set, so we also add an edge between v 3 and [ 1 , 4 ] . Then, we add edges between L and V 2 , that is, { ( v 2 , B ) , ( v 3 , C ) } , and add edges between V 1 and L , including { ( u 2 , B ) , ( u 2 , C ) , ( u 4 , B ) , ( u 4 , C ) } . The temporal neighborhood matching graphs of v 6 and other vertices are constructed in the same manner.
Then, we determine the vertex state based on the TNMG.
Definition 5
(Vertex state). For a vertex v in 𝒢 , the state of v, denoted as s ( v ) , is a binary value represented by “True” or “False”.
Let T N M ( v ) be v’s temporal neighborhood matching graph. For a vertex u V 1 ( T N M ( v ) ) , we say u is completely matched if, for each of its neighbors w in the query graph, there is an edge ( u , L ( w ) ) in T N M ( v ) . We set s ( v ) to “True” if there exists at least one completely matched vertex in V 1 ( T N M ( v ) ) , and “False” otherwise. For a vertex v, the “True” state indicates that there exists at least one query vertex u that can be matched to v, and all neighbors of u in the query graph are completely matched by the neighbors of v in the data graph. For example, u 4 is completely matched in Figure 5a, so the state of v 4 , s ( v 4 ) , is “True”. Both u 2 and u 4 are not completely matched in Figure 5b, so the state of v 6 , s ( v 6 ) , is “False”.

4.2. Index Construction

After setting the state of vertices in 𝒢 , we construct the index structure TCG.
Definition 6
(Temporal Candidate Graph (TCG)). Given a query q and a data graph 𝒢 , the temporal candidate graph T C G = ( V T C G , E T C G , T T C G ) is constructed as follows:
1. 
V T C G = { v | v V 𝒢 L ( v ) L q } ;
2. 
For each v V T C G , if  s ( v ) = "True", then add a directed edge v w into E T C G for each vertex w V 2 ( T N M ( v ) ) if w has at least one edge in T N M ( v ) , where T N M ( v ) is the temporal neighborhood matching graph of v;
3. 
For v , w V T C G , if there exists a bidirectional edge between v and w, then add T e ( v , w ) into T T C G , where T e ( v , w ) is a set of time subsets of t ( v , w ) that satisfy the temporal constraints.
For a vertex v in the TCG, we say it is a valid candidate if it has at least one bidirectional edge.
Example 4.
Figure 6 shows the TCG of the data graph in Figure 2a and query graph in Figure 4. Excluding v 6 and v 11 , the state of the other vertices are “True”. Taking v 4 as an example, the state of v 4 is “True”, and  V 2 ( T N M ( v 4 ) ) = { v 2 , v 3 , v 6 } . Because  v 2 and v 3 have connecting edges in T N M ( v 4 ) , we add an outgoing edge from v 4 to v 2 and v 3 , respectively. In addition, for each bidirectional edge in the TCG, we add a set to record the time subsets that satisfy the temporal constraints.
Algorithm 2 summarizes the details of constructing the index structure TCG. We first initialize V T C G , E T C G , and T T C G (Line 1). For each vertex v with a label in the query graphs, we first construct its TNMG and set its state (Lines 2–4). If the state is “True”, we add an outgoing edge from v to each vertex in V 2 ( T N M ( v ) ) , which is connected with at least one edge (Lines 5–7). If there exists a bidirectional edge between vertex v and w, we add a time set to T T C G (Lines 8–9). The details for TNMG construction and vertex state determination are illustrated in Lines 11–28 and Lines 29–32, respectively.    
Algorithm 2: BuildTCG(q, 𝒢 )
Technologies 13 00335 i001

4.3. Algorithm Analysis

Next, we analyze the time complexity and space complexity of our proposed algorithms.
Proposition 1.
The time complexity of constructing the TNMG for all vertices is O ( | E 𝒢 | | T | l o g | T | + | E q | | 𝒱 𝒢 | ) , where | T | is the number of snapshots in data graph 𝒢 .
Proof. 
For each vertex v, the time to compute vertices in V 1 , L , V 2 , and T is | V q | , | V q | | L q | d q , d ( v ) , and d ( v ) , where d q is the average degree of vertices in q. So, the time complexity of computing vertices is O ( | V q | + | V q | | L q | d q + d ( v ) + d ( v ) ) = O ( | V q | + | V q | | L q | d q + d ( v ) ) . Meanwhile, the time to check TE - Filter for each time set in T is | T | l o g | T | , where | T | is the number of snapshots in data graph 𝒢 . So the time complexity of adding edges is O ( d ( v ) | T | l o g | T | + d ( v ) + | V q | | L q | | L q | d q ) = O ( d ( v ) | T | l o g | T | + | E q | ) . Thus, the time complexity of constructing TNMG for v is O ( | V q | + | V q | | L q | d q + d ( v ) + d ( v ) | T | l o g | T | + | E q | ) = O ( | V q | + | V q | | L q | d q + d ( v ) | T | l o g | T | + | E q | ) , which is bounded by O ( d ( v ) | T | l o g | T | + | E q | ) . Therefore, the overall time complexity of constructing TNMG for all vertices is O ( v 𝒱 𝒢 ( d ( v ) | T | l o g | T | + | E q | ) ) = O ( | E 𝒢 | | T | l o g | T | + | E q | | 𝒱 𝒢 | ) .    □
Proposition 2.
The space complexity of TNMG for all vertices is O ( | V q | | 𝒱 𝒢 | + | E 𝒢 | ) .
Proof. 
For each v, the space cost to store vertices in V 1 , L , V 2 , and T is | V q | | L q | , | L q | , d ( v ) , and d ( v ) , respectively. So the space complexity of storing vertices is O ( | V q | | L q | + | L q | + d ( v ) + d ( v ) ) = O ( | V q | | L q | + | L q | + d ( v ) ) . Then, we need to store edges in TNMG. The number of edges between V 2 and T and the number of edges between L and V 2 are both bounded by d ( v ) . And the number of edges between V 1 and L is bounded by | V q | | L q | | L q | = | V q | . So, the space complexity of storing edges is O ( d ( v ) + d ( v ) + | V q | ) = O ( d ( v ) + | V q | ) . Thus, the space cost of constructing TNMG for v is O ( | V q | | L q | + | L q | + d ( v ) + | V q | ) , which is bounded by O ( d ( v ) + | V q | ) . Therefore, the overall space cost for all vertices is O ( v 𝒱 𝒢 ( d ( v ) + | V q | ) = O ( | E 𝒢 | + | V q | | 𝒱 𝒢 | ) .    □
Proposition 3.
The time complexity of constructing TCG is O ( | E 𝒢 | | T | l o g | T | + | E q | | 𝒱 𝒢 | ) , where | T | is the number of snapshots in data graph 𝒢 .
Proof. 
For each v V T C G , the time complexity of constructing TNMG is O ( d ( v ) | T | l o g | T | + | E q | ) according to Proposition 1. The time complexity to set vertex state is O ( | V q | | L q | d q ) = O ( | E q | | L q | ) . If  s ( v ) = “True”, the time complexity of adding edges is bounded by O ( d ( v ) ) . For all vertices, the time complexity is O ( v 𝒱 𝒢 ( d ( v ) | T | l o g | T | + | E q | + | E q | | L q | + d ( v ) ) ) = O ( | E 𝒢 | | T | l o g | T | + | E q | | 𝒱 𝒢 | ) . For all bidirectional edges, the time complexity of adding time sets is bounded by O ( | E 𝒢 | ) . Therefore, the overall time complexity of BuildTCG is O ( | E 𝒢 | | T | l o g | T | + | E q | | 𝒱 𝒢 | + | E 𝒢 | ) = O ( | E 𝒢 |     | T | l o g | T | + | E q | | 𝒱 𝒢 | ) , which is dominated by that of constructing TNMG.    □
Proposition 4.
The space cost of TCG is O ( | V q | | 𝒱 𝒢 | + | E 𝒢 | ) .
Proof. 
During the process of BuildTCG, we need to store TCG and TNMG for all vertices. The total space cost of constructing TNMG is O ( | V q | | 𝒱 𝒢 | + | E 𝒢 | ) according to Proposition 2. The space cost to store vertices in V T C G is bounded by O ( | 𝒱 𝒢 | ) . The TCG is induced from 𝒢 , so the space cost to store edges is O ( | E 𝒢 | ) . For the bidirectional edges, the space cost to store time set is bounded by O ( | E 𝒢 | ) . Therefore, the overall space complexity is O ( | V q | | 𝒱 𝒢 | + | E 𝒢 | + | 𝒱 𝒢 | + | E 𝒢 | + | E 𝒢 | ) = O ( | V q | | 𝒱 𝒢 | + | E 𝒢 | ) , which is also dominated by that of constructing TNMG.    □

5. Enumeration of Matchings

In this section, we present our algorithm to find all matchings of the query graph based on the TCG. We first construct a query matching tree for generating an efficient matching order and then compute all matchings following the matching order.

5.1. Matching Order Generation

Given a query graph, we can find matchings by performing a widely used depth-first search paradigm [27]. The search space is actually a depth-first search tree. Different matching orders can lead to a large search space and affect the performance of the algorithm. In order to save search space, we construct a query matching tree based on the query graph and TCG, which can be used to generate an efficient matching order.
The query matching tree is a DFS spanning tree Q T of the query graph. To generate Q T , we need to select a root and then determine the DFS order. We define the c o s t of a query vertex u as c o s t ( u ) = | C ( u ) | / d ( u ) , where | C ( u ) | is the number of valid candidates with the same label as u in the TCG, and  d ( u ) is the degree of u in the query graph. Intuitively, a vertex with few candidates and a larger degree means it has a smaller search space and higher chance to prune unpromising partial results. So, we select the vertex with the least cost as the root of Q T . Then, we determine the DFS order. Let u be the vertex currently being visited; if there exist unvisited neighbors of u, we select neighbor w with the least c o s t as the next vertex to visit and designate u as the parent of w in the Q T . Otherwise, we backtrack to the parent of u. In addition, for each node u in Q T , we maintain a set of vertices in the ancestor nodes to record the non-tree edges in the query graph, which is denoted as u . a . After constructing the query matching tree, we generate the matching order by performing preorder traversal on Q T .
Example 5.
For the query graph in Figure 4 and temporal candidate graph in Figure 6, the  c o s t of the vertices u 1 , u 2 , u 3 , u 4 , and u 5 is 2, 4/3, 2/3, 2, and 2, respectively. Thus, u 3 is selected as the root. Then, we construct the query matching tree Q T by performing DFS backtracking on the query. The  Q T is shown in Figure 7. The matching order is determined by preorder traversal on Q T , that is, u 3 , u 2 , u 1 , u 4 , and u 5 .

5.2. Matching Enumeration

The TCG contains all necessary information to enumerate matchings; thus, we can directly find all matchings in the TCG by following the matching order.
Algorithm 3 illustrates the details of our matching approach. We first use a hashmap M and M T to store the partial matchings and time instance sets (Line 1). Then, we generate a matching order (Line 2). The root r of Q T must be the first matched vertex in the order. Thus, for each valid candidate v with the same label as r in the TCG, we match v to r and call Procedure Expand to generate a matching (Lines 4–6).
Algorithm 3: SearchMatch( Q T , T C G )
Technologies 13 00335 i002
During the Expand process, once the size of partial matchings equals the number of query vertices, we report M and M T as a result (Line 7). Otherwise, we process the next query vertex n according to the matching order. We determine the matches of n according to the matched result of its parent n p (Lines 9–12). In this process, we use TE-Filter and NontreeCheck to check the temporal constraints and structure information separately (Lines 13–15). Note that, the TE-Filter only checks the temporal constraints on a single edge. We further use TG-Filter to check the temporal constraints between two edges (Lines 16–21). The temporal graph filter (TG-Filter) is designed as follows. Let T ( u 1 , u 2 ) and T ( u 1 , u 2 ) be the time sets on query edges ( u 1 , u 2 ) and ( u 1 , u 2 ) . Suppose a data edge ( v 1 , v 2 ) has been matched to ( u 1 , u 2 ) . Let { t 1 , , t k } be the time subset on ( v 1 , v 2 ) that passes through the TE-Filter, and t ( v 1 , v 2 ) be the time subset on the data edge ( v 1 , v 2 ) that passes through the TE-Filter. If | T ( u 1 , u 2 ) T ( u 1 , u 2 ) | > | { t 1 , , t k } t ( v 1 , v 2 ) | , then ( v 1 , v 2 ) cannot be matched to ( u 1 , u 2 ) . If a candidate passes through all checkings, it is verified as a match of n. We then update the M and M T , and execute the next Expand process. The details about NontreeCheck are illustrated in Lines 26–30.
Example 6.
Figure 8 shows the search tree for the query graph in Figure 4 and TCG in Figure 6 according to the matching order u 3 u 2 u 1 u 4 u 5 . During the searching process, we use TE-Filter and TG-Filter to prune invalid branches. Finally, we can obtain the matching results for query q, i.e., { < u 3 , v 3 > , < u 2 , v 2 > , < u 1 , v 1 > , < u 4 , v 4 > , < u 5 , v 10 > } and { < u 3 , v 9 > , < u 2 , v 7 > , < u 1 , v 5 > , < u 4 , v 8 > , < u 5 , v 12 > } .

6. Experiments

In this section, we evaluate the performance of our proposed TMQ algorithm. All experiments were implemented in C++ and ran on a PC with an Intel(R) Core Ultra 7 1.4 GHz CPU and 16 GB of RAM.

6.1. Experimental Setup

Datasets. 
The experiments were carried out on five real-world temporal graphs: CollegeMsg, MathOverflow, SuperUser, WikiTalk, and StackOverflow (all datasets were obtained from https://snap.stanford.edu/data, accessed on 29 July 2025). Since these temporal graphs are unlabeled, we assigned five labels to the vertices at random. We partitioned the time span of a temporal graph into a series of consecutive non-overlapping time intervals of equal length and merged all edges that occur within a time interval into a snapshot. The edges within a snapshot share the same timestamp. In the experiments, we set the time interval of CollegeMsg as an hour ( 60 × 60 s) and the time interval of other datasets as a day ( 24 × 60 × 60 s). The detailed statistics of the datasets are shown in Table 1.
Queries. 
In the experiments, given the desired number of edges | E q | in the temporal query pattern q and the desired number of queries n in temporal query set Q , we generated the temporal query patterns as connected subgraphs of the data using random walks on the temporal graph. To generate different temporal query patterns, we varied the number of edges | E q | from five to eight with a default value of six and varied the number of queries n from two to four a with default value of three. For a data graph, we generated 50 temporal query patterns under each specific | E q | and n.
Comparative algorithm. 
In the experiments, we compared our TMQ algorithm with a baseline developed based on VEQ [19], a state-of-the-art subgraph matching algorithm for a single query on static graphs. Given a temporal graph 𝒢 and a temporal query set ( 𝒢 = { Q 1 , , Q n } , F ) , this algorithm first finds all matchings of each query in { Q 1 , , Q n } on each snapshot of 𝒢 using VEQ . Then, for each matching result of { Q 1 , , Q n } , it checks whether the timestamp order satisfies the temporal constraint defined by function F. If the temporal order satisfies the constraint, the matching is output as a temporal multi-query subgraph matching of ( 𝒢 = { Q 1 , , Q n } , F ) in 𝒢 . This algorithm is called VEQ T in our experiments.
Metrics. 
We measured and evaluated (1) the average elapsed time to process a query by varying the number of query edges and the number of queries; (2) the average memory usage to process a query by varying the number of query edges and the number of queries; and (3) the scalability of algorithm. In every experiment, we set the time limit to process a query to 1 h (i.e., 3.6 × 10 6 ms). If an algorithm could not finish within the time limit, then we plottef the elapsed time as INF . Each experimental test was repeated five times, and the average metric is reported.

6.2. Processing Time

In this part, we compare our method TMQ with VEQ T in terms of the average running time to process a query on five real-world datasets.
Figure 9 shows the experimental results under the default parameter settings over different datasets. We can see that VEQ T cannot finish within the time limit on the wiki and stack datasets, while our TMQ can return results within 100 s on all datasets. TMQ significantly outperforms the competitor on all datasets under the default settings. The processing time of TMQ is up to three orders of magnitude faster than that of VEQ T , even excluding the cases when VEQ T cannot finish within the time limit. The reason for this is that VEQ T needs to process the multiple queries sequentially and check the temporal constraints between queries one by one, which costs a lot of time overhead. TMQ utilizes an efficient index structure TCG to maintain the partial matchings and uses an effective matching order to enumerate matchings, both of which can efficiently prune a lot of unpromising intermediate results and significantly speed up the querying process.
Figure 10 shows the average processing time of TMQ and VEQ T on the college dataset when varying the number of edges | E q | in the temporal query pattern from five to eight and the number of queries n in the temporal query set from two to four. From Figure 10a, we can see that TMQ significantly outperforms VEQ T under all parameter settings and it can improve the processing time by one to three orders of magnitude on the college dataset. The reason is illustrated above. When setting the number of queries n as a default value and varying the number of edges | E q | , the average processing time of TMQ and VEQ T is plotted in Figure 10b. When n is fixed, the average execution time of TMQ to process a query increases as the number of edges | E q | in a temporal query pattern increases, while the average processing time of VEQ T changes very smoothly with increasing | E q | . This is because, when | E q | becomes larger, TMQ requires more time to construct the index structure and enumerate matchings for more edges. For VEQ T , the process of matching result verification takes up the majority of the execution time; thus the subtle change in edges in a single query will not obviously affect the overall time. For fixed | E q | , the average processing time of TMQ and VEQ T when varying n is demonstrated in Figure 10c. The results show that the running time of VEQ T increases with increasing n, while the running time of TMQ decreases as n increases. This is because VEQ T needs to find all subgraph matchings for each query in the temporal query set one by one; thus, the time cost will increase when the number of queries in the temporal query set increases, while TMQ equipped with filtering techniques can significantly reduce the search space. When n becomes larger, the temporal constraints on the edges of temporal query pattern become stricter, so more unpromising candidates can be filtered, and the time to verify candidates and enumerate results decreases.
Figure 11, Figure 12, Figure 13 and Figure 14 depict the experimental results on the temporal graphs math, super, wiki, and stack, respectively. These experimental results are very similar to those obtained on college. Specifically, TMQ is up to three orders of magnitude faster than VEQ T on math and two orders of magnitude faster than VEQ T on super. For large temporal graphs wiki and stack, VEQ T cannot terminate within the time limit under most parameter settings, whereas TMQ can find all matchings and is also several orders of magnitude faster than VEQ T .

6.3. Memory Usage

In this part, we evaluate the performance of TMQ against VEQ T based on the aspect of average memory usage to process a query on five different datasets.
Figure 15a–e show the average memory usage of two algorithms on temporal graphs college, math, super, wiki, and stack, respectively. The size of the corresponding temporal graph is marked by the line. In the experiments, we did not record or plot the memory usage if the algorithm could not finish within the time limit. The experimental results show that TMQ and VEQ T were close in the memory cost to process a query. This is because TMQ needs to verify the state of all vertices when constructing the index structure, which uses a lot of memory. As for VEQ T , it takes a lot of memory to store all matchings of each query even if most matchings do not satisfy the temporal constraints.

6.4. Scalability

In this part, we evaluate the scalability of TMQ and VEQ T by varying the size of the data graph under default parameter settings.
Figure 16a shows the average running time of the two algorithms when varying the size of the dataset under default parameter settings. It can been seen that VEQ T cannot finish on large datasets, whereas TMQ can find all results on all datasets. And the running time of TMQ increases with increasing dataset size. Figure 16b shows the average memory usage when varying the size of the dataset under default parameter settings. We can see that the memory usage increases linearly as dataset size increases. The above results demonstrate the good scalability of TMQ .

7. Conclusions

In this paper, we model the time-evolving cyber attack detection task as a novel temporal multi-query subgraph matching problem and propose an efficient algorithm to tackle this problem. Specifically, we first merge multiple queries into a new query graph with temporal constraints, which is helps improve the searching efficiency. Then, we design a novel index structure called TCG to maintain valid candidates. During this process, we use an efficient pruning technology TE-Filter to filter unpromising intermediate results by considering the temporal constraints. Lastly, we generate an efficient matching order by constructing a query matching tree and enumerate subgraph matching results based on the matching order. Extensive experiments on five real datasets demonstrate that our method is several orders of magnitude faster than the existing method, while achieving comparable performance in memory consumption.

Author Contributions

Conceptualization, M.L.; methodology, M.L.; validation, M.L.; writing—original draft preparation, M.L.; supervision, Q.Z. and X.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets can be found at https://snap.stanford.edu/data (accessed on 29 July 2025).

Conflicts of Interest

The authors declare that they have no known competing financial interest or personal relationships that could have appeared to influence the work reported in this paper.

References

  1. Verizon. Data Breach Investigations Report 2020. Comput. Fraud. Secur. 2020, 4. [Google Scholar]
  2. Aly, A.; Iqbal, S.; Youssef, A.; Mansour, E. MEGR-APT: A Memory-Efficient APT Hunting System Based on Attack Representation Learning. IEEE Trans. Inf. Forensics Secur. 2024, 19, 5257–5271. [Google Scholar] [CrossRef]
  3. Choudhury, S.; Holder, L.; Chin, G.; Agarwal, K.; Feo, J. A Selectivity based approach to Continuous Pattern Detection in Streaming Graphs. arXiv 2015, arXiv:1503.00849. [Google Scholar]
  4. Jia, Y.; Gu, Z.; Du, L.; Long, Y.; Wang, Y.; Li, J.; Zhang, Y. Artificial intelligence enabled cyber security defense for smart cities: A novel attack detection framework based on the MDATA model. Knowl.-Based Syst. 2023, 276, 110781. [Google Scholar] [CrossRef]
  5. Milajerdi, S.M.; Rigel, G.; Birhanu, E.; Venkatakrishnan, V.N. POIROT: Aligning Attack Behavior with Kernel Audit Records for Cyber Threat Hunting. In Proceedings of the CCS′19: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, London, UK, 11–15 November 2019. [Google Scholar]
  6. Satvat, K.; Gjomemo, R.; Venkatakrishnan, V. Extractor: Extracting Attack Behavior from Threat Reports. In Proceedings of the 2021 IEEE European Symposium on Security and Privacy (EuroS&P), Vienna, Austria, 6–10 September 2021. [Google Scholar]
  7. Wei, R.; Cai, L.; Zhao, L.; Yu, A.; Meng, D. DeepHunter: A Graph Neural Network Based Approach for Robust Cyber Threat Hunting. In Proceedings of the Security and Privacy in Communication Networks, Virtual Event, 6–9 September 2021. [Google Scholar]
  8. Peng, G.; Fei, S.; Xiaoyuan, L.; Xusheng, X.; Zheng, Q.; Fengyuan, X.; Prateek, M.; Kulkarni, S.R.; Dawn, S. Enabling Efficient Cyber Threat Hunting With Cyber Threat Intelligence. In Proceedings of the 2021 IEEE 37th International Conference on Data Engineering (ICDE), Chania, Greece, 19–22 April 2021. [Google Scholar]
  9. Ullmann, J.R. An Algorithm for Subgraph Isomorphism. J. ACM 1976, 13, 31–42. [Google Scholar] [CrossRef]
  10. Cordella, L.P.; Foggia, P.; Sansone, C.; Vento, M. A (sub)graph isomorphism algorithm for matching large graphs. IEEE Trans. Pattern Anal. Mach. Intell. 2004, 26, 1367–1372. [Google Scholar] [CrossRef] [PubMed]
  11. Shang, H.; Zhang, Y.; Lin, X.; Yu, J.X. Taming verification hardness: An efficient algorithm for testing subgraph isomorphism. Proc. VLDB Endow. 2008, 1, 364–375. [Google Scholar] [CrossRef]
  12. He, H.; Singh, A.K. Graphs-at-a-time: Query Language and Access Methods for Graph Databases. In Proceedings of the SIGMOD ’08: Proceedings of the 2008 ACM SIGMOD international conference on Management of Data, Vancouver, BC, Canada, 10–12 June 2008. [Google Scholar]
  13. Zhao, P.; Han, J. On graph query optimization in large networks. Proc. VLDB Endow. 2010, 3, 340–351. [Google Scholar] [CrossRef]
  14. Han, W.S.; Lee, J.; Lee, J.H. Turboiso: Towards ultrafast and robust subgraph isomorphism search in large graph databases. In Proceedings of the SIGMOD ’13: Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, New York, NY, USA, 22–27 June 2013. [Google Scholar]
  15. Ren, X.; Wang, J. Exploiting Vertex Relationships in Speeding up Subgraph Isomorphism over Large Graphs. Proc. VLDB Endow. 2015, 8, 617–628. [Google Scholar] [CrossRef]
  16. Bi, F.; Chang, L.; Lin, X.; Qin, L.; Zhang, W. Efficient Subgraph Matching by Postponing Cartesian Products. In Proceedings of the SIGMOD’16: Proceedings of the 2016 International Conference on Management of Data, San Francisco, CA, USA, 26 June–1 July 2016. [Google Scholar]
  17. Han, M.; Kim, H.; Gu, G.; Park, K.; Han, W.S. Efficient Subgraph Matching: Harmonizing Dynamic Programming, Adaptive Matching Order, and Failing Set Together. In Proceedings of the SIGMOD’19: Proceedings of the 2019 International Conference on Management of Data, Amsterdam, The Netherlands, 30 June–5 July 2019. [Google Scholar]
  18. Kim, H.; Choi, Y.; Park, K.; Lin, X.; Hong, S.H.; Han, W.S. Versatile Equivalences: Speeding up Subgraph Query Processing and Subgraph Matching. In Proceedings of the SIGMOD/PODS’21: Proceedings of the 2021 International Conference on Management of Data, Xi’an, China, 20–25 June 2021. [Google Scholar]
  19. Kim, H.; Choi, Y.; Park, K.; Lin, X.; Hong, S.H.; Han, W.S. Fast subgraph query processing and subgraph matching via static and dynamic equivalences. VLDB J. 2023, 32, 343–368. [Google Scholar] [CrossRef]
  20. Ansari, Z.A.; Parwez, M.A.; Thoker, I.R.; Jahiruddin. Enhanced Subgraph Matching for Large Graphs using Candidate Region-Based Decomposition and Ordering. J. King Saud Univ.-Comput. Inf. Sci. 2023, 35, 101694. [Google Scholar] [CrossRef]
  21. Jian, X.; Li, Z.; Chen, L. SUFF: Accelerating Subgraph Matching with Historical Data. Proc. VLDB Endow. 2023, 16, 1699–1711. [Google Scholar] [CrossRef]
  22. Amine, M.; Chathura, K.; Semih, S. Optimizing One-time and Continuous Subgraph Queries using Worst-case Optimal Joins. ACM Trans. Database Syst. 2021, 46, 1–45. [Google Scholar]
  23. Zervakis, L.; Setty, V.; Tryfonopoulos, C.; Hose, K. Efficient Continuous Multi-Query Processing over Graph Streams. arXiv 2019, arXiv:1902.05134. [Google Scholar]
  24. Xi, W.; Qianzhen, Z.; Deke, G.; Xiang, Z. Continuous multi-query optimization for subgraph matching over dynamic graphs. Semant. Web 2022, 13, 601–622. [Google Scholar]
  25. Ziyi, M.; Jianye, Y.; Xu, Z.; Guoqing, X.; Jianhua, W.; Liang, Y.; Kenli, L.; Xuemin, L. Efficient Multi-Query Oriented Continuous Subgraph Matching. In Proceedings of the 40th IEEE International Conference on Data Engineering, ICDE 2024, Utrecht, The Netherlands, 13–16 May 2024. [Google Scholar]
  26. Li, F.; Zou, Z.; Li, J.; Yang, X.; Wang, B. Evolving subgraph matching on temporal graphs. Knowl.-Based Syst. 2022, 258, 109961. [Google Scholar] [CrossRef]
  27. Sun, S.; Luo, Q. Subgraph Matching With Effective Matching Order and Indexing. IEEE Trans. Knowl. Data Eng. 2022, 34, 491–505. [Google Scholar] [CrossRef]
Figure 1. A time-evolving attack.
Figure 1. A time-evolving attack.
Technologies 13 00335 g001
Figure 2. A temporal graph and snapshots.
Figure 2. A temporal graph and snapshots.
Technologies 13 00335 g002
Figure 3. A temporal query set.
Figure 3. A temporal query set.
Technologies 13 00335 g003
Figure 4. The temporal query pattern merged by a temporal query set.
Figure 4. The temporal query pattern merged by a temporal query set.
Technologies 13 00335 g004
Figure 5. Temporal neighborhood matching graph of v 4 and v 6 .
Figure 5. Temporal neighborhood matching graph of v 4 and v 6 .
Technologies 13 00335 g005
Figure 6. Temporal candidate graph.
Figure 6. Temporal candidate graph.
Technologies 13 00335 g006
Figure 7. Query matching tree.
Figure 7. Query matching tree.
Technologies 13 00335 g007
Figure 8. Search tree for enumeration.
Figure 8. Search tree for enumeration.
Technologies 13 00335 g008
Figure 9. Average processing time on different datasets.
Figure 9. Average processing time on different datasets.
Technologies 13 00335 g009
Figure 10. Average processing time on college. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Figure 10. Average processing time on college. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Technologies 13 00335 g010
Figure 11. Average processing time on math. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Figure 11. Average processing time on math. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Technologies 13 00335 g011
Figure 12. Average processing time on super. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Figure 12. Average processing time on super. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Technologies 13 00335 g012
Figure 13. Average processing time on wiki. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Figure 13. Average processing time on wiki. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Technologies 13 00335 g013
Figure 14. Average processing time on stack. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Figure 14. Average processing time on stack. (a) Processing time under different settings. (b) Processing time with varying | E q | . (c) Processing time with varying n.
Technologies 13 00335 g014
Figure 15. Average memory usage on different datasets.
Figure 15. Average memory usage on different datasets.
Technologies 13 00335 g015
Figure 16. Scalability of algorithms. (a) Average running time with varying data graph size. (b) Average memory usage with varying data graph size.
Figure 16. Scalability of algorithms. (a) Average running time with varying data graph size. (b) Average memory usage with varying data graph size.
Technologies 13 00335 g016
Table 1. Statistics of datasets.
Table 1. Statistics of datasets.
DatasetVerticesTemporal EdgesStatic EdgesTime Span
CollegeMsg (college)189959,83520,296193 days
MathOverflow (math)21,688107,58190,4892350 days
SuperUser (super)194,0851,443,339924,8862773 days
WikiTalk (wiki)1,140,1497,833,1403,309,5922320 days
StackOverflow (stack)2,464,60617,823,52516,266,3952774 days
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lu, M.; Zhang, Q.; Zhu, X. Temporal Multi-Query Subgraph Matching in Cybersecurity. Technologies 2025, 13, 335. https://doi.org/10.3390/technologies13080335

AMA Style

Lu M, Zhang Q, Zhu X. Temporal Multi-Query Subgraph Matching in Cybersecurity. Technologies. 2025; 13(8):335. https://doi.org/10.3390/technologies13080335

Chicago/Turabian Style

Lu, Min, Qianzhen Zhang, and Xianqiang Zhu. 2025. "Temporal Multi-Query Subgraph Matching in Cybersecurity" Technologies 13, no. 8: 335. https://doi.org/10.3390/technologies13080335

APA Style

Lu, M., Zhang, Q., & Zhu, X. (2025). Temporal Multi-Query Subgraph Matching in Cybersecurity. Technologies, 13(8), 335. https://doi.org/10.3390/technologies13080335

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop