Graded road network topology adversarial generation method based on pseudo node attention

Through the hierarchical road network topology adversarial generation method based on pseudo-node attention, the problem of ignoring road grading in the existing technology is solved, and the efficient generation of hierarchical road topology maps is achieved, which improves the efficiency of road network planning and design and the generalization of the generation model, and meets the needs of autonomous driving testing.

CN119514643AInactive Publication Date: 2025-02-25ZHEJIANG UNIV

Patent Information

Application Number
CN202411551494.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art ignores road grading when generating road network topology, resulting in the generated road network lacking authenticity and diversity, making it difficult to meet the needs of autonomous driving testing.

Method used

The topology adversarial generation method of hierarchical road network based on pseudo-node attention is adopted. By constructing a topology generation model of hierarchical road network, and using the variational autoencoder network and graph convolutional network to generate node attributes and link relationships, to achieve efficient generation of hierarchical road network topology.

Benefits of technology

This method can efficiently generate hierarchical road topology maps, improve the efficiency of road network planning and design, enhance the generalization of the generative model, meet the deployment needs of autonomous driving hierarchical dedicated road networks, optimize traffic flow and improve the driving experience of autonomous driving vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514643A_ABST
    Figure CN119514643A_ABST
Patent Text Reader

Abstract

The invention discloses a hierarchical road network topology adversarial generation method based on pseudo node attention, and belongs to the technical field of urban road network generation. Comprising the following steps: constructing a hierarchical road network topology generation model, and training the model by using a hierarchical road network topological graph to obtain a trained model; the hierarchical road network topology generation model comprises a variational auto-encoder network based on pseudo node attention and a variational auto-encoder network based on graph convolution; wherein the variational auto-encoder network based on pseudo node attention comprises a node encoder and a node decoder, and the variational auto-encoder network based on graph convolution comprises a link encoder and a link decoder; during application, node attributes and an adjacent matrix are obtained based on a trained node decoder and a trained link decoder; and forming a hierarchical road network topological graph of the number of nodes based on the obtained node attributes and the adjacent matrix. According to the method, the complexity of a hierarchical road network topology generation task is reduced, and meanwhile, the quality and accuracy of a result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of urban road network generation, and in particular relates to a pseudo-node attention-based hierarchical road network topology adversarial generation method. Background Art

[0002] Designing road networks similar to cities with efficient energy utilization and high comfort for residents is crucial to creating green, low-carbon cities. In addition to urban planning, road network topology maps also play a vital role in traffic management. Whether it is traffic flow analysis, deployment of dedicated lanes for autonomous driving, or optimization of traffic light management, road network data is indispensable. At present, autonomous driving technology is becoming a key development direction in the field of intelligent transportation. Therefore, driving tests in a virtual road network that mimics the actual road network layout will help verify the role of autonomous driving in improving urban traffic efficiency. Therefore, it is particularly important to automatically generate a road network similar to the actual road network, which will inject new vitality into urban planning and autonomous driving applications.

[0003] Road network deployment planning has undergone a significant evolution, from rule-based procedural modeling to the use of generative artificial intelligence models. Although traditional procedural modeling methods can semi-automatically generate road networks based on preset rules and parameters, they are cumbersome because they require a lot of manual operations and complex parameter settings. In addition, the generated road networks lack diversity and are difficult to meet the selection requirements of subsequent tasks. In recent years, with the rapid development of generative artificial intelligence technology, researchers have begun to try to use advanced deep generative models such as variational autoencoders (VAEs), generative adversarial networks (GANs), and diffusion models to create road networks. These methods can generate unique, novel, and diverse road network topologies, greatly enriching the diversity and selectivity of road network models. However, these methods all ignore an important aspect when generating or deploying road networks: road classification. In the real world, road networks are composed of many types of roads, such as highways, urban expressways, and urban main roads. Classifying roads not only helps to simulate the actual traffic environment more realistically, but also provides an important basis for autonomous driving testing. For example, by setting speed, acceleration and other control parameter limits for different levels of roads, the performance of autonomous vehicles under various road conditions can be tested. Summary of the invention

[0004] In order to solve the problems in the prior art, the present invention provides a hierarchical road network topology adversarial generation method based on pseudo-node attention.

[0005] The technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention discloses a method for generating adversarial hierarchical road network topology based on pseudo-node attention, comprising the following steps:

[0007] 1) constructing a hierarchical road network topology generation model, and obtaining a hierarchical road network topology map, and using the hierarchical road network topology map as training data to train the model, thereby obtaining a trained hierarchical road network topology generation model;

[0008] The hierarchical road network topology generation model includes a variational autoencoder network based on pseudo-node attention and a variational autoencoder network based on graph convolution;

[0009] Among them, the variational autoencoder network based on pseudo-node attention includes a node encoder and a node decoder. The node encoder takes the node attributes of the hierarchical road network topology as input and outputs the node features of the latent space to the node decoder, and the node decoder outputs the cross-node attributes.

[0010] The variational autoencoder network based on graph convolution includes a link encoder and a link decoder, which constructs an adjacency matrix based on the link relationship of the hierarchical road network topology graph. The link encoder takes the adjacency matrix as input and outputs the link features of the latent space to the link decoder, and the link decoder outputs the cross-adjacency matrix.

[0011] 2) When applied, the node features corresponding to different numbers of nodes are input into the trained node decoder to obtain the corresponding node attributes; the link features corresponding to the number of nodes are input into the trained link decoder to obtain the adjacency matrix corresponding to the corresponding link relationship; based on the obtained node attributes and adjacency matrix, a hierarchical road network topology map of the number of nodes is constructed.

[0012] In a second aspect, the present invention discloses a hierarchical road network topology adversarial generation system for implementing the method, comprising:

[0013] A model building and training module, which is used to build a hierarchical road network topology generation model and obtain a hierarchical road network topology map, and use the hierarchical road network topology map as training data to train the model to obtain a trained hierarchical road network topology generation model;

[0014] The hierarchical road network topology generation model includes a variational autoencoder network based on pseudo-node attention and a variational autoencoder network based on graph convolution;

[0015] Among them, the variational autoencoder network based on pseudo-node attention includes a node encoder and a node decoder. The node encoder takes the node attributes of the hierarchical road network topology as input and outputs the node features of the latent space to the node decoder, and the node decoder outputs the cross-node attributes.

[0016] The variational autoencoder network based on graph convolution includes a link encoder and a link decoder, which constructs an adjacency matrix based on the link relationship of the hierarchical road network topology graph. The link encoder takes the adjacency matrix as input and outputs the link features of the latent space to the link decoder, and the link decoder outputs the cross-adjacency matrix.

[0017] The application module is used to input the node features corresponding to different numbers of nodes into the trained node decoder to obtain the corresponding node attributes; input the link features corresponding to the number of nodes into the trained link decoder to obtain the adjacency matrix corresponding to the corresponding link relationship; and construct a hierarchical road network topology map of the number of nodes based on the obtained node attributes and adjacency matrix. Compared with the prior art, the present invention has the following beneficial technical effects:

[0018] (1) The present invention can efficiently generate a hierarchical road topology map, avoid dependence on manually designed road networks, and improve the efficiency of road network planning and design.

[0019] (2) The hierarchical road topology generation model of the present invention adopts an encoder and decoder architecture, and through feature cross-talk, it can generate node attributes and links in a feature coupling and task decoupling manner.

[0020] (3) This paper proposes a novel pseudo-node attention mechanism. This mechanism does not rely on the real adjacency matrix, and models the global association between linked nodes and unlinked nodes in a semi-supervised manner, greatly improving the generalization of the generated model.

[0021] (4) Different levels of autonomous driving technology have different requirements for road grades. Therefore, the generation of hierarchical road network topology can provide simulation and computing support for the deployment of hierarchical dedicated road networks for autonomous driving, ensuring that the road network design can maximize the use of existing road network resources while optimizing traffic flow and improving the driving experience of autonomous driving vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a framework diagram of the hierarchical road network topology generation model;

[0023] Figure 2 It is the structural diagram of the pseudo-node attention module;

[0024] Figure 3 This is a schematic diagram of the hierarchical road network topology generation results. DETAILED DESCRIPTION

[0025] The present invention is further described and illustrated below in conjunction with specific embodiments. The embodiments are merely exemplary of the present disclosure and do not define the scope of limitation. The technical features of each embodiment of the present invention may be combined accordingly without conflicting with each other.

[0026] The present invention represents the hierarchical road network topology as a graph G = (V, L), which includes a node set V consisting of a finite number of points and a link set L consisting of a finite number of link relationships. A link represents the connection relationship between two nodes. Where n represents the number of nodes in the node set V, and node is the d-dimensional feature vector of node i in graph G, which is composed of random noise + node first-level and second-level degrees + node position + node type, expressed as formula (1):

[0027] v i ←{Rend; Deg1; Deg2; Pos; C} (1)

[0028] in, is a d1-dimensional noise vector sampled from a normal distribution, where d1 can be 16; and They are the first-order degree and second-order degree of a node, respectively. They are encoded using one-hot vectors. d2 and d3 both represent dimensions. The first-order degree represents the degree of the node v. i The total number of connected nodes, the second-order degree represents the number of nodes connected to node v i The sum of the degrees of all nodes connected to , that is, node v i Pos represents the total number of neighbor nodes; Pos represents the position of the node; C represents the category attribute of the node. The actual meaning of the node here in the hierarchical topology road network is the intersection type, which can be an intersection of the same type of roads or an intersection of different types of roads.

[0029] represents a link list, which specifies the index of the starting point and the end point of the link; M represents the number of links in the link set L. Using the index information of the link, the present invention can construct an adjacency matrix A={a uv}∈{0,1} N×N , N represents the dimension of the adjacency matrix A, which means: if edge(u,v)∈L, a uv =1, otherwise a uv = 0, edge(u,v) represents the edge edge formed by node u and node v. The present invention only focuses on the type of intersections and the link relationship between intersections, ignoring the category of links. Therefore, the hierarchical road network topology of the present invention is a heterogeneous undirected graph. Most roads in reality are bidirectional, so describing the connection between nodes as undirected is also in line with the actual situation. The hierarchical road network topology used in the training of the present invention is constructed by the known technology in the field.

[0030] The present invention provides a method for adversarial generation of hierarchical road network topology based on pseudo-node attention. The present invention adopts an encoder-decoder architecture, integrates feature crossover, multi-head attention based on pseudo-connection, and distribution matching adversarial to improve the quality and accuracy of the generated road network topology. In particular, the hierarchical road network topology generation model of the present invention first encodes node attributes and links as potential features respectively by using two encoders, and uses adversarial learning to ensure the distribution matching between these two types of potential variables and prior distributions, thereby achieving effective integration of node attributes and links. Then, the node features in the latent space and the link features in the latent space are decoded respectively by two decoders. In addition, in the feature crossover of the encoding-decoding process, the present invention first splices the node features with the link features to form new link features and node features. Then, drawing on the idea of ​​semi-supervised learning, multi-head pseudo-node attention is created by false positive links and false negative links, and the global association of node features is strengthened, thereby improving the generalization of the model. By decoupling the generation process of node attributes and links, the present invention reduces the complexity of the hierarchical road network topology generation task, while improving the quality and accuracy of the results.

[0031] The present invention focuses on the generation of hierarchical road network topology, which can be regarded as a heterogeneous undirected graph. If node attributes and their links are generated simultaneously, the complexity of network design will be significantly increased. In order to meet this challenge, the present invention decomposes the hierarchical road network topology generation task into two relatively independent tasks: node generation and link generation, thereby achieving decoupling between tasks.

[0032] The pseudo-node attention-based hierarchical road network topology adversarial generation method of the present invention comprises the following steps:

[0033] 1) constructing a hierarchical road network topology generation model, and obtaining a hierarchical road network topology map, and using the hierarchical road network topology map as training data to train the model, thereby obtaining a trained hierarchical road network topology generation model;

[0034] The hierarchical road network topology generation model includes a variational autoencoder network based on pseudo-node attention and a variational autoencoder network based on graph convolution;

[0035] Among them, the variational autoencoder network based on pseudo-node attention includes a node encoder and a node decoder. The node encoder takes the node attributes of the hierarchical road network topology as input and outputs the node features of the latent space to the node decoder, and the node decoder outputs the cross-node attributes.

[0036] The variational autoencoder network based on graph convolution includes a link encoder and a link decoder, which constructs an adjacency matrix based on the link relationship of the hierarchical road network topology graph. The link encoder takes the adjacency matrix as input and outputs the link features of the latent space to the link decoder, and the link decoder outputs the cross-adjacency matrix.

[0037] 2) When applied, the node features corresponding to different numbers of nodes are input into the trained node decoder to obtain the corresponding node attributes; the link features corresponding to the number of nodes are input into the trained link decoder to obtain the adjacency matrix corresponding to the corresponding link relationship; based on the obtained node attributes and adjacency matrix, a hierarchical road network topology map of the number of nodes is constructed.

[0038] For node generation, the present invention designs and implements a variational autoencoder (VAE) network based on pseudo-node attention, which consists of two parts: a node encoder and a node decoder. The node encoder first uses a multi-layer perceptron (MLP) to encode the node attributes of the input hierarchical road network topology map, and then inputs the encoded node features to the encoding module based on pseudo-node attention. The encoding module based on pseudo-node attention is composed of N series-connected pseudo-node modules, and the pseudo-node module is composed of a pseudo-node attention module and a multi-layer perceptron in series, such as Figure 2 As shown, the pseudo-node attention module includes a pseudo-positive link attention module and a pseudo-negative link attention module. Therefore, after passing through an MLP and N first pseudo-node attention modules, the present invention encodes the node attributes of the original hierarchical road network topology map into node features in the latent space. The node decoder also adopts a process similar to that of the node encoder. First, an MLP is used to process the node features of the latent space, and then the processed features are input into a decoding module based on pseudo-node attention. The decoding module based on pseudo-node attention is composed of M series-connected pseudo-node modules; therefore, after passing through an MLP and M pseudo-node modules, the present invention restores the node features of the latent space to the node attributes of the new hierarchical road network topology map, that is, obtains the cross-node attributes.

[0039] For link generation, the present invention designs and implements a variational autoencoder network based on graph convolution, which consists of a link encoder and a link decoder. The link encoder includes a graph convolution module and a graph convolution encoding module. The link encoder first uses a graph convolution module to encode the matrix corresponding to the link relationship of the input hierarchical road network topology map, and then encodes the encoded link features through the graph convolution encoding module to obtain the link features of the latent space; the graph convolution encoding module is composed of N series-connected graph convolution networks, and the graph convolution module is a graph convolution network. The link decoder includes a multi-layer perceptron and a multi-layer perceptron decoding module; the link decoder first uses an MLP to process the link features of the latent space, and then decodes the processed features through the multi-layer perceptron decoding module to obtain the link relationship of the new hierarchical road network topology map, that is, to obtain the cross-adjacency matrix; the multi-layer perceptron decoding module is composed of M series-connected multi-layer perceptrons.

[0040] In order to improve the generation quality of the hierarchical road network topology map, the present invention proposes a node-link feature crossover strategy, which specifically includes two parts: node features restore link features, and link features restore node features.

[0041] The present invention restores the link feature for the node feature. In the encoding and decoding stage, the node feature and the link feature are added together and then input into the corresponding link encoding and decoding modules. The use of node features helps to generate more accurate link features. For example, if the features of two nodes are similar, then the possibility of a link relationship between them is high, otherwise it is low.

[0042] For link features, node features are restored. This part consists of a module for constructing a pseudo link relationship and a multi-head attention module based on the pseudo link relationship. Usually, the node attribute prediction model based on the graph attention network (GAT) requires a real adjacency matrix to aggregate the features of link and non-link nodes. However, for the road topology generation task, if a real adjacency matrix is ​​used, the generation ability of the model will be limited to the feature distribution range represented by the data set, which is not conducive to the generation and generalization of the model. To this end, the present invention uses link features to create a pseudo positive link set. Specifically, the link feature matrix and its transposed matrix are multiplied to obtain a feature matrix representing the possibility of node links, and then all elements of each row of the feature matrix are divided by the maximum value of the row to achieve normalization. After normalization is completed, the upper triangular matrix of the feature matrix is ​​taken out, and a threshold δ is set at the same time. When the value in the upper triangular matrix is ​​greater than the threshold δ, it indicates that there is a link relationship between the corresponding two nodes. In this way, the present invention obtains a pseudo positive link set. The "positive" here means that there is a link relationship between the nodes. Then, based on the pseudo positive link set, a certain number of negative sampling (usually set to a multiple of the number of pseudo positive links) of link relationships between all nodes is performed to obtain a pseudo negative link set. Here, "negative" means that there is no link relationship between nodes.

[0043] like Figure 2 As shown, in order to strengthen the feature association between nodes and not rely on the real adjacency matrix, the present invention proposes two novel attention modules, a pseudo positive link attention module and a pseudo negative link attention module, for aggregating node features. They both use the same network structure.

[0044] The purpose of the pseudo-positive link attention module is to establish a global association between all nodes with pseudo-positive links. First, using the aforementioned pseudo-positive link set, perform the following operations on each node: (1) Aggregate the features of all neighboring nodes of the target node in the pseudo-positive link set (take each node in the pseudo-positive link set as the target node); (2) Multiply the aggregated features with the features of the target node; (3) Perform a softmax operation on the multiplied features. After the above three steps, a pseudo-positive link attention coefficient matrix can be obtained. Multiply this pseudo-positive link attention coefficient matrix with the node features, and obtain the pseudo-positive link node features through an MLP.

[0045] The purpose of the pseudo-negative link attention module is to establish a global association between all nodes with pseudo-negative links. First, using the aforementioned pseudo-negative link set, perform the following operations on each node: (1) Aggregate the features of all neighboring nodes of the target node in the pseudo-negative link set (take each node in the pseudo-negative link set as the target node); (2) Multiply the aggregated features with the features of the target node; (3) Perform a softmax operation on the multiplied features. After the above three steps, a pseudo-negative link attention coefficient matrix can be obtained. Multiply this pseudo-negative link attention coefficient matrix with the node features, and obtain the pseudo-negative link node features through an MLP.

[0046] Finally, the node features, pseudo positive link node features, and pseudo negative link node features are added together to achieve an updated node feature that can capture the global spatial relationship of both links and non-links.

[0047] Since the pseudo positive link set and the pseudo negative link set are extracted from the link features, the pseudo positive link attention module and the pseudo negative link attention module can implicitly realize the recovery of node features from the link features.

[0048] The task of the present invention consists of node attributes and link generation. When training the generation model, the loss function of the present invention is: adversarial matching loss L adv and the reconstruction loss L r .

[0049] The adversarial matching loss encourages the latent features to align with the real data distribution, including node feature adversarial matching and link feature adversarial matching, which is defined as shown in formula (2):

[0050]

[0051] In the formula, z p is a real sample from the prior distribution p(z), p(z) is the prior distribution, and z is a random variable; is the entropy of the prior distribution p(z); is the node feature z in the latent space x Entropy of is the link feature z in the latent space a Entropy of For node encoder E X Set the node attribute x i Node features z mapped to latent space x ,φ x is the node encoder E X The learnable parameters of , q is the posterior distribution of the encoding stage; Link encoder E A The link relationship a corresponding to the adjacency matrixi The link feature z mapped to the latent space a ,φ a Is the link encoder E A The learnable parameters of ; D(*) is the discriminator, which is used to distinguish the generated samples from the real samples.

[0052] During adversarial training, the discriminator D(*) is first fixed, and then the node encoder E is trained. X and link encoder E A , so that they can reduce the gap between the generated samples and the real samples as much as possible, which is equivalent to making the discriminator misjudge as much as possible. Then fix the node encoder E X and link encoder E A , train the discriminator D(*) to accurately distinguish between real samples and generated samples as well as possible. After multiple update iterations, the ideal situation is to make the discriminator D(*) unable to distinguish that the sample comes from the node encoder E X and link encoder E A The output is still the real output. Through the above adversarial training, the model will converge to the generated distribution and fit the real distribution, thereby improving the generated quality.

[0053] Reconstruction loss L r It is used to measure the difference between the generated hierarchical road network topology map and the real hierarchical road network topology map, including node feature reconstruction loss and link feature reconstruction loss, as shown in formula (3):

[0054]

[0055] In the formula, is the node decoder D X The node feature z in the latent space x Mapped to the cross node attribute y i ,θ x is the node decoder D X The learnable parameters of , p is the posterior distribution of the decoding stage; Link decoder D A The link feature z in the latent space a Mapped to cross-link relationship b i ,θ a Link decoder D A The learnable parameters of is the intersection node attribute y i The entropy of X is the intersection node attribute y i The probability distribution of is the link relationship b corresponding to the cross adjacency matrix i The entropy of AFor the cross-link relationship b i The probability distribution of .

[0056] The total loss function L total As shown in formula (4), α and β are weight coefficients, which will be adjusted according to the training stage.

[0057] L total =αL adv +βL r (4)

[0058] Figure 1 The hierarchical road network topology generation model is presented. The model adopts an encoder-decoder architecture to generate node attributes and links in a task-decoupled-feature-coupled manner. Specifically, the hierarchical road network topology generation model first transforms the node attributes X and link relationships A into the latent space through two parameterized encoders, where E X :q(z x |x i ) is used to encode node attributes and obtain node features; E A :q(z a |a i ) is used to encode the link relationship and obtain the link feature. Then, adversarial learning is introduced to complete the potential node feature z x ~q(z), potential link feature z a ~q(z) is aligned with the prior distribution p(z). Finally, two parameterized decoders are used to restore node attributes and link relationships, where D X :p(x i |z x ) is used to decode node features, D A :p(a i |z a ) is used to decode the link features. In this process, the hierarchical road network topology generation model completes the intersection of node features and connection features through the strategy of restoring link features from node features and restoring node features from link features, thus achieving feature sharing. In particular, the model also strengthens the global connection between nodes through pseudo-node attention.

[0059] like Figure 1 As shown, in a specific embodiment of the present invention, the node encoder of the present invention includes a first multi-layer perceptron and a pseudo-node attention-based encoding module, and the first multi-layer perceptron encodes the input node attributes to obtain encoded node features;

[0060] The link encoder includes a first graph convolutional network and a graph convolutional encoding module. The first graph convolutional network encodes the input adjacency matrix to obtain encoded link features; the adjacency matrix is ​​obtained based on the link relationship A.

[0061] Based on the shared feature hypothesis, node features can be recovered from structured link features, and vice versa. Therefore, the present invention proposes a node-link feature crossover strategy, which specifically includes two parts: node features recover link features, and link features recover node features. Therefore, the two encoders complete the crossover of encoded node features and encoded link features by recovering link features from node features and recovering node features from link features;

[0062] When performing the process of restoring link features from node features, the first graph convolutional network of the graph convolutional encoding module takes the encoded node features and the encoded link features as inputs and outputs the first encoded link features;

[0063] When performing the process of restoring node features from link features, the first pseudo-node module of the pseudo-node attention-based encoding module also takes the encoding node features and the encoding link features as inputs, and outputs the first encoding node features;

[0064] Next, the i-th encoded node feature and the i-th encoded link feature are input into the i+1-th graph convolutional network together, and are also input into the i+1-th pseudo-node module together, where 1≤i≤N-1; finally, the N-th graph convolutional network outputs the N-th encoded link feature, which is the link feature of the latent space, and the N-th pseudo-node module outputs the N-th encoded node feature, which is the node feature of the latent space.

[0065] As shown in Figure 1, the present invention first transforms the original node attribute X through a multi-layer perceptron (MLP) to obtain the encoded node feature X l =MLP(X). At the same time, the adjacency matrix A containing the link relationship is also transformed through a graph convolutional network (GCN) to obtain the encoded link feature A l =GCN(A).

[0066] The node feature restores the link feature through formula (5):

[0067] A′=A l +X l (5)

[0068] Where A′ represents the link feature after crossover.

[0069] The process of restoring node features from link features is slightly more complicated and is divided into two steps: extracting pseudo-link relationships and multi-node attention based on pseudo-link relationships. First, we will introduce how to extract pseudo-link relationships between pseudo-nodes from link features. Usually, node attribute prediction models based on graph attention networks require a true adjacency matrix to aggregate the features of linked and non-linked nodes. However, for road topology generation tasks, if a true adjacency matrix is ​​used, the generation capability of the model will be limited to the feature distribution range represented by the dataset, which is not conducive to the generation and generalization of the model. For this reason, Figure 2 As shown, the present invention extracts a pseudo adjacency matrix A″ representing the possibility of node links from the link features. Specifically, A′ and its transpose (A′) are T Multiply them, and then divide by the maximum value of each row of the matrix to normalize and get A″.

[0070]

[0071] In the formula, (A′(A′) T ) i,j Represents the matrix A′(A′) T The element in the i-th row and j-th column of the T ) i ) is the maximum value of the i-th row of the matrix. The element value in A″ represents the possibility of the link between nodes. Then, this paper obtains the pseudo positive link set through formula (7):

[0072] E pos ←U(A″)[i,j]>δ (7)

[0073] In the formula, E pos represents the pseudo positive link set, U represents the upper triangular matrix of the matrix, and δ is a threshold. When the value of an element in A″ is greater than δ, it means that there is a link relationship between the corresponding two nodes. For the pseudo negative link set, this paper generates it by sampling the negative edges of the pseudo positive links.

[0074] E neg ←neg sam (E pos ,K) (8)

[0075] In the formula, E neg Represents a pseudo negative link set, neg sam Denotes the negative edge sampling function, and K denotes the number of negative edges to be sampled. Finally, the present invention obtains a set of pseudo positive link sets and pseudo negative link sets, which will be used in the subsequent multi-head pseudo node attention mechanism.

[0076] In order to strengthen the global connection between nodes without relying on the real adjacency matrix, the present invention proposes two novel attention modules, namely the pseudo positive link attention module and the pseudo negative link attention module. They both adopt the same network structure.

[0077] The purpose of the pseudo positive link attention module is to establish global associations between all pseudo-linked nodes. The attention coefficient of the pseudo positive link attention module is calculated by formula (9):

[0078]

[0079] In the formula, num(E pos ) represents the number of pseudo positive links, Pool represents the pos Aggregate the neighbor node features of the pseudo positive link to the target node. Next, l and Perform matrix multiplication and pass through a layer of MLP to obtain pseudo positive link node features

[0080]

[0081] The pseudo-positive link attention module obtains a global view of the spatial graph structure through Equations (9) and (10).

[0082] Similarly, the attention coefficient of the pseudo-negative link attention module is shown in formula (11),

[0083]

[0084] In the formula, num(E neg ) represents the number of pseudo negative links, Pool represents the peg Aggregate the neighbor node features of the pseudo negative link to the target node. Next, l and Perform matrix multiplication and pass through a layer of MLP to obtain pseudo negative link node features

[0085]

[0086] Finally, the present invention is to X l Element-wise addition is performed so that the updated node features can capture the global spatial relationship of both pseudo positive links and pseudo negative links, as shown in formula (13).

[0087]

[0088] Since the pseudo positive link set E pos and the pseudo-negative link set E negIt is extracted from the link features, and the node features can be implicitly restored from the link features through the above-mentioned pseudo-positive link attention module and pseudo-negative link attention module.

[0089] In a specific embodiment of the present invention, the specific implementation of the decoding part is:

[0090] The node decoder includes a second multi-layer perceptron and a pseudo-node attention-based decoding module, wherein the pseudo-node attention-based decoding module is composed of M pseudo-node modules connected in series;

[0091] The chained decoder includes a third multi-layer perceptron and a multi-layer perceptron decoding module, wherein the multi-layer perceptron decoding module is composed of M multi-layer perceptrons connected in series;

[0092] The two decoders complete the intersection of node features in the latent space and link features in the latent space by recovering link features from node features and recovering node features from link features. Finally, the node decoder outputs cross-node attributes and the link encoder outputs a cross-adjacency matrix.

[0093] The two decoders restore link features through node features and restore node features through link features to complete the intersection of encoded node features and encoded link features, including:

[0094] First, the second multilayer perceptron receives the node features of the input latent space, and outputs the processed node features to the decoding module based on pseudo-node attention; the third multilayer perceptron receives the link features of the input latent space, and outputs the processed link features to the multilayer perceptron decoding module;

[0095] The first graph of the multi-layer perceptron decoding module The multi-layer perceptron takes the processed link features and the processed node features as input and outputs the first adjacency matrix; at the same time, the first pseudo-node module of the pseudo-node attention-based decoding module also takes the processed link features and the processed node features as input and outputs the first node features;

[0096] Next, the j-th node feature and the j-th adjacency matrix are input into the j+1-th multilayer perceptron together, and are also input into the j+1-th pseudo-node module, where 1≤j≤M-1; finally, the M-th multilayer perceptron outputs the M-th adjacency matrix, which is a cross-adjacency matrix, and the M-th pseudo-node module outputs the M-th node feature, and the cross-node attribute is obtained based on the M-th node feature.

[0097] In order to verify the capability of the hierarchical road network topology generation model, the present invention randomly generates latent vectors with different numbers of nodes and inputs them into the node decoder and link decoder of the hierarchical road network topology generation model of the present invention. The generated hierarchical road network topology graphs with different numbers of nodes are visualized as follows: Figure 2 The generated results show different city styles, such as Figure 2 (2) is the style of a certain city intersection and Figure 2 (4) a certain city loop style; Figure 2 (1), (3), (5), (6), (7), and (8) represent the random generation results under different node conditions. The visualization results show that the hierarchical road network topology graph generated by the present invention effectively displays the node attributes and the link relationships between them. Furthermore, after adding length information to the links in the topology graph, these graphs can be used for coarse-grained traffic flow simulation, such as dedicated lane deployment and traffic balance analysis.

[0098] In this embodiment, a hierarchical road network topology confrontation generation system for implementing the method is also provided, including:

[0099] A model building and training module, which is used to build a hierarchical road network topology generation model and obtain a hierarchical road network topology map, and use the hierarchical road network topology map as training data to train the model to obtain a trained hierarchical road network topology generation model;

[0100] The hierarchical road network topology generation model includes a variational autoencoder network based on pseudo-node attention and a variational autoencoder network based on graph convolution;

[0101] Among them, the variational autoencoder network based on pseudo-node attention includes a node encoder and a node decoder. The node encoder takes the node attributes of the hierarchical road network topology as input and outputs the node features of the latent space to the node decoder, and the node decoder outputs the cross-node attributes.

[0102] The variational autoencoder network based on graph convolution includes a link encoder and a link decoder, which constructs an adjacency matrix based on the link relationship of the hierarchical road network topology graph. The link encoder takes the adjacency matrix as input and outputs the link features of the latent space to the link decoder, and the link decoder outputs the cross-adjacency matrix.

[0103] The application module is used to input node features corresponding to different numbers of nodes into the trained node decoder to obtain corresponding node attributes; input link features corresponding to the number of nodes into the trained link decoder to obtain an adjacency matrix corresponding to the corresponding link relationship; and construct a hierarchical road network topology map of the number of nodes based on the obtained node attributes and adjacency matrix.

[0104] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment, and the implementation methods of the remaining modules will not be repeated here. The system embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0105] The embodiments of the system of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The system embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the corresponding computer program instructions in the non-volatile memory are read into the memory by the processor of any device with data processing capabilities and run.

[0106] Obviously, the above-described embodiments and drawings are only some examples of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that, although the work done in this development process may be complicated and lengthy, for those of ordinary skill in the art, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application. Without departing from the concept of the present application, several variations and improvements can also be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for adversarial generation of hierarchical road network topology based on pseudo-node attention, characterized in that: The following steps are involved: 1) constructing a hierarchical road network topology generation model, and obtaining a hierarchical road network topology map, and using the hierarchical road network topology map as training data to train the model, thereby obtaining a trained hierarchical road network topology generation model; The hierarchical road network topology generation model includes a variational autoencoder network based on pseudo-node attention and a variational autoencoder network based on graph convolution; Among them, the variational autoencoder network based on pseudo-node attention includes a node encoder and a node decoder. The node encoder takes the node attributes of the hierarchical road network topology as input and outputs the node features of the latent space to the node decoder, and the node decoder outputs the cross-node attributes. The variational autoencoder network based on graph convolution includes a link encoder and a link decoder, which constructs an adjacency matrix based on the link relationship of the hierarchical road network topology graph. The link encoder takes the adjacency matrix as input and outputs the link features of the latent space to the link decoder, and the link decoder outputs the cross-adjacency matrix. 2) When applied, the node features corresponding to different numbers of nodes are input into the trained node decoder to obtain the corresponding cross-node attributes; the link features corresponding to the number of nodes are input into the trained link decoder to obtain the cross-adjacency matrix corresponding to the corresponding link relationship; based on the obtained cross-node attributes and cross-adjacency matrix, a hierarchical road network topology map of the number of nodes is constructed.

2. The method according to claim 1, characterized in that In step 1), the node encoder includes a first multi-layer perceptron and a pseudo-node attention-based encoding module, and the pseudo-node attention-based encoding module is composed of N pseudo-node modules connected in series; The link encoder includes a graph convolution module and a graph convolution encoding module, and the graph convolution encoding module is composed of N series-connected graph convolution networks; The two encoders complete the intersection of encoded node features and encoded link features by recovering link features from node features and recovering node features from link features. Finally, the node encoder outputs node features of the latent space, and the link encoder outputs link features of the latent space.

3. The method according to claim 2, characterized in that The two encoders restore link features through node features and restore node features through link features to complete the intersection of encoded node features and encoded link features, including: First, the first multi-layer perceptron encodes the input node attributes to obtain the encoded node features, and the graph convolution module encodes the input adjacency matrix to obtain the encoded link features; The first graph convolution network of the graph convolutional encoding module takes the encoding node feature and the encoding link feature as input, and outputs the first encoding link feature; at the same time, the first pseudo-node module of the pseudo-node attention-based encoding module also takes the encoding node feature and the encoding link feature as input, and outputs the first encoding node feature; Next, the i-th encoded node feature and the i-th encoded link feature are input into the i+1-th graph convolutional network together, and are also input into the i+1-th pseudo-node module together, where 1≤i≤N-1; finally, the N-th graph convolutional network outputs the N-th encoded link feature, which is the link feature of the latent space, and the N-th pseudo-node module outputs the N-th encoded node feature, which is the node feature of the latent space.

4. The method according to claim 3, characterized in that The pseudo node module is composed of a pseudo node attention module and a multi-layer perceptron connected in series; the i-th pseudo node module obtains the i-th encoding node feature, The following steps are involved: First, the pseudo node module receives the coded link features and the ith coded link features in matrix form, and multiplies the matrix-form coded link features or the ith coded link features with their transposed matrix to obtain a pseudo adjacency matrix; the pseudo adjacency matrix is ​​normalized to obtain the upper triangular matrix of the normalized matrix, and a threshold δ is set at the same time. When the value in the upper triangular matrix is ​​greater than the threshold δ, it indicates that there is a link relationship between the corresponding two nodes, and all nodes with a link relationship constitute a pseudo positive link set; based on the pseudo positive link set, the link relationship between all nodes is negatively sampled to obtain a pseudo negative link set; Take each node in the pseudo positive link set as the target node, aggregate the features of all neighbor nodes of the target node in the pseudo positive link set, multiply the aggregated features with the features of the target node, perform a softmax operation on the multiplied features, and obtain a pseudo positive link attention coefficient matrix; multiply the pseudo positive link attention coefficient matrix with the encoding node features, and pass the multiplication result through an MLP to obtain the pseudo positive link node features; Take each node in the pseudo-negative link set as the target node, aggregate the features of all neighboring nodes of the target node in the pseudo-negative link set, multiply the aggregated features with the features of the target node, perform a softmax operation on the multiplied features, and obtain a pseudo-negative link attention coefficient matrix; multiply the pseudo-negative link attention coefficient matrix with the encoding node features, and pass the multiplication result through an MLP to obtain the pseudo-negative link node features; The pseudo positive link node features, the pseudo negative link node features, and the coding node features or the i-th coding node features received by the pseudo node module are added together, and the addition result is input into the multi-layer perceptron of the pseudo node module to obtain the output of the pseudo node module.

5. The method according to claim 3, characterized in that: The i-th graph convolution obtains the i-th encoded link feature, comprising the following steps: The graph convolutional network adds the two features it receives and obtains the output of the graph convolutional network.

6. The method according to claim 4, characterized in that The node decoder includes a second multi-layer perceptron and a pseudo-node attention-based decoding module, wherein the pseudo-node attention-based decoding module is composed of M pseudo-node modules connected in series; The chained decoder includes a third multi-layer perceptron and a multi-layer perceptron decoding module, wherein the multi-layer perceptron decoding module is composed of M multi-layer perceptrons connected in series; The two decoders complete the intersection of node features in the latent space and link features in the latent space by recovering link features from node features and recovering node features from link features. Finally, the node decoder outputs cross-node attributes and the link encoder outputs a cross-adjacency matrix.

7. The method according to claim 6, characterized in that The two decoders restore link features through node features and restore node features through link features to complete the intersection of encoded node features and encoded link features, including: First, the second multilayer perceptron receives the node features of the input latent space, and outputs the processed node features to the decoding module based on pseudo-node attention; the third multilayer perceptron receives the link features of the input latent space, and outputs the processed link features to the multilayer perceptron decoding module; The first graph of the multi-layer perceptron decoding module The multi-layer perceptron takes the processed link features and the processed node features as input and outputs the first adjacency matrix; at the same time, the first pseudo-node module of the pseudo-node attention-based decoding module also takes the processed link features and the processed node features as input and outputs the first node features; Next, the j-th node feature and the j-th adjacency matrix are input into the j+1-th multilayer perceptron together, and are also input into the j+1-th pseudo-node module, where 1≤j≤M-1; finally, the M-th multilayer perceptron outputs the M-th adjacency matrix, which is a cross-adjacency matrix, and the M-th pseudo-node module outputs the M-th node feature, and the cross-node attribute is obtained based on the M-th node feature.

8. The method according to claim 1, characterized in that Based on adversarial matching loss L adv and the reconstruction loss L r The hierarchical road network topology generation model is trained, and the adversarial matching loss L adv The calculation formula is: Among them, z p is a real sample from the prior distribution p(z), p(z) is the prior distribution, and z is a random variable; is the entropy of the prior distribution p(z); is the node feature z in the latent space x Entropy of is the link feature z in the latent space a Entropy of For node encoder E X Set the node attribute x i Node features z mapped to latent space x ,φ x is the node encoder E X The learnable parameters of , q is the posterior distribution of the encoding stage; Link encoder E A The link relationship a corresponding to the adjacency matrix i The link feature z mapped to the latent space a ,φ a Is the link encoder E A The learnable parameters of ; D(*) is the discriminator; The reconstruction loss L r The calculation formula is: in, is the node decoder D X The node feature z in the latent space x Mapped to the cross node attribute y i ,θ x is the node decoder D X The learnable parameters of , p is the posterior distribution of the decoding stage; Link decoder D A The link feature z in the latent space a Mapped to cross-link relationship b i ,θ a Link decoder D A The learnable parameters of is the intersection node attribute y i The entropy of X is the intersection node attribute y i The probability distribution of is the link relationship b corresponding to the cross adjacency matrix i The entropy of A For the cross-link relationship b i The probability distribution of The total loss function L total The calculation is as follows: L total =αL adv +βL r Among them, α and β are weight coefficients.

9. The method according to claim 1, characterized in that: In step 2), the generated hierarchical road network topology graph G = (V, L) includes a node set V consisting of a finite number of points and a link set L consisting of a finite number of links. A link represents the connection relationship between two nodes. The nodes is the d-dimensional feature vector of node i in the graph, expressed as: v i ←{Rand;Deg1;Deg2;Pos;C} in, is a d1-dimensional noise vector sampled from a normal distribution; and are the first-order degree and second-order degree of a node respectively. The first-order degree represents the degree with node v i The total number of connected nodes, the second-order degree represents the number of nodes connected to node v i The sum of the degrees of all nodes connected to , that is, node v i The sum of the number of neighbor nodes; Pos represents the position of the node; C represents the category attribute of the node; represents a link list, M is the number of links in the link set L; using the index information of the link, construct the adjacency matrix A = {a uv }∈{0,1} N×N , a uv is the element in the uth row and vth column of the adjacency matrix A, representing the connection between nodes u and v. If edge(u,v)∈L, then a uv =1, otherwise a uv =0, edge(u,v) represents the connecting edge edge consisting of node u and node v.

10. A hierarchical road network topology adversarial generation system for implementing the method of claim 1, characterized in that: include: A model building and training module, which is used to build a hierarchical road network topology generation model and obtain a hierarchical road network topology map, and use the hierarchical road network topology map as training data to train the model to obtain a trained hierarchical road network topology generation model; The hierarchical road network topology generation model includes a variational autoencoder network based on pseudo-node attention and a variational autoencoder network based on graph convolution; Among them, the variational autoencoder network based on pseudo-node attention includes a node encoder and a node decoder. The node encoder takes the node attributes of the hierarchical road network topology as input and outputs the node features of the latent space to the node decoder, and the node decoder outputs the cross-node attributes. The variational autoencoder network based on graph convolution includes a link encoder and a link decoder, which constructs an adjacency matrix based on the link relationship of the hierarchical road network topology graph. The link encoder takes the adjacency matrix as input and outputs the link features of the latent space to the link decoder, and the link decoder outputs the cross-adjacency matrix. The application module is used to input node features corresponding to different numbers of nodes into the trained node decoder to obtain corresponding cross-node attributes; input link features corresponding to the number of nodes into the trained link decoder to obtain the cross-adjacency matrix corresponding to the corresponding link relationship; and construct a hierarchical road network topology map of the number of nodes based on the obtained cross-node attributes and cross-adjacency matrix.

Citation Information

Patent Citations

  • Controllable hierarchical road topology generation system and method based on AIGC

    CN118397449A

  • Topological road network controllable generation method and system for automatic driving simulation

    CN118536251A

Cited By

  • Controllable community graph data generation method and system

    CN120107408A