Knowledge-driven end-to-end automatic driving method based on sparse expert mechanism and diffusion model
Through the sparse expert mechanism and diffusion model, autonomous driving skills are divided into multiple expert modules, achieving efficient knowledge organization and reuse in multiple scenarios, solving the problems of insufficient generalization ability and catastrophic forgetting in existing technologies, and improving the real-time performance and stability of the autonomous driving system.
Patent Information
- Application Number
- CN202511141736.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-15
AI Technical Summary
Existing autonomous driving methods lack generalization capabilities, poor transferability, and insufficient real-time performance when facing changing environments. They find it difficult to achieve continuous learning and lack clear knowledge modeling and scheduling mechanisms, resulting in catastrophic forgetting and low reasoning efficiency.
By adopting the sparse expert mechanism and diffusion model, driving skills are abstracted into multiple expert modules, which are combined and scheduled through the sparse activation mechanism and trajectory prediction diffusion model to construct an interpretable modular driving knowledge structure. Incremental learning of new tasks and expert reorganization and migration are achieved by freezing the original model and adding routers or experts.
It achieves efficient knowledge organization and reuse under multi-scenario conditions, improves the quality and latency of driving decisions, reduces computing resource consumption, avoids catastrophic forgetting, and is suitable for high-quality driving control in complex scenarios.
Smart Images

Figure CN120716776A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent autonomous driving, and in particular to a knowledge-driven end-to-end autonomous driving method based on a sparse expert mechanism and a diffusion model. Background Art
[0002] With the development of autonomous driving technology, vehicles are facing extremely high demands on the adaptability and generalization capabilities of perception, decision-making, and control modules when driving in changing environments such as urban roads, highways, complex intersections, and rain and snow. Existing autonomous driving methods are mainly based on deep reinforcement learning or imitation learning, and generally adopt a unified end-to-end policy network to uniformly model all driving tasks. However, this "single policy structure" has the following prominent problems: 1. Insufficient generalization and poor transferability: When faced with new driving scenarios (such as different urban road network structures or unexpected traffic conditions), single policies often require large-scale retraining, making it difficult to efficiently reuse existing knowledge. 2. High inference overhead and insufficient real-time performance: Unifying the model requires activating all network parameters, resulting in low operating efficiency on edge computing platforms and difficulty meeting the real-time requirements of autonomous driving. 3. Continuous learning is difficult to achieve and there is a risk of catastrophic forgetting: As the model continuously receives new task data for training, the introduction of new knowledge may undermine existing capabilities, leading to degradation of existing driving behavior. This is particularly serious in scenarios involving multiple tasks and long deployments. 4. Lack of clear knowledge modeling and scheduling mechanisms: Traditional networks cannot provide explainable "skill modules", making it difficult to perform more advanced behavioral control such as knowledge reuse and skill combination.
[0003] In recent years, the Mixture of Experts (MoE) mechanism has made significant progress in natural language processing and computer vision. By introducing multiple expert networks and utilizing routers for sparse selection, it effectively improves the model's parameter efficiency and task adaptability. Diffusion models have also demonstrated excellent performance in trajectory modeling and multimodal behavior generation, making them suitable for building multi-stage action prediction architectures.
[0004] However, directly migrating these advanced structures to the end-to-end autonomous driving field still faces the following challenges: 1. How to build stable and transferable "driving knowledge units" in different autonomous driving scenarios; 2. How to design an expert scheduling mechanism that adapts to dynamic environments; 3. How to introduce new tasks in continuous learning without disrupting the original strategy.
[0005] Therefore, there is an urgent need for an end-to-end autonomous driving method that can efficiently organize, reuse and expand knowledge under multi-scenario conditions, so as to realize the construction of general capabilities for large-scale tasks in the future. Summary of the Invention
[0006] In response to the shortcomings of the existing technology, the purpose of the present invention is to provide a knowledge-driven end-to-end autonomous driving method based on a sparse expert mechanism and a diffusion model, aiming to address key issues such as task switching difficulties, insufficient generalization ability, catastrophic forgetting, and low reasoning efficiency in multi-scenario autonomous driving. This method makes full use of the structural knowledge in autonomous driving tasks, abstracts different types of driving skills into "expert modules", and combines and schedules them through an efficient sparse activation mechanism and a trajectory prediction diffusion model, ultimately achieving high-quality, low-latency driving decisions for different environments. The present invention is applicable to a typical autonomous driving system architecture based on perception-decision-control.
[0007] The purpose of the present invention is achieved through the following technical solutions: A knowledge-driven end-to-end autonomous driving method based on a sparse expert mechanism and a diffusion model includes the following steps: S1: Perceptual information processing and state encoding; Collect and fuse the vehicle's current multimodal perception data and environmental metadata, and encode them into a unified state representation .
[0008] S2: Sparse expert module construction and multi-task training; Construct a sparse expert module composed of multiple experts and acquire reusable driving skills through multi-task behavior cloning training; State vector Through the sparse expert module processing, the intermediate representation is obtained , provided to step S3, the intermediate representation contains the abstract driving knowledge filtered and combined by sparse experts.
[0009] S3: Diffusion strategy network and action sequence generation; Based on the diffusion model, a multi-step control action sequence is generated from the current state conditions to form a continuous and stable driving decision.
[0010] S4: Continuous learning and task transfer mechanism; By freezing the original model and adding routers or experts, incremental learning and expert reorganization transfer of new tasks can be achieved.
[0011] The details are as follows: In step S1, autonomous driving decisions require continuous driving control instructions based on the current environmental perception information. To this end, the multimodal perception data and environmental metadata of the current frame are first processed to extract high-level semantic feature representations, which serve as input for subsequent steps.
[0012] Specifically, this step aims to encode heterogeneous sensory source information into a unified high-dimensional state vector representation. , used in the subsequent expert selection and trajectory generation decision process.
[0013] The heterogeneous perception source information includes: visual perception information and low-dimensional environment meta-information.
[0014] At every decision moment , observe the following information flow: Visual perception information is mainly first-person perspective images. The actual observation space of the intelligent agent includes the following: (1) RGB image ; (2) Depth image ; (3) Semantic segmentation image ,in Indicates the number of semantic categories (such as "lane line", "pedestrian", "traffic sign", etc.); In addition, in order to extract effective high-level semantic features, a multimodal perceptual coding structure is constructed. After each image modality is extracted through shared convolutional features, it is input into the visual coding module ResNet18 to extract key visual representations. .
[0015] Low-dimensional environmental metadata, including vehicle status information and navigation information: (1) Vehicle status information, the dimension is fixed to ,include: Relative distance to lane boundaries: continuous yellow line on the left, sidewalk on the right; (2D) Current vehicle speed; (1 dimension) Current steering angle; (1 dimension) Previous frame control command (throttle / brake, steering); (2D) Yaw angular velocity; (1D) The lateral position of the current lane; (1 dimension) Heading deviation from the lane centerline; (1D) The vehicle state information vector is recorded as: ; (2) Navigation information, with a fixed dimension of 10, including 5-dimensional parameters of the navigation features of the current lane and the next lane checkpoint: The navigation features (5-dimensional) of the current lane checkpoint include: the forward projection distance between the vehicle's current position and the current lane checkpoint (along the vehicle's heading direction); the lateral projection distance between the vehicle's current position and the current lane checkpoint (perpendicular to the vehicle's heading direction); the radius of the current lane (0 for a straight road); the direction of the current lane curve (1 for clockwise, 0 for counterclockwise, and 0 for a straight road); and the heading angle of the current lane (0 for a straight road).
[0016] The navigation features (5-dimensional) of the checkpoint of the next lane (i.e., the next navigation section) include: the forward projection distance between the next lane position and the next lane checkpoint (along the vehicle heading direction); the lateral projection distance between the next lane position and the next lane checkpoint (perpendicular to the vehicle heading direction); the radius of the next lane (0 for a straight road); the direction of the curve of the next lane (1 for clockwise, 0 for counterclockwise, and 0 for a straight road); and the heading angle of the next lane (0 for a straight road).
[0017] Checkpoints are pre-set reference locations on the navigation path, used to guide the autonomous vehicle along its intended route. Checkpoints are located at the road centerline or at the end of a lane. Their coordinates are generated by the global navigation planner and expressed in a local coordinate system based on the vehicle itself, used to calculate relative distance and direction from the vehicle's position.
[0018] In the calculation of navigation information, the current lane checkpoint indicates the next navigation target position of the lane segment the vehicle is currently in; the next lane checkpoint indicates the navigation target position of the next lane segment to be entered after the current lane ends.
[0019] The navigation information vector is recorded as: Then, the visual encoding results are combined with the vehicle status information , navigation information After linear mapping and normalization, they are concatenated to form the final state vector: in, , , Represents the corresponding linear mapping and normalization layers, Enter the dimensions for the unified strategy.
[0020] State vector Provided to subsequent steps for generating driving decisions.
[0021] Multimodal perception input strengthens the robustness of environment modeling, and depth maps and semantic maps effectively improve spatial structure understanding. The introduction of environmental meta-information in this invention allows the strategy to not only rely on vision, but also have accurate kinematics, road geometry, navigation intent and other key information, which helps routers and experts make their choices more interpretable. In addition, the state vector generated under the current frame observation It does not rely on historical sequences and is suitable for high-frequency real-time reasoning and closed-loop control.
[0022] In step S2, in order to enable the autonomous driving system to have cross-scenario decision-making capabilities, the present invention proposes a strategy representation method based on a sparse expert mechanism, which divides the abstract driving knowledge into multiple expert sub-modules, and realizes skill abstraction, sharing and combination reuse through a task-driven training process.
[0023] In the present invention, in order to enhance the modeling capability of the visual perception module for complex scene information, a sparse expert mechanism is introduced inside the visual encoder to efficiently encode different image modal structures.
[0024] Step S21: constructing a sparse expert module; The sparse expert module adopts a hybrid expert mechanism (MoE), which includes several MoE structures. Each MoE structure consists of An expert subnetwork is composed of a corresponding router. The MoE structure can be represented as a set of experts: Each of these experts It is a multi-layer perceptron with the same structure but independent parameters, which is responsible for modeling a certain type of abstract visual features. The input features received by the sparse expert module are state vectors. .
[0025] in, Represents the dimension of the input feature vector of this layer, and its value is equal to the visual feature vector , vehicle state information vector and navigation information vector The total dimension after concatenation.
[0026] Furthermore, the sparse expert module is implemented by replacing some fully connected layers (Feed-Forward Network, FFN) in the traditional visual encoding network.
[0027] In the sparse expert module, the expert’s activation is determined by the corresponding router Control.Router to input features Based on, the output length is The scoring vector of : in Router parameters.
[0028] Then the score vector Perform Top-K sparse activation selection, that is, only keep the top scores The experts participate in the calculation, and the outputs of the remaining experts are set to zero. The output of the MoE structure is: The above output is provided to the subsequent steps for action generation.
[0029] The difference from the traditional model is that in the traditional model without MoE structure, the policy network is directly based on Predict control actions at current and future times ; In the present invention, the state vector is first converted into an intermediate representation through the MoE module , which contains the abstract driving knowledge filtered and combined by sparse experts. As the input of the diffusion policy network (step S3), it is used to generate the control action sequence for the next multiple steps.
[0030] Step S22: multi-task behavior cloning training; During the training phase, the system presets multiple autonomous driving task scenario sets: in, Indicates the total number of preset autonomous driving mission scenarios. Each mission scenario Corresponding to a specific road environment or driving goal, such as high-speed cruising, city straight driving, left turn at intersection, congestion avoidance, etc. Requires expert demonstration data collected by a set of humans or high-performance controllers , each trajectory is represented as a sequence of state-action pairs: in, represents an instance of the state vector in step S1 during the training phase, i.e., encoded from the multimodal perception information, vehicle state information, and navigation information at the time of acquisition; Indicates the throttle / brake control value output by the expert controller at the corresponding moment and steering angle ,and Strictly aligned in time. In the task scenario The number of expert demonstration trajectories collected under Indicates the maximum number of time steps contained in a single trajectory. Each time step corresponds to a state-action pair. In one embodiment of the present invention, it is 350. During the training process, the policy network is optimized by the behavior cloning method of imitation learning to predict a future action sequence: in, Indicates that experts are always arrive Continuous Step control action sequence; each action This sequence is generated by the expert driver when collecting data and is used as a supervisory signal to train the policy network. represents the mean squared error or negative log-likelihood supervised loss function, is the diffusion strategy network, is the parameter to be optimized. The total loss of multi-task training is: In the expert task differentiation and information regularization stage, in order to improve the division of labor and selection interpretability of the sparse expert module and prevent multiple tasks from frequently activating the same expert and causing routing collapse, this paper designs an expert task differentiation regularization term based on mutual information. First, we need to define the task With the Expert Collection The mutual information between them is: The default distribution of tasks is uniform. , joint probability It can be obtained by counting the activation frequency of experts in the task. The final training goal is: in is the balance coefficient.
[0031] This design encourages experts to be frequently active in certain tasks and inactive in other tasks, thereby forming a clear "task-skill" mapping, improving router stability and facilitating subsequent expert reuse.
[0032] After training is completed, a set of experts is shared between tasks , each task is selected by an independent or shared router; in multi-task training, the number of experts activated for each task , which can significantly reduce the consumption of computing resources during reasoning; and skills that show high similarity in certain tasks will be completed by the same group of experts, avoiding repeated learning, so the present invention has a strong knowledge reuse capability; through graphical statistics of expert activation frequency, it can further support the compression, fusion or distillation of the expert pool.
[0033] In step S3, in order to improve the behavior generation capability of the end-to-end autonomous driving system in complex and diverse scenarios, the present invention proposes an action sequence prediction mechanism based on the conditional diffusion model. This mechanism not only has the ability to model multimodal policy distribution, but also can effectively maintain the consistency of decision timing and adapt to the dynamic changes of continuous expert combination. This part of the method is represented by the aforementioned state As input, a continuous future control sequence is generated through a structured Transformer architecture, and the output is the throttle amount and steering angle of the vehicle in several future time steps.
[0034] This paper models the action generation problem as a conditional trajectory generation task that includes a forward process and a reverse process. The core idea is that given the current state and the motion trajectory perturbed by the initial Gaussian noise , learn a reverse process to gradually generate control sequences that conform to the semantics of the current driving scene from noise ,in Indicates the The control variables for each time step include the throttle and steering angle. This process is similar to the "denoising" process of the diffusion generative model in the image field, but the target here is a high-dimensional motion trajectory with a strong temporal structure constraint.
[0035] Diffusion modeling consists of two stages: the forward process and the reverse process.
[0036] In the forward process, Gaussian noise is gradually added to the real action trajectory to generate a perturbation trajectory: in, is the noise scheduling coefficient of the diffusion step number n, represents the initial clean trajectory, represents the final noisy trajectory. Represents the conditional probability distribution of the forward diffusion process, which is used to define the known trajectory of the previous step Generate the current noise trajectory under the condition of Statistical process; Indicates the mean , the covariance is Multidimensional Gaussian distribution.
[0037] Preferably, the mean of the distribution is taken as , the covariance is taken as , is the identity matrix.
[0038] The reverse process aims to parameterize the model by learning , gradually predicting the noise residual or denoised trajectory to restore a well-structured action sequence: in is the conditional mean prediction function, which depends on the current noise trajectory, state characteristics and the current diffusion step. The entire denoising process is modeled by a deep neural network with parameter sharing and optimized during the training phase by minimizing the mean square error between the predicted noise and the true noisy residual, in the form of: in is the real Gaussian noise injected, is the model estimate.
[0039] In terms of network implementation, the present invention designs a multi-layer Transformer architecture as the core of the diffusion network. During the reverse process, this structure dynamically adjusts the activation path based on the number of diffusion steps and environmental characteristics, enabling automatic combination of policy sub-skills in different task scenarios. For example, in a congested city scenario, the router is more likely to activate the precise obstacle avoidance expert; while in a highway scenario, it tends to call on the uniform speed following or lane change experts.
[0040] Specifically, unlike the existing diffusion strategy network, the present invention embeds a sparse expert module in the multi-layer structure of the Transformer backbone, and embeds the diffusion step number together with the environmental feature code into the router to achieve dynamic adjustment of the expert activation path at each step of the reverse process.
[0041] By introducing diffusion step embedding and environment feature embedding, and jointly inputting the two into the router with the current layer feature vector, assuming that in the nth step reverse iteration, the Transformer backbone The input features of the layer are , the system concatenates it with the diffusion step embedding and the environmental feature vector and inputs it into the router to obtain the expert score vector. The system only selects the one with the highest score Experts participate in the calculation, achieving sparse activation. Differences in environmental characteristics in different task scenarios directly influence the router's expert selection tendency. For example, in urban congestion scenarios, the router is more likely to activate experts for precise obstacle avoidance; in high-speed cruising scenarios, it is more likely to activate experts for constant-speed following or lane changing.
[0042] In the inference phase, the system first initializes the future action sequence, and then follows the reverse process from Step-by-step restoration The final output is a complete action trajectory, in which only the first action at the current moment is executed. The remaining information is used as a reference for subsequent planning. This mechanism not only maintains the continuity and stability of control behavior but also has the ability to proactively model future trends, making it suitable for complex road conditions such as curves, lane changes, and intersections.
[0043] In summary, the diffusion policy network provides an action generation mechanism that combines expressiveness, diversity, and structural controllability. Its deep integration with the sparse expert structure significantly enhances adaptability to multi-scenario decision-making and enables high-quality driving policy modeling while maintaining computational efficiency. It is the core component of the policy module in this paper.
[0044] In step S4, autonomous driving systems face the challenges of continuously changing task environments and increasing scenario complexity during real-world deployment. Traditional multi-task training methods require a joint update of the entire model when a new task is added, which can easily lead to catastrophic forgetting, destroy existing driving knowledge, and reduce model stability and safety.
[0045] To this end, the present invention proposes a structured continuous learning mechanism that relies on a sparse expert structure to efficiently inject new task capabilities into the model without modifying existing knowledge parameters. It also supports rapid task migration through expert combination and router fine-tuning, forming a continuous learning capability of "expansion without forgetting, and combination-promoting migration".
[0046] In the set of tasks that have completed training The model already has a shared pool of experts , diffusion strategy network parameters , and the router parameter set corresponding to each task When the system receives a new task , the model does not retrospectively fine-tune the original parameters, but instead uses the following two steps to complete incremental adaptation: (1) Freeze the original parameters: freeze the original expert set , diffusion trunk and its router collection Freeze everything to prevent degradation of old mission capabilities; (2) Adding a new module: assigning a new set of router parameters to the new task , new expert module ( The number of newly added expert modules is added to the expert pool, enabling new tasks to be independently scheduled by experts. This design achieves both structural knowledge isolation and controllable knowledge injection.
[0047] The training process for new tasks only updates: The total parameter change is much smaller than the full model and is usually controlled within 1%.
[0048] In some new tasks, the system can be trained by training new routers without adding new experts. The reorganization and scheduling of the original experts can be completed, thus achieving efficient transfer learning under zero-expert expansion. Specifically, assuming that the new task is related to an old task The system can use the new router to connect to the original expert set. Reweight and combine to construct a new activation path. This mechanism constitutes a sparse expert path reconstruction strategy: Among them, the expert group The system remains unchanged, with only differences occurring at the routing policy layer. By fine-tuning the routers, the system can quickly migrate to new scenarios without modifying any core parameters, achieving acceptable control performance under limited sample conditions. Furthermore, by statistically analyzing the activation frequency distribution of routers, this invention supports analysis of expert reuse rates, further enabling optimizations such as expert compression, common skill extraction, or module distillation.
[0049] Beneficial effects Compared with the prior art, the present invention has the following advantages: (1) A modular, composable, and interpretable driving knowledge structure is constructed, significantly improving policy modeling capabilities. This paper introduces a MoE architecture, explicitly dividing abstract driving skills into multiple expert modules. State-driven routers select activation paths, freeing policies from relying on a unified, difficult-to-generalize single network. Each expert corresponds to a reusable behavioral capability, supporting on-demand combination to generate complex control behaviors. This structured modeling approach not only enhances the model's generalization capabilities but also provides a transparent and controllable policy generation mechanism for actual deployment and debugging.
[0050] (2) A diffusion generation mechanism suitable for autonomous driving action prediction was constructed to achieve high-quality modeling of multi-step control instructions. To meet the temporal continuity requirements of control signals such as throttle and steering, the present invention designed modules such as trajectory initialization, state condition modeling, and residual denoising to form a complete trajectory generation network. This mechanism effectively improves the smoothness and stability of the decision-making process, reduces the risk of trajectory jitter and strategy jumps, and is suitable for complex scenarios such as curves and intersections that require medium- and long-term planning.
[0051] (3) A structurally decoupled continuous learning and task migration mechanism is constructed to improve the long-term adaptability and deployment efficiency of the system. By freezing the existing strategy structure and adding only a small number of expert modules or adjusting the router, the present invention can achieve rapid adaptation to new tasks, effectively avoiding the problem of catastrophic forgetting. At the same time, for scenarios with similar behavior patterns to existing tasks, efficient migration can be achieved by reorganizing the expert combination path through the router without introducing new parameters, significantly reducing sample and computing resource consumption. It is suitable for resource-constrained and real-time demanding vehicle environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a process flow chart of the method of the present invention; Figure 2 Schematic diagram of the overall architecture of the method of the present invention; Figure 3 This is a schematic diagram of the knowledge-driven principle of an embodiment of the present invention; Figure 4 This is a schematic diagram of the diffusion model structure according to an embodiment of the present invention; Figure 5 Schematic diagram of the structure of the hybrid expert model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0054] Example A knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model. Its overall process is as follows Figure 1 As shown, the following steps are included: S1: Perceptual Information Processing and State Coding Collect and fuse the vehicle's current multimodal perception data and environmental metadata, and encode them into a unified state representation .
[0055] S2: Sparse expert module construction and multi-task training Build a policy network composed of multiple experts and obtain reusable driving skill modules through multi-task behavior cloning training.
[0056] State vector The intermediate representation is obtained by processing the sparse expert module ,This representation contains the abstract driving knowledge filtered and combined by sparse experts and is provided to step S3.
[0057] S3: Diffusion Policy Network and Action Sequence Generation Based on the diffusion model, a multi-step control action sequence is generated from the current state conditions to form a continuous and stable driving decision.
[0058] S4: Continuous learning and task transfer mechanism By freezing the original model and adding routers or experts, incremental learning and expert reorganization transfer of new tasks can be achieved.
[0059] like Figure 2 The network constructed in this embodiment includes: 1. Multimodal perception encoding module: receives perception information from the vehicle's multimodal sensors and extracts preliminary visual features; 2. Sparse expert module: embedded in the visual encoder, performs expert processing on convolution features; 3. Diffusion trajectory generation module: receives visual information and predicts future multi-step control action sequences based on the conditional diffusion model.
[0060] The three submodules run sequentially, corresponding to steps S1-S3, to achieve end-to-end mapping from raw perception data to continuous driving control instructions.
[0061] In step S1, in this embodiment, the autonomous driving system uses the multimodal perception information observed by the vehicle at the current moment as input to extract high-dimensional feature representations of the environmental state, providing semantic expression support for subsequent sparse expert scheduling and diffusion action generation.
[0062] The perception information includes three visual modalities from the vehicle's first-person perspective: 1. RGB image , used to represent the current road scene, dynamic objects and traffic elements; 2. Depth Image , reflecting the environment space geometry and obstacle distance information; 3. Semantic Segmentation Image ,in is the number of semantic categories, which is used to label the semantics of each pixel, such as lane line, sidewalk, traffic light, etc.
[0063] The above images are collected synchronously by sensors and uniformly normalized and preprocessed before entering the model. Subsequently, the three images are input into a feature extraction network based on the ResNet structure. In addition to visual information, this embodiment further integrates the vehicle's current environmental metadata, including dynamic state and navigation vectors. Specifically, it includes: (1) Vehicle state vector , with a dimension of 9, and contains the following: Relative distance to lane boundaries: continuous yellow line on the left, sidewalk on the right; (2D) Current vehicle speed; (1 dimension) Current steering angle; (1 dimension) Previous frame control command (throttle / brake, steering); (2D) Yaw angular velocity; (1D) The lateral position of the current lane; (1 dimension) Heading deviation from the lane centerline; (1D) Let this part of the vector be: ; (2) Navigation target state vector , which represents the geometry and position information of the current lane and the next lane in the navigation path, including: The forward and lateral projection distances of the current / next lane checkpoint in the vehicle coordinate system; Turn radius, direction sign (clockwise or counterclockwise) and heading angle of the current / next lane.
[0064] Finally, all perceptual modalities are jointly mapped into a unified state representation: in They are linear transformation and normalization layers, respectively, used to unify the scales between modalities and compress feature dimensions.
[0065] Status after processing is completed It will serve as the input of the core policy network to drive the subsequent sparse expert selection (step S2).
[0066] In step S2, in this embodiment, in order to realize the modeling capability of the autonomous driving strategy for multiple driving tasks and to share structural knowledge between different tasks, the system introduces a sparsely activated hybrid expert structure in multiple layers of the diffusion strategy network, constructs a sparse expert module and performs multi-task behavior cloning training. Figure 5 .
[0067] In this embodiment, the action sequence prediction network is divided into Transformer layers, each layer has a MoE structure, including Expert sub-network ,Each expert is composed of a multi-layer perceptron, whose function is to process the state feature transformation of a specific sub-task or driving skill.
[0068] Introducing the router submodule into the MoE structure , used to calculate the input features of the current layer Calculate the selection probability of all experts. The scoring process is expressed as: in 、 is the learnable parameter of the router. Represents the dimension of the input feature vector of this layer. In this embodiment, the visual encoding output is a 256-dimensional vector, M = 256 + 9 + 10 = 275.
[0069] Then, the system calculates the score vector Perform Top-K sparse activation operation, selecting only the top The experts with the highest scores participate in the calculation of this layer. The process is defined as: The final output of this layer is: Figure 3 Schematic diagram of the knowledge-driven principle.
[0070] The output of the entire policy network is transformed by the above multi-layer MoE and then passed to the action generation head. The action generation head refers to the output module at the end of the policy network, which is used to input the intermediate representation after the multi-layer MoE transformation into the diffusion trajectory generation module (see step S3) and output the vehicle's future time-step control action sequence , each action Including throttle / brake control amount and steering angle In the present invention, the output module is a general term for the conditional input interface and the prediction output layer of the diffusion strategy network.
[0071] The training process of the sparse expert module adopts a multi-task behavior cloning method. During the training phase, a set of driving tasks covering multiple scenarios is prepared: Each of these tasks Represents a road structure or traffic scenario, such as a straight road in a city, a lane change on a highway, a left turn at an intersection, etc. For each task, an expert demonstration trajectory dataset is collected: in is the state vector, For expert controllers in the future The action sequence generated by the time step includes the throttle value and steering angle at each moment. The training goal is to minimize the mean square error between the predicted trajectory and the expert trajectory. The behavior cloning loss is defined as: in Represents the entire policy network, including visual encoding, MoE structure and diffusion trajectory generation module, are all learnable parameters of the network. The total training target of all tasks is the sum of the losses of each subtask: To improve router stability and avoid conflicts in expert selection between tasks, this embodiment also introduces a mutual information regularization term as an auxiliary supervisory signal. This regularization term encourages different sets of experts to be activated for different tasks, thereby forming functional differentiation between experts. Mutual information is defined as: in Indicates a task Chinese experts The activation frequency is obtained from the router activation distribution statistics. The overall optimization goal after joint regularization is: in is the balance coefficient, in this embodiment After the training is completed, all expert modules and their corresponding router score functions will be fixed and used for sparse expert combination and strategy generation in the subsequent reasoning stage.
[0072] Step S3: Diffusion strategy network and action sequence generation In this embodiment, the end-to-end autonomous driving system is based on the output in step S2. , the generation of multi-step action sequences is completed through the diffusion model. The core structure is as follows Figure 4 As shown. Different from the prior art, the diffusion strategy network of the present invention is not directly based on the original state vector Instead of generating actions, the intermediate representation dynamically combined by the sparse expert module (S2) is used. As conditional input, the backbone structure deeply integrates the MoE mechanism within the multi-layer Transformer to achieve adaptive scheduling of expert knowledge for different driving tasks.
[0073] In this invention, the diffusion model is used to predict the vehicle control action trajectory in the future period of time, in the form of: in Indicates the throttle control amount, Indicates the steering angle.
[0074] The diffusion policy network models the conditional distribution of the action sequence , used at the current moment , according to the status Generate the Future Control instructions at a moment.
[0075] S31 Network Structure and Information Flow The diffusion strategy network consists of the following submodules: 1. Action trajectory initialization module: In the training phase, the expert trajectory is added with step-by-step Gaussian noise to form a perturbation sample; in the inference phase, a standard normal distribution is used to initialize a length of Sample motion trajectory: 2. Conditional Diffusion Prediction Network: The backbone structure is a multi-layer Transformer architecture, and the MoE layer built in step S2 is embedded inside to process high-dimensional action and state features. The network accepts input , output the prediction result of the action residual at each time step , that is, to estimate the current noise term: 3. Motion trajectory reconstruction module: The network output is used to perform a one-step restoration operation on the motion trajectory in the reverse process, namely: in The preset noise scheduling parameters for the current diffusion step.
[0076] The above process Start iteration and finally generate action sequence prediction results .
[0077] S32 training method Diffusion model training uses the method of predicting the noise term in the noisy trajectory, that is, minimizing the mean square error between the noise predicted by the network and the actual injected noise. The loss function is: in, is the real motion trajectory output by the expert controller, is the injected standard Gaussian noise, The perturbed motion trajectory generated by the forward diffusion process. This loss is consistent with the behavior cloning goal and can be jointly optimized with the MoE module training in S2, with parameters jointly updated through backpropagation.
[0078] S33 Inference and Actual Control Interface During the deployment phase, the system : 1. Collect the current status of the vehicle (See S1 for details); 2. Initialize motion trajectory samples , perform a multi-step reverse process to generate the final predicted trajectory ; 3. Output control instructions , which is directly sent to the vehicle controller as the throttle and steering angle commands of the current frame.
[0079] This module supports operation at frequencies above 50Hz and is suitable for the deployment conditions of conventional in-vehicle GPUs / edge AI chips. It also has multi-step prediction capabilities and is suitable for integration into secondary decision-making modules such as Model Predictive Control (MPC).
[0080] S4: Continuous learning and task transfer mechanism Considering the continuous mission evolution and diverse scenario expansion requirements faced by autonomous driving systems in real-world environments, a continuous learning approach based on module freezing and expert reuse has been developed. This approach aims to efficiently inject new mission capabilities while avoiding disruption to existing learned mission policies. This mechanism, leveraging the aforementioned sparse expert architecture and independent router modules, enables policy expansion and rapid migration without modifying existing expert parameters.
[0081] The specific process is as follows: S41 Model structure freezing and new task loading mechanism Assume that the system has completed the previous training for each task, and obtain a set of experts , policy network backbone parameters , and the router set corresponding to each task When receiving a new autonomous driving task , the system introduces new knowledge in the following ways: 1) Freeze all existing parameters: including all trained expert modules , diffusion strategy network backbone parameters and router parameters The freeze operation prevents the degradation of existing policy capabilities and ensures that the performance of old tasks is not disturbed.
[0082] 2) Create a new task-specific module: Selectively introduce a new set of router parameters based on actual task requirements , used to combine skill paths in an existing expert pool; or to add a new set of expert modules , to meet the skill requirements of new tasks that are not covered by existing experts.
[0083] The model is trained only on these newly added modules.
[0084] S42 Expert Reuse and Combined Migration Process For new tasks that are structurally or semantically similar to historical tasks, the present invention allows Complete the new strategy construction without introducing any new expert modules. This "no new module" lightweight adaptation process is as follows: (1) Initialize a new router , whose output dimension covers the existing expert set ; (2) In a fixed expert pool Based on this, the new router is trained to select the optimal Top-K expert combination path in the current task scenario; (3) The trained router can automatically combine existing experts during the reasoning process to achieve rapid strategy reconstruction.
[0085] S43 Activation Path Control and Deployment Example In the actual deployment process, each new task can be configured with different expert paths to achieve modular strategy loading. For example: Task A (e.g., high-speed constant speed driving) activates experts ; Task B (e.g., left turn obstacle avoidance in the city) activates the expert ; Task C (new scenario) reuses the expert path in Task A and adds a new expert .
[0086] This structure enables each task to correspond to a clear set of expert combinations, which facilitates on-demand loading during reasoning, while also having good system scalability and maintainability.
[0087] After this step is completed, the system can adapt to new scenarios in an incremental structural manner while supporting the execution of historical tasks. This creates a continuous learning closed loop of "freezing the old structure and injecting new modules," providing scalable strategic capabilities for the long-term deployment of large-scale autonomous driving systems. This completes the implementation process of a knowledge-driven, end-to-end autonomous driving system based on sparse expert mechanisms and diffusion models.
[0088] To verify the comprehensive performance of the method in different driving scenarios, this example conducted a systematic comparison experiment in three typical road scenarios: intersection, roundabout, and ramp merging. To ensure fairness and representativeness of the comparison, the baseline method selected representative algorithms from various current mainstream autonomous driving decision-making paradigms: 1. Reinforcement Learning Paradigm: This approach uses a proximal policy optimization method with a safety constraint mechanism, balancing policy exploration efficiency and safety performance. 2. Rule-based decision-making paradigm: Using a rotational projection intelligent driver model, this method demonstrates high stability and interpretability in rule-based path planning and speed control tasks. 3. Imitation learning paradigm: Using implicit behavior cloning methods and combining them with derivative-free optimization strategies, it performs well in end-to-end driving tasks without explicit action label optimization.
[0089] The test results of each method in terms of success rate, collision rate, average reward, average speed, acceleration variance and other indicators in the above scenarios are shown in the following table.
[0090] As can be seen from the table, the proposed method demonstrates excellent overall performance across various driving scenarios. In terms of safety, the proposed method maintained a high success rate across all test scenarios, with a significantly lower collision rate than existing methods, effectively avoiding traffic conflicts and collision risks. In terms of efficiency, the proposed method achieved higher average rewards and a reasonable average speed while ensuring safety, demonstrating a good balance between task completion rate and driving efficiency. In terms of comfort, the proposed method maintained a low acceleration variance indicator, reflecting the smoothness of the vehicle's longitudinal control and contributing to an enhanced riding experience.
[0091] Overall, the proposed method outperforms existing baseline methods in many aspects such as safety, efficiency, and comfort, demonstrating the significant advantages and generalization capabilities of the sparse expert mechanism and diffusion trajectory generation strategy in complex traffic environments.
[0092] The above description is only a description of the preferred embodiments of the present application and does not limit the scope of the present application. Any changes or modifications made by any person skilled in the art based on the above disclosed technical content should be regarded as equivalent valid embodiments and fall within the scope of protection of the technical solution of the present application.
Claims
1. A knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model, characterized by: The following steps are involved: S1: Perceptual information processing and state encoding; Collect and fuse the vehicle's current multimodal perception data and environmental metadata, and encode them into a unified state representation ; S2: Sparse expert module construction and multi-task training; Construct a sparse expert module composed of multiple experts and acquire reusable driving skills through multi-task behavior cloning training; State vector Through the sparse expert module processing, the intermediate representation is obtained , provided to step S3; S3: Diffusion strategy network and action sequence generation; Generate a multi-step control action sequence from the current state based on the diffusion model to form a continuous and stable driving decision; S4: Continuous learning and task transfer mechanism; By freezing the original model and adding routers or experts, incremental learning and expert reorganization transfer of new tasks can be achieved.
2. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 1, characterized in that: In step S1, the collected information includes: visual perception information and low-dimensional environmental meta-information; At every decision moment , observe the following information flow: Visual perception information, including the following: (1) RGB image ; (2) Depth image ; (3) Semantic segmentation image ,in Indicates the number of semantic categories; After shared convolutional feature extraction, each image modality is input into the visual encoding module ResNet18 to extract key visual representations. ; Low-dimensional environment meta-information includes two categories: vehicle status information and navigation information, as follows: (1) Vehicle status information, the dimension is fixed to , including: relative distance to lane boundaries: continuous yellow line on the left, sidewalk on the right; current vehicle speed; current steering angle; control commands from the previous frame, including throttle / brake, steering; yaw rate; lateral position of the current lane; heading deviation from the lane centerline; the vehicle state information vector is recorded as: ; (2) Navigation information, the dimension is fixed at 10, including the 5-dimensional parameters of the navigation features of the current lane and the next lane checkpoint, as follows: The navigation features of the current lane checkpoint include: the forward projection distance between the vehicle's current position and the current lane checkpoint; the lateral projection distance between the vehicle's current position and the current lane checkpoint; the radius of the current lane; the direction of the current lane curve; the heading angle of the current lane; The navigation features of the next lane checkpoint include: the forward projection distance between the next lane position and the next lane checkpoint; the lateral projection distance between the next lane position and the next lane checkpoint; the radius of the next lane; the direction of the next lane curve; the heading angle of the next lane; The navigation information vector is recorded as: ; Then, the visual encoding results are combined with the vehicle status information , navigation information After linear mapping and normalization, they are concatenated to form the final state vector: in, , , Represents the corresponding linear mapping and normalization layers, Enter the dimensions for the unified strategy.
3. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 1, characterized in that: In step S2, the sparse expert module includes several MoE structures, each of which consists of An expert sub-network is composed of a corresponding router; The MoE structure is represented as a set of experts: Each expert It is a multi-layer perceptron with the same structure but independent parameters, which is responsible for modeling a certain type of abstract visual features. The input features received by the sparse expert module are state vectors. ; Represents the dimension of the input feature vector of this layer, and its value is equal to the visual feature vector , vehicle state information vector and navigation information vector The total dimension after splicing; In the sparse expert module, the expert’s activation is determined by the corresponding router Control; Router to input features Based on, the output length is The scoring vector of : in For router parameters; Then the score vector Perform Top-K sparse activation selection, that is, only keep the top scores The experts participate in the calculation, and the outputs of the remaining experts are set to zero; The output of the MoE structure is: The above output is provided to the subsequent steps for action generation.
4. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 1, characterized in that: The multi-task behavior cloning training process in step S2 is as follows: During the training phase, the system presets multiple autonomous driving task scenario sets: in, Indicates the total number of preset autonomous driving mission scenarios. Each mission scenario Corresponding to a specific road environment or driving goal, each task Requires expert demonstration data collected by a set of humans or high-performance controllers , each trajectory is represented as a sequence of state-action pairs: in, represents an instance of the state vector in step S1 during the training phase, which is obtained by encoding the multimodal perception information, vehicle state information, and navigation information at the time of acquisition; Indicates the throttle / brake control value output by the expert controller at the corresponding moment and steering angle ,and Strictly aligned in time; In the task scenario The number of expert demonstration trajectories collected under Indicates the maximum total number of time steps contained in a single trajectory, each time step corresponds to a state-action pair; During the training process, the policy network is optimized by imitating the behavior cloning method of learning to predict a future action sequence: in, Indicates that experts are always arrive Continuous Step control action sequence; each action Generated by expert drivers when collecting data, this sequence is used as a supervisory signal to train the policy network; represents the mean squared error or negative log-likelihood supervised loss function, is the diffusion strategy network, is the parameter to be optimized; The total loss of multi-task training is: Defining tasks With the Expert Collection The mutual information between them is: The default distribution of tasks is uniform. , joint probability Obtained from the activation frequency statistics of experts in the task; the final training goal is: in is the balance coefficient.
5. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 1, characterized in that: Step S3 specifically adopts the action sequence prediction mechanism based on the conditional diffusion model, using the state representation As input, a structured Transformer architecture is used to generate a continuous future control sequence, and the output is the throttle amount and steering angle of the vehicle in several future time steps; The action generation problem is modeled as a conditional trajectory generation task that includes a forward process and a backward process. In the forward process, Gaussian noise is gradually added to the real action trajectory to generate a perturbation trajectory: in, is the noise scheduling coefficient of the diffusion step number n, represents the initial clean trajectory, represents the final noisy trajectory; Represents the conditional probability distribution of the forward diffusion process, which is used to define the known trajectory of the previous step Generate the current noise trajectory under the condition of Statistical process; Indicates the mean , the covariance is Multidimensional Gaussian distribution of The reverse process aims to parameterize the model by learning , gradually predicting the noise residual or denoised trajectory to restore a well-structured action sequence: in is the conditional mean prediction function, which depends on the current noise trajectory, state characteristics and current diffusion step; the entire denoising process is modeled by a deep neural network with parameter sharing, and is optimized during the training phase by minimizing the mean square error between the predicted noise and the true noisy residual, in the form of: in is the real Gaussian noise injected, is the model estimate.
6. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 5, characterized in that: A multi-layer Transformer architecture is designed as the main body of the diffusion network. Sparse expert modules are embedded in the multi-layer structure of the Transformer backbone. The diffusion step embedding and environmental feature encoding are input into the router together to achieve dynamic adjustment of the expert activation path at each step of the reverse process. By introducing diffusion step embedding and environment feature embedding, and jointly inputting the two into the router with the current layer feature vector, assuming that in the nth step reverse iteration, the Transformer backbone The input features of the layer are , the system concatenates it with the diffusion step embedding and the environmental feature vector and inputs it into the router to obtain the expert score vector; the system only selects the one with the highest score Experts participate in the calculation to achieve sparse activation; in different task scenarios, the difference in environmental characteristics will directly affect the router's expert selection tendency; In the inference phase, the future action sequence is first initialized, and then the reverse process is followed from Step-by-step restoration ; The final output is a complete motion trajectory, only executing the first step at the current moment , and the rest are used as reference for subsequent planning.
7. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 5, characterized in that: The mean of the multidimensional Gaussian distribution is taken as , the covariance is taken as , is the identity matrix.
8. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 1, characterized in that: In step S4, when processing a new task, In the set of tasks that have completed training The model already has a shared pool of experts , diffusion strategy network parameters , and the router parameter set corresponding to each task ; When the system receives a new task , the model does not retrospectively fine-tune the original parameters, but instead uses the following two steps to complete incremental adaptation: (1) Freeze the original parameters: freeze the original expert set , diffusion trunk and its router collection Freeze everything to prevent degradation of old mission capabilities; (2) Adding a new module: assigning a new set of router parameters to the new task , new expert module and inserted into the expert pool, where In order to increase the number of expert modules, new tasks have the ability to independently schedule experts; this design achieves knowledge isolation and controllable knowledge injection at the structural level; The training process for new tasks only updates: 。 9. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model according to claim 1, characterized in that: In step S4, When dealing with new tasks, no new experts are added, only new routers are trained This can complete the reorganization and scheduling of the original experts, thereby achieving efficient transfer learning under zero-expert expansion; Assume that the new task is related to an old task The system uses the new router to connect the original expert set to the similarity in local structure or behavior pattern. Reweight and combine to construct a new activation path; this mechanism constitutes a sparse expert path reconstruction strategy: Among them, the expert group The difference is only reflected in the routing policy layer; by fine-tuning the routers, the system can quickly migrate to new scenarios without modifying any backbone parameters and obtain acceptable control performance under limited sample conditions.
Citation Information
Patent Citations
System and method for enabling safe stop release in autonomous vehicle
CN114286770A
Personalized recommendation method and system for sparse ultra-short sequence, medium and equipment
CN114692005A
Unmanned driving training method for incomplete information scene in sparse high-dimensional state
CN115965879A
Automatic driving track prediction method and device based on diffusion model
CN118636913A
Federal reinforcement learning system, method and equipment for multi-agent trusted interactive decision control
CN118982061A
Cited By
Automatic driving evolution method and system based on progressive expert hybrid network
CN121525783A
Automatic driving test scene simulation generalization generation method and system based on knowledge distillation
CN121744955A
An automatic driving test scene simulation generalization generation method and system based on knowledge distillation
CN121744955B
End-side multi-mode continuous learning method for plastic playback of resource-constrained scene
CN121902916A
End-to-end multi-modal continual learning method for resource-constrained scenario plasticity replay
CN121902916B
