A knowledge-driven end-to-end autonomous driving method based on a sparse expert mechanism and a diffusion model
By using a sparse expert mechanism and a diffusion model, autonomous driving skills are divided into multiple expert modules, and an interpretable modular knowledge structure is constructed. This solves the problems of insufficient generalization ability and real-time performance of autonomous driving methods in changing environments, and enables efficient knowledge reuse and rapid task migration.
Patent Information
- Application Number
- CN202511141736.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-15
AI Technical Summary
Existing autonomous driving methods suffer from insufficient generalization ability, poor transferability, and inadequate real-time performance when facing changing environments. They also lack clear knowledge modeling and scheduling mechanisms, resulting in difficulties in efficiently reusing existing knowledge and catastrophic forgetting problems when facing new tasks.
By employing a sparse expert mechanism and a diffusion model, driving skills are abstracted into multiple expert modules. These modules are then combined and scheduled using a sparse activation mechanism and a trajectory prediction diffusion model to construct an interpretable modular driving knowledge structure. Furthermore, incremental learning and expert reorganization and transfer for new tasks are achieved by freezing the original model and adding a new router.
It enables efficient knowledge organization and reuse in multiple scenarios, improves the generalization ability and real-time decision-making efficiency of autonomous driving systems, avoids catastrophic forgetting, adapts to dynamic environments, and supports rapid task migration.
Smart Images

Figure CN120716776B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent automatic driving, and in particular to a knowledge-driven end-to-end automatic driving method based on a sparse expert mechanism and a diffusion model. BACKGROUND
[0002] With the development of automatic driving technology, when vehicles drive in various environments such as urban roads, highways, complex intersections, and rain and snow, high requirements are put forward for the adaptability and generalization ability of perception, decision-making and control modules. The existing automatic driving method is mainly based on deep reinforcement learning or imitation learning, and generally uses a unified end-to-end policy network to model all driving tasks. However, such a "single policy structure" has the following outstanding problems:
[0003] 1. Poor generalization ability and poor transferability: when facing new driving scenarios (such as different urban road network structures or sudden traffic conditions), the single policy often needs to be retrained on a large scale, making it difficult to efficiently reuse existing knowledge;
[0004] 2. Large reasoning overhead and insufficient real-time performance: the unified model needs to activate all network parameters, resulting in low running efficiency on edge computing platforms and difficulty in meeting the real-time requirements of automatic driving;
[0005] 3. Difficulty in achieving continuous learning and catastrophic forgetting problem: in the process of continuously receiving new task data for training, the introduction of new knowledge may damage the original ability, leading to degradation of the original driving behavior, especially in the face of multi-task and long-term deployment scenarios;
[0006] 4. Lack of explicit knowledge modeling and scheduling mechanism: traditional networks cannot provide interpretable "skill modules", making it difficult to reuse knowledge, combine skills, and perform higher-level behavior control.
[0007] In recent years, the mixture of experts (Mixture of Experts, MoE) has made significant progress in natural language processing and computer vision, effectively improving the parameter efficiency and task adaptability of the model by introducing multiple expert networks and using routers for sparse selection. At the same time, diffusion models (Diffusion Model) have also shown excellent performance in trajectory modeling and multi-modal behavior generation, making them suitable for building multi-stage action prediction structures.
[0008] However, directly migrating the above advanced structures to the end-to-end automatic driving field still faces the following challenges:
[0009] 1. How to construct stable and transferable "driving knowledge units" in different automatic driving scenarios;
[0010] 2. How to design an expert scheduling mechanism that adapts to dynamic environments;
[0011] 3. How to introduce new tasks in continuous learning without disrupting the original strategy.
[0012] Therefore, there is an urgent need for an end-to-end autonomous driving method that can efficiently organize, reuse and expand knowledge in multiple scenarios to achieve future-oriented large-scale task general-purpose capability construction. SUMMARY
[0013] To overcome the shortcomings of the prior art, the present application provides a knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model, aiming to address the key problems of task switching difficulty, 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 and low-latency driving decisions for different environments. The present application is applicable to typical autonomous driving system architectures based on perception-decision-control.
[0014] The object of the present application is achieved by the following technical solutions:
[0015] A knowledge-driven end-to-end autonomous driving method based on sparse expert mechanism and diffusion model, comprising the following steps:
[0016] S1: Perception information processing and state encoding;
[0017] Collect and fuse the current multi-modal perception data and environmental meta-information of the vehicle, and encode them into a unified state representation .
[0018] S2: Sparse expert module construction and multi-task training;
[0019] Construct a sparse expert module composed of multiple experts, and obtain reusable driving skills through multi-task behavior cloning training;
[0020] State vector Through sparse expert module processing, an intermediate representation is obtained , which is provided to step S3. The intermediate representation contains abstract driving knowledge selected and combined by the sparse expert.
[0021] S3: Diffusion strategy network and action sequence generation;
[0022] Based on the diffusion model, a multi-step control action sequence is generated from the current state condition to form a continuous and stable driving decision.
[0023] S4: Continuous learning and task transfer mechanism
[0024] By freezing the original model and adding new routers or experts, incremental learning and expert reorganization transfer of new tasks are realized.
[0025] Specifically as follows:
[0026] In step S1, the decision of autonomous driving needs to make continuous driving control instructions based on the current environmental perception information. To this end, first, the multi-modal perception data and environmental meta-information of the current frame are processed to extract high-level semantic feature representation for input in subsequent steps.
[0027] Specifically, this step aims to encode heterogeneous perception source information into a unified high-dimensional state vector representation , which is used for subsequent expert selection and trajectory generation decision process.
[0028] The heterogeneous perception source information includes visual perception information and low-dimensional environmental meta-information.
[0029] At each decision-making moment , the following information streams are observed:
[0030] The visual perception information mainly includes first-person view images, and the observation space of the actual agent includes the following contents:
[0031] (1) RGB image ;
[0032] (2) Depth image ;
[0033] (3) Semantic segmentation image , where denotes the number of semantic categories (such as "lane line", "pedestrian", "traffic sign", etc.);
[0034] In addition, in order to extract effective high-level semantic features, a multi-modal perception encoding structure is constructed. After shared convolution feature extraction, each image modality is input into the visual encoding module ResNet18 to extract key visual representation .
[0035] Low-dimensional environmental meta-information includes two categories: vehicle state information and navigation information:
[0036] (1) Vehicle state information, with a fixed dimension of , including:
[0037] Relative distance to lane boundary: left continuous yellow line, right sidewalk; (2 dimensions)
[0038] Current vehicle speed; (1 dimension)
[0039] Current steering angle; (1-dimensional)
[0040] Previous frame control commands (accelerator / brake, steering); (2D)
[0041] Yaw angular velocity; (1-dimensional)
[0042] The current lateral position of the lane; (1D)
[0043] Heading deviation from the lane centerline; (1D)
[0044] The vehicle state information vector is denoted as: ;
[0045] (2) Navigation information, with a fixed dimension of 10, including 5-dimensional parameters for navigation features of the current lane and the next lane checkpoint:
[0046] 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 straight roads); the direction of the current lane curve (1 for clockwise, 0 for counterclockwise, and 0 for straight roads); and the heading angle of the current lane (0 for straight roads).
[0047] The navigation features (5-dimensional) of the next lane (i.e., the next navigation segment) checkpoint include: the forward projection distance between the next lane position and the next lane checkpoint (along the vehicle's heading direction); the lateral projection distance between the next lane position and the next lane checkpoint (perpendicular to the vehicle's heading direction); the radius of the next lane (0 for straight roads); the curve direction of the next lane (1 for clockwise, 0 for counterclockwise, and 0 for straight roads); and the heading angle of the next lane (0 for straight roads).
[0048] The checkpoints are pre-set reference points on the navigation path, used to guide the autonomous vehicle along the predetermined route. The checkpoints are located on the road centerline or at the end of a lane, and their coordinates are generated by the global navigation planner and represented in a local coordinate system based on the vehicle itself, used to calculate the relative distance and direction to the vehicle's position.
[0049] In the calculation of navigation information, the current lane checkpoint indicates the next navigation target location of the lane segment in which the vehicle is currently located; the next lane checkpoint indicates the navigation target location of the next lane segment that the vehicle will enter after the current lane ends.
[0050] The navigation information vector is denoted as:
[0051] Subsequently, the visual encoding results were compared with vehicle status information. Navigation information Respectively, after linear mapping and normalization, splicing forms the final state vector:
[0052]
[0053] Wherein, , , Respectively, the linear mapping and normalization layer corresponding to, The input dimension of the unified strategy is unified.
[0054] State vector Provided to the subsequent steps, used for driving decision generation.
[0055] Multi-modal perception input enhances the robustness of environment modeling, and depth map and semantic map effectively improve the understanding of spatial structure. In the present invention, the introduction of environment meta information makes the strategy not only rely on vision, but also has accurate kinematics, road geometry, navigation intention and other key information, which helps the router and expert to choose more explainability. In addition, the state vector generated under the current frame observation Without relying on historical sequence, it is suitable for high-frequency real-time inference and closed-loop control.
[0056] In step S2, in order to make the automatic driving system have cross-scene decision-making ability, the present invention proposes a strategy representation method based on sparse expert mechanism, which divides the abstract driving knowledge into multiple expert sub-modules, and realizes skill abstraction, sharing and combination reuse through task-driven training process.
[0057] In the present invention, in order to enhance the modeling ability of visual perception module to complex scene information, a sparse expert mechanism is introduced inside the visual encoder, which is used for efficient coding of different image modal structures.
[0058] Step S21: constructing a sparse expert module;
[0059] The sparse expert module adopts a mixed expert mechanism (MoE) and includes a plurality of MoE structures. Each MoE structure is composed of An expert subnetwork and a corresponding router. The first MoE structure can be expressed as an expert set:
[0060]
[0061] Wherein each expert Is a multi-layer perceptron with the same structure but independent parameters, which is specially responsible for modeling a certain type of abstract visual features. The input features received by the sparse expert module are state vectors .
[0062] Wherein, denotes the dimension of the layer input feature vector, and its value is equal to the visual feature vector , vehicle state information vector and navigation information vector The total dimension after splicing.
[0063] Further, the sparse expert module is realized by replacing part of the full connection layer (Feed-Forward Network, FFN) in the traditional visual coding network.
[0064] In the sparse expert module, the activation of the expert is controlled by the corresponding router . The router takes the input feature as the basis, and outputs a scoring vector with a length of :
[0065]
[0066] Wherein is the router parameter.
[0067] Then, Top-K sparse activation selection is performed on the scoring vector , that is, only the top experts are retained for operation, and the rest of the experts output zero. The output of the first MoE structure is:
[0068]
[0069] The above output is provided to the subsequent step for action generation.
[0070] The difference from the traditional model is that in the traditional model without MoE structure, the strategy network will directly predict the control action at the current and future time based on ; while in the present application, the state vector is first converted into an intermediate representation by the MoE module, which contains abstract driving knowledge after sparse expert screening and combination. Then, the intermediate representation is used as the input of the diffusion strategy network (step S3) to generate a control action sequence for multiple steps in the future.
[0071] Step S22: multi-task behavior cloning training;
[0072] In the training stage, the system presets a plurality of automatic driving task scene sets:
[0073]
[0074] Wherein, denotes the total number of preset automatic driving task scenes, and each task scene corresponds to a specific road environment or driving goal, such as high-speed cruising, urban straight driving, intersection left turn, congestion obstacle avoidance, etc. Each task requires a set of expert demonstration data collected by human or high-performance controllers , and each trajectory is represented as a sequence of state-action pairs:
[0075]
[0076] wherein, represents the instance of the state vector in step S1 in the training phase, that is, obtained by encoding the multi-modal perception information, vehicle state information and navigation information at the collection time; represents the throttle / brake control amount output by the expert controller at the corresponding time and the steering angle . are strictly aligned in time. represents the number of expert demonstration trajectories collected in the task scenario , and represents the maximum number of time steps contained in a single trajectory, each time step corresponds to a state-action pair, and in an embodiment of the present application, 350 is taken. In the training process, the policy network is optimized in the behavior cloning manner of imitative learning, so that it can predict a future action sequence:
[0077]
[0078] wherein, represents the continuous step control action sequence of the expert at time ; each action is generated by the expert driver when collecting data, and the sequence is used as a supervision signal for training the policy network. In addition, represents the mean square error or negative log-likelihood supervision loss function, is the diffusion policy network, is the parameter to be optimized. The total loss of multi-task training is:
[0079]
[0080] In the expert task differentiation and information regularization phase, in order to improve the division ability and selection interpretability of the sparse expert module and prevent the same expert from being frequently activated to cause the routing to collapse, the present application designs an expert task differentiation regularization term based on mutual information. First, the mutual information between the task and the first expert set is defined as:
[0081]
[0082] where the task distribution is uniform by default, , joint probability can be obtained by counting the activation frequency of experts in tasks. The final training objective is:
[0083]
[0084] where is the balance coefficient.
[0085] This design encourages experts to be frequently activated in certain tasks and inactive in other tasks, thus forming a clear mapping of "task-skill", improving the stability of the router and facilitating the reuse of experts later.
[0086] After training is completed, a set of expert groups is shared among tasks , each task is selected by an independent or shared router; during multi-task training, the number of experts activated by each task can significantly reduce the consumption of computing resources during inference; and skills that exhibit high similarity in certain tasks will be completed by the same group of experts, avoiding repeated learning, so the present application has a strong knowledge reuse capability; by graphically counting the activation frequency of experts, the compression, fusion or distillation of the expert pool can be further supported.
[0087] In step S3, to improve the behavior generation capability of the end-to-end autonomous driving system in complex and diverse scenarios, the present application proposes an action sequence prediction mechanism based on a conditional diffusion model. This mechanism not only has the ability to model the multi-modal strategy distribution, but also effectively maintains the consistency of the decision-making timing and adapts to the dynamic changes of the continuous expert combination. The method in this part takes the state representation as input and generates a continuous future control sequence through a structured Transformer architecture. The output is the throttle and steering angle of the vehicle within a certain number of future time steps.
[0088] The present application models the action generation problem as a conditional trajectory generation task that includes a forward process and a reverse process. The core idea is to give the current state and the action trajectory with an initial Gaussian noise disturbance , learn a reverse process to gradually generate a control sequence that meets the semantic requirements of the current driving scene from the noise , where represents the control amount at the time step, including the throttle and steering angle. This process is similar to the "denoising" process of diffusion generation models in the image field, but the goal here is a high-dimensional, time-series structured action trajectory with strong constraints.
[0089] Diffusion modeling includes two stages: forward process and backward process.
[0090] In the forward process, the real action trajectory is gradually added with Gaussian noise to generate a perturbed trajectory:
[0091]
[0092] wherein, is the noise scheduling coefficient of diffusion step 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 statistical process of generating the current noisy trajectory under the condition that the previous step trajectory is known; represents a multi-dimensional Gaussian distribution with mean and covariance .
[0093] Preferably, the mean of the distribution is taken as , and the covariance is taken as , is the unit matrix.
[0094] The backward process aims to restore the well-structured action sequence by learning the parameterized model to gradually predict the noise residual or the denoised trajectory:
[0095]
[0096] wherein is the conditional mean prediction function, which depends on the current noise trajectory, state features and the current diffusion step. The entire denoising process is modeled by a deep neural network with parameter sharing, and is optimized in the training stage by minimizing the mean square error between the predicted noise and the real noisy residual, in the form of:
[0097]
[0098] wherein is the injected real Gaussian noise, is the model estimate.
[0099] In terms of network implementation, the present application designs a multi-layer Transformer architecture as the main body of the diffusion network. This structure can dynamically adjust the activation path according to the diffusion step and environmental features in the backward process, realizing the automatic combination of policy sub-skills in different task scenarios. For example, in the urban congestion scenario, the router tends to activate fine obstacle avoidance experts; while in the highway scenario, it tends to call uniform speed following or lane changing experts.
[0100] Specifically, unlike existing diffusion strategy networks, the application embeds sparse expert modules in the multi-layer structure of the Transformer backbone and inputs the diffusion step number into the router together with the environment feature encoding to realize dynamic adjustment of the expert activation path at each step of the reverse process.
[0101] By introducing diffusion step number embedding and environment feature embedding, and inputting the two into the router together with the current layer feature vector, in the nth step of the reverse iteration, the input feature of the nth layer of the Transformer backbone is The system inputs it into the router after splicing it with the diffusion step number embedding and the environment feature vector to obtain an expert scoring vector. The system only selects the top expert to participate in the calculation to realize sparse activation. In different task scenarios, the difference in environment features will directly affect the expert selection tendency of the router. For example, in the urban congestion scenario, the router is more likely to activate fine obstacle avoidance experts; in the high-speed cruising scenario, it is more likely to activate uniform speed following or lane changing experts.
[0102] In the reasoning phase, the system first initializes the future action sequence, and then restores the generated from the step by step according to the reverse process. The final output is a complete action trajectory, in which only the first step action at the current time is executed, and the rest is used as a reference for subsequent planning. This mechanism not only maintains the continuity and stability of the control behavior, but also has the ability to model future trends, suitable for complex road conditions such as curves, lane changes, and intersections.
[0103] In summary, the diffusion strategy network provides an action generation mechanism that combines expressiveness, diversity, and controllable structure. Its deep integration with the sparse expert structure significantly enhances the adaptability of multi-scene decision-making, and while maintaining computational efficiency, it realizes high-quality driving strategy modeling, which is the core component of the strategy module in the application.
[0104] In step S4, during the real-world deployment of the autonomous driving system, the system faces the challenges of continuous changes in the task environment and increasing complexity of the scene. Traditional multi-task training methods require joint updating of the entire model when new tasks are added, which can easily cause catastrophic forgetting, disrupt existing driving knowledge, and reduce model stability and safety.
[0105] Therefore, the application proposes a structured continuous learning mechanism that relies on the sparse expert structure to efficiently inject new task capabilities into the model without modifying existing knowledge parameters, and supports rapid task migration through expert combination and router fine-tuning, forming a continuous learning capability of "expanding without forgetting and combining to promote migration".
[0106] In the completed training task set The model has a set of shared expert pool , diffusion strategy network parameters , and a set of router parameters corresponding to each task When the system receives a new task , the model does not perform retrospective fine-tuning on the original parameters, but uses the following two-step method to complete incremental adaptation:
[0107] (1) Freeze the original parameters: freeze the original expert set , diffusion backbone and its router set to prevent degradation of old task capabilities;
[0108] (2) Add new modules: allocate a new set of router parameters for the new task, add new expert modules ( the number of new expert modules) and insert them into the expert pool, so that the new task has independent expert scheduling capabilities. This design realizes knowledge isolation and controllable injection at the structure level.
[0109] The training process of the new task only updates:
[0110]
[0111] The total parameter variation is much smaller than the full model, usually controlled within 1%.
[0112] In some new tasks, the system can not need to add new experts, but only through training new routers can complete the reorganization and scheduling of the original experts, so as to realize efficient transfer learning under zero expert expansion. Specifically, assuming that the new task has similarity with a certain old task in local structure or behavior pattern, the system can reweight and combine the original expert set through new routers to build new activation paths. This mechanism constitutes a sparse expert path reconstruction strategy:
[0113]
[0114] Among them, the expert set The difference only lies in the routing strategy layer. By fine-tuning the router, the system can quickly migrate to a new scene without modifying any backbone parameters, and obtain acceptable control performance under limited sample conditions. In addition, by counting the activation frequency distribution of the router, the application supports analysis of expert reuse rate, and further realizes optimization such as expert compression, common skill extraction or module distillation.
[0115] Advantages
[0116] Compared with the prior art, the application has the following advantages:
[0117] (1) A combinable and interpretable modular driving knowledge structure is constructed, which significantly improves the strategy modeling capability. The application introduces the MoE architecture, explicitly divides the abstract driving skills into multiple expert modules, and selects the activation path through the state-driven router, so that the strategy no longer depends on a unified and difficult to generalize single network. Each expert corresponds to a reusable behavior ability, supporting on-demand combination to generate complex control behavior. This structured modeling method not only enhances the generalization ability of the model, but also provides a transparent and controllable strategy generation mechanism for actual deployment and debugging.
[0118] (2) A diffusion generation mechanism suitable for automatic driving action prediction is constructed, which realizes high-quality modeling of multi-step control instructions. In view of the time sequence continuity requirement of control signals such as throttle and steering, the application designs modules such as trajectory initialization, state condition modeling and residual noise reduction 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 jump, and is suitable for complex scenes such as curves and intersections that require medium and long-term planning.
[0119] (3) A structure-decoupled continuous learning and task migration mechanism is constructed, which improves the long-term adaptability and deployment efficiency of the system. By freezing the existing strategy structure and only adding a small number of expert modules or adjusting the router, the application can quickly adapt to new tasks, effectively avoiding the problem of catastrophic forgetting. At the same time, for scenes with similar behavior patterns to existing tasks, the application can achieve efficient migration by recombining expert paths through the router without introducing new parameters, significantly reducing sample and computing resource consumption, and is suitable for resource-constrained and real-time vehicle environments. BRIEF DESCRIPTION OF DRAWINGS
[0120] Figure 1 The flowchart of the method of the application;
[0121] Figure 2 The overall architecture schematic diagram of the method of the application;
[0122] Figure 3 The knowledge-driven principle schematic diagram of the embodiment of the application;
[0123] Figure 4 A diffusion model structure diagram for an embodiment of the present application;
[0124] Figure 5 A hybrid expert model structure diagram for an embodiment of the present application. DETAILED DESCRIPTION
[0125] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work should fall within the protection scope of the present application.
[0126] EMBODIMENT
[0127] A knowledge-driven end-to-end autonomous driving method based on a sparse expert mechanism and a diffusion model, the overall process of which is shown in Figure 1 and includes the following steps:
[0128] S1: Perception information processing and state coding
[0129] Collect and fuse the current multi-modal perception data and environmental meta-information of the vehicle, and encode them into a unified state representation .
[0130] S2: Sparse expert module construction and multi-task training
[0131] Construct a strategy network composed of multiple experts, and obtain reusable driving skill modules through multi-task behavior cloning training.
[0132] State vector Obtain an intermediate representation through sparse expert module processing , which contains abstract driving knowledge filtered and combined by the sparse expert, and is provided to step S3.
[0133] S3: Diffusion strategy network and action sequence generation
[0134] Based on the diffusion model, generate a future multi-step control action sequence from the current state condition to form a continuous and stable driving decision.
[0135] S4: Continuous learning and task migration mechanism
[0136] By freezing the original model and adding a router or an expert, incremental learning and expert reorganization migration of new tasks are realized.
[0137] As shown in Figure 2The network constructed in the embodiment comprises: 1, a multi-modal perception coding module: receiving perception information from a multi-modal sensor of a vehicle, and extracting preliminary visual features; 2, a sparse expert module: embedded in a visual encoder, and performing expert processing on convolutional features; and 3, a diffusion trajectory generation module: receiving visual information, and predicting a control action sequence of multiple steps in the future based on a conditional diffusion model.
[0138] The three sub-modules are sequentially operated, corresponding to steps S1-S3, to realize end-to-end mapping from original perception data to continuous driving control instructions.
[0139] In step S1, in the embodiment, the autonomous driving system takes multi-modal perception information observed by the vehicle at the current time as input, extracts a high-dimensional feature representation of an environmental state, and provides semantic expression support for subsequent sparse expert scheduling and diffusion action generation.
[0140] The perception information includes three visual modalities from a first perspective of the vehicle:
[0141] 1. An RGB image for representing a current road scene, dynamic objects and traffic elements;
[0142] 2. A depth image reflecting environmental spatial geometry and obstacle distance information;
[0143] 3. A semantic segmentation image wherein is a number of semantic categories, used to label a semantic to which each pixel belongs, such as a lane line, a sidewalk, a traffic light, and the like.
[0144] The above images are synchronously collected by a sensor, and are uniformly sized, normalized and preprocessed before entering the model. Subsequently, the three images are respectively input to a feature extraction network based on a ResNet structure. In addition to the visual information, the embodiment further fuses current environmental meta-information of the vehicle, including dynamic states and navigation vectors. Specifically, the environmental meta-information includes:
[0145] (1) a vehicle state vector with a dimension of 9, including the following contents:
[0146] a relative distance to a lane boundary: a left continuous yellow line and a right sidewalk (2 dimensions);
[0147] a current vehicle speed (1 dimension);
[0148] a current steering angle (1 dimension);
[0149] a previous frame control command (throttle / brake, steering) (2 dimensions);
[0150] a yaw rate (1 dimension); and
[0151] Lateral position of current lane; (1D)
[0152] Heading deviation from lane centerline; (1D)
[0153] Let this part of the vector be: ;
[0154] (2) Navigation target state vector , representing the geometric and positional information of the current lane and the next lane in the navigation path, specifically including:
[0155] Forward and lateral projection distances of the current / next lane checkpoint in the vehicle coordinate system;
[0156] Turning radius, direction sign (clockwise or counterclockwise), and heading angle of the current / next lane.
[0157] Finally, all perception modalities are jointly mapped to a unified state representation:
[0158]
[0159] where are linear transformation and normalization layers, respectively, used to unify the scales between modalities and compress the feature dimension.
[0160] Processed state representation will serve as the input to the core policy network, driving the subsequent sparse expert selection (step S2).
[0161] In step S2, in this embodiment, to achieve the modeling ability of autonomous driving strategies for multiple driving tasks and structural knowledge sharing between different tasks, the system introduces a mixed expert structure with sparse activation in multiple levels of the diffusion policy network, constructs a sparse expert module and performs multi-task behavior cloning training. The MoE module structure is detailed in Figure 5 .
[0162] This embodiment divides the action sequence prediction network into Transformer layers, each with an MoE structure containing expert subnetworks , each expert consisting of multiple perception mechanisms, which function to process state feature transformations for specific subtasks or driving skills.
[0163] The MoE structure introduces a router sub-module , which calculates the selection probability of all experts according to the input features of the current layer. Its scoring process is represented as:
[0164]
[0165] wherein , are learnable parameters of the router. Wherein, denotes the dimension of the layer input feature vector, the visual encoding output of the present embodiment is a 256-dimensional vector, M = 256 + 9 + 10 = 275.
[0166] Subsequently, the system performs a Top-K sparse activation operation on the score vector , only selecting the top expert with the highest score to participate in the calculation of the layer. The process is defined as:
[0167]
[0168] The output of the layer is finally:
[0169]
[0170] Figure 3 is a schematic diagram of the knowledge-driven principle.
[0171] The output of the entire policy network is transmitted to the action generation head after the above multi-layer MoE transformation. 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 control action sequence of the vehicle in the future time steps , each action contains the throttle / brake control amount and the steering angle . In the present invention, the output module is collectively referred to as the conditional input interface of the diffusion policy network and the prediction output layer.
[0172] The training process of the sparse expert module adopts a multi-task behavior cloning method. In the training phase, a set of driving tasks covering multiple scenarios is prepared:
[0173]
[0174] Each task represents a road structure or traffic situation, such as a city straight road, a highway lane change, a left turn at an intersection, etc. For each task, a set of expert demonstration trajectory data is collected:
[0175]
[0176] wherein is the state vector, is the expert controller in the future action sequence generated at each time step, including throttle value and steering angle at each time. The training objective is to minimize the mean square error between the predicted trajectory and the expert trajectory, and the behavior cloning loss is defined as:
[0177]
[0178] where denotes the entire policy network, including visual encoding, MoE structure and diffusion trajectory generation module, is the total learnable parameter of the network. The total training objective of all tasks is the sum of the loss of each sub-task:
[0179]
[0180] To improve the stability of the router and avoid conflicts between task experts, the mutual information regularization term is introduced as an auxiliary supervision signal. This regularization term encourages different tasks to activate different expert sets, thereby forming functional differentiation between experts. Mutual information is defined as:
[0181]
[0182] where denotes the frequency of expert activation in task , which is obtained by router activation distribution statistics. The total optimization objective after joint regularization is:
[0183]
[0184] where is the balance coefficient, and in this embodiment . After training is completed, all expert modules and their corresponding router score functions will be fixed, and used for sparse expert combination and policy generation in the subsequent inference stage.
[0185] Step S3: Diffusion policy network and action sequence generation
[0186] In this embodiment, the end-to-end autonomous driving system generates a multi-step action sequence based on the output in step S2 through a diffusion model. The core structure is shown in Figure 4 Unlike existing technologies, the diffusion policy network of the present application does not directly generate actions based on the original state vector , but uses the intermediate representation after dynamic combination by the sparse expert module (S2) as the conditional input. The backbone structure deeply integrates MoE mechanism within multiple layers of Transformer, realizing adaptive scheduling of expert knowledge for different driving tasks.
[0187] In the present application, a diffusion model is used to predict the vehicle control action trajectory in the future period of time, in the form of:
[0188]
[0189] wherein represents the throttle control amount, represents the steering angle.
[0190] The diffusion policy network models the conditional distribution of the action sequence , for generating control instructions at future time steps, according to the state at the current time.
[0191] S31 Network structure and information flow
[0192] The diffusion policy network is composed of the following sub-modules:
[0193] 1. Action trajectory initialization module: in the training phase, the expert trajectory is added to the gradually Gaussian noise to form a perturbed sample; in the inference phase, a standard normal distribution is used to initialize an action trajectory sample with a length of :
[0194]
[0195] 2. Conditional diffusion prediction network: the main structure is a multi-layer Transformer architecture, and the MoE layer constructed in step S2 is embedded inside for processing high-dimensional action and state features. The network accepts input , and outputs the prediction result of the action residual at each time step , that is, the estimation of the current noise term:
[0196]
[0197] 3. Action trajectory reconstruction module: the network output is used to perform a one-step restoration operation in the reverse process of the action trajectory, that is:
[0198]
[0199] wherein is the preset noise scheduling parameter of the current diffusion step.
[0200] The above process is iterated from , and finally generates the action sequence prediction result .
[0201] S32 Training method
[0202] The diffusion model training adopts a method of predicting the noise term in the noisy trajectory, that is, minimizing the mean square error between the network prediction noise and the real injected noise, and the loss function is:
[0203]
[0204] wherein, is the real action trajectory output by the expert controller, is the injected standard Gaussian noise, is the disturbance action trajectory generated by the forward diffusion process. The loss is consistent with the behavior cloning target, and can be jointly optimized with the MoE module training in S2, and the parameters are updated together through back propagation.
[0205] S33 reasoning and actual control interface
[0206] In the deployment phase, the system updates the system at each control period :
[0207] 1. Collect the current state of the vehicle (Detailed in S1);
[0208] 2. Initialize the action trajectory sample , perform a multi-step reverse process to generate the final predicted trajectory ;
[0209] 3. Output control instructions , directly as the throttle and steering angle command of the current frame sent to the vehicle controller.
[0210] This module supports running at a frequency of 50Hz or higher, and is suitable for deployment conditions of conventional vehicle-mounted GPU / edge AI chips; at the same time, it has multi-step prediction capability, and is suitable for integration into secondary decision modules such as Model Predictive Control (MPC).
[0211] S4: Continuous learning and task transfer mechanism
[0212] Considering the continuous task evolution and diverse scene expansion requirements of autonomous driving systems in real environments, a continuous learning method based on module freezing and expert reuse mechanism is constructed, aiming to efficiently inject new task capabilities while avoiding damage to the learned task strategy. This mechanism relies on the aforementioned sparse expert architecture and independent router module, and can complete strategy expansion and rapid transfer without modifying the original expert parameters.
[0213] The specific process is as follows:
[0214] S41 model structure freezing and new task loading mechanism
[0215] Assume the system has completed the training of previous tasks, obtaining a set of experts , a policy network backbone parameter , and a set of routers corresponding to each task . When a new autonomous driving task is received , the system introduces new knowledge in the following way:
[0216] 1) Freeze all existing parameters: including all trained expert modules , diffuse policy network backbone parameters , and router parameters . Freezing prevents existing policy capabilities from degrading and ensures that old task performance is not disturbed.
[0217] 2) Task-specific module creation: according to actual task requirements, selectively introduce a new set of router parameters for combining skill paths in the existing expert pool; or add a new set of expert modules to address skill requirements not covered by existing experts in new tasks.
[0218] The model only trains these newly added modules.
[0219] S42 Expert reuse and combined migration process
[0220] For new tasks similar in structure or semantics to historical tasks, the invention allows new policy construction to be completed by training routers only, without introducing any new expert modules. This "no new module" lightweight adaptation process is as follows:
[0221] (1) Initialize a new router with output dimensions covering the existing expert set ;
[0222] (2) Based on the fixed expert pool , train the new router to select the optimal Top-K expert combination path in the current task scenario;
[0223] (3) The trained router can automatically combine existing experts during inference to achieve rapid policy reconstruction.
[0224] S43 Activation path control and deployment example
[0225] In actual deployment, each new task can achieve modular policy loading by configuring different expert path implementation modules. For example:
[0226] Task A (such as high-speed uniform speed travel) activates experts ;
[0227] Task B (e.g., city left turn obstacle avoidance) activates the expert ;
[0228] Task C (new scenario) reuses the expert path in Task A and adds a new expert .
[0229] This structure allows each task to correspond to a clear set of expert combinations, facilitating on-demand loading during reasoning, while also providing good system scalability and maintainability.
[0230] After this step, the system can support historical task execution while adapting to new scenarios in a structured incremental manner, forming a continuous learning closed loop of "frozen old structure + new module injection". This provides scalable policy capability support for long-period deployment of large-scale autonomous driving systems. Thus, the implementation process of the knowledge-driven end-to-end autonomous driving system based on the sparse expert mechanism and diffusion model is complete.
[0231] To verify the comprehensive performance of the method in different driving scenarios, the system comparison experiments were conducted in three typical road scenarios: intersections, roundabouts, and ramp merging. To ensure fairness and representativeness, the baseline method selected representative algorithms from current mainstream autonomous driving decision paradigms:
[0232] 1. Reinforcement learning paradigm: using a proximal policy optimization method with safety constraint mechanism, balancing policy exploration efficiency and safety performance;
[0233] 2. Rule-based decision-making paradigm: using a rotating projection intelligent driver model, which has high stability and interpretability in rule-based path planning and speed control tasks;
[0234] 3. Imitation learning paradigm: using implicit behavior cloning method combined with derivative-free optimization strategy, which performs well in end-to-end driving tasks without explicit action label optimization.
[0235] The test results of the success rate, collision rate, average reward, average speed, and acceleration variance of each method in the above scenarios are shown in the following table.
[0236]
[0237] As can be seen from the table, the method of the present application shows excellent comprehensive performance in different types of driving scenarios. In terms of safety, the success rate of the method of the present application in all test scenarios remains at a high level, and the collision rate is significantly lower than that of the existing method, which can effectively avoid traffic conflicts and collision risks; in terms of efficiency, the method of the present application realizes higher average reward and reasonable average speed while ensuring safety, indicating that it has achieved a good balance between task completion rate and driving efficiency; in terms of comfort, the method of the present application keeps the acceleration variance index at a low level, reflecting the stability of the vehicle's longitudinal control, which helps to improve the riding experience.
[0238] In summary, the method of the present application is superior to the existing baseline method in terms of safety, efficiency and comfort, and embodies the significant advantages and generalization ability of the sparse expert mechanism and the diffusion trajectory generation strategy in complex traffic environment.
[0239] The above description is only a description of the preferred embodiments of the present application, and is not any limitation on the scope of the present application. Any modification or modification made by any person skilled in the art according to the above disclosed technical content shall be regarded as an equivalent effective embodiment, and shall fall within the scope of protection of the technical scheme of the present application.
Claims
1. A knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models, characterized in that, Includes the following steps: S1: Sensing 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. ; S2: Construction of sparse expert modules and multi-task training; Construct a sparse expert module composed of multiple experts, and obtain reusable driving skills through multi-task behavior cloning training; State vector The intermediate representation is obtained through sparse expert module processing. Provided to step S3; S3: Diffusion strategy network and action sequence generation; Based on the diffusion model, a sequence of control actions for multiple future steps is generated from the current state conditions, forming 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 and migration for new tasks can be achieved.
2. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 1, characterized in that, In step S1, the information collected includes: visual perception information and low-dimensional environmental metadata; At every decision moment Observe the following information flow: Visual perception information includes the following: (1) RGB image ; (2) Depth image ; (3) Semantic image segmentation ,in Indicates the number of semantic categories; After each image modality undergoes shared convolutional feature extraction, it is input into the ResNet18 visual encoding module to extract key visual representations. ; Low-dimensional environmental metadata includes two main categories: vehicle status information and navigation information, as follows: (1) Vehicle status information, with fixed dimensions. This includes: relative distance to the lane boundary: continuous yellow lines on the left, pedestrian crossing on the right; current vehicle speed; current steering angle; control commands from the previous frame, including accelerator / brake and steering; yaw rate; current lateral position in the lane; heading deviation from the lane centerline; and the vehicle state information vector denoted as: ; (2) Navigation information, with a fixed dimension of 10, including 5-dimensional parameters for 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 current lane radius; the current lane curvature direction; and the current lane heading angle. 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; and the heading angle of the next lane. The navigation information vector is denoted as: ; Subsequently, the visual encoding results were compared with vehicle status information. Navigation information After linear mapping and normalization, the vectors are concatenated to form the final state vector: in, , , These represent the corresponding linear mapping and normalization layer, respectively. To unify the input dimensions of the strategy.
3. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 1, characterized in that, In step S2, the sparse expert module includes several MoE structures, each MoE structure consisting of... Each expert subnetwork consists of a corresponding router; the first Each MoE structure is represented as a set of experts: Among them, each expert It is a multilayer perceptron with identical structure but independent parameters, specifically responsible for modeling a certain class of abstract visual features. The sparse expert module receives state vectors as input features. ; This represents the dimension of the input feature vector of this layer, and its value is equal to that of the visual feature vector. Vehicle state information vector and navigation information vector Total dimensions after splicing; In the sparse expert module, the activation of the expert is controlled by the corresponding router. Control; router with input characteristics Based on this, the output length is Scoring vector: in Router parameters; Then the score vector Perform Top-K sparse activation selection, i.e., only retain the scores before the peak. Only a few experts participate in the calculation, while the outputs of the remaining experts are set to zero; finally, the... The output of each MoE structure is: The above output is provided to subsequent steps for action generation.
4. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models 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 pre-sets multiple sets of autonomous driving task scenarios: in, This indicates the total number of preset autonomous driving task scenarios, and each task scenario... Each task corresponds to a specific road environment or driving objective. Requires a set of expert demonstration data collected by humans or high-performance controllers. Each trajectory is represented as a sequence of state-action pairs: in, The instance of the state vector described in step S1 during the training phase is obtained by encoding the multimodal perception information, vehicle state information, and navigation information at the time of acquisition. This indicates the throttle / brake control output of the expert controller at the corresponding moment. With steering angle ,and Strictly aligned in time; Indicating in the task scenario The number of expert demonstration trajectories collected below. This represents the maximum total number of time steps contained in a single trajectory, with each time step corresponding to a state-action pair; During training, the policy network is optimized using a behavioral cloning approach based on imitation learning, enabling it to predict a future sequence of actions. in, Experts indicate that at any time arrive Continuous Step-controlled action sequence; each action This sequence, generated by expert drivers during data collection, serves as a supervisory signal for training the policy network. This represents the mean squared error or negative log-likelihood monitoring loss function. For a diffusion strategy network, These are the parameters to be optimized. The total loss during multi-task training is: Define task With the A group of experts The mutual information between them is: The task distribution is uniform by default. Joint probability The activation frequency was statistically analyzed by experts during the task; the final training objective is: in This is the balance coefficient.
5. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 1, characterized in that, Step S3 specifically involves employing an action sequence prediction mechanism based on a conditional diffusion model, using state representation. As input, a continuous future control sequence is generated through a structured Transformer architecture, and the output is the throttle and steering angle of the vehicle in several future time steps; The motion generation problem is modeled as a conditional trajectory generation task involving a forward process and a backward process; during the forward process, Gaussian noise is gradually added to the real motion trajectory to generate a perturbed trajectory: in, Let n be the noise scheduling coefficient for the number of diffusion steps. This represents the initial clean trajectory. Indicates the final noisy trajectory; The conditional probability distribution representing the forward diffusion process is used to define the path given the trajectory of the previous step. Generate the current noisy trajectory under the condition The statistical process; The mean is Covariance is The multidimensional Gaussian distribution; The reverse process aims to learn a parameterized model. By progressively predicting the noise residuals or the denoised trajectories, a well-structured sequence of actions can be reconstructed. in The conditional mean prediction function depends on the current noise trajectory, state features, and current diffusion step. The entire denoising process is modeled using a parameter-sharing deep neural network and optimized during the training phase by minimizing the mean square error between the predicted noise and the actual denoised residual, in the form of: in To inject real Gaussian noise, These are the model estimates.
6. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 5, characterized in that, Design a multi-layer Transformer architecture as the main body of the diffusion network. Embed sparse expert modules in the multi-layer structure of the Transformer backbone, and input the diffusion step embedding and environmental feature encoding into the router to realize the dynamic adjustment of the expert activation path at each step of the reverse process. By introducing diffusion step embedding and environmental feature embedding, and jointly inputting both with the current layer feature vector into the router, let the Transformer backbone in the nth step of the reverse iteration be... The input features of the layer are The system concatenates the vector with the diffusion step embedding and environmental feature vector, then inputs it into the router to obtain the expert scoring vector; the system selects only the highest-scoring vector. Multiple experts participate in the computation to achieve sparse activation; in different task scenarios, the differences in environmental characteristics will directly affect the router's expert selection tendency; During the reasoning phase, the future action sequence is first initialized, and then proceeds in reverse order. Step-by-step restoration The final output is the complete motion trajectory, executing only the first step of the current moment. The rest will be used as a reference for future planning.
7. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 5, characterized in that, The mean of the multidimensional Gaussian distribution is taken as... The covariance is taken as , It is an identity matrix.
8. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 1, characterized in that, In step S4, when processing a new task, In the set of tasks that have been trained 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 perform retrospective fine-tuning of the original parameters, but instead uses the following two steps to complete incremental adaptation: (1) Freeze existing parameters: freeze the existing expert set , diffusion trunk and its router set Freeze everything to prevent the degradation of old mission capabilities; (2) Add a new module: Assign a new set of router parameters to the new task. Added expert module And insert it into the expert pool, where To increase the number of expert modules and enable new tasks to have autonomous expert scheduling capabilities, this design achieves knowledge isolation and controllable knowledge injection at the structural level. The training process for the new task is only updated: 。 9. The knowledge-driven end-to-end autonomous driving method based on sparse expert mechanisms and diffusion models according to claim 1, characterized in that, In step S4, When handling new tasks, do not add new experts, but only train the new router. This allows for the reorganization and scheduling of existing experts, thereby enabling efficient transfer learning under zero-expert expansion. Suppose the new task is related to an old task. The system shares similarities in local structure or behavioral patterns, and uses a new router to access the original expert set. Reweighting and combining data to construct new activation paths; this mechanism constitutes a sparse expert path reconstruction strategy. Among them, expert group The system remains unchanged; the differences are only reflected in the routing policy layer. By fine-tuning the router, the system can quickly migrate to new scenarios without modifying any backbone parameters and achieve acceptable control performance under limited sample conditions.
Citation Information
Patent Citations
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