Automatic driving simulation test method based on adaptive importance sampling

By using an adaptive importance sampling method and constructing an importance sampling distribution using Gaussian kernel expansion and AMIS algorithm, the problem of insufficient generation of high-risk scenarios in existing autonomous driving tests is solved, improving testing efficiency and accuracy, and enhancing the system's responsiveness under extreme conditions.

CN121809063APending Publication Date: 2026-04-07JIANGSU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing autonomous driving testing methods are inadequate in generating and covering high-risk scenarios, especially in extreme and emergency situations where testing efficiency is low and costs are high. Traditional methods cannot effectively capture dangerous scenarios in the real world, leading to increased testing time and costs.

Method used

An autonomous driving simulation test method based on adaptive importance sampling is adopted. The target distribution is fitted by Gaussian kernel expansion, and the importance sampling distribution is constructed by using the AMIS algorithm to increase the sampling probability of high-risk scenarios and reduce the number of tests required to reach convergence.

Benefits of technology

It significantly improves the efficiency and accuracy of autonomous driving testing, reduces simulation costs, and enhances the safety and reliability of the system in complex traffic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809063A_ABST
    Figure CN121809063A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic driving simulation test method based on adaptive importance sampling, and the method comprises the steps: firstly, preparing an original driving data set which comprises but is not limited to the speed of a front vehicle at the switching moment of the front vehicle, the speed of a test vehicle, and the relative collision time between two vehicles; taking the relative collision time as a variable, drawing a probability density histogram, and fitting the variable by using a Gaussian kernel expansion mode to obtain a probability density function; based on the probability density function, constructing importance sampling distribution oriented to the dangerous scene by using an AMIS algorithm; and resampling the driving data based on the importance sampling function to form optimized driving data for automatic driving simulation. According to the method, the sampling probability of a high-risk scene can be more effectively increased, so that the number of tests required for convergence is reduced, and the test efficiency and accuracy are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving simulation testing technology, and in particular to an adaptive importance sampling autonomous driving simulation testing method based on Gaussian kernel expansion. Background Technology

[0002] With the rapid development of autonomous driving technology, the demand for safety and reliability testing of autonomous driving systems is increasing. When evaluating autonomous driving systems, the complexity of the test scenarios directly affects the coverage and effectiveness of the tests. Existing autonomous driving testing methods, such as assessments based on Natural Driving Data (N-FOT), typically face two main problems: firstly, limited exposure to hazardous scenarios, leading to extremely long testing times and high costs; secondly,

[0003] Traditional autonomous driving testing methods typically rely on static traffic flow models or fixed test scenarios. These methods mainly simulate different driving situations through simple parameter adjustments, ignoring the dynamic changes in hazardous areas and failing to effectively capture extreme and dangerous scenarios that may occur in the real world. Especially when the vehicle is making an emergency maneuver or at relatively high speeds, the system's reaction capability is often insufficient. This results in existing models failing to fully reflect potential dangerous scenarios when facing extreme conditions, leading to low testing efficiency and insufficient coverage.

[0004] Traditional importance sampling methods typically employ weighted sampling and weighted average calculations to ensure convergence, thereby guaranteeing sufficient sampling of rare events (such as high-risk scenarios). While this method can guarantee a certain level of statistical accuracy, the low frequency of dangerous scenarios necessitates a very large number of tests, undoubtedly increasing testing time costs. Therefore, existing methods have significant limitations in simulating and generating high-risk scenarios.

[0005] In summary, existing autonomous driving simulation testing methods still have significant shortcomings in generating and covering high-risk scenarios, especially in responding to extreme and emergency situations, which increases testing time costs and affects testing efficiency and accuracy. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this application proposes an autonomous driving simulation testing method based on adaptive importance sampling. This invention fits the original target distribution by performing Gaussian kernel expansion on the TTC (Time to Collision Relative) data. Then, the sampling distribution is gradually adjusted using the AMIS method. ),get The distributed critical sampling scheme is used for autonomous driving simulation testing. It can more effectively increase the sampling probability of high-risk scenarios, thereby reducing the number of tests required to reach convergence and significantly improving testing efficiency and accuracy.

[0007] The technical solution adopted in this invention is as follows:

[0008] An autonomous driving simulation testing method based on adaptive importance sampling includes the following steps:

[0009] Step 1: Prepare the original driving dataset, which includes, but is not limited to, the speed of the vehicle in front at the moment the vehicle in front cuts in. Test vehicle speed And the relative collision time between the two vehicles ;

[0010] Step 2: Relative collision time Using these variables as variables and plotting their probability density histograms, we fit the variables using Gaussian kernel expansion to obtain the probability density function. ;

[0011] Step 3: Based on probability density function An importance sampling distribution for hazardous scenarios is constructed using the AMIS algorithm. ;

[0012] Step 4, based on the importance sampling function The driving data is resampled to form optimized driving data, which is then used for autonomous driving simulation.

[0013] Furthermore, step 2 is as follows:

[0014] Step 2.1: Using the relative collision time obtained in Step 1 Based on the data, set the first Gaussian kernel;

[0015] Step 2.2: Iteratively add Gaussian kernels; the Gaussian mixture model is completed when the iteration terminates.

[0016] Step 2.3: Obtain the probability density function of the Gaussian mixture model, expressed as:

[0017]

[0018] in, Indicates the first The probability density function of Gaussian kernels, where x is a variable. It is the weight of the i-th Gaussian kernel. It is the mean of the i-th Gaussian kernel. It is the standard deviation of the i-th Gaussian kernel. It represents the number of Gaussian kernels at the end of the iteration.

[0019] Furthermore, the iterative construction of the Gaussian mixture model in step 2.2 is as follows:

[0020] Step 2.2.1: Based on Construct a probability density histogram from the data;

[0021] Step 2.2.2: Calculate the current Gaussian mixture model and the data probability density histogram for each data point. residuals at the location;

[0022] Step 2.2.3: Select the data point with the largest residual. As the center of the new Gaussian kernel;

[0023] Step 2.2.4: Assign an initial weight to the new Gaussian kernel The standard deviation of the data itself is used to add a new core;

[0024] Step 2.2.5: Use the expectation-maximization algorithm to calculate the parameters of each Gaussian kernel. Optimize; when the iteration termination condition is met, terminate the kernel addition and complete the Gaussian mixture model construction.

[0025] Furthermore, the iteration termination condition is: calculate the Bayesian Information Criterion (BIC) for all kernels, and select the model based on the change in BIC. The BIC formula is as follows:

[0026]

[0027] in, It is the log-likelihood value of the Gaussian mixture model; It is the number of kernels in the model; It is the sample size;

[0028] Preset the threshold for log-likelihood increment. and BIC change threshold Let the log-likelihood value and BIC value corresponding to the s-th iteration be respectively... , When the following conditions are met:

[0029]

[0030] If the model converges, the kernel addition process is terminated; otherwise, steps 2.2.2 to 2.2.5 are executed for the next iteration.

[0031] Furthermore, the expectation-maximization algorithm is used to optimize the parameters of each Gaussian kernel. The optimization method is as follows: by alternately executing the E-step and M-step, the responsibility coefficient of each sample relative to each Gaussian component is calculated in the E-step, and the membership degree is used as a weight to update the mixed weight, mean and variance of each component in the M-step until the log-likelihood converges.

[0032] Furthermore, step 3 is as follows:

[0033] Step 3.1: When t=0, initialize Using probability density function sampling initial samples Set the initial importance weights for the initial samples. Calculate the weighted average based on the sample and weights.

[0034] Step 3.2: When t=1 round, apply the probability density function Introducing parameters This will lead to a new distribution in this round. The expected value is equal to the weighted average of the previous round. Find Value, back substitution to find the value in each round ;

[0035] Step 3.3: In the t-th iteration, use the sampling distribution obtained from the previous update. sampling The sample, and the first sample The samples from each round are used together for subsequent weight updates and parameter adjustments. estimate;

[0036] Step 3.4: After updating the weights, calculate the new weighted mean using all samples from rounds 0 to t: .

[0037] Furthermore, in step 3.2, the parameters are calculated. The process is as follows:

[0038]

[0039] have

[0040]

[0041] make

[0042]

[0043] The analytical update formula for the parameters can be obtained.

[0044]

[0045] when hour, A negative value indicates that the overall sampling distribution has shifted towards the danger zone; if ,but If the value is positive, the sampling distribution should be appropriately pulled back to avoid excessive concentration in extreme scenarios.

[0046] Furthermore, the calculation process is as follows:

[0047] (1) Calculation Construct a mixed sampling distribution by taking the weighted mean of all sampling distributions. :

[0048]

[0049] in, Let be the number of samples in the s-th round of sampling. This represents the sampling distribution for the corresponding round;

[0050] (2) Calculate the i-th sample in the s-th round. Importance weights, denoted as:

[0051]

[0052] in, Represents samples under the target distribution The probability density; Indicates sample The density under a mixed sampling distribution;

[0053] And after normalization, we get:

[0054]

[0055] in, Let be the unnormalized importance weight of the j-th sample in the u-th iteration; The number of samples in the u-th round is denoted by ; the denominator is summed over all rounds and all samples for normalization.

[0056] Furthermore, the termination condition for the iterative update in step 3.4 is: until the change in the effective sample size is less than a threshold. Stop iterating when the time comes and output the final importance sampling distribution.

[0057] The beneficial effects of this invention are:

[0058] 1. This invention employs Gaussian kernel expansion to fit the target distribution. By utilizing a linear combination of multiple Gaussian kernel functions, it can approximate arbitrarily complex real distribution shapes with extremely high accuracy, and is particularly adept at capturing non-standard distribution characteristics such as multimodal and skewed distributions. Compared to traditional single distribution assumptions, Gaussian kernel expansion does not rely on strong prior distribution assumptions, which can maximize the fitting accuracy of the original data distribution, constructing an accurate and reliable probabilistic foundation for subsequent importance sampling, and fundamentally improving the accuracy and realism of simulation testing.

[0059] 2. Achieving Efficient Sample Recycling and Utilization through AMIS Framework: By introducing the Adaptive Multiple Importance Sampling (AMIS) algorithm, this invention achieves full-cycle recycling and dynamic reuse of historical samples. In each iteration, the algorithm recalculates the weights of all generated samples (including those from previous rounds), ensuring that every computational resource is fully utilized. This mechanism significantly reduces the number of new samples required to achieve convergence, fundamentally lowering the simulation and time costs of testing.

[0060] 3. By optimizing the testing process, this invention reduces unnecessary sampling of low-risk scenarios, lowers testing time and computational resource consumption, making the testing of autonomous driving systems more efficient and economical. It not only improves the test coverage of autonomous driving systems but also helps the systems react more accurately under extreme conditions, thereby enhancing the safety and reliability of autonomous driving systems in complex traffic environments. Attached Figure Description

[0061] Figure 1 To apply Gaussian kernel expansion to the target distribution The flowchart for the fitting process.

[0062] Figure 2 Construction of adaptive importance sampling The flowchart.

[0063] Figure 3 for Fitted plot.

[0064] Figure 4 To adopt as well as The importance of the sampling distribution is shown in the figure.

[0065] Figure 5 This is a scene conflict rate estimation graph.

[0066] Figure 6 This is a comparison chart of the convergence of conflict rate relative to half-width. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0068] Combination Figure 1 , 2 An autonomous driving simulation testing method based on adaptive importance sampling includes the following steps:

[0069] Step 1: Prepare the driving dataset; extract the speed of the vehicle in front at the moment the vehicle cuts in from the driving dataset. Test vehicle speed And the relative collision time between the two vehicles .

[0070] More specifically, the driving dataset mentioned is the highD dataset used. In the actual data collection process, vehicle driving status data can be collected through onboard sensors. For example, radar and lidar can be used to collect relative collision time information between the vehicle in front and the test vehicle, GPS can be used to obtain the vehicle's location information, and onboard cameras or other sensors can be used to record the vehicle's speed and trajectory.

[0071] Step 2: To address the lack of flexibility in fitting real-world driving data using traditional parametric distribution assumptions (such as a single Gaussian or exponential distribution), this invention employs the Gaussian kernel expansion method to accurately fit key variables (such as relative collision time) from the original driving data. The probability distribution of (), i.e., the probability density function This lays a more reliable foundation for subsequent sampling. The specific steps are as follows:

[0072] Step 2.1: Using the relative collision time obtained in Step 1 Based on the data, the initial parameters for the Gaussian kernel expansion are set, specifically including: defining the first Gaussian kernel of the Gaussian mixture model; the mean of this Gaussian kernel is the sample mean. Standard deviation The standard deviation of the sample, weights =1.

[0073] Step 2.2: Iterate by adding Gaussian kernels until the iteration terminates, at which point the Gaussian mixture model is complete.

[0074] Step 2.2.1 First, construct a probability density histogram of the target variable based on the original driving data obtained in Step 1. Specifically, extract distance samples from the driving data, denoted as... The statistical interval is determined based on the minimum and maximum values ​​of the sample. The interval is then divided into M equal sub-intervals, each with a width of [missing value]. Count the number of samples that fall within the j-th subinterval. And by normalizing, the frequencies are converted into probability density estimates, i.e.

[0075]

[0076] in, Let be the center position of the j-th subinterval. The resulting point set... That is, the "data points" defined in the probability density histogram of data. This data point contains both the horizontal axis position (variable value) and the vertical axis probability density.

[0077] Step 2.2.2: Calculate the residuals: MATLAB or other software can be used to calculate the probability density histogram of the current Gaussian mixture model and the data at each data point. The residual at each point. After obtaining the above data points, at each Calculate the theoretical probability density value given by the current Gaussian mixture model. And define the residual at this data point as:

[0078]

[0079] Step 2.2.3: Determine the new core center: Find the data point with the largest residual. As the center of the new Gaussian kernel.

[0080] Step 2.2.4: Add a new kernel: Assign an initial weight to the new Gaussian kernel. =0.1 and the standard deviation of the data itself.

[0081] Step 2.2.5: Parameter Optimization: Use the Expectation-Maximization (EM) algorithm to optimize the parameters of each Gaussian kernel. Optimize.

[0082] More specifically, model selection and convergence determination: In this embodiment, the iteration termination condition is consistent with the aforementioned termination condition, and the value is... and BIC change threshold When, the consecutive rounds parameter is taken as The process is considered to have converged and terminated when the above conditions are met in the most recent eight consecutive iterations.

[0083] In this embodiment, when the number of kernels is increased to 7, the BIC value reaches the optimum (28580.061), and the mean square error between the model and the data probability distribution is 8.88 × 10⁻⁶. -6 This indicates that the Gaussian Mixture Model (GMM) fits well, and the iteration is terminated. The final result is a target distribution with high fitting accuracy, consisting of 7 Gaussian kernels.

[0084] Step 2.3: The final Gaussian mixture model consists of 7 kernels, and its probability density function is expressed as:

[0085]

[0086] in, Indicates the first The probability density function of Gaussian kernels, where x is a variable. It is the weight of the i-th Gaussian kernel. It is the mean of the i-th Gaussian kernel. It is the standard deviation of the i-th Gaussian kernel. The specific parameters are as follows:

[0087] Nuclear Number Weight mean Standard deviation 1 0.3561 -2.8549 0.7506 2 0.0175 9.5560 0.2676 3 0.0407 9.1545 0.5032 4 0.3157 4.4309 1.0121 5 0.0665 5.8876 1.5827 6 0.0401 8.2968 0.7206 7 0.1634 -6.7845 1.1929

[0088] Step 3: Based on probability density function An importance sampling distribution for hazardous scenarios was constructed using the AMIS algorithm. .

[0089] In this embodiment, the danger threshold is taken as TTC. thr =2s, when TTC is less than the danger threshold, it is determined to be a dangerous scenario. The specific process of step 3 is as follows:

[0090] Step 3.1: Using the target distribution p(x) obtained in Step 2 as the initial distribution, let t=0, then:

[0091]

[0092] Directly from the final target distribution Medium sampling =2000 samples, all samples have the same initial weight, calculate the initial sample mean according to the formula in step 3.1 above. Meanwhile, the theoretical expectation of the target distribution can be analytically obtained from the GMM parameters:

[0093]

[0094] Step 3.2: In the iterations of the t≥1 round, when t=1 round, move towards the probability density function Introducing parameters This will lead to a new distribution in this round. The expected value is equal to the weighted mean. Find Value, back substitution to find the value in each round .

[0095] Step 3.3: In the t-th iteration, the sampling distribution obtained from the previous update... Medium sampling Sample, and with the first The samples from each round are used together for subsequent weight updates and parameter estimation.

[0096] The calculation process is as follows:

[0097] (1) Calculation The weighted mean of all sampling distributions in the round:

[0098]

[0099] (2) Calculate the i-th sample in the s-th round. Importance weights, denoted as:

[0100]

[0101] in, Represents samples under the target distribution The probability density; Indicates sample The density of under mixed sampling distribution.

[0102] And after normalization, we get:

[0103]

[0104] in, Let be the unnormalized importance weight of the j-th sample in the u-th iteration; The number of samples in the u-th round is denoted by ; the denominator is summed over all rounds and all samples for normalization.

[0105] Step 3.4: After updating the weights, calculate the new weighted mean using all samples from rounds 0 to t:

[0106]

[0107] Furthermore, in step 3.2, the parameters are calculated. The process is as follows:

[0108]

[0109] Based on the aforementioned analytical relationship

[0110]

[0111] The adaptive update formula can be obtained.

[0112]

[0113] when hour, A negative value corresponds to the overall sampling distribution shifting towards the danger zone (a smaller distance); if ,but If the value is positive, the sampling distribution should be appropriately pulled back to avoid excessive concentration in extreme scenarios.

[0114] By repeating the above iterations, the iteration stops when the change in the number of effective samples (ESS) between two adjacent rounds is less than a preset threshold (e.g., 0.3), and the final importance sampling distribution is output. It will be used for subsequent scene generation and autonomous driving simulation testing.

[0115] Step 4, based on the final importance sampling function Resampling is performed to generate new relative collision time data. and find Corresponding speed of the vehicle in front and the speed of this car Then calculate the new vehicle distance data. To form a new test scenario Simulations of autonomous driving are conducted based on the optimized data.

[0116] In this embodiment, simulation testing can be conducted using a virtual testing platform for autonomous vehicles that simulates a scenario where a preceding vehicle enters the test area. This will allow for the creation of new test scenarios. The test is conducted as the initial state for simulation testing to obtain vehicle driving state data to evaluate its acceleration.

[0117] The collision rate, crash rate, and accident rate for each test are calculated using data obtained from simulation tests. The convergence of these metrics is evaluated by plotting curves showing their variation with the number of tests. Furthermore, test efficiency is calculated... The minimum number of tests required for convergence of the occurrence rate of high-risk scenarios at a given confidence level is used for evaluation. The testing efficiency in accelerated testing scenarios is evaluated using a speedup method.

[0118] The acceleration ratio formula is defined as:

[0119]

[0120] in, To improve the speedup ratio in testing scenarios, This refers to the test mileage of autonomous vehicles in natural testing scenarios. This refers to the test mileage in accelerated testing scenarios.

[0121] The following description, in conjunction with the specific implementation process, further illustrates that this embodiment uses unmanned aerial vehicle (UAV) data collection to gather natural driving data of the vehicle's driving status and extracts the speed of the vehicle ahead at the moment it cuts in. Test vehicle speed And the relative collision time between the two vehicles Through data filtering and preprocessing, a total of 10,646 valid scenarios were identified.

[0122] like Figure 3 As shown, to better illustrate the relative collision times associated with hazardous scenarios In this embodiment, the probability density of the original data is estimated by Gaussian kernel expansion in order to better observe the data characteristics and the proportion of dangerous scenarios.

[0123] In this embodiment, an importance sampling method is used to generate a probability distribution function that is more biased towards dangerous scenarios, replacing the original probability distribution. First, the original... Probability density estimation was performed, and the range was divided into 150 equally spaced intervals to obtain the horizontal axis vector. The frequency within each interval was counted, and a probability density histogram of relative collision time was constructed.

[0124] Subsequently, the probability distribution was fitted using a Gaussian kernel expansion function, successfully capturing different... The probability distribution trend of the occurrence of danger, such as Figure 3 As shown.

[0125] After fitting the original data, when using the importance sampling method to generate a probability distribution function with a higher probability of danger to replace the original probability distribution function, the maximum likelihood estimation function is first used to represent the sampling distribution. With target distribution The relationship is specifically represented as follows:

[0126]

[0127] Let the relative collision time value vector range be denoted. High-risk areas are Furthermore, indicator functions were introduced. , The probability of a high-risk event occurring is called the hazard rate.

[0128]

[0129]

[0130] in, Number of tests;

[0131] In order to make exist Convergence is achieved at a confidence level where the relative half-width is less than a constant. The optimal distribution function should satisfy the following conditions for the number of tests n:

[0132]

[0133] in, is the likelihood ratio function; is the confidence level; The confidence level; This represents the cumulative distribution function value corresponding to the confidence level; This is the convergence threshold.

[0134] Combined with appendix Figure 3 Introducing importance tilt parameter The original distribution was adjusted to generate a new fitted distribution. Furthermore, it can calculate the uniqueness of each iteration based on the calculation formula. Through continuous iterative optimization and weight reclamation, the final importance sampling distribution can be obtained.

[0135]

[0136] Using a virtual testing platform for autonomous vehicles that takes precedence over a previous vehicle, new data is regenerated to create new test scenarios. The test is conducted as the initial state for simulation testing to obtain vehicle driving state data to evaluate its acceleration.

[0137] Combined with appendix Figure 4 As shown, the solid line represents the target distribution obtained by fitting natural driving data. The dashed line represents the sampling distribution obtained using the adaptive importance sampling method of this invention. The vertical line represents the danger threshold. It can be seen that within the danger zone to the left of the danger threshold, The density is significantly higher than This indicates a significant increase in the number of samples taken from hazardous scenarios; meanwhile, across the entire spectrum, and The shapes are generally consistent. This indicates that the present invention effectively increases the sampling ratio in hazardous scenarios while maintaining the overall distribution characteristics.

[0138] Combined with appendix Figure 5 , 6 The collision rate, crash rate, and accident rate for each test are calculated using data obtained from simulation tests, and curves showing these metrics changing with the number of tests are plotted to evaluate their convergence. Furthermore, test efficiency is calculated... The minimum number of tests required for convergence of the occurrence rate of high-risk scenarios at a given confidence level is used for evaluation. The testing efficiency in accelerated testing scenarios is evaluated using a speedup method.

[0139]

[0140] In the formula, represents the speedup ratio of the two testing methods; The number of times the autonomous vehicle was tested in the driving scenario in Monte Carlo; The number of tests conducted on autonomous vehicles in importance sampling acceleration scenarios; the calculation results show that the technical solution of this invention can accelerate by 24.70 times, and there is an even greater improvement based on parameter optimization.

[0141] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.

Claims

1. An autonomous driving simulation testing method based on adaptive importance sampling, characterized in that, Includes the following steps: Step 1: Prepare the original driving dataset, which includes, but is not limited to, the speed of the vehicle in front at the moment the vehicle in front cuts in. Test vehicle speed And the relative collision time between the two vehicles ; Step 2: Relative collision time Using these variables as variables and plotting their probability density histograms, we fit the variables using Gaussian kernel expansion to obtain the probability density function. ; Step 3: Based on probability density function An importance sampling distribution for hazardous scenarios is constructed using the AMIS algorithm. ; Step 4, based on the importance sampling function The driving data is resampled to form optimized driving data, which is then used for autonomous driving simulation.

2. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 1, characterized in that, Step 2 is as follows: Step 2.1: Using the relative collision time obtained in Step 1 Based on the data, set the first Gaussian kernel; Step 2.2: Iteratively add Gaussian kernels; the Gaussian mixture model is completed when the iteration terminates. Step 2.3: Obtain the probability density function of the Gaussian mixture model, expressed as: ; in, Indicates the first The probability density function of Gaussian kernels, where x is a variable. It is the weight of the i-th Gaussian kernel. It is the mean of the i-th Gaussian kernel. It is the standard deviation of the i-th Gaussian kernel. It represents the number of Gaussian kernels at the end of the iteration.

3. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 2, characterized in that, The iterative construction of the Gaussian mixture model in step 2.2 is as follows: Step 2.2.1: Based on Construct a probability density histogram from the data; Step 2.2.2: Calculate the current Gaussian mixture model and the data probability density histogram for each data point. The residual at the location; Step 2.2.3: Select the data point with the largest residual. As the center of the new Gaussian kernel; Step 2.2.4: Assign an initial weight to the new Gaussian kernel The standard deviation of the data itself is used to add a new core; Step 2.2.5: Use the expectation-maximization algorithm to calculate the parameters of each Gaussian kernel. Optimize; when the iteration termination condition is met, terminate the kernel addition and complete the Gaussian mixture model construction.

4. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 3, characterized in that, The iteration termination condition is: calculate the Bayesian Information Criterion (BIC) for all kernels, and select the model based on the change in BIC. The BIC formula is as follows: ; in, It is the log-likelihood value of the Gaussian mixture model; It is the number of kernels in the model; It is the sample size; Preset the threshold for log-likelihood increment and BIC change threshold Let the log-likelihood value and BIC value corresponding to the s-th iteration be respectively... , When the following conditions are met: If the model converges, the kernel addition process is terminated; otherwise, steps 2.2.2 to 2.2.5 are executed for the next iteration.

5. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 3, characterized in that, The parameters of each Gaussian kernel are calculated using the expectation-maximization algorithm. The optimization method is as follows: The EM algorithm alternately executes the E-step and M-step. In the E-step, the responsibility coefficient of each sample relative to each Gaussian component is calculated. In the M-step, the responsibility coefficient is used as a weight to update the mixed weight, mean and variance of each component until the log-likelihood converges.

6. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 2, characterized in that, Step 3 is as follows: Step 3.1: When t=0, initialize Using probability density function sampling initial samples Set the initial importance weights for the initial samples. Calculate the weighted average based on the sample and weights. ; Step 3.2: When t=1 round, apply the probability density function Introducing parameters This will lead to a new distribution in this round. The expected value is equal to the weighted average of the previous round. Find Value, back substitution to find the value in each round ; Step 3.3: In the t-th iteration, use the sampling distribution obtained from the previous update. sampling The sample, and the first sample The samples from each round are used together for subsequent weight updates and parameter adjustments. estimate; Step 3.4: After updating the weights, calculate the new weighted mean using all samples from rounds 0 to t. .

7. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 6, characterized in that, Calculate parameters in step 3.2 The process is as follows: ; have ; make ; The analytical update formula for the parameters can be obtained. ; when hour, A negative value indicates that the overall sampling distribution has shifted towards the danger zone; if ,but If the value is positive, the sampling distribution should be appropriately pulled back to avoid excessive concentration in extreme scenarios.

8. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 6, characterized in that, The calculation process is as follows: (1) Calculation Construct a mixed sampling distribution by taking the weighted mean of all sampling distributions. : ; in, Let be the number of samples in the s-th round of sampling. This represents the sampling distribution for the corresponding round; (2) Calculate the i-th sample in the s-th round. Importance weights, denoted as: ; in, Represents samples under the target distribution The probability density; Indicates sample The density under a mixed sampling distribution; And after normalization, we get: ; in, Let be the unnormalized importance weight of the j-th sample in the u-th iteration; The number of samples in the u-th round is denoted by ; the denominator is summed over all rounds and all samples for normalization.

9. The autonomous driving simulation testing method based on adaptive importance sampling according to claim 6, characterized in that, The termination condition for iterative updates in step 3.4 is: until the change in the effective sample size is less than a threshold. Stop iterating when the time comes and output the final importance sampling distribution.