An uncertainty-aware based continual learning trajectory prediction system
By combining a base model, an uncertainty-aware continuous learning trajectory prediction system with an uncertainty-aware memory module and a conditional generation memory playback module, the problems of large memory requirements and catastrophic forgetting in the continuous learning of trajectory prediction models are solved, achieving efficient trajectory prediction and improved model reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
- Filing Date
- 2023-11-29
- Publication Date
- 2026-05-01
AI Technical Summary
Existing trajectory prediction models suffer from high memory requirements, long data update times, and catastrophic forgetting problems during continuous learning, and existing methods are difficult to apply effectively to trajectory prediction tasks.
An uncertainty-aware continuous learning trajectory prediction system is adopted, which combines a base model, an uncertainty-aware memory module, and a conditional generation memory playback module. Discriminative trajectory memory samples are generated through Bayesian networks and conditional variational autoencoders, reducing memory requirements and improving model robustness.
It improves the reliability and robustness of trajectory prediction models, reduces the catastrophic forgetting problem in continuous learning, and the system can be combined with other models to improve the overall prediction effect.
Smart Images

Figure CN117634587B_ABST
Abstract
Description
A continuous learning trajectory prediction system based on uncertainty perception Technical Field
[0001] This invention relates to the field of autonomous driving technology, and more specifically, to a continuous learning trajectory prediction system based on uncertainty perception. Background Technology
[0002] For a safe and effective autonomous driving system, a crucial technology is predicting the future behavior of surrounding vehicles to help the autonomous vehicle make appropriate decisions. Due to the complexity and diversity of real-world road environments, ensuring a reliable trajectory prediction system operates safely and effectively in constantly changing road traffic scenarios is an extremely challenging task.
[0003] With the rapid development of hardware and autonomous driving infrastructure, the amount of vehicle trajectory data is constantly growing rapidly. Therefore, many existing works focus on data-driven approaches. However, current trajectory prediction models employ offline learning strategies, training offline on a dataset encompassing all scenarios to achieve good predictive performance. This approach requires significant storage space, and if new road scenario data emerges, the model must be retrained from scratch on all datasets, incurring substantial training time. A more efficient approach is to employ a continuous learning strategy. Through continuous learning algorithms, the model is trained on a continuous data stream, updating the original model only with new data, without needing to retrain and store old datasets. This saves storage space and training time, and the model possesses continuous learning capabilities, enabling it to learn from new data and adapt to new road scenarios.
[0004] Currently, there are the following problems with continuous learning trajectory prediction tasks: (1) There is very little relevant work. There is no detailed research on whether continuous learning can be applied to trajectory prediction tasks and the effect of trajectory prediction models in continuous learning settings. (2) It is challenging. Most continuous learning methods are mainly applied to image classification tasks, but trajectory data has a complex spatiotemporal data structure and involves high-dimensional regression tasks, so applying continuous learning to trajectory prediction is challenging. (3) Existing methods have problems. They require explicit storage of old trajectory data into memory for playback, and are also insufficient in overcoming the catastrophic forgetting of continuous learning. Summary of the Invention
[0005] To address the aforementioned problems in the prior art, this invention provides a continuous learning trajectory prediction system based on uncertainty perception. Combining the advantages of rehearsal and pseudo-rehearsal, it effectively avoids the problems of large memory requirements of rehearsal methods and the inaccuracy and lack of discriminative power in pseudo-rehearsal-generated data. It also effectively reduces the catastrophic forgetting problem in continuous learning and improves the robustness and reliability of the autonomous driving trajectory prediction system.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] An uncertainty-aware continuous learning trajectory prediction system includes a base model, an uncertainty-aware memory module, and a conditional generation memory playback module, wherein...
[0008] The base model is used for trajectory prediction tasks, and outputs future trajectories by inputting trajectory samples.
[0009] The uncertainty-aware memory module uses the Monte Carlo Dropout algorithm to transform the base model into a Bayesian network (BNN). It then uses the Bayesian network to calculate the uncertainty of trajectory samples X. After calculating the uncertainty of each trajectory sample, the samples are sorted, and the trajectory samples with the highest and lowest uncertainties are stored in memory as condition samples X. init ;
[0010] The conditional generation memory replay module encodes and processes the trajectory samples and conditional samples of the current task, then obtains the attention output through a multi-head attention module. This output is then combined with the conditional samples and subjected to conditional variational inference through a conditional variational autoencoder to generate trajectory memory samples X for replay. r ;
[0011] During the training phase of the continuous learning process, for each task j, the base model is fed a set of task-specific trajectory samples X. j and a set of replayed trajectory memory samples The output is the predicted future trajectory of the current task and the replayed observation trajectory scene. and And based on the actual future trajectory Y on the ground j and use The loss function is used to optimize the base model;
[0012] The uncertainty-aware memory module and the conditional generation memory playback module are fed a set of task-specific trajectory samples X as input. j and a set of replayed trajectory memory samples The output shows the current task and the replay trajectory. and And based on the input trajectory sample X j and trajectory memory samples As the true value, using The loss function is optimized for the uncertainty-aware memory module and the condition generation memory playback module.
[0013] After completing the training phase, the memory replay phase begins. This phase prepares trajectory memory samples for the next task j+1, where the uncertainty-aware memory module retrieves condition samples from task j. Then, the condition generation memory replay module uses these condition samples and the trajectory data X from task j to generate the replay data. j Generate trajectory memory samples for replay in task j+1. Trajectory memory samples Input the base model trained and optimized in task j, and output the true future ground trajectory for task j+1.
[0014] Specifically, the base model adopts an LSTM-based encoder-decoder architecture. The input trajectory sample is encoded by a fully connected layer and an LSTM encoder, and then the predicted future trajectory is output by an LSTM decoder and another fully connected layer.
[0015] Specifically, the uncertainty-aware memory module uses the Monte Carlo Dropout algorithm to transform the base model into a Bayesian network (BNN) for variational inference. The uncertainty of the trajectory samples is measured by the variance of the T forward propagations, expressed by the following formula:
[0016]
[0017] Where u(x) i ) represents trajectory sample x i Uncertainty, E(y) represents the predicted output value, and E(y) represents the mean of the predicted output value.
[0018] Specifically, the condition generation memory playback module includes an encoding unit consisting of an LSTM encoder, a multi-head attention module, and a CVAE encoder connected in sequence, and a decoding unit consisting of a CVAE decoder, an LSTM decoder, and a fully connected layer connected in sequence. The CVAE encoder and CVAE decoder are associated through a latent space mapping. The LSTM encoder takes the trajectory sample and condition sample of the current task as input, and the fully connected layer outputs the trajectory memory sample for playback.
[0019] Specifically, the conditional generation memory playback module inputs the trajectory sample X and conditional sample X of the current task through an LSTM encoder. init It outputs the encoded trajectory sample X and condition sample X. initA set of hidden features, expressed by the formula:
[0020]
[0021] Where Emb() represents an embedding function with ReLU nonlinearity, and the hidden features obtained by LSTM encoding are represented as follows: W represents the dynamic characteristics of vehicle i at time t. enc This represents the weights of the LSTM encoder; all LSTM encoders share the same weights.
[0022] Specifically, the conditional generation memory playback module will hide the features within the features. The input is fed into the multi-head attention module, and the feature input of each vehicle is embedded into a set of queries Q, a set of keys K, and a set of values V, represented as:
[0023]
[0024] Where MLP() represents a multilayer perceptron, These represent the corresponding attention weights;
[0025] Then, self-attention is performed on each head h to obtain the interdependencies between the input vehicle features. The attention calculation formula for head h is expressed as:
[0026]
[0027] The multi-head attention module performs H attention calculations in parallel, concatenates each independent attention output head, and uses W... O The output result is obtained by linearly transforming Q to the same dimension. Represented as:
[0028]
[0029] Specifically, the CVAE encoder in the conditional generation memory playback module is a conditional variational encoder, which converts the output of the multi-head attention module into a single output. and conditional sample X init The conditional variational encoder maps the latent space distribution to the posterior distribution, which is then represented as the posterior distribution. Where Z = {z i} i=1:N And z i Z is a Gaussian random variable of the i-th agent, from which new potential scene points Z can be sampled.
[0030] Specifically, the CVAE decoder in the conditional generation memory playback module is a conditional variational decoder, denoted as P(X|Z,X). init The sampled latent scene point Z is decoded into appropriate feature points, and then passed through an LSTM decoder based on the conditional sample X. init Each consistent feature point is decoded into a trajectory scene, thereby outputting the reconstructed trajectory scene. Based on the training loss of the conditional variational encoder, the final output is the trajectory memory sample X for replay. r .
[0031] Specifically, the parameters of the CVAE encoder are defined as follows: Recorded as The parameters of the CVAE decoder are defined as θ, denoted as P. θ (X|Z,X init If the training loss of the conditional variational encoder is... Represented as:
[0032]
[0033] Where KL is the Kullback-Liebler divergence, and β is a hyperparameter that adjusts the importance of regularization.
[0034] Specifically, the utilization The loss function optimized over the base model is expressed as:
[0035]
[0036] The use of The loss function optimized for the uncertainty-aware memory module and the conditional generation memory playback module is expressed as follows:
[0037]
[0038] Where γ is a hyperparameter for adjusting importance.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] This invention applies continuous learning to vehicle trajectory prediction tasks, endowing the trajectory prediction model with the ability to learn continuously, thereby improving the reliability and robustness of the model. By generating memory replay based on uncertainty perception, it can generate trajectory memory samples with discriminative and representative characteristics, avoiding the need for large amounts of memory and effectively reducing the catastrophic forgetting problem in continuous learning. Furthermore, the system of this invention can be easily combined with other advanced trajectory prediction models simply by replacing the base model, thereby further improving the overall prediction performance. Attached Figure Description
[0041] Figure 1 is a system overall framework diagram of an embodiment of the present invention.
[0042] Figure 2 is a flowchart of the overall continuous learning process of the system in an embodiment of the present invention.
[0043] Figure 3 is a flowchart of the system training phase in an embodiment of the present invention.
[0044] Figure 4 is a flowchart of the system memory playback stage in an embodiment of the present invention. Detailed Implementation
[0045] The present invention will be further described below with reference to the accompanying drawings and embodiments. The embodiments of the present invention include, but are not limited to, the following embodiments.
[0046] Example
[0047] As shown in Figures 1 to 4, the continuous learning trajectory prediction system based on uncertainty perception mainly consists of three parts: a base model, an uncertainty perception memory module, and a conditional generation memory playback module (CGR). The uncertainty perception memory module and the conditional generation memory playback module (CGR) together constitute the uncertainty perception generation memory playback module (UCG).
[0048] Specifically, the base model is configured based on the trajectory prediction module BM, which mainly performs trajectory prediction tasks and predicts the future trajectory by inputting trajectory samples. Specifically, it adopts an encoder-decoder architecture based on LSTM, which consists of a fully connected layer FC, an LSTM encoder, an LSTM decoder and a fully connected layer FC connected in sequence. The input trajectory sample X is encoded by the first fully connected layer FC and the LSTM encoder, and then the predicted future trajectory is output by the LSTM decoder and the second fully connected layer FC.
[0049] This base model can be replaced by other more advanced trajectory prediction models, thereby further improving the overall performance of the system.
[0050] The uncertainty-aware memory module primarily utilizes a Bayesian network (BNN) to calculate the uncertainty of trajectory sample X. Specifically, it employs the Monte Carlo Dropout algorithm (MC Dropout) to transform the base model into a Bayesian network for variational inference. The variance of T forward propagations is used to measure the uncertainty of the trajectory sample and its relative position in the feature space, expressed by the following formula:
[0051]
[0052] Where u(x) i ) represents trajectory sample xi Uncertainty, E(y) represents the predicted output value, and E(y) represents the mean of the predicted output value.
[0053] After calculating the uncertainty of each trajectory sample X, they are sorted. Samples with higher uncertainty are located at the boundaries of the feature space, possessing discriminatory power compared to other task samples, and are easily forgotten by the model. Samples with lower uncertainty are located at the center of the feature space, and are representative. The trajectory samples with the highest and lowest uncertainty are stored in memory as conditional samples X. init This is used in the subsequent condition generation and memory playback module.
[0054] The Conditional Generate Memory Replay (CGR) module primarily employs a Conditional Variational Autoencoder (CVAE) to perform conditional variational inference, generating the trajectory memory sample X to be replayed. r It adopts an encoder-decoder architecture, specifically including an encoding unit (CGR encoder) consisting of an LSTM encoder, a multi-head attention module, and a conditional variational (CVAE) encoder connected in sequence, and a decoding unit (CGR decoder) consisting of a conditional variational (CVAE) decoder, an LSTM decoder, and a fully connected layer connected in sequence. The CVAE encoder and CVAE decoder are associated through a latent space mapping. The LSTM encoder takes the trajectory sample and condition sample of the current task as input, and the fully connected layer outputs the trajectory memory sample for replay.
[0055] Specifically, the input to the encoding unit (CGR encoder) includes the trajectory sample and condition sample X of the current task. init The trajectory sample X and condition sample X of the current task are input through an LSTM encoder. init It outputs the encoded trajectory sample X and condition sample X. init A set of hidden features, expressed by the formula:
[0056]
[0057] Where Emb() represents an embedding function with ReLU nonlinearity, and the hidden features obtained by LSTM encoding are represented as follows: This represents the dynamic characteristics of vehicle i at time t, and all LSTM encoders share the same weight W. enc .
[0058] The features obtained from the hidden features will then be... The input is fed into the multi-head attention module, and the feature input of each vehicle is embedded into a set of queries Q, a set of keys K, and a set of values V, represented as:
[0059]
[0060] Where MLP() represents a multilayer perceptron, These represent the corresponding attention weights.
[0061] Then, self-attention is performed on each head h to obtain the interdependencies between the input vehicle features. The attention calculation formula for head h is expressed as:
[0062]
[0063] Where d k The vector length of K is represented;
[0064] The multi-head attention module performs H attention calculations in parallel, concatenates each independent attention output head, and uses W... O The output result is obtained by linearly transforming Q to the same dimension. Represented as:
[0065]
[0066] Then, the output of the multi-head attention module and conditional sample X init The conditional variational encoder maps the latent space distribution to the posterior distribution, which is then represented as the posterior distribution. Where Z = {z i} i=1:N And z i Z is a Gaussian random variable of the i-th agent, from which new potential scene points Z can be sampled.
[0067] Specifically, the decoding unit (CGR decoder) determines the potential scene points Z and X based on the samples. init Output the reconstructed trajectory scene The conditional variational decoder P(X|Z,X) init The LSTM decoder decodes the sampled latent scene point Z into appropriate feature points based on the conditional sample X. init Decode each consistent feature point into a trajectory scene. Definition: The parameters of the CVAE encoder are... Recorded as The parameter of the CVAE decoder is θ, denoted as P. θ (X|Z,X init If the training loss of the conditional variational encoder is... Represented as:
[0068]
[0069] Where KL is the Kullback-Liebler divergence, and β is a hyperparameter that adjusts the importance of regularization.
[0070] Based on the training loss of the conditional variational encoder, the final output is the trajectory memory sample X used for replay. r .
[0071] During the training phase of the continuous learning process, for each task j, the base model is fed a set of task-specific trajectory samples X. j and a set of replayed trajectory memory samples The output is the predicted future trajectory of the current task and the replayed observation trajectory scene. and And based on the given true future trajectory Y on the ground j and use The loss function optimizes the base model and is expressed as:
[0072]
[0073] The uncertainty-aware memory module and the conditional generation memory playback module are fed a set of task-specific trajectory samples X as input. j and a set of replayed trajectory memory samples The output shows the current task and the replay trajectory. and And based on the input trajectory sample X j and trajectory memory samples As the true value, using The loss function is optimized for the uncertainty-aware memory module and the conditional generation memory playback module, and is expressed as follows:
[0074]
[0075] Where γ is a hyperparameter for adjusting importance. loss function and The loss function is similar, being a conditional variational autoencoder and a reconstruction loss. The sum of.
[0076] After completing the training phase for task j, the process enters the memory replay phase, preparing trajectory memory samples for the next task j+1 to be replayed. First, the uncertainty-aware memory module obtains conditional samples from task j. Then, the condition generation memory replay module uses these conditional samples and the trajectory samples X from task j to generate the memory replay. j Generate trajectory memory samples for replay When the next task j+1 arrives, the trajectory sample X of task j+1 is...j+1 They were trained together, and the trajectory memory samples were stored. Input the base model trained and optimized in task j, and output the true future ground trajectory for task j+1.
[0077] Through the above process, this invention applies continuous learning to vehicle trajectory prediction tasks, improving the reliability and robustness of the trajectory prediction model. Furthermore, by generating memory playback based on uncertainty perception, it can generate trajectory samples with discriminative and representative characteristics, avoiding the need for large amounts of memory and effectively reducing the catastrophic forgetting problem in continuous learning.
[0078] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any changes made based on the design principles of the present invention, or any non-creative modifications made thereon, shall fall within the scope of protection of the present invention.
Claims
1. A continuous learning trajectory prediction system based on uncertainty perception, characterized in that, The system comprises a base model, an uncertainty-aware memory module, and a conditional generation memory playback module. The base model is used for trajectory prediction, predicting future trajectories from input trajectory samples. The uncertainty-aware memory module uses the Monte Carlo Dropout algorithm to transform the base model into a Bayesian network (BNN). It then uses the Bayesian network to calculate the uncertainty of each trajectory sample X, sorts the samples after calculation, and stores the trajectory samples with the highest and lowest uncertainties in memory as conditional samples X. init The conditional generation memory replay module encodes and processes the trajectory samples and conditional samples of the current task, then obtains the attention output through a multi-head attention module. This output, combined with the conditional samples, is then used by a conditional variational encoder to perform conditional variational inference, generating a trajectory memory sample X for replay. r During the training phase of the continuous learning process, for each task j, the base model is trained using a set of task-specific trajectory samples X as input. j and a set of replayed trajectory memory samples The output is the predicted future trajectory of the current task and the replayed observation trajectory scene. and And based on the actual future trajectory Y on the ground j and use The loss function optimizes the base model; the uncertainty-aware memory module and the conditional generation memory playback module are fed a set of task-specific trajectory samples X. j and a set of replayed trajectory memory samples The output shows the current task and the replay trajectory. and And based on the input trajectory sample X j and trajectory memory samples As the true value, using The loss function is optimized for both the uncertainty-aware memory module and the conditional generation memory replay module. After the training phase, the memory replay phase begins, where trajectory memory samples to be replayed are prepared for the next task j+1. The uncertainty-aware memory module obtains conditional samples from task j, and then the conditional generation memory replay module uses these conditional samples and the trajectory samples X from task j to perform the replay. j Generate trajectory memory samples for replay in task j+1. Trajectory memory samples Input the base model trained and optimized in task j, and output the true future ground trajectory for task j+1.
2. The continuous learning trajectory prediction system based on uncertainty perception according to claim 1, characterized in that, The base model adopts an LSTM-based encoder-decoder architecture. The input trajectory sample is encoded by a fully connected layer and an LSTM encoder, and then the predicted future trajectory is output by an LSTM decoder and another fully connected layer.
3. The continuous learning trajectory prediction system based on uncertainty perception according to claim 2, characterized in that, The uncertainty-aware memory module uses the Monte Carlo Dropout algorithm to transform the base model into a Bayesian network (BNN) for variational inference. The uncertainty of the trajectory samples is measured by the variance of the T forward propagations, expressed by the following formula: Where u(x) i ) represents trajectory sample x i Uncertainty, E(y) represents the predicted output value, and E(y) represents the mean of the predicted output value.
4. The continuous learning trajectory prediction system based on uncertainty perception according to claim 3, characterized in that, The condition generation memory playback module includes an encoding unit consisting of an LSTM encoder, a multi-head attention module, and a CVAE encoder connected in sequence, and a decoding unit consisting of a CVAE decoder, an LSTM decoder, and a fully connected layer connected in sequence. The CVAE encoder and CVAE decoder are associated through a latent space mapping. The LSTM encoder takes the trajectory sample and condition sample of the current task as input, and the fully connected layer outputs the trajectory memory sample for playback.
5. The uncertainty-aware continuous learning trajectory prediction system according to claim 4, characterized in that, The conditional generation memory playback module inputs the trajectory sample X and condition sample X of the current task through an LSTM encoder. init It outputs the encoded trajectory sample X and condition sample X. init A set of hidden features, expressed by the formula: Where Emb() represents an embedding function with ReLU nonlinearity, and the hidden features obtained by LSTM encoding are represented as follows: W represents the dynamic characteristics of vehicle i at time t. enc This represents the weights of the LSTM encoder; all LSTM encoders share the same weights.
6. The continuous learning trajectory prediction system based on uncertainty perception according to claim 5, characterized in that, The conditional generation memory playback module will hide features within features. The input is fed into the multi-head attention module, and the feature input of each vehicle is embedded into a set of queries Q, a set of keys K, and a set of values V, represented as: Where MLP() represents a multilayer perceptron, These represent the corresponding attention weights; subsequently, self-attention is calculated for each head h to obtain the interdependencies between the input vehicle features. The attention calculation formula for head h is expressed as: The multi-head attention module performs H attention calculations in parallel, concatenates each independent attention output head, and uses W... O The output result is obtained by linearly transforming Q to the same dimension. Represented as:
7. The continuous learning trajectory prediction system based on uncertainty perception according to claim 6, characterized in that, The CVAE encoder in the conditional generation memory playback module is a conditional variational encoder, which processes the output of the multi-head attention module. and conditional sample X init The conditional variational encoder maps the latent space distribution to the posterior distribution, which is then represented as the posterior distribution. Where Z = {z i } i=1:N And z i Z is a Gaussian random variable of the i-th agent, from which new potential scene points Z can be sampled.
8. The continuous learning trajectory prediction system based on uncertainty perception according to claim 7, characterized in that, The CVAE decoder in the conditional generation memory playback module is a conditional variational decoder, denoted as P(X|Z,X). init The sampled latent scene point Z is decoded into appropriate feature points, and then passed through an LSTM decoder based on the conditional sample X. init Each consistent feature point is decoded into a trajectory scene, thereby outputting the reconstructed trajectory scene. Based on the training loss of the conditional variational encoder, the final output is the trajectory memory sample X for replay. r .
9. The continuous learning trajectory prediction system based on uncertainty perception according to claim 8, characterized in that, The parameters of the CVAE encoder are defined as follows: Recorded as The parameters of the CVAE decoder are defined as θ, denoted as P. θ (X|Z,X init If the training loss of the conditional variational encoder is... Represented as: Where KL is the Kullback-Liebler divergence, and β is a hyperparameter that adjusts the importance of regularization.
10. The uncertainty-aware continuous learning trajectory prediction system according to any one of claims 1-9, characterized in that, The use of The loss function optimized over the base model is expressed as: The use of The loss function optimized for the uncertainty-aware memory module and the conditional generation memory playback module is expressed as follows: Where γ is a hyperparameter for adjusting importance.