Accidental traffic anomaly detection method based on fusion graph convolution gated neural differential equation

By combining graph convolution gating neural differential equations and space-time embedding enhancement modules, combining dynamic graph convolution and hypergraph convolution, the problem of single data deviation and evaluation standards in existing traffic anomaly detection methods is solved, and the traffic system is realized Accurate and flexible abnormality detection.

CN119152682AActive Publication Date: 2024-12-17TONGJI UNIV

Patent Information

Application Number
CN202411374860.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-17
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

The existing traffic anomaly detection methods lack real data support, are difficult to capture complex spatiotemporal patterns, and have a single evaluation standard, which cannot adapt to heterogeneity in different regions and time periods, resulting in biased and inaccurate detection results.

Method used

Using a method based on fusion graph convolution gated neural differential equations, the traffic system is modeled through the space-time embedding enhancement module and graph-gated cyclic differential equations, combining dynamic graph convolution and hypergraph convolution to realize synchronous representation and complexity of spatiotemporal features. Relationship capture, and a real-time traffic anomaly detection algorithm is proposed to adaptively determine the abnormal threshold.

Benefits of technology

It significantly improves the accuracy and adaptability of traffic anomaly detection, can represent the dynamic changes of the traffic system more naturally, enhances the expression and generalization capabilities of the model, and is suitable for actual traffic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152682A_ABST
    Figure CN119152682A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of intelligent traffic, and provides an accidental traffic anomaly detection method based on a fusion graph convolution gated neural differential equation for a traffic accidental anomaly problem. Comprising the following steps: step 1, generating time embedding based on data set time period information, generating space embedding based on node space information and generating historical information embedding based on adjacent historical information, and obtaining heterogeneous node space-time embedding after splicing; and the like. By applying the traffic anomaly detection method provided by the invention, an urban traffic management department can identify and cope with an emergent traffic event more efficiently, so that the strain capacity and adaptability of an urban traffic system are greatly improved. The research result lays a solid foundation for a future intelligent urban traffic management system, and has a wide application prospect and important social significance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation, and proposes an occasional traffic anomaly detection method based on a fusion graph convolution gated neural differential equation to address the problem of occasional traffic anomalies. Background Art

[0002] Occasional traffic abnormalities, such as traffic paralysis caused by traffic accidents and natural disasters, are sudden and atypical abnormal phenomena in urban transportation systems. These events are different from regular congestion during peak hours in the morning and evening, and are usually unpredictable and sudden. If not detected and responded to in a timely manner, these events may pose a serious threat to public safety and social stability. For policymakers and government departments, early detection of these abnormal phenomena is of great value, which can minimize the harmful effects of accidents, ensure public traffic safety and improve urban traffic efficiency.

[0003] Although the importance of sporadic traffic anomaly detection has been widely recognized and some progress has been made in research methods, there are still several challenges and limitations. First, current research generally lacks the support of real traffic accident data sets. Due to the scarcity of traffic accident records, most studies rely on virtual data generated by simulation for experiments, which is difficult to fully reflect the complexity and diversity of the real world. Simulation data is usually difficult to reproduce the noise, outliers and complex interactions in real data, resulting in a certain deviation between the experimental results and the actual situation. Secondly, existing methods lack dynamic models that can accurately characterize complex spatiotemporal patterns. Sporadic traffic anomalies are affected by multiple spatial and temporal factors, and traffic patterns have significant spatiotemporal heterogeneity. Many methods only use simple sequence models for modeling, ignoring the complex mutual influence between time and space, and thus it is difficult to fully capture the dynamic changes of the traffic system. Finally, the evaluation criteria for anomaly detection are relatively simple. Many methods use a global unified threshold to identify anomalies, failing to take into account that the road network anomaly identification criteria in different regions and time periods may be different, and lack adaptability to real scenarios.

[0004] Traffic speed data, as a key indicator that reflects traffic conditions in real time, can directly indicate the occurrence of abnormal traffic events. For example, sudden deceleration or stoppage usually indicates abnormal situations such as traffic accidents, congestion or road construction. By monitoring changes in traffic speed, abnormal events can be quickly identified and located, and timely responses and processing can be provided. At the same time, normal traffic conditions have certain speed patterns and regularities. By analyzing these speed data, a baseline for normal traffic conditions can be established. When the speed deviates significantly from these baselines, it can be identified as abnormal. This traffic anomaly detection method based on pattern recognition is of great significance in practical applications.

[0005] Traditional methods of representing traffic speed mostly rely on time series analysis techniques, such as the autoregressive integrated moving average model (ARIMA) and vector autoregression model (VAR), as well as machine learning algorithms such as k-nearest neighbor (k-NN) and support vector machine (SVM). However, these methods often have difficulty in effectively capturing the complex spatiotemporal dependencies inherent in traffic data. In recent years, deep learning methods have made significant progress in the spatiotemporal domain. Recurrent neural networks (RNNs) have improved model representation performance by virtue of their advantages in temporal dynamic modeling, while convolutional neural networks (CNNs) have performed well in spatial feature extraction by virtue of their long receptive fields. However, these models are still insufficient in capturing spatial dependencies in urban networked systems. To make up for this deficiency, graph convolutional networks (GCNs) have gradually been introduced into spatiotemporal tasks and have been widely used in the field of transportation. Although existing work has made great breakthroughs in performance, in the face of the significant heterogeneity and non-stationarity of traffic anomaly scenarios, classic graph spatiotemporal neural networks still have limitations and are difficult to achieve ideal results in such scenarios. Summary of the invention

[0006] In view of the problems existing in the prior art, the present invention proposes a method for detecting sporadic traffic anomalies based on a fused graph convolutional gated neural differential equation.

[0007] The present invention introduces a fusion graph gated recurrent unit based on neural differential equations to model the normal mode of the traffic system in a continuous time domain. Its main components are:

[0008] (1) The spatiotemporal embedding enhancement module is a novel spatiotemporal feature modeling method that assigns a unique representation to each spatiotemporal context through learnable embeddings. Unlike traditional methods that rely on additional contextual information such as points of interest, the spatiotemporal embedding enhancement module maps daily and weekly cycle information into dynamic temporal feature representations in the temporal dimension, maps node number information into dynamic spatial feature representations in the spatial dimension, and maps node speed information at the same time step into dynamic node feature representations. By concatenating these three types of embedding features, the module can effectively identify and distinguish input contexts in both temporal and spatial dimensions, thereby achieving modeling of spatiotemporal heterogeneity.

[0009] (2) Graph-gated recurrent differential equations (GREDEs) are a feature extraction framework based on neural differential equations. They implement continuous modeling of spatiotemporal sequences through graph-gated recurrent units. Compared with traditional spatiotemporal feature extraction methods, GREDEs can model in the continuous time domain and more naturally capture the dynamic changes in the traffic system, thereby achieving synchronous representation of spatiotemporal features and greatly improving the expressive power of the model.

[0010] (3) The fused graph convolution gating unit combines dynamic graph convolution with dynamic hypergraph convolution to form a more comprehensive reconstruction model of the normal component of traffic speed. Dynamic graph convolution generates a node relationship matrix through data-driven, which better reflects the dynamic changes of nodes and edges and adapts to the time-varying interaction relationship in actual scenarios. Dynamic hypergraph convolution generates a dynamic hypergraph based on different temporal features, and uses the information of node-related hyperedges to update the node representation, thereby capturing more complex relationships in the traffic network. By fusing dynamic graph convolution with hypergraph convolution, the model can capture both low-order and high-order spatial relationships and provide more accurate traffic speed reconstruction.

[0011] Technical solution of the present invention

[0012] A method for detecting sporadic traffic anomalies based on fused graph convolutional gated neural differential equations includes the following steps:

[0013] Step 1: Generate time embedding based on the time period information of the data set, generate spatial embedding based on the spatial information of the node, and generate historical information embedding based on the neighboring historical information. After splicing, obtain heterogeneous node spatiotemporal embedding.

[0014] Step 2: Capture temporal features through continuous gated recurrent units, and use dynamic graph convolution and hypergraph convolution modules to achieve collaborative modeling of spatiotemporal data. Use the exponential sliding average algorithm to smooth the hidden state update to ensure that the model has good generalization ability while maintaining high fitting ability. Finally, the calculated spatiotemporal features are input into the reconstruction module to reconstruct the normal traffic pattern.

[0015] Step 3: Calculate the anomaly score based on the original traffic data and the reconstruction result, and normalize the anomaly score. Based on the anomaly score of the training set, the real-time traffic anomaly detection algorithm is used to adaptively determine the anomaly threshold of different areas, and detect and mark occasional anomalies in the road network based on the threshold.

[0016] Beneficial Effects

[0017] The present invention uses spatiotemporal embedding enhancement technology to highlight and capture different spatiotemporal context features in the traffic network, thereby better demonstrating its spatiotemporal heterogeneity. The spatiotemporal data is modeled for continuity using gated recurrent differential equations, and the synchronous modeling of spatiotemporal features is achieved by integrating dynamic graph convolution and hypergraph convolution as gating mechanisms, so that changes in the state of the traffic network can be represented more naturally and accurately. In addition, the present invention proposes a real-time traffic anomaly detection algorithm to adaptively determine the anomaly threshold of each node, thereby significantly improving the adaptability and accuracy of anomaly detection results in actual application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1It is a system flow chart of the non-incidental anomaly detection method of the traffic network of the present invention;

[0019] Figure 2 This is a schematic diagram of the model structure proposed in step 1 of the present invention;

[0020] Figure 3 A visualized topological structure diagram of an urban traffic network according to an embodiment of the present invention;

[0021] Figure 4 It is a fitting curve diagram of the reconstructed value and the true value at the node 296 and the node 44 under normal conditions and occasional abnormal conditions in the embodiment of the present invention;

[0022] Figure 5 It is a heat map of the reconstructed value and the true value of the normal component under the formal situation and the occasional abnormal situation of the embodiment of the present invention;

[0023] Figure 6 The following is a distribution diagram of abnormal scores under normal and occasional abnormal conditions in an embodiment of the present invention;

[0024] Figure 7 This is a graph of anomaly scores and anomaly thresholds on node 296 under normal conditions and occasional abnormal conditions according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The technical solution provided by the present application will be further described below in conjunction with specific embodiments and accompanying drawings. The advantages and features of the present application will become more apparent with the following description.

[0026] A sporadic traffic anomaly detection method based on fused graph convolutional gated neural differential equations, such as Figure 1 As shown, the following steps are included:

[0027] Step 1: Generate time embedding based on the time period information of the dataset, generate spatial embedding based on the spatial information of the node, and generate historical information embedding based on the neighboring historical information. After splicing, obtain heterogeneous node spatiotemporal embedding.

[0028] Specifically, the data set uses the public transportation speed data set PEMS-BAY.

[0029] Step 1 The specific steps are as follows:

[0030] Step 1.1: Perform cubic spline interpolation on the original traffic data to transform the discrete time series data into continuous changes, and obtain the interpolation coefficients as a continuous path to control the direction of solving the neural differential equation.

[0031] Step 1.2: Generate spatiotemporal embedding based on the timestamp information of the data set, and generate historical information embedding based on the uninterpolated original data. The specific operation formula is shown in formula (1)(2)(3)(4)(5).

[0032] F tid =TidEmbedding(tid),tid∈Z B×N ,F tid ∈Z B×N×D (1)

[0033] F diw =DiwEmbedding(diw),diw∈Z B×N ,F diw ∈Z B×N×D (2)

[0034] F node =NodeEmbedding(idx),idx∈Z B×N ,F node ∈Z B×N×D (3)

[0035] F his =HisEmbedding(s),his∈Z B×L×N ,F his ∈Z B×N×D (4)

[0036] F final =Concat(F tid ,F diw ,F node ,F his ),F final ∈Z B×N×4D (5)

[0037] in,

[0038] TidEmbedding inputs the timestamp information tid within a day into the embedding layer to obtain a high-dimensional daily period feature vector;

[0039] NodeEmbedding inputs the timestamp information diw within a week into the embedding layer to obtain a high-dimensional weekly feature vector;

[0040] NodeEmbedding inputs the node number idx into the embedding layer to obtain a high-dimensional node feature vector;

[0041] HisEmbedding concatenates the data of the node’s 12 historical time steps and inputs them into the two-dimensional convolutional layer to obtain a high-dimensional historical feature vector;

[0042] Concat represents a concatenation operation, which concatenates the above feature vectors to obtain complete heterogeneous spatiotemporal features.

[0043] F tid and F diw It is the embedding of daily cycle and weekly cycle, tid is the timestamp information within a day, and diw is the timestamp information within a week; F node is the node spatial embedding, idx is the node index information, and the spatiotemporal embedding uses the standard embedding layer; F his is the historical information embedding, x is the original historical traffic data in the dataset, and the historical information embedding is implemented using a two-dimensional convolutional layer; F final is the final spatiotemporal context embedding. B is the batch size of batch processing, N is the number of traffic network detectors, and D is the dimension of the embedded feature.

[0044] Step 2: Capture temporal features through continuous gated recurrent units, and use dynamic graph convolution and hypergraph convolution modules to achieve collaborative modeling of spatiotemporal data. An exponential moving average algorithm is used to smooth the hidden state update to ensure that the model has good generalization ability while maintaining high fitting ability. Finally, the calculated spatiotemporal features are input into the reconstruction module to reconstruct the normal traffic pattern.

[0045] Design neural differential equation models (such as Figure 2 ), the core of the model consists of three sub-modules: fusion graph gated recurrent unit module, controlled smooth update module and reconstruction module.

[0046] The embedded features are input into the fusion graph gated recurrent unit module, spatial associations of different scales are modeled through the fusion of dynamic graph and dynamic hypergraph convolution, and temporal associations are modeled through gated recurrent units. The spatiotemporal associations are captured at the same time to obtain the change in hidden states.

[0047] The controlled smooth update module uses data interpolation coefficients as a continuous path and uses an exponential smoothing algorithm to update the change in the hidden state, thereby improving the robustness of the model.

[0048] The reconstruction module embeds the node spatial position and splices the spatiotemporal features, and obtains the final normal component reconstruction result through a two-dimensional convolution layer.

[0049] The specific processing is as follows:

[0050] Step 2.1: The spatiotemporal context embedding generated in step 1 is linearly mapped and input into the fusion graph gated recurrent differential equation to capture the temporal evolution characteristics.

[0051] The fusion graph gated loop differential equation is as follows:

[0052] h(0)=linear in (Ffinal ) (6)

[0053]

[0054] Among them, h(0) is the initial state representation of the differential equation, f(.) is the fusion graph gated recurrent unit, dX(t) is the coefficient after the original data is interpolated, T is the historical time step of the model reconstruction, which is set to 12 in this experiment, and θ f is the parameter that the model needs to update, and h(T) is the final spatiotemporal feature representation.

[0055] The structure of the fusion graph gated recurrent unit is as follows:

[0056] g(t)=HybridGCN(h(t-1)) (8)

[0057] z(t)=σ(linear hz (h(t-1))+g(t)) (9)

[0058] h(t)=z(t)⊙h(t)+(1-z(t))⊙g(t) (10)

[0059] dh=(1-z(t))⊙(g(t)-h(t)) (11)

[0060] Among them, HybridGCN() is a fusion graph convolution gating module that aggregates neighbor node features to update node features; σ is a sigmoid activation function, z(t) controls the fusion ratio of the current input and the previous state during the update, and obtains the final state h(t). Its structure is as follows:

[0061] First, the node embedding E is randomly initialized to represent the node adjacency information and generate the adaptive adjacency matrix A adp , dynamically adjust the topology between nodes as follows:

[0062] A adp =Softmax(ReLU(EE T )) (12)

[0063] Where E is a randomly initialized node embedding, A adp is the resulting adaptive adjacency matrix.

[0064] The Chebyshev polynomial is used to approximate the graph convolution operation to realize an efficient graph convolution network and aggregate the spatial adjacency features of nodes, as follows:

[0065] Z adp =A adp h(t-1)EW n +Eb n (13)

[0066] Among them, h(t-1) is the hidden state of the input, W n is the weight pool, b n is the offset pool, Z adp It is the result of dynamic graph convolution.

[0067] An adaptive dynamic hypergraph is used to model the high-order spatial associations between nodes. In particular, daily period embedding is used to make the hypergraph have temporal periodic characteristics, and the hypergraph convolution operation is used to update the node features to obtain the final spatial features.

[0068] Z h =Relu(F tid [:,0,:]A h Z adp ) (14)

[0069] Z hyper =Z h E hn W h +E hn b h (15)

[0070]

[0071] Among them, F tid is the daily cycle embedding, A h is an adaptive temporal hypergraph, Z h is the obtained dynamic hyperedge representation, E hn is the hyperedge embedding, W h is the weight pool, b h is the offset pool, Z hyper It is the node feature representation after the dynamic hypergraph convolution, and g(t) is the output of the final fusion graph gating module.

[0072] In step 2.2, when the hidden state is updated h(t), an exponential smoothing algorithm is used. By weighted combination of the current state and the previous state, the model can flexibly adapt to different data characteristics, capturing changes and filtering out noise.

[0073] h(t)=αh(t)+(1-α)h(t-1) (18)

[0074] Here, α is the smoothing factor.

[0075] Step 2.3 concatenates the spatiotemporal features represented by the differential equation with the node embedding and passes through a two-dimensional convolutional layer to obtain the final result.

[0076] Z=Conv out (Concat(F node ,H(T))) (17)

[0077] Among them, F node is the spatial embedding of the node, H(T) is the spatiotemporal feature represented by the differential equation, and Z is the model reconstruction result.

[0078] Step 3: Calculate the anomaly score based on the original traffic data and the reconstruction result, and normalize the anomaly score. Based on the anomaly score of the training set, the real-time traffic anomaly detection algorithm is used to adaptively determine the anomaly threshold of different areas, and detect and mark occasional anomalies in the road network based on the threshold.

[0079] The abnormal score is the square of the difference between the reconstructed normal speed value and the actual speed, reflecting the degree of deviation of the speed value from the normal traffic pattern.

[0080] Step 3 is as follows:

[0081] Step 3.1 Calculate the square error between the original data and the reconstructed result, and normalize them to get the anomaly score.

[0082] score=(ZX real ) 2 (18)

[0083]

[0084] Among them, Z is the reconstructed traffic data, X real is real traffic data, Q1 is the median of the anomaly score, Q3 is the interquartile range of the anomaly score, and score norm It is the normalized anomaly score, that is, the final road network traffic node anomaly score of the present invention.

[0085] Step 3.2 obtains a threshold value according to the real-time traffic anomaly detection algorithm, marks the data points with anomaly scores greater than the threshold value as anomalies, and obtains the detection results.

[0086] The input of the real-time traffic anomaly detection algorithm is the anomaly score obtained from the training set in step 3.1, the candidate threshold is calculated by adjusting the parameters, the anomaly scores above the threshold are screened out and their index is expanded (considering that the anomaly usually lasts for a period of time after it occurs). The percentage reduction of the mean and standard deviation after removing these scores is calculated, the optimal threshold is updated, and finally the optimal anomaly threshold obtained is returned.

[0087] Specifically, the pseudo code of the real-time traffic anomaly detection algorithm is as follows:

[0088]

[0089] The obtained threshold is applied to the test set, and nodes with anomaly scores greater than the threshold are marked as anomalies.

[0090] In order to prove the ability of this example to accurately represent the spatiotemporal characteristics of the traffic network, the present invention conducts experiments on the public data set PEMS-BAY. The data set contains 308 monitoring nodes (numbered 1-308), including traffic data for one year from March 2018 to February 2019, and the data is collected every 5 minutes. At the same time, according to the accident reports released in the corresponding period of the corresponding area, the distance between the accident point and the node is calculated, and the effective threshold range is set to 1km. If the two are within the effective range, the data of the corresponding period of the node is marked as abnormal, and the abnormal point information in the real scene is obtained.

[0091] Since traffic anomalies have obvious temporal and spatial heterogeneity, in order to prove the robustness of the speed reconstruction of the present invention in different time and space, different road network nodes are tested at different times. No. 296 and No. 44 are selected as test nodes, where No. 296 is a regional internal road network node and No. 44 is a regional transportation hub node. The reconstruction results of the speed normal component reconstruction model proposed by the present invention under the normal state of these two nodes and in the accident scene and the fitting curve of the true value are shown as follows: Figure 4 As shown. The horizontal axis is time, from 00:00 to 24:00, and the vertical axis is the speed value measured by the monitor. The left figure shows the true value and reconstructed value of the speed of node 296, and the right figure shows the true value and reconstructed value of the speed of node 44. The gray area corresponds to the time period when the accident occurred.

[0092] To further visualize the reconstruction effect of the present invention, Figure 5 Heat maps of the reconstructed and true values ​​under normal and accident conditions are plotted, where grayscale represents the speed value.

[0093] To further illustrate the effectiveness of selecting anomaly scores as the criterion for determining occasional anomalies, Figure 6 It shows the ratio of abnormal scores of abnormal data points and normal data points to the total amount of their respective data, indicating the distribution difference.

[0094] To specifically illustrate the difference in abnormal scores between normal conditions and accidental accident scenarios, and to further illustrate the scientific nature of the score as a judgment standard, Figure 7 It shows the anomaly score of node 296 for one day and the anomaly threshold of that point.

[0095] In addition, in order to prove the superiority of the present invention over other velocity modeling methods, the latest and well-known models were selected to conduct velocity reconstruction comparison experiments on the public dataset PEMS-BAYS. The experimental results show that the invented model is superior to similar models in terms of mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE), as shown in Table 1.

[0096] Table 1 Comparison of speed reconstruction results with well-known models

[0097]

[0098]

[0099] As can be seen from Table 1, compared with the current mainstream methods, the reconstruction performance of the present invention has reached the best in various indicators, whether in the short-term or long-term reconstruction scenario. Among them, STSGCN[1] effectively captures complex local spatiotemporal associations through a spatiotemporal synchronous modeling mechanism, and uses multiple modules for different time periods to effectively capture the heterogeneity in the local spatiotemporal graph; AGCRN[2] uses an adaptive graph convolutional network to dynamically learn the topological structure of the traffic network, and uses a recurrent neural network to capture time dependencies; simST[3] uses spatiotemporal embedding and splicing of spatial adjacent node features for special representation, and can achieve excellent reconstruction performance through a simple fully connected layer; STGNCDE[4] can more accurately capture continuous time dynamics by using neural network parameterized control differential equations, can handle irregular sampling and multi-scale time series data, and provide more flexible and accurate modeling capabilities in traffic speed reconstruction. The normal component representation model of traffic proposed in the present invention designs and introduces spatiotemporal embedding enhancement, graph gated recurrent units, dynamic fusion graph convolution, etc., combines the advantages of neural differential equations and graph neural networks, and performs simultaneous spatiotemporal modeling, which significantly improves the model's ability to represent the spatiotemporal characteristics of traffic. At the same time, it has good generalization ability and robustness, and achieves the optimality in reconstruction scenarios with different time steps.

[0100] In addition, in order to prove the accuracy of the invention for traffic anomaly detection, the normal component reconstruction results and true values ​​of different models were selected for comparative experiments on anomaly detection. The experimental results show that the detection accuracy (Accuracy), recall rate (Recall), weighted F1 score (F1) and area under the curve (AUC) indicators of the invention are better than those of similar models, as shown in Table 2

[0101] Table 2 Comparison of anomaly detection results with well-known models

[0102]

[0103] References are as follows:

[0104] [1]Song C, Lin Y, Guo S, et al. Spatial-Temporal Synchronous GraphConvolutional Networks: A New Framework for Spatial-Temporal Network DataForecasting[J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2020, 34(01):914-921.

[0105] [2]Bai L, Yao L, Li C, et al. Adaptive graph convolutional recurrent network for traffic forecasting[J]. Advances in neural information processing systems, 2020, 33: 17804-17815.

[0106] [3]Liu X, Liang Y, Huang C, et al.SimST:A GNN-Free Spatio-TemporalLearning Framework for Traffic Forecasting[J].2023

[0107] [4]Choi J, Choi H, Hwang J, et al.Graph neural controlled differential equations for traffic forecasting[C] / / Proceedings of the AAAI conference onartificial intelligence.2022,36(6):6367-6374.

[0108] Innovation

[0109] Aiming at the detection of sporadic anomalies in urban road networks, this paper proposes a sporadic anomaly detection method based on fusion graph convolution gated neural differential equations. Its innovative points are as follows:

[0110] (1) A method for reconstructing normal traffic speed of a road network based on a fused graph convolutional gated neural differential equation is proposed. In view of the inaccuracy of the existing traffic speed modeling methods in the representation of spatiotemporal features, the present invention utilizes the powerful representation ability of neural differential equations to transform the traffic speed feature representation into a numerical solution problem of ordinary differential equations. This method can not only process irregular data, but also has high memory efficiency. The differential equations are solved by graph recurrent gating units, and the gating mechanism enables the model to selectively remember or forget past information, thereby more effectively processing the dependencies of time series data. In addition, during the training process, the model can adjust parameters faster, achieve convergence in a shorter time, and achieve better performance.

[0111] (2) Construct a spatiotemporal information enhancement module and a fused graph convolution module to model the spatiotemporal heterogeneity of road network traffic. In view of the problem that existing traffic feature representation methods ignore spatiotemporal heterogeneity, the present invention obtains a unique spatiotemporal context representation by introducing daily and weekly cycle embedding, node information embedding, and historical data embedding. At the same time, in view of the problem that existing methods ignore high-order relationships between nodes, the present invention introduces fused graph convolution as a gating unit, uses dynamic graph convolution to extract real-time spatial associations between nodes, and extracts high-order relationships between nodes through hypergraph convolution, thereby more comprehensively capturing the complex spatiotemporal relationships in the traffic network.

[0112] (3) A traffic sporadic anomaly detection algorithm based on the road network traffic speed reconstruction and decomposition strategy is proposed. Based on the speed reconstruction results, the present invention effectively addresses the difficulty of sporadic anomaly detection caused by the scarcity of accident data. A real-time traffic anomaly detection algorithm is proposed to adaptively generate different anomaly thresholds for each region and perform anomaly judgment. Compared with the use of a unified anomaly threshold, this method fully considers the spatiotemporal heterogeneity of different regions and significantly improves the accuracy of anomaly detection results.

[0113] The above description is only a description of the preferred embodiments of the present application, and is not intended to limit the scope of the present application. Any changes or modifications made by any person skilled in the art based on the above disclosed technical contents shall be deemed as equivalent effective embodiments and shall fall within the scope of protection of the technical solution of the present application.

Claims

1. A method for detecting sporadic traffic anomalies based on fused graph convolutional gated neural differential equations, characterized in that: The following steps are involved: Step 1: Generate time embedding based on the time period information of the data set, generate spatial embedding based on the spatial information of the node, and generate historical information embedding based on the neighboring historical information, and then obtain heterogeneous node spatiotemporal embedding after splicing; Step 2: Capture temporal features through continuous gated recurrent units, and use dynamic graph convolution and hypergraph convolution modules to achieve collaborative modeling of spatiotemporal data; An exponential moving average algorithm is used to smooth the hidden state update, ensuring that the model has good generalization ability while maintaining high fitting ability. Finally, the calculated spatiotemporal features are input into the reconstruction module to reconstruct the normal traffic pattern. Step 3: Calculate the anomaly score based on the original traffic data and the reconstruction result, and normalize the anomaly score; Based on the anomaly score of the training set, use the real-time traffic anomaly detection algorithm to adaptively determine the anomaly threshold of different areas, and detect and mark occasional anomalies in the road network based on the threshold.

2. The method for detecting sporadic traffic anomalies based on fused graph convolutional gated neural differential equations as claimed in claim 1, characterized in that: Step 1 The specific steps are as follows: Step 1.1: Perform cubic spline interpolation on the original traffic data to transform the discrete time series data into continuous changes, and obtain the interpolation coefficient as a continuous path to control the direction of solving the neural differential equation; Step 1.2: Generate spatiotemporal embedding based on the timestamp information of the dataset, and generate historical information embedding based on the uninterpolated original data; The specific operation formula is shown in formula (1)(2)(3)(4)(5): F tid =TimeEmbedding(time), time∈Z B×N ,F tid ∈Z B×N×D (1) F diw =DiwEmbedding(diw),diw∈Z B×N ,F diw ∈Z B×N×D (2) F node =NodeEmbedding(idx), idx∈Z B×N ,F node ∈Z B×N×D (3) F his =HisEmbedding(x),his∈Z B×L×N ,F his ∈Z B×N×D (4) F final =Concat(F tid ,F diw ,F node ,F his ),F final ∈Z B×N×4D (5) in, TidEmbedding inputs the timestamp information tid within a day into the embedding layer to obtain a high-dimensional daily period feature vector; DiwEmbedding inputs the timestamp information diw within a week into the embedding layer to obtain a high-dimensional weekly feature vector; NodeEmbedding inputs the node number idx into the embedding layer to obtain a high-dimensional node feature vector; HisEmbedding concatenates the data of the node’s 12 historical time steps and inputs them into the two-dimensional convolutional layer to obtain a high-dimensional historical feature vector; Concat represents the concatenation operation, which concatenates the above feature vectors to obtain complete heterogeneous spatiotemporal features; F tid and F diw It is the embedding of daily cycle and weekly cycle, tid is the timestamp information within a day, and diw is the timestamp information within a week; F node is the node spatial embedding, idx is the node index information, and the spatiotemporal embedding uses the standard embedding layer; F his is the historical information embedding, x is the original historical traffic data in the dataset, and the historical information embedding is implemented using a two-dimensional convolutional layer; F final is the final spatiotemporal context embedding; B is the batch size of batch processing, N is the number of traffic network detectors, and D is the dimension of the embedded feature.

3. The method for detecting sporadic traffic anomalies based on fused graph convolutional gated neural differential equations as claimed in claim 1, characterized in that: Step 2 specifically includes: Step 2.1: The spatiotemporal context embedding generated in step 1 is linearly mapped and input into the fusion graph gated recurrent differential equation to capture the temporal evolution characteristics; The fusion graph gated loop differential equation is as follows: h(0)=linear in (F final ) (6) Among them, h(0) is the initial state representation of the differential equation, f(.) is the fusion graph gated recurrent unit, dX(t) is the coefficient after interpolation of the original data, T is the historical time step of the model reconstruction, θf is the parameter that needs to be updated in the model, and h(T) is the final spatiotemporal feature representation; The structure of the fusion graph gated recurrent unit is as follows: g(t)=HybridGCN(h(t-1)) (8) z(t)=σ(linear hz (h(t-1))+g(t)) (9) h(t)=z(t)⊙h(t)+(1-z(t))⊙g(t) (10) dh=(1-z(t))⊙( g (t)-h(t)) (11) Among them, HybridGCN() is a fusion graph convolution gating module that aggregates neighbor node features to update node features; σ is a sigmoid activation function, z(t) controls the fusion ratio of the current input and the previous state during the update, and obtains the final state h(t). Its structure is as follows: First, the node embedding E is randomly initialized to represent the node adjacency information and generate the adaptive adjacency matrix A adp , dynamically adjust the topology between nodes, as follows: YOUR adp =Softmax(ReLU(EE T )) (12) Where E is a randomly initialized node embedding, A adp is the generated adaptive adjacency matrix; The Chebyshev polynomial is used to approximate the graph convolution operation to realize an efficient graph convolution network and aggregate the spatial adjacency features of nodes, as follows: Z adp =A adp h(t-1)EW n +Eb n (13) Among them, h(t-1) is the hidden state of the input, W n is the weight pool, b n is the offset pool, Z adp It is the result of dynamic graph convolution; Adaptive dynamic hypergraphs are used to model high-order spatial associations between nodes. In particular, daily period embedding is used to make the hypergraph have temporal periodicity, and hypergraph convolution operations are used to update node features to obtain the final spatial features: WITH h =Relu(F tid [:,0,:]A h WITH adp ) (14) WITH hyper =Z h E hn IN h +E hn b h (15) Among them, F tid is the daily cycle embedding, A h is an adaptive temporal hypergraph, Z h is the obtained dynamic hyperedge representation, E hn is the hyperedge embedding, W h is the weight pool, b h is the offset pool, Z hyper is the node feature representation after the dynamic hypergraph convolution, and g(t) is the output of the final fusion graph gating module; Step 2.2: When the hidden state is updated h(t), an exponential smoothing algorithm is used to adapt to different data characteristics by weighted combination of the current state and the previous state, which can capture changes and filter out noise: h(t)=ah(t)+(1-ɑ)h(t-1) (18) Among them, ɑ is the smoothing factor; Step 2.3: The spatiotemporal features represented by the differential equations are concatenated with the node embedding and passed through a two-dimensional convolutional layer to obtain the final result: Z=Conv out (Concat(F node ,H(T))) (17) Among them, F node is the spatial embedding of the node, H(T) is the spatiotemporal feature represented by the differential equation, and Z is the model reconstruction result.

4. The method for detecting sporadic traffic anomalies based on fused graph convolutional gated neural differential equations as claimed in claim 1, characterized in that: Step 3 specifically includes: Step 3.1: Calculate the square error between the original data and the reconstructed result, and normalize it to get the anomaly score: score=(Z-X real ) 2 (18) Among them, Z is the reconstructed traffic data, X real is real traffic data, Q1 is the median of the anomaly score, Q3 is the interquartile range of the anomaly score, and score norm is the normalized anomaly score, i.e., the final anomaly score of the road network traffic node; Step 3.2: Obtain a threshold value based on the real-time traffic anomaly detection algorithm, mark the data points with anomaly scores greater than the threshold value as anomalies, and obtain the detection results.

5. The method for detecting sporadic traffic anomalies based on fused graph convolutional gated neural differential equations as claimed in claim 4, characterized in that: The real-time traffic anomaly detection algorithm is specifically: Input the anomaly score obtained from the training set in step 3.1, calculate the candidate threshold by adjusting the parameters, filter out the anomaly scores above the threshold and expand their index, calculate the percentage reduction of the mean and standard deviation after removing these scores, update the optimal threshold, and finally return the obtained optimal anomaly threshold; Specifically, the pseudo code of the real-time traffic anomaly detection algorithm is as follows: The obtained threshold is applied to the test set, and nodes with anomaly scores greater than the threshold are marked as anomalies.

Citation Information

Patent Citations

  • Traffic prediction method based on multi-scale space-time fusion graph network

    CN115240425A

  • DSTGCN-based traffic prediction method

    CN115578852A

  • Multi-view fusion space-time dynamic graph convolutional network urban traffic flow prediction method

    CN116935649A

  • Traffic flow prediction method and device based on dynamic ordinary differential graph neural network

    CN117789478A

  • Traffic flow forecasting method based on multi-mode dynamic residual graph convolution network

    US20230334981A1

Cited By

  • Multivariate time series prediction method and device

    CN119962572A

  • Road network comprehensive toughness evaluation method based on double-component neural rough differential equation

    CN121435156A