A method for adaptive equilibrium estimation and uncertainty decomposition of traffic states

By constructing a dual-output heteroscedastic neural network and an adaptive weighting algorithm, combined with the underdamped Langevin dynamics diffusion process, the problem of high accuracy and uncertainty quantification in traffic state estimation under sparse observation conditions is solved. This achieves high-precision probabilistic estimation and uncertainty decomposition of traffic state, improving the robustness and convergence efficiency of the estimation.

CN122157472APending Publication Date: 2026-06-05NINGBO UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGBO UNIV
Filing Date
2026-01-30
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing traffic state estimation methods based on physical information neural networks struggle to provide high-precision and reliable uncertainty quantification under sparse observation conditions. Furthermore, the weights of the loss function in multi-task learning are difficult to balance dynamically, resulting in low convergence efficiency during training and a tendency to fall into suboptimal solutions.

Method used

A dual-output heteroscedastic neural network is constructed, which combines the Gaussian negative log-likelihood and the hybrid loss function of the traffic flow physical equation. The weights of the loss terms are dynamically adjusted through the gradient variance adaptive weight algorithm and the underdamped Langevin dynamic diffusion process, so as to achieve high-precision probabilistic estimation and uncertainty decomposition of traffic conditions.

Benefits of technology

It achieves high-precision probabilistic estimation of traffic conditions under sparse observation conditions, effectively quantifies randomness and cognitive uncertainty, improves the robustness and convergence efficiency of the estimation, and provides a quantitative basis for traffic monitoring optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157472A_ABST
    Figure CN122157472A_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-adaptive balance estimation and uncertainty decomposition method of traffic state, it is related to traffic management technical field, mainly includes the following steps: first, construct a double-output neural network that can simultaneously output traffic state mean and variance, and design mixed loss function that fuses data and physical constraints.In training, the variance of each loss gradient is calculated to adaptively adjust its weight, to balance the optimization process.Further, the parameter update is modeled as an underdamped Langevin dynamics process, noise is injected for posterior sampling, and multiple sets of model parameters are obtained.Finally, these parameters are used for multiple inferences, and by aggregating and statistically analyzing the prediction results, the accidental uncertainty from data noise and the cognitive uncertainty from model cognitive deficiency are separated and quantified.The application realizes high-precision probability estimation of traffic state under sparse observation data, providing a quantitative basis for traffic monitoring optimization and risk assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic management technology, specifically to an adaptive equilibrium estimation and uncertainty decomposition method for traffic conditions. Background Technology

[0002] In intelligent transportation systems, comprehensive and accurate traffic state estimation is fundamental to achieving efficient traffic management and travel services. Traditional traffic state estimation methods mainly fall into two categories: one is purely data-driven, relying on a large amount of sensor observation data and directly fitting data relationships through machine learning or statistical models. However, its generalization ability is limited when data is sparse or noise is significant, and it lacks consideration of the physical mechanisms of traffic flow. The other is a physical model-based approach, such as using macroscopic traffic flow partial differential equations for state deduction. Although the mechanisms are clear, it is sensitive to model simplification assumptions and struggles to effectively handle complex noise and uncertainties in real-world systems. In recent years, Physical-Informed Neural Networks (PINN) have been introduced into the transportation field as a novel framework that integrates data and physical models. By embedding physical equations such as traffic flow conservation laws into the training process of the neural network as soft constraints, it can improve the physical consistency of state estimation even under conditions of limited observation data. However, existing PINN-based traffic state estimation methods still have several significant limitations: First, most methods only output definite point estimates, failing to provide confidence intervals or uncertainty measures for the prediction results, making it difficult to assess prediction risks in practical decision-making. Second, even when some studies attempt to quantify uncertainty, they often treat it as a mixed overall output, failing to distinguish the sources of uncertainty—namely, accidental uncertainty caused by observation noise and cognitive uncertainty caused by missing data or insufficient model understanding—thus failing to provide clear guidance for sensor optimization or model improvement. Third, PINN training essentially constitutes a multi-objective optimization problem, with a large and dynamic difference in gradient magnitude between the data fitting loss and the physical constraint loss. Existing methods typically rely on manually setting fixed weights, leading to difficulties in balancing the training process, low convergence efficiency, and a tendency to fall into suboptimal solutions. Therefore, how to achieve high-precision traffic state estimation with reliable uncertainty quantification and automatic multi-task learning balance under sparse observation conditions remains a critical technical challenge that current intelligent transportation systems urgently need to overcome. Summary of the Invention

[0003] To achieve high-precision traffic state estimation with reliable uncertainty quantification and automatic multi-task learning balance under sparse observation conditions, this invention proposes an adaptive balance estimation and uncertainty decomposition method for traffic states, including the following steps: S1: Construct a dual-output heteroscedastic neural network that takes spatiotemporal coordinates as input and simultaneously outputs the mean and logarithmic variance of traffic state predictions; S2: Construct a hybrid loss function for the neural network consisting of a data fitting loss based on Gaussian negative log-likelihood and a physical constraint loss based on traffic flow physical equations; S3: During the training process of the neural network, the weights of each loss term are dynamically adjusted based on the gradient variance of the two loss terms in the hybrid loss function with respect to the neural network parameters. S4: The parameter optimization process of the neural network is modeled as an underdamped Langevin dynamic diffusion process. In each iteration, the gradient is calculated according to the hybrid loss function and noise is injected to update the network parameters, and posterior sampling of the solution space is performed. S5: Save the multiple sets of neural network parameters obtained during the sampling process and construct a posterior parameter set; S6: Using multiple sets of parameters in the posterior parameter set, perform multiple forward inferences on the target spatiotemporal region through a neural network to obtain the mean and variance of multiple traffic state predictions; S7: Aggregate and average the multiple predicted means to obtain the final state estimate, average the multiple variances to quantify random uncertainty, and quantify cognitive uncertainty by calculating the variance between the multiple predicted means.

[0004] This invention achieves high-precision probabilistic estimation of traffic conditions under sparse observation data by constructing a dual-output neural network, combining adaptive loss weights with Bayesian posterior sampling, and for the first time decouples total uncertainty into interpretable accidental uncertainty and cognitive uncertainty, thereby improving the robustness of the estimation and providing a quantitative basis for traffic monitoring optimization and risk assessment.

[0005] Furthermore, the mean of the output of the dual-output heteroscedastic neural network is processed by the Sigmoid activation function, and the normalized output represents the expected mean of traffic state prediction; the logarithmic variance of the output is directly used to represent the variance of the observation noise.

[0006] Furthermore, in step S2, the data fitting loss formula based on the Gaussian negative log-likelihood is: In the formula, For the set of parameters to be optimized in the neural network, For data fitting loss, They represent the first The time and spatial coordinates of each observation point For neural networks in coordinates The logarithmic variance of the output. For neural networks in coordinates The average traffic state prediction output. coordinates The actual traffic condition observation values ​​at the location, This represents the total number of observation points.

[0007] Furthermore, in step S2, the physical constraint loss is constructed based on the LWR macroscopic traffic flow model and is obtained by calculating the mean square error at a set of spatiotemporal configuration points using the physical residual function defined by the LWR macroscopic traffic flow model. The formula for the physical residual function is as follows: In the formula, Representing continuous time coordinates and spatial coordinates respectively. The mean of the traffic density predictions output by the neural network. For free flow velocity, This represents the maximum density of roads.

[0008] Furthermore, in step S3, dynamically adjusting the weights of each loss term specifically involves: calculating the variance of the gradient of each loss term, smoothing the variance by exponential moving average, and calculating adaptive weights based on the smoothed variance according to the inverse Dirichlet principle.

[0009] Furthermore, the formula for calculating the adaptive weights is as follows: In the formula, For the first During the training iteration, the first... Adaptive weights for the loss term, These correspond to data fitting loss and physical constraint loss, respectively; The gradients of the data fitting loss and the physical constraint loss are respectively on the th... Exponential moving average smoothed variance during the training iteration; For the first The smoothed variance corresponding to the term loss; To prevent numerical stability constants with a denominator of zero.

[0010] Furthermore, in step S4, the update rule formula for network parameters during the underdamped Langevin dynamic diffusion process is expressed as: In the formula, This is an index for the number of training iterations. For momentum variables, The coefficient of friction, For learning rate, For Gaussian noise that follows a standard normal distribution, This is a hybrid loss function weighted according to dynamically adjusted loss term weights. For the hybrid loss function on the neural network parameters The gradient.

[0011] Furthermore, in step S5, a set of neural network parameters is saved to construct a posterior parameter set at a fixed iteration interval or when the fluctuation of the loss function is less than a preset threshold.

[0012] Furthermore, the training process of the neural network adopts a phased strategy, specifically including: In the first stage, the neural network is pre-trained using only the data fitting loss based on mean squared error, while the physical constraint loss and variance output are turned off. In the second stage, enable physical constraint loss and variance output, and activate the dynamic weight adjustment in step S3. In the third stage, after the loss converges to the stable region, noise injection from step S4 is enabled to perform posterior sampling.

[0013] Furthermore, in step S7, the specific calculation formula for uncertainty decoupling is as follows: In the formula, Due to chance and uncertainty, To understand uncertainty, The number of parameter sets in the posterior parameter set. Let be the mean and logarithmic variance of the traffic state predictions for the m-th group of parameters, respectively. This is the final average of the traffic condition predictions. These represent continuous time coordinates and spatial coordinates, respectively.

[0014] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The adaptive equilibrium estimation and uncertainty decomposition method for traffic state proposed in this invention constructs a dual-output heteroscedastic neural network that can simultaneously output the mean and variance of traffic state prediction, and designs a hybrid loss function that integrates Gaussian negative log-likelihood and traffic flow physical equation. First, at the architecture level, a probabilistic estimation of traffic state is realized, which not only provides the predicted value, but also evaluates the reliability of the prediction, effectively improving the estimation robustness under sparse and noisy traffic data. (2) To address the core challenge of balancing data fitting and physical constraints during training, an adaptive weighting algorithm based on gradient variance is introduced. This algorithm calculates the statistical fluctuations of the gradients of each loss term in real time and dynamically adjusts the weights accordingly, thereby achieving automatic and smooth guidance of the multi-objective optimization process. This ensures that the model can still strictly approximate physical laws under sparse observations, reduces the dependence of training on manual parameter tuning, and improves convergence efficiency and estimation accuracy. (3) The parameter optimization process is modeled as an underdamped Langevin dynamic diffusion process. By injecting noise into the gradient update to perform Bayesian posterior sampling, multiple sets of model parameters representing the probability distribution of the solution space are obtained. By aggregating and statistically analyzing the forward inference results of multiple sets of parameters, the random uncertainty and cognitive uncertainty are mathematically decoupled: the former originates from data noise and can be quantified by variance averaging to identify sensor anomalies or high dynamic regions; the latter originates from the cognitive blind spot of the model and can be intuitively revealed by mean variance quantization to reveal the spatiotemporal range of insufficient observation. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the steps of an adaptive equilibrium estimation and uncertainty decomposition method for traffic conditions. Detailed Implementation

[0016] This invention provides an adaptive equilibrium estimation and uncertainty decomposition method for traffic states, aiming to solve the technical problems of existing physical information neural networks in traffic state estimation, which can only provide point estimates, cannot effectively quantify and decompose uncertainties, and have difficulty dynamically determining the weights of multi-task loss functions. The invention will be further described in detail below with reference to the accompanying drawings (if any) and specific embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0017] The overall implementation process of this method is based on a probabilistic framework that deeply integrates data-driven approaches and physical models. For example... Figure 1 As shown, the method mainly includes the following steps: S1: Construct a dual-output heteroscedastic neural network that takes spatiotemporal coordinates as input and simultaneously outputs the mean and logarithmic variance of traffic state predictions; S2: Construct a hybrid loss function for the neural network consisting of a data fitting loss based on Gaussian negative log-likelihood and a physical constraint loss based on traffic flow physical equations; S3: During the training process of the neural network, the weights of each loss term are dynamically adjusted based on the gradient variance of the two loss terms in the hybrid loss function with respect to the neural network parameters. S4: The parameter optimization process of the neural network is modeled as an underdamped Langevin dynamic diffusion process. In each iteration, the gradient is calculated according to the hybrid loss function and noise is injected to update the network parameters, and posterior sampling of the solution space is performed. S5: Save the multiple sets of neural network parameters obtained during the sampling process and construct a posterior parameter set; S6: Using multiple sets of parameters in the posterior parameter set, perform multiple forward inferences on the target spatiotemporal region through a neural network to obtain the mean and variance of multiple traffic state predictions; S7: Aggregate and average the multiple predicted means to obtain the final state estimate, average the multiple variances to quantify random uncertainty, and quantify cognitive uncertainty by calculating the variance between the multiple predicted means.

[0018] Its core idea is to construct a dual-output neural network that can simultaneously output the mean and variance of traffic state predictions, embed the physical laws of traffic flow into the network training process in the form of soft constraints, introduce an adaptive weight mechanism based on gradient statistical characteristics to balance multi-objective learning, and finally use underdamped Langevin dynamics to perform posterior sampling in the parameter space, thereby achieving high-precision probabilistic estimation of traffic state and effective decoupling of random uncertainty and cognitive uncertainty.

[0019] First, before implementing the technical solution of this invention, it is necessary to collect sparse spatiotemporal observation data of the target road network within a specific time period. This data typically comes from fixed detectors (such as loop coils or microwave radar) or mobile detection devices (such as floating cars). The observation data should at least include timestamps, spatial locations (such as road segment markers or mileage markers), and traffic state parameters (such as density, flow rate, or speed). Simultaneously, key parameters of the macroscopic traffic flow model, such as free-flow velocity, need to be determined based on actual road conditions. and maximum road density These parameters will be used to construct physical constraints. In terms of model architecture, a model based on spatiotemporal coordinates will be constructed. deep neural network as input ,in This represents all trainable parameters of the network. The key innovation of this network lies in its output layer design: it has two parallel output heads. The first output head is used to predict traffic states (typically normalized traffic density), and its output value is processed by a sigmoid activation function to obtain the predicted mean. This value characterizes the expected traffic condition. The second output header is used to predict the log-variance of the observation noise at this spatiotemporal location, i.e. This output typically does not impose a restrictive activation function, allowing the network to freely learn the heteroscedastic noise levels at different spatiotemporal points. This dual-output design enables the model to not only provide point estimates but also a measure of the reliability of those estimates.

[0020] Next, we need to define the hybrid loss function used to train the neural network. This loss function consists of two parts: data fitting loss and physical constraint loss. The data fitting loss measures the difference between the network's predictions and the actual observed data. Unlike traditional mean squared error, this invention uses a negative log-likelihood function based on the Gaussian assumption. For a set of data containing... A sparse observation dataset of samples ( coordinates (actual traffic condition observations at the location), data fitting loss Defined as: , In this formula, the first term The first term acts as a regularization mechanism, preventing the network from infinitely increasing the prediction variance in an attempt to reduce fitting error; the second term is the weighted squared error, with the weights being the reciprocal of the variance. This means that when the model has a large prediction error at a certain observation point, it can increase the prediction variance at that point. This reduces the contribution of the sample to the overall loss, thereby giving the model robustness to heteroscedastic noise and automatically reducing the impact of high noise or outlier data points.

[0021] Physical constraint loss is used to ensure that the predicted traffic state evolution conforms to basic physical conservation laws. This invention is based on the LWR macroscopic traffic flow model and combined with the Greenshields speed-density relationship model. Physical residuals The conservation equation is defined as a continuous form: .

[0022] Among them, the flow rate is Provided. Neural network output. Regarding time and space The partial derivatives are efficiently calculated using automatic differentiation techniques. Physical constraint loss. It is a set of pre-configured physical configuration points covering the entire spatiotemporal domain. Calculate the mean square error of the physical residual: .

[0023] These configuration points are typically obtained through uniform or random sampling of spatiotemporal regions, and their number is far greater than that of sparse observation points, thereby forcibly imposing physical constraints on regions without real data.

[0024] After defining the mixed loss Afterwards, direct training will face a key challenge: the data loss term. and physical loss items The magnitudes of gradients typically vary greatly numerically and change dynamically during training. If fixed weights are used, the optimization process is easily dominated by loss terms with large gradient magnitudes, leading to either overfitting potentially noisy sparse data and violating physical laws, or excessively satisfying physical equations and deviating from true observations, making it difficult to find a Pareto optimal solution. To address this multi-task balancing problem, this invention proposes an adaptive weighting algorithm based on gradient statistical variance. The core idea of ​​this algorithm is: In each training iteration, the data loss and physical loss are calculated with respect to the network parameters. gradient and Then, calculate the variance of each gradient vector. and This quantifies the uncertainty or volatility of task optimization at the current iteration step. To obtain a smoother variance estimate that better reflects the training trend and avoids interference from sudden changes in single-step gradients, an exponential moving average is further introduced to smooth the gradient variance. ,in , This represents the dynamic decay coefficient. Finally, based on the inverse Dirichlet principle, tasks with lower variance (i.e., more certain optimization paths) are assigned higher weights, while tasks with higher variance (greater optimization uncertainty) are assigned lower weights, thus achieving dynamic balance. Adaptive weights. The calculation formula is: , here It is a very small constant used to ensure numerical stability and prevent the denominator from being zero. The weighted total loss function becomes This algorithm automatically adjusts the balance during training, eliminating the need for tedious manual hyperparameter searching.

[0025] To quantify the uncertainty of a model due to insufficient understanding (such as sparse data regions), this invention abandons the traditional deterministic optimization paradigm of finding a single optimal parameter point and instead adopts a Bayesian inference perspective, aiming to obtain the posterior distribution of the parameters. Specifically, the parameter optimization process of the neural network is modeled as an underdamped Langevin dynamical stochastic differential equation. This process introduces controllable noise into gradient descent, ensuring that after the parameters converge to the trough region of the loss function, they do not stop updating but instead randomly walk around this trough according to a certain probability distribution, thereby achieving sampling of high-probability regions in the parameter space. and auxiliary momentum variables The update rules are as follows: , , Among them, here It is an iterative index. It is the coefficient of friction. It's the learning rate. It is standard Gaussian noise. This is the total loss gradient after adaptive weighting. Injected noise. It is key to balancing exploration and exploitation: it allows parameters to explore different patterns of the posterior distribution, while using gradient information to guide sampling toward high-probability regions, making it more efficient than gradient-free Markov chain Monte Carlo methods.

[0026] In actual training, a phased strategy is recommended to improve stability and efficiency. The first phase is the pre-training phase, in which only the mean squared error loss is used to calculate the network's mean output. Perform training while disabling variance output. and physical constraint loss The purpose of this first stage is to allow the network to initially learn the basic mapping from spatiotemporal coordinates to traffic states, providing a good starting point for introducing more complex constraints later. The second stage is the joint training stage, where the full dual output (mean and variance) and physical constraint loss are enabled. Simultaneously, the aforementioned adaptive weight calculation module is activated to dynamically calculate and update weights in each iteration. and The first stage guides the model to find the optimal balance between fitting the data and obeying physical laws. The third stage is the posterior sampling stage. Once the model loss converges and enters a relatively stable range, the noise injection term in the underdamped Langevin dynamics update rule (i.e., ...) is formally activated. At this stage, the optimizer no longer seeks to significantly reduce the loss further, but instead drives the parameters to be sampled throughout the high-probability posterior regions of the solution space. The current set of network parameters is saved at fixed iteration intervals (e.g., every 100 iterations) or when the loss fluctuation is less than a certain threshold. After sampling for a sufficient number of steps, a series of parameter samples will be obtained, forming the posterior parameter set. ,in This represents the number of parameter sets obtained from the sampling.

[0027] After training and sampling are complete, the obtained posterior parameter set can be used for inference and uncertainty decomposition. For any query point within the target spatiotemporal region... , the posterior parameter set Each set of parameters in The data is loaded into the neural network separately and then propagated forward. This will yield... Predicted output for each group: mean Sum of logarithmic variance The final estimate of traffic conditions is obtained by analyzing this... A simple average of the samples with the mean is obtained: The next crucial step is the decomposition of uncertainty: Random uncertainty, also known as data uncertainty, stems from sensor noise or the randomness of traffic flow itself. It is determined by... Quantified by averaging the variance of a sample: , Here we use Reduce the logarithmic variance to the variance.

[0028] Cognitive uncertainty, also known as model uncertainty, stems from the model's cognitive limitations regarding unobserved or undertrained regions. It is addressed through computation... A sample of mean values Quantified by the variance between them: .

[0029] Through this kind of decomposition, High levels of congestion may indicate sensor malfunction or highly dynamic changes in traffic conditions (such as congestion formation or dissipation); while High-resolution areas clearly identify cognitive blind spots where observational data is not fully covered, providing a basis for traffic management departments to optimize sensor layout and add new detection equipment.

[0030] In summary, this invention constructs a dual-output heteroscedastic neural network that simultaneously outputs the mean and variance of traffic state predictions, and designs a hybrid loss function that integrates Gaussian negative log-likelihood and traffic flow physical equations. Firstly, at the architectural level, it achieves probabilistic estimation of traffic states, enabling it not only to provide predicted values ​​but also to assess the reliability of these predictions, effectively improving the robustness of estimation under sparse and noisy traffic data. Addressing the core challenge of balancing data fitting and physical constraints during training, an adaptive weighting algorithm based on gradient variance is introduced. This algorithm dynamically adjusts the weights by calculating the statistical fluctuations of the gradients of each loss term in real time, achieving automatic and smooth guidance of the multi-objective optimization process. This ensures that the model can still rigorously approximate physical laws under sparse observations, reducing the dependence on manual parameter tuning during training and improving convergence efficiency and estimation accuracy. To further quantify and differentiate the sources of uncertainty, this invention models the parameter optimization process as an underdamped Langevin dynamic diffusion process. By injecting noise into gradient updates to perform Bayesian posterior sampling, multiple sets of model parameters characterizing the probability distribution of the solution space are obtained. Finally, by aggregating and statistically analyzing the forward inference results of these multiple sets of parameters, random uncertainty and cognitive uncertainty are mathematically decoupled: the former originates from data noise and can be quantified by variance averaging to identify sensor anomalies or high-dynamic regions; the latter originates from model cognitive blind spots and, through mean-variance quantification, intuitively reveals the spatiotemporal range of insufficient observations. Ultimately, this achieves high-precision, interpretable traffic state estimation under sparse data conditions and provides a decision-making basis for the optimized placement of sensors and risk assessment of traffic control.

[0031] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0032] Furthermore, in this invention, descriptions involving terms such as "first," "second," and "a" are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0033] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0034] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

Claims

1. An adaptive equilibrium estimation and uncertainty decomposition method for traffic states, characterized in that, Including the following steps: S1: Construct a dual-output heteroscedastic neural network that takes spatiotemporal coordinates as input and simultaneously outputs the mean and logarithmic variance of traffic state predictions; S2: Construct a hybrid loss function for the neural network consisting of a data fitting loss based on Gaussian negative log-likelihood and a physical constraint loss based on traffic flow physical equations; S3: During the training process of the neural network, the weights of each loss term are dynamically adjusted based on the gradient variance of the two loss terms in the hybrid loss function with respect to the neural network parameters. S4: The parameter optimization process of the neural network is modeled as an underdamped Langevin dynamic diffusion process. In each iteration, the gradient is calculated according to the hybrid loss function and noise is injected to update the network parameters, and posterior sampling of the solution space is performed. S5: Save the multiple sets of neural network parameters obtained during the sampling process and construct a posterior parameter set; S6: Using multiple sets of parameters in the posterior parameter set, perform multiple forward inferences on the target spatiotemporal region through a neural network to obtain the mean and variance of multiple traffic state predictions; S7: Aggregate and average the multiple predicted means to obtain the final state estimate, average the multiple variances to quantify random uncertainty, and quantify cognitive uncertainty by calculating the variance between the multiple predicted means.

2. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, The mean of the output of the dual-output heteroscedastic neural network is processed by the Sigmoid activation function, and the normalized output represents the expected mean of traffic state prediction; the logarithmic variance of the output is directly used to represent the variance of the observation noise.

3. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, In step S2, the data fitting loss formula based on the Gaussian negative log-likelihood is: In the formula, For the set of parameters to be optimized in the neural network, For data fitting loss, They represent the first The time and spatial coordinates of each observation point For neural networks in coordinates The logarithmic variance of the output. For neural networks in coordinates The average traffic state prediction output. coordinates The actual traffic condition observation values ​​at the location, This represents the total number of observation points.

4. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, In step S2, the physical constraint loss is constructed based on the LWR macroscopic traffic flow model and is obtained by calculating the mean square error at a set of spatiotemporal configuration points using the physical residual function defined by the LWR macroscopic traffic flow model. The formula for the physical residual function is as follows: In the formula, Representing continuous time coordinates and spatial coordinates respectively. The mean of the traffic density predictions output by the neural network. For free flow velocity, This represents the maximum density of roads.

5. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, In step S3, dynamically adjusting the weights of each loss term specifically involves: calculating the variance of the gradient of each loss term, smoothing the variance by exponential moving average, and calculating adaptive weights based on the smoothed variance according to the inverse Dirichlet principle.

6. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 5, characterized in that, The formula for calculating the adaptive weight is: In the formula, For the first During the training iteration, the first... Adaptive weights for the loss term, These correspond to data fitting loss and physical constraint loss, respectively; The gradients of the data fitting loss and the physical constraint loss are respectively on the th... Exponential moving average smoothed variance during training iterations; For the first The smoothed variance corresponding to the term loss; To prevent numerical stability constants with a denominator of zero.

7. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, In step S4, the update rule formula for network parameters during the underdamped Langevin dynamic diffusion process is expressed as follows: In the formula, This is an index for the number of training iterations. For momentum variables, The coefficient of friction, For learning rate, For Gaussian noise that follows a standard normal distribution, This is a hybrid loss function weighted according to dynamically adjusted loss term weights. For the hybrid loss function on the neural network parameters The gradient.

8. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, In step S5, a set of neural network parameters is saved to construct a posterior parameter set at a fixed iteration interval or when the fluctuation of the loss function is less than a preset threshold.

9. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, The training process of the neural network adopts a phased strategy, specifically including: In the first stage, the neural network is pre-trained using only the data fitting loss based on mean squared error, while the physical constraint loss and variance output are turned off. In the second stage, enable physical constraint loss and variance output, and activate dynamic weight adjustment in step S3. In the third stage, after the loss converges to the stable region, noise injection from step S4 is enabled to perform posterior sampling.

10. The adaptive equilibrium estimation and uncertainty decomposition method for traffic states as described in claim 1, characterized in that, In step S7, the specific calculation formula for uncertainty decoupling is as follows: In the formula, Due to chance and uncertainty, To understand uncertainty, The number of parameter sets in the posterior parameter set. Let be the mean and logarithmic variance of the traffic state predictions for the m-th group of parameters, respectively. This is the final average of the traffic condition predictions. These represent continuous time coordinates and spatial coordinates, respectively.