A robust control method and system for autonomous driving based on contrastive learning
Through the contrastive learning method, low-dimensional state representation is extracted and the scIRL algorithm is used for deep contrastive learning to construct a continuous robust control network, which solves the problem of poor adaptability to complex driving scenarios in the existing technology and achieves efficient automatic driving control.
Patent Information
- Application Number
- CN202410813221.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-24
AI Technical Summary
In existing autonomous driving technology, deep neural networks and inverse reinforcement learning methods are ineffective when processing high-dimensional data and multi-modal behaviors. They are difficult to capture complex real-world driving scenarios and rely on a large amount of annotated data, which is costly.
Adopt a robust control method for autonomous driving based on contrastive learning, extract state representations through a low-dimensional state extractor, and use the scIRL algorithm for deep contrastive learning to build a continuous robust control network, reduce dependence on annotated data, and enhance adaptation to complex scenes. ability.
It effectively retains multi-modality across different driving scenarios, reduces dependence on annotated data, improves adaptability to complex real-world driving scenarios, and achieves high-precision and robust controller parameter prediction.
Smart Images

Figure CN118378069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to an autonomous driving robust control method and system based on contrastive learning. Background Art
[0002] Accurately predicting the trajectories of traffic participants has been a core challenge in the development of autonomous driving systems.
[0003] As a powerful learning tool, deep neural networks (DNNs) are widely used to learn complex patterns from abundant data. However, DNN methods are mainly limited by the problem of data scarcity, that is, when the amount of data is insufficient or the quality is not high, the learning effect and generalization ability of the model will be greatly reduced. In addition, DNN methods often require a large amount of labeled data for training, which is particularly problematic in autonomous driving tasks because obtaining high-quality, accurately labeled driving trajectory data is costly and time-consuming.
[0004] Inverse reinforcement learning (IRL) learns the decision-making process by observing the behavior of experts to infer the underlying reward function. IRL methods can fundamentally understand the intention behind the behavior and are suitable for simulating complex decision-making processes. However, the main challenges facing IRL are locality and limited robustness, which means that the learned policies are difficult to adapt to new or unseen scenarios. In addition, traditional IRL methods do not work well when dealing with high-dimensional data and multimodal behaviors because they often rely on linear reward functions or simplified model assumptions, which make it difficult to capture the complexity of real-world driving scenarios. Summary of the invention
[0005] Based on the problems raised by the above background technology, the purpose of the present invention is to provide an autonomous driving robust control method and system based on contrastive learning, which overcomes the limitations of existing DNN and IRL methods and solves the problem that the prior art relies on linear reward functions or simplified model assumptions, making it difficult to capture the complexity of real-world driving scenarios, resulting in poor results when processing high-dimensional data and multimodal behaviors.
[0006] The present invention is achieved through the following technical solutions:
[0007] A first aspect of the present invention provides an autonomous driving robust control method based on contrastive learning, comprising the following steps:
[0008] Step S1, using a low-dimensional state extractor to extract state representations in a monitoring trajectory data set, and mapping the state representations to a feature space, presetting a group of multiple candidates of a population in the feature space, and initializing a comparison trajectory set corresponding to each candidate;
[0009] Step S2: using the scIRL algorithm to calculate the set of comparison trajectories corresponding to each candidate to obtain a reward parameter;
[0010] Step S3, constructing a continuous robust control network for each candidate, using the reward parameter as the continuous robust control network corresponding to the driving context training, and obtaining a candidate continuous robust control network;
[0011] Step S4, test each candidate continuous robust control network to obtain test indicators, select preferred candidate continuous robust control networks for hybridization and mutation through the test indicators, generate the next group of populations based on the results of hybridization and mutation, and repeat steps S2 to S4 until the number of cycles reaches a preset value.
[0012] In the above technical solution, for each original trajectory in the monitoring trajectory data set, a low-dimensional motion state extractor is used to extract it, and the extracted state representation is mapped to the feature space to achieve the purpose of dimensionality reduction. In the low-dimensional feature space, a group of populations is preset, and there are multiple candidates in the group of populations. Each candidate corresponds to a comparison trajectory set, and the comparison trajectory set includes a positive trajectory set and a negative trajectory set. Initializing the comparison trajectory set is to initialize the positive trajectory set and the negative trajectory set, initialize the positive trajectory set as a trajectory feature set, and initialize the negative trajectory set as an empty set for subsequent comparison learning.
[0013] The scIRL algorithm is used to calculate the initialized contrast trajectory set. Compared with the traditional IRL algorithm, which relies on linear reward functions or simplified model assumptions and is difficult to capture the complexity of real-world driving scenes, this method effectively retains the multimodality across different driving scenes by performing deep contrastive learning on the contrast trajectory set. In general, in the absence of a priori that can be predetermined, the contrast set is iteratively refined in a self-supervised manner, reducing the dependence on a large amount of labeled data, overcoming the defects of the traditional IRL algorithm, effectively utilizing a large amount of unlabeled sample data, and improving the adaptability to complex real-world driving scenes. The reward parameter of the contrast trajectory set corresponding to each candidate can be obtained by calculating the initialized contrast trajectory set through the scIRL algorithm (self-contrastive inverse reinforcement learning algorithm), and the reward parameter is used as the label of the contrast trajectory set, that is, the driving context of the contrast trajectory set.
[0014] A continuous robust control network is constructed for each candidate. The continuous robust control network is a continuous control network that provides the ability to handle high-dimensional, continuous dynamic environments and enhances the progress and generalization of prediction. Compared with the existing deep neural network (DNN) that requires a large amount of high-quality and accurately labeled driving trajectory data, the continuous robust control network adopted by the present invention reduces the dependence on a large amount of labeled data. However, since the definition of positive and negative classes of contrastive learning is not embedded in any priori, the continuous control network (CCN) may have the problem of high variance and low precision. Therefore, the method uses the driving context corresponding to the candidate to train the continuous robust control network, adopts an iterative method to generate pseudo labels, and then uses the CCN obtained in the current cycle to assign labels to the positive and negative classes of each trajectory, so as to superimpose the knowledge accumulated in this iteration to carry out the next cycle. Through continuous iteration, the prior knowledge is gradually accumulated, and the CCN finally obtained can adaptively predict the controller parameters for the dynamic driving context with high accuracy and high robustness.
[0015] In an optional embodiment, the comparison trajectory set includes a positive trajectory set and a negative trajectory set;
[0016] Among them, the initialization of the comparison trajectory set corresponding to each candidate includes:
[0017] The positive trajectory set is initialized as the trajectory feature set, and the negative trajectory set is initialized as the empty set.
[0018] In an optional embodiment, using the scIRL algorithm to calculate the set of comparison trajectories corresponding to each candidate includes:
[0019] Setting an expert demonstration set and initial parameters of the comparison trajectory set, calculating the expert demonstration set and the initial parameters to obtain an expert demonstration probability;
[0020] An objective function and a scIRL loss function are established, and a reward parameter is obtained by calculating the expert demonstration set, the initial parameters and the expert demonstration probability through the objective function and the scIRL loss function.
[0021] In an optional embodiment, the scIRL loss function includes an IRL loss term and an extended loss term, and the expression of the scIRL loss function is as follows:
[0022] ;
[0023] ;
[0024] ;
[0025] In the above formula, represents the loss function of scIRL self-contrast inverse reinforcement, represents the loss function of the original IRL, represents the contrastive learning loss function, represents the distribution weight hyperparameter of the loss function, Represents controller parameters, represents the positive sample set, represents the transpose of the controller parameters, represents a predefined characteristic function, represents the i-th demonstration trajectory, represents the total number of trajectories, Indicates Tracks, represents the max function, and Represent the probability of each expert demonstration in the positive trajectory set and the negative trajectory set, respectively. represents the optimized spacing, The larger it is, the greater the distance between positive and negative samples.
[0026] In an optional embodiment, the continuous robust control network includes a first network input stream for inputting static map geometry, a second network input stream for inputting vehicle spatial state mapping, and a third network input stream for inputting vehicle kinematic state mapping;
[0027] The static map geometry, the vehicle spatial state mapping and the vehicle kinematic state mapping are respectively input into the first network input stream, the second network input stream and the third network input stream for training by the continuous robust control network, and the continuous robust control network inputs the control parameters of the reward function after training.
[0028] In an optional embodiment, inputting the static map geometry, the vehicle spatial state map, and the vehicle kinematic state map into the first network input stream, the second network input stream, and the third network input stream respectively to train the continuous robust control network includes:
[0029] Convolutionally mapping the static map geometry through the first network input stream to obtain a static map attention map;
[0030] Convolutionally mapping the vehicle spatial state map through the second network input stream to obtain a vehicle spatial information attention map;
[0031] Fusing the static map attention map with the vehicle space information attention map to obtain a fused mapping attention map;
[0032] Convolutionally mapping the vehicle kinematic state map through the third network input stream to obtain a vehicle kinematic attention map;
[0033] A dual-input twin structure is established, and the fusion mapping attention map is coupled with the vehicle kinematic attention map through the dual-input twin structure to obtain a coupling vector, and the coupling vector is mapped to the IRL parameter space through a fully connected layer.
[0034] In an optional embodiment, fusing and mapping the static map attention map with the vehicle spatial information attention map includes: fusing and mapping the static map attention map with the vehicle spatial information attention map using Hadamard Product.
[0035] In an optional embodiment, the loss of the continuous robust control network during training is expressed as follows:
[0036] ;
[0037] In the above formula, represents the loss of the continuous robust control network during training, where is the training trajectory number; and Represent the predicted reward parameters and true values respectively, and Respectively represent The reward parameters and true values predicted by the training trajectory sequence number, represents the cosh distance between the predictive controller parameters and the true knowledge of the parameters, Represents the total number of trajectories.
[0038] A second aspect of the present invention provides an autonomous driving robust control system based on contrastive learning, comprising:
[0039] An initialization module, the initialization module is used to extract state representations in the monitoring trajectory data set using a low-dimensional state extractor, and map the state representations to a feature space, preset a group of multiple candidates of a population in the feature space, and initialize a comparison trajectory set corresponding to each candidate;
[0040] A scIRL processing module, wherein the scIRL processing module is used to calculate the comparison trajectory set corresponding to each candidate using the scIRL algorithm to obtain a reward parameter;
[0041] A continuous robust control module, wherein the continuous robust control module is used to construct a continuous robust control network for each candidate, and use the reward parameter as a continuous robust control network corresponding to the driving context training to obtain a candidate continuous robust control network;
[0042] A test module is used to test each candidate continuous robust control network to obtain a test index, select a preferred candidate continuous robust control network for hybridization and mutation through the test index, and generate the next group of populations based on the results of hybridization and mutation.
[0043] In an optional embodiment, the scIRL processing module includes:
[0044] A probability calculation unit, wherein the expert demonstration unit is used to set an expert demonstration set and initial parameters of a comparison trajectory set, calculate the expert demonstration set and the initial parameters, and obtain an expert demonstration probability;
[0045] A reward calculation unit is used to establish an objective function and a scIRL loss function, and to calculate the expert demonstration set, the initial parameters and the expert demonstration probability through the objective function and the scIRL loss function to obtain a reward parameter.
[0046] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0047] 1. Through deep contrastive learning of contrast trajectory sets, the multimodality across different driving scenarios is effectively preserved. In general cases where there is no prior knowledge, the contrast set is iteratively refined in a self-supervised manner, reducing the reliance on a large amount of labeled data, overcoming the defects of traditional IRL algorithms, effectively utilizing a large amount of unlabeled sample data, and improving the adaptability to complex real-world driving scenarios.
[0048] 2. Use the driving context corresponding to the candidate to train the continuous robust control network, adopt an iterative method to generate pseudo labels, and then use the CCN obtained in the current cycle to assign labels to the positive and negative classes of each trajectory, so as to superimpose the knowledge accumulated in this iteration to carry out the next cycle. Through continuous iteration, the prior knowledge is gradually accumulated, and the CCN finally obtained can adaptively predict the controller parameters for the dynamic driving context with high accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0050] Figure 1 A schematic diagram of the structure of the structured decoupling training framework provided in Example 1 of the present invention;
[0051] Figure 2 A schematic diagram of the structure of a continuous robust control network provided in Example 1 of the present invention;
[0052] Figure 3 A schematic diagram of the structure of an electronic device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0053] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0054] Embodiment 1 of the present invention provides an autonomous driving robust control method based on contrastive learning, and its overall process is as follows: Figure 1 As shown, a method for robust control of autonomous driving based on contrastive learning includes the following steps:
[0055] Step S1, using a low-dimensional state extractor to extract state representations in a monitoring trajectory data set, and mapping the state representations to a feature space, presetting a group of multiple candidates of a population in the feature space, and initializing a comparison trajectory set corresponding to each candidate;
[0056] Step S2: using the scIRL algorithm to calculate the set of comparison trajectories corresponding to each candidate to obtain a reward parameter;
[0057] Step S3, constructing a continuous robust control network for each candidate, using the reward parameter as the continuous robust control network corresponding to the driving context training, and obtaining a candidate continuous robust control network;
[0058] Step S4, test each candidate continuous robust control network to obtain test indicators, select the preferred candidate continuous robust control network through the test indicators for hybridization (randomly exchange trajectory points of different comparison sets) and mutation (randomly change the trajectory points of each set), generate the next group of populations based on the results of hybridization and mutation, and repeat steps S2 to S4 until the number of cycles reaches a preset value.
[0059] It should be noted that for each original trajectory in the monitoring trajectory data set, a low-dimensional motion state extractor is used to extract it, and the extracted state representation is mapped to the feature space to achieve the purpose of dimensionality reduction. In the low-dimensional feature space, a set of populations (populations) is preset, and there are multiple candidates in the set of populations. Each candidate corresponds to a comparison trajectory set, and the comparison trajectory set includes a positive trajectory set and a negative trajectory set. Initializing the comparison trajectory set is to initialize the positive trajectory set and the negative trajectory set, initialize the positive trajectory set as a trajectory feature set, and initialize the negative trajectory set as an empty set for subsequent comparison learning.
[0060] The scIRL algorithm is used to calculate the initialized set of comparison trajectories. Compared with the traditional IRL algorithm that relies on linear reward functions or simplified model assumptions and is difficult to capture the complexity of real-world driving scenarios, this method effectively retains the multimodality across different driving scenarios by performing deep comparative learning on the comparison trajectory set. In general cases where there is no prior knowledge that can be predetermined, the comparison set is iteratively refined in a self-supervised manner, reducing the reliance on a large amount of labeled data, overcoming the shortcomings of the traditional IRL algorithm, and effectively utilizing a large amount of unlabeled sample data, thereby improving the ability to adapt to complex real-world driving scenarios. By calculating the initialized comparison trajectory set using the scIRL algorithm (self-contrastive inverse reinforcement learning algorithm), the reward parameters of the comparison trajectory set corresponding to each candidate can be obtained, and the reward parameters are used as the label of the comparison trajectory set, that is, the driving context of the comparison trajectory set. Among them, if Figure 1 As shown, It is the self-supervised contrast inverse reinforcement learning loss function defined in the scIRL algorithm. Implement the self-supervised contrastive inverse reinforcement learning of the scIRL algorithm for the initialized contrast trajectory set.
[0061] A continuous robust control network is constructed for each candidate. The continuous robust control network is a continuous control network that provides the ability to handle high-dimensional, continuous dynamic environments and enhances the progress and generalization of predictions. Compared with the existing deep neural network (DNN) that requires a large amount of high-quality, accurately labeled driving trajectory data, the continuous robust control network used in the present invention reduces the reliance on a large amount of labeled data. However, since the definition of positive and negative classes in contrastive learning does not embed any priors, the continuous control network (CCN) may have the problem of high variance and low precision. Therefore, this method uses the driving context corresponding to the candidate to train the continuous robust control network, uses an iterative method to generate pseudo-labels, and then uses the CCN obtained in the current cycle to assign labels to the positive and negative classes of each trajectory, thereby superimposing the knowledge accumulated in this iteration to carry out the next cycle. Through continuous iteration and gradual accumulation of prior knowledge, the CCN we finally obtain can adaptively predict the controller parameters for dynamic driving contexts with high precision and robustness. Among them, such as Figure 1 As shown, It is the CCN supervised learning loss function in the continuous control network, and the loss function is used to train the continuous control network.
[0062] Among them, each candidate continuous robust control network is tested to obtain a test index, and the preferred candidate continuous robust control network is screened out through the test index for crossover and mutation, including: each continuous robust control network is tested on a validation set, and through the ADE effect of each continuous robust control network on the validation set, a comparison set of the top 10% of candidates is screened for crossover and mutation to generate the next generation population.
[0063] In an optional embodiment, the comparison trajectory set includes a positive trajectory set and a negative trajectory set;
[0064] Among them, the initialization of the comparison trajectory set corresponding to each candidate includes:
[0065] The positive trajectory set is initialized as the trajectory feature set, and the negative trajectory set is initialized as the empty set.
[0066] In an optional embodiment, using the scIRL algorithm to calculate the set of comparison trajectories corresponding to each candidate includes:
[0067] Setting an expert demonstration set and initial parameters of the comparison trajectory set, calculating the expert demonstration set and the initial parameters to obtain an expert demonstration probability;
[0068] An objective function and a scIRL loss function are established, and a reward parameter is obtained by calculating the expert demonstration set, the initial parameters and the expert demonstration probability through the objective function and the scIRL loss function.
[0069] In an optional embodiment, the scIRL loss function includes an IRL loss term and an extended loss term, and the expression of the scIRL loss function is as follows:
[0070] ;
[0071] ;
[0072] ;
[0073] In the above formula, represents the loss function of scIRL self-contrast inverse reinforcement, represents the loss function of the original IRL, represents the contrastive learning loss function, represents the distribution weight hyperparameter of the loss function, Represents controller parameters, represents the positive sample set, represents the transpose of the controller parameters, represents a predefined characteristic function, represents the i-th demonstration trajectory, represents the total number of trajectories, Indicates Tracks, represents the max function, and Represent the probability of each expert demonstration in the positive trajectory set and the negative trajectory set, respectively. represents the optimized spacing, The larger it is, the greater the distance between positive and negative samples.
[0074] It should be noted that is a hyperparameter and is set to 1 by default in this example unless otherwise specified.
[0075] It should be noted that the current processing of trajectories usually divides the dataset into different specific scenarios, such as dividing the dataset into subsets of following, changing lanes, or merging lanes, to ensure that the reward function inferred in the demonstration within a specific scenario is stable. In contrast, we consider an undivided full multi-distribution dataset to learn a unified control network that outputs a reward function to handle all different driving scenarios.
[0076] However, learning such a unified control network poses more challenges than simply solving the equations, since it only produces a vector of control parameters. This is acceptable for existing trajectory processing methods because they implicitly assume that the expert demonstrations follow a uniform distribution due to the partitioning of the dataset. However, such an assumption is no longer valid in our method because we consider multiple distributions among the expert demonstrations. Blindly following this assumption will lead to degraded performance and reduced robustness.
[0077] Therefore, in order to handle the multimodality of driving conditions and preserve the distribution diversity in the demonstration dataset, we propose a self-contrastive inverse reinforcement learning algorithm scIRL, which expands the equation by adding an auxiliary contrastive loss term based on the IRL loss function. Compared with the unexpanded loss function that only considers the positive trajectory set, the expanded scIRL loss function considers both the positive trajectory set and the negative trajectory set, and uses the contrastive loss term to ensure that the probability of the expert demonstration in the positive trajectory set is higher than that in the negative trajectory set.
[0078] Specifically in this embodiment, and Represent the state and action of the vehicle respectively. To control the timing, we transform the dynamic system equation of each vehicle into Expressed as
[0079]
[0080] Next, we will take the trajectory in the space-time domain is defined as a sequence of states and actions, i.e.
[0081]
[0082] The subscripts represent the discretized planning steps, Indicates the total length of the planning horizon.
[0083] Given a group of driving experts teaching , contains various individual trajectories, among which , and the reward function A set of parameters , the probability of expert demonstration is defined as:
[0084]
[0085] In the above formula, represents the probability of expert demonstration, represents the set of feasible trajectories, Indicates demonstration proximity.
[0086] It should be noted that, unless otherwise specified, in this embodiment is always set to 1.
[0087] The goal of the maximum entropy inverse reinforcement learning algorithm is to infer the maximization equation The latent reward function is the likelihood of all expert demonstrations, assuming that trajectories are exponentially more likely when the cumulative reward is high.
[0088] Furthermore, assuming that the trajectory space can be discretized into samples To approximate, and are the sampling trajectory sequence number and the total number of sampling trajectories, respectively; Expert demonstration track Candidate sampling trajectories.
[0089] Therefore, the goal of IRL is to find a set of parameters , so that this set of parameters maximizes the expert demonstration in the set of sampled trajectories.
[0090] The calculation formula of this parameter is as follows:
[0091]
[0092] In the context of trajectory planning and prediction, we will continue to use Select the best trajectory from the set of sampled trajectories .
[0093] Based on the original IRL loss function, this paper designs an auxiliary contrast loss term , is a hinge loss function to ensure that the probability of the expert demonstration in the positive trajectory set is higher than the probability of the negative trajectory set, and more than one The margin.
[0094] Specifically, for any expert teaching ,have
[0095]
[0096] Based on a common assumption that each demonstration trajectory It only represents a specific scenario. A pair of discrete contrast sets is defined. That is, the method is not applied to the entire dataset. , but for the dataset Each demo in Defines a pair of positive / negative (contrast) sets.
[0097] In summary, the proposed scIRL algorithm can effectively preserve multimodality (multiple driving conditions) across different driving scenarios and optimize expert behavior on a finer-grained subspace. However, considering the general case where these sets cannot be predetermined a priori, we introduce an iterative pseudo-label generation algorithm to iteratively refine the comparison set in a self-supervised manner.
[0098] In an optional embodiment, the continuous robust control network includes a first network input stream for inputting static map geometry, a second network input stream for inputting vehicle spatial state mapping, and a third network input stream for inputting vehicle kinematic state mapping;
[0099] The static map geometry, the vehicle spatial state mapping and the vehicle kinematic state mapping are respectively input into the first network input stream, the second network input stream and the third network input stream for training by the continuous robust control network, and the continuous robust control network inputs the control parameters of the reward function after training.
[0100] In an optional embodiment, inputting the static map geometry, the vehicle spatial state map, and the vehicle kinematic state map into the first network input stream, the second network input stream, and the third network input stream respectively to train the continuous robust control network includes:
[0101] Convolutionally mapping the static map geometry through the first network input stream to obtain a static map attention map;
[0102] Convolutionally mapping the vehicle spatial state map through the second network input stream to obtain a vehicle spatial information attention map;
[0103] Fusing the static map attention map with the vehicle space information attention map to obtain a fused mapping attention map;
[0104] Convolutionally mapping the vehicle kinematic state map through the third network input stream to obtain a vehicle kinematic attention map;
[0105] A dual-input twin structure is established, and the fusion mapping attention map is coupled with the vehicle kinematic attention map through the dual-input twin structure to obtain a coupling vector, and the coupling vector is mapped to the IRL parameter space through a fully connected layer.
[0106] In an optional embodiment, fusing and mapping the static map attention map with the vehicle spatial information attention map includes: fusing and mapping the static map attention map with the vehicle spatial information attention map using Hadamard Product.
[0107] In an optional embodiment, the loss of the continuous robust control network during training is expressed as follows:
[0108] ;
[0109] In the above formula, represents the loss of the continuous robust control network during training, where is the training trajectory number; and Represent the predicted reward parameters and true values respectively, and Respectively represent The reward parameters and true values predicted by the training trajectory sequence number, represents the cosh distance between the predictive controller parameters and the true knowledge of the parameters, Indicates the total number of trajectories.
[0110] Among them, the true value In this embodiment, it represents the corresponding control parameter of the reward function.
[0111] It should be noted that in order to capture the potential relationship between specific driving contexts (including vehicle states (spatial and kinematic), map geometry and its expert policy distribution), this embodiment proposes a unified continuous control network (CCN). The proposed framework is as follows Figure 2 As shown in Figure 1, the continuous control network has three network input streams: static map geometry, a mapping of the vehicle's spatial state (e.g., coordinates, orientation), and a mapping of the vehicle's kinematic state (e.g., velocity, acceleration, jerk), and the output is the corresponding control parameters of the reward function. The three network input streams are spliced through the continuous control network and then the spliced data is fully connected, and the final output is the predicted inverse reinforcement controller weight (i.e., the reward parameter predicted by the continuous control network).
[0112] Since both the map geometry and the vehicle spatial state are static, in this embodiment, they are stacked into a dual-channel mapping input, and after obtaining two convolutional mapping outputs, the two mappings are fused using Hadamard Product. Among them, in this embodiment, the convolutional intermediate mapping output of the spatial input is defined as an attention map, indicating which specific parts of the context are responsible for the current prediction.
[0113] Then, in this embodiment, a dual-input twin structure is designed in CCN to encode the vehicle kinematic information (i.e., kinematic input) and the static map and vehicle spatial information (i.e., spatial input), respectively. By connecting the fused mapped static data with the state of the self-driving vehicle again, the low-dimensional representation of the vehicle environment information is further enhanced. Finally, the coupled vector is mapped to the IRL parameter space through a fully connected layer. This attention-based design allows for adaptive representation of the driving context and establishes an information mapping from the driving context to the controller space (i.e., the parameter space of the reward function).
[0114] Compared with the prior art, the present invention has strong scalability, strong interpretability, adaptability and self-optimization capabilities, specifically:
[0115] Strong scalability: The algorithm is designed to handle a variety of driving scenarios and conditions without relying on a specific partitioning of the dataset, which means it can be easily expanded to adapt to larger and more diverse datasets. By learning a unified controller network to handle a variety of driving scenarios, the algorithm demonstrates adaptability to different data distributions, making it efficient and effective when processing large-scale and complex driving data.
[0116] Strong interpretability: The structure of CCN is specially designed with three input streams containing static map geometry, vehicle spatial state, and kinematic state, and a twin structure is used to independently encode static and dynamic information. This design not only improves the predictive performance of the model, but also enhances the interpretability of the model. By introducing the attention mechanism, the algorithm is able to indicate which parts of the context are more important for the current prediction, thereby providing an intuitive understanding of the model's decision-making process. This attention-based design allows the algorithm to adaptively represent the driving context and establish an intuitive mapping from the driving context to the control parameters, making it easier for researchers and engineers to understand and verify the behavior of the model. Through CCN's fused attention mechanism, the current vehicle is able to pay better attention to the vehicles near and in front of it to adaptively plan its trajectory.
[0117] Adaptability: The algorithm can adaptively predict the reward function parameters corresponding to the self-driving vehicle by learning a continuous control network (CCN). This adaptability enables the algorithm to flexibly respond to different driving conditions and scenarios, improving the robustness and application range of the algorithm.
[0118] Self-optimization capability: By introducing the self-contrastive inverse reinforcement learning (scIRL) algorithm and evolutionary framework, the algorithm can self-optimize during the iteration process, accumulate prior knowledge to determine the optimal contrast set, and thus ensure convergence and global optimal solution without relying on external priors. This self-optimization capability makes the algorithm more efficient in the learning process and can adaptively improve its performance.
[0119] Embodiment 2 of the present invention provides an autonomous driving robust control system based on contrastive learning, comprising:
[0120] An initialization module, the initialization module is used to extract state representations in the monitoring trajectory data set using a low-dimensional state extractor, and map the state representations to a feature space, preset a group of multiple candidates of a population in the feature space, and initialize a comparison trajectory set corresponding to each candidate;
[0121] A scIRL processing module, wherein the scIRL processing module is used to calculate the comparison trajectory set corresponding to each candidate using the scIRL algorithm to obtain a reward parameter;
[0122] A continuous robust control module, wherein the continuous robust control module is used to construct a continuous robust control network for each candidate, and use the reward parameter as a continuous robust control network corresponding to the driving context training to obtain a candidate continuous robust control network;
[0123] A test module is used to test each candidate continuous robust control network to obtain a test index, select a preferred candidate continuous robust control network for hybridization and mutation through the test index, and generate the next group of populations based on the results of hybridization and mutation.
[0124] In an optional embodiment, the scIRL processing module includes:
[0125] A probability calculation unit, wherein the expert demonstration unit is used to set an expert demonstration set and initial parameters of a comparison trajectory set, calculate the expert demonstration set and the initial parameters, and obtain an expert demonstration probability;
[0126] A reward calculation unit is used to establish an objective function and a scIRL loss function, and to calculate the expert demonstration set, the initial parameters and the expert demonstration probability through the objective function and the scIRL loss function to obtain a reward parameter.
[0127] Embodiment 3 of the present invention provides an electronic device, such as Figure 3 As shown, the electronic device includes a processor 21, a memory 22, an input device 23 and an output device 24; the number of processors 21 in the computer device can be one or more. Figure 3 A processor 21 is taken as an example; the processor 21, the memory 22, the input device 23 and the output device 24 in the electronic device can be connected by a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0128] The memory 22 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and modules. The processor 21 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 22, that is, implements a robust control method for autonomous driving based on contrastive learning in Example 1.
[0129] The memory 22 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 22 may further include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The input device 23 can be used to receive the ID and password input by the user, etc. The output device 24 is used to output the network configuration page.
[0131] Embodiment 4 of the present invention also provides a computer-readable storage medium, wherein the computer-executable instructions, when executed by a computer processor, are used to implement a robust control method for autonomous driving based on contrastive learning as provided in Embodiment 1.
[0132] A storage medium containing computer executable instructions provided in an embodiment of the present invention, wherein the computer executable instructions are not limited to the method operations provided in Example 1, but can also execute related operations in a method for robust control of autonomous driving based on contrastive learning provided in any embodiment of the present invention.
[0133] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A robust control method for autonomous driving based on contrastive learning, characterized in that: The steps include: Step S1, using a low-dimensional state extractor to extract state representations in a monitoring trajectory data set, and mapping the state representations to a feature space, presetting a group of multiple candidates of a population in the feature space, and initializing a comparison trajectory set corresponding to each candidate; Step S2: using the scIRL algorithm to calculate the set of comparison trajectories corresponding to each candidate to obtain a reward parameter; Step S3, constructing a continuous robust control network for each candidate, using the reward parameter as the continuous robust control network corresponding to the driving context training, and obtaining a candidate continuous robust control network; Step S4, testing each candidate continuous robust control network to obtain a test index, screening out a preferred candidate continuous robust control network for hybridization and mutation according to the test index, generating the next group of populations based on the results of the hybridization and mutation, and repeating steps S2 to S4 until the number of cycles reaches a preset value; Wherein, the continuous robust control network includes a first network input stream for inputting static map geometry, a second network input stream for inputting vehicle spatial state mapping, and a third network input stream for inputting vehicle kinematic state mapping; The static map geometry, the vehicle spatial state mapping, and the vehicle kinematic state mapping are respectively input into the first network input stream, the second network input stream, and the third network input stream for training by the continuous robust control network, and the continuous robust control network is trained to input the control parameters of the reward function; The step of inputting the static map geometry, the vehicle spatial state mapping, and the vehicle kinematic state mapping into the first network input stream, the second network input stream, and the third network input stream respectively to train the continuous robust control network includes: Convolutionally mapping the static map geometry through the first network input stream to obtain a static map attention map; Convolutionally mapping the vehicle spatial state map through the second network input stream to obtain a vehicle spatial information attention map; Fusing the static map attention map with the vehicle space information attention map to obtain a fused mapping attention map; Convolutionally mapping the vehicle kinematic state map through the third network input stream to obtain a vehicle kinematic attention map; A dual-input twin structure is established, and the fusion mapping attention map is coupled with the vehicle kinematic attention map through the dual-input twin structure to obtain a coupling vector, and the coupling vector is mapped to the IRL parameter space through a fully connected layer.
2. The method for robust control of autonomous driving based on contrastive learning according to claim 1, characterized in that: The comparison trajectory set includes a positive trajectory set and a negative trajectory set; Among them, the initialization of the comparison trajectory set corresponding to each candidate includes: The positive trajectory set is initialized as the trajectory feature set, and the negative trajectory set is initialized as the empty set.
3. The method for robust control of autonomous driving based on contrastive learning according to claim 1, characterized in that: The scIRL algorithm is used to calculate the set of contrast trajectories corresponding to each candidate, including: Setting an expert demonstration set and initial parameters of the comparison trajectory set, calculating the expert demonstration set and the initial parameters to obtain an expert demonstration probability; An objective function and a scIRL loss function are established, and a reward parameter is obtained by calculating the expert demonstration set, the initial parameters and the expert demonstration probability through the objective function and the scIRL loss function.
4. The method for robust control of autonomous driving based on contrastive learning according to claim 3, characterized in that: The scIRL loss function includes an IRL loss term and an extended loss term. The expression of the scIRL loss function is as follows: ; ; ; In the above formula, represents the loss function of scIRL self-contrast inverse reinforcement, represents the loss function of the original IRL, represents the contrastive learning loss function, represents the distribution weight hyperparameter of the loss function, Represents controller parameters, represents the positive sample set, represents the transpose of the controller parameters, represents a predefined characteristic function, represents the i-th demonstration trajectory, represents the total number of trajectories, Indicates Tracks, represents the max function, and Represent the probability of each expert demonstration in the positive trajectory set and the negative trajectory set, respectively. represents the optimized spacing, The larger it is, the greater the distance between positive and negative samples.
5. The method for robust control of autonomous driving based on contrastive learning according to claim 1, characterized in that: Fusing and mapping the static map attention map with the vehicle space information attention map includes: fusing and mapping the static map attention map with the vehicle space information attention map using Hadamard Product.
6. The method for robust control of autonomous driving based on contrastive learning according to claim 1, characterized in that: The loss of the continuous robust control network during training is expressed as follows: ; In the above formula, represents the loss of the continuous robust control network during training, where is the training trajectory number; and Represent the predicted reward parameters and true values respectively, and Respectively represent The reward parameters and true values predicted by the training trajectory sequence number, Indicates The cosh distance between the reward parameter predicted by the training trajectory number and the true value, Represents the total number of trajectories.
7. A robust control system for autonomous driving based on contrastive learning, characterized in that: include: An initialization module, the initialization module is used to extract state representations in the monitoring trajectory data set using a low-dimensional state extractor, and map the state representations to a feature space, preset a group of multiple candidates of a population in the feature space, and initialize a comparison trajectory set corresponding to each candidate; A scIRL processing module, wherein the scIRL processing module is used to calculate the comparison trajectory set corresponding to each candidate using the scIRL algorithm to obtain a reward parameter; A continuous robust control module, the continuous robust control module is used to construct a continuous robust control network for each candidate, and the reward parameter is used as the continuous robust control network corresponding to the driving context training to obtain a candidate continuous robust control network; wherein the continuous robust control network includes a first network input stream for inputting static map geometry, a second network input stream for inputting vehicle spatial state mapping, and a third network input stream for inputting vehicle kinematic state mapping; the static map geometry, the vehicle spatial state mapping, and the vehicle kinematic state mapping are respectively input into the first network input stream, the second network input stream, and the third network input stream for training by the continuous robust control network, and the control parameters of the reward function are input into the continuous robust control network after training; Wherein, the continuous robust control module includes: A first input unit, the first input unit is used to convolute the static map geometry through the first network input stream to obtain a static map attention map; A second input unit, the second input unit is used to convolute the vehicle space state map through the second network input stream to obtain a vehicle space information attention map; A fusion unit, the fusion unit is used to fuse and map the static map attention map with the vehicle space information attention map to obtain a fused mapping attention map; A third input unit, the third input unit is used to convolute the vehicle kinematic state map through the third network input stream to obtain a vehicle kinematic attention map; A coupling mapping unit, wherein the coupling mapping unit is used to establish a dual-input twin structure, couple the fusion mapping attention map with the vehicle kinematic attention map through the dual-input twin structure to obtain a coupling vector, and map the coupling vector to the IRL parameter space through a fully connected layer; A test module is used to test each candidate continuous robust control network to obtain a test index, select a preferred candidate continuous robust control network for hybridization and mutation through the test index, and generate the next group of populations based on the results of hybridization and mutation.
8. The autonomous driving robust control system based on contrastive learning according to claim 7, characterized in that: The scIRL processing module includes: A probability calculation unit, the probability calculation unit is used to set an expert demonstration set and initial parameters of the comparison trajectory set, calculate the expert demonstration set and the initial parameters, and obtain an expert demonstration probability; A reward calculation unit is used to establish an objective function and a scIRL loss function, and to calculate the expert demonstration set, the initial parameters and the expert demonstration probability through the objective function and the scIRL loss function to obtain a reward parameter.
Citation Information
Patent Citations
Long text semantic similarity calculation method based on comparative learning
CN114707516A
Multi-label identification method in open driving scene based on dynamic graph convolution
CN117690098A
