Analysis Method for Causal Effect between Built Environment and Traffic Accidents Based on Double Robust Learning
Through the dual-stable learning method, combined with federated learning and generative adversarial network, the privacy collaboration and data accuracy problems in causal effect analysis of urban traffic safety are solved, efficient causal effect analysis and privacy protection are achieved, and the robustness and accuracy of causal inference are improved.
Patent Information
- Application Number
- CN202510464793.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-15
AI Technical Summary
In the analysis of causal effects of urban traffic safety, the existing technology has problems such as insufficient causal inference robustness, poor privacy collaboration capabilities and low counterfactual generation accuracy in the analysis of causal effects of urban traffic safety, and it is difficult to effectively deal with the confounding variables and real causal effects in high-dimensional data. In addition, cross-regional data collaboration has the risk of privacy leakage and high computational complexity.
Using a dual-stable learning method, cross-regional data collaborative analysis is achieved through federated learning, combining differential privacy encryption and generative adversarial network to generate high-fidelity counterfactual scenarios, a spatiotemporal causal dynamic weighted GBDT prediction model is constructed, and a causal effect analysis is carried out by combining dual robust causal constraints and regional adaptive splitting strategies.
It realizes the privacy protection and collaboration of cross-regional traffic safety data without sharing original data, generates high-fidelity counterfactual data, improves the reliability and scenario coverage of causal effect verification, reduces the bias of confounding factors, and improves the robustness and accuracy of causal inference.
Smart Images

Figure CN119990785B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of intelligent traffic safety and traffic accident risk assessment, and particularly relates to a method for analyzing the causal effect between built environment and traffic accidents based on double robust learning. Background Art
[0002] With the acceleration of the global urbanization process, the complexity of urban traffic systems and the incidence of traffic accidents have been continuously rising, becoming a core challenge threatening public safety. Traditional research methods are mostly based on statistics and regression models, analyzing accident causes from multiple dimensions such as people, vehicles, roads, and the environment. Although combined with machine learning models, their limitations are still relatively significant, specifically reflected in:
[0003] (1) The problems of confounding bias and model misspecification in traditional causal inference methods;
[0004] Existing technologies (such as correlation analysis, instrumental variable method) rely on strong exogeneity assumptions and cannot effectively distinguish confounding variables and true causal effects in high-dimensional data (such as the correlation between road network density and traffic accidents). Traditional regression models (generalized linear models, random forests) are vulnerable to noise interference, resulting in bias in the estimation of conditional average treatment effect (CATE);
[0005] (2) The contradiction between privacy and efficiency in cross-regional data collaboration;
[0006] Traffic safety data in multiple regions are restricted by privacy regulations (such as GDPR). Traditional centralized processing methods need to share raw data, posing a risk of leakage; while existing encryption technologies (homomorphic encryption, differential privacy) significantly increase computational complexity when protecting privacy and lead to a decrease in model accuracy (AUC-ROC decreases by 8%-12%), restricting the feasibility of global causal analysis;
[0007] (3) The lack of fidelity and diversity in counterfactual data generation;
[0008] Existing methods (interpolation method, basic generative adversarial network) are difficult to simulate the complex spatial heterogeneity of the built environment (such as road topology, POI distribution), and the generated data has a large distribution difference from the real scenario (KL divergence ≥ 0.5), resulting in low confidence in causal effect verification and being unable to support virtual experiments for dynamic environmental changes. Summary of the Invention
[0009] In view of the complex requirements of urban traffic safety, the present invention proposes a method for analyzing the causal effect between built environment and traffic accidents based on double robust learning, effectively breaking through the bottlenecks of existing technologies in causal inference robustness, privacy collaboration ability, and counterfactual generation accuracy, and providing technical support for urban traffic planning and safety management.
[0010] The present invention is implemented by the following technical solutions: A method for analyzing the causal effect of built environment and traffic accidents based on double robust learning, comprising the following steps:
[0011] Step A: Collect multi-source data, perform federated preprocessing and feature alignment on it, achieve cross-regional data collaborative analysis through federated learning, and combine differential privacy encryption to ensure data compliance;
[0012] Step B: Construct a spatio-temporal causal dynamic weighted GBDT prediction model and train and optimize it, deeply integrating the spatio-temporal attention mechanism, double robust causal constraints and regional adaptive splitting strategy;
[0013] Step C: On the basis of Step B, introduce a generative adversarial network to generate high-fidelity counterfactual scenarios, and couple a double robust learning framework to quantify the conditional average treatment effect CATE of the built environment on traffic accident risks;
[0014] Step D: Finally, test the causal effect of the built environment and traffic accidents, and generate a comprehensive analysis report and a causal effect quantification table.
[0015] Further, in the said Step A, the multi-source data includes traffic accident data, satellite remote sensing data and built environment data; the traffic accident data includes the accident occurrence time, location and severity; after preprocessing the satellite remote sensing data, a multi-dimensional data set including spectral features, texture parameters, night light intensity and population density gradient is obtained to support the correlation modeling of the built environment and traffic safety; the built environment data includes road networks and multi-category points of interest; a multi-scale built environment quantification index system is formed through three-level verification.
[0016] Further, in the said Step A, when performing federated preprocessing and feature alignment, a multi-head self-attention mechanism is introduced into the fusion layer of the federated model, and the feature weights are dynamically allocated through attention scores to capture the synergistic effect of the cross-modal interaction "RS (remote sensing) × road network density" on accident risks, specifically including:
[0017] (1) Horizontal federated learning: By sharing encrypted model parameters among multiple participants and dynamically adjusting node weights in combination with KL divergence, cross-regional data collaborative analysis and adaptive fusion are realized;
[0018] (2) Encrypted feature alignment: Use the Z-score normalization method to normalize the feature values to a distribution with a mean of 0 and a standard deviation of 1;
[0019] (3) Differential privacy encryption: Calculate the global sensitivity of the query function and add Laplace noise to the query result.
[0020] Further, in the said Step B, the spatio-temporal causal dynamic weighted GBDT prediction model includes:
[0021] Spatio-temporal attention gating module: Dynamically capture regional specificity and temporal evolution laws, and encode geographical grids and time series into spatio-temporal feature vectors, dynamically calculate regional weights through the multi-head attention mechanism, and generate dynamic regional weights through the dual-channel gating mechanism;
[0022] Region adaptive splitting module: Propose a region adaptive splitting strategy, dynamically adjust the splitting gain, and introduce a smoothing constraint;
[0023] Dual robust causal constraint module: Introduce dual robust causal constraints to ensure the robustness of the conditional average treatment effect CATE estimation;
[0024] Then, evaluate the robustness and generalization ability of the spatio-temporal causal dynamic weighted GBDT prediction model through feature screening, hyperparameter tuning, and federated cross-validation, and optimize the model through iteration.
[0025] Furthermore, the specific implementation of step C is as follows:
[0026] Step C1: Start dual robust learning for causal inference: Achieve dual correction by combining inverse probability weighting and regression models, and use the spatio-temporal causal dynamic weighted GBDT prediction model to estimate the conditional average treatment effect CATE;
[0027] Step C2: Generate high-fidelity counterfactual data through a generative adversarial network: Input real traffic accident data and built environment features, and the generator generates counterfactual data based on the spatial attention mechanism;
[0028] Step C3: Compare the generated counterfactual data with the real data, verify the authenticity and diversity of the counterfactual data, and ensure that the generated counterfactual data can reflect the impact of different built environment features on traffic accidents; furthermore, further achieve the quantitative analysis of the conditional average treatment effect CATE.
[0029] Furthermore, in step D, by estimating the conditional average treatment effect CATE and combining cross-validation, verify the significance of the causal effect:
[0030] (1) When the significance holds, integrate the data for the entire experimental cycle, generate a comprehensive analysis report and a causal effect quantification table, and propose targeted planning strategies;
[0031] (2) When the significance does not hold: Adjust the DRL parameters, start dual robust estimation, and re-optimize the spatio-temporal causal dynamic weighted GBDT prediction model.
[0032] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0033] This solution integrates a multi-dimensional causal analysis framework of federated learning, generative adversarial networks, and double robust learning, which is used to accurately infer the causal effect between the built environment and traffic accidents, and supports cross-regional data collaboration and privacy protection:
[0034] 1. Privacy protection and cross-regional collaboration capabilities:
[0035] Through the federated learning framework, this solution realizes the distributed collaborative analysis of multi-regional traffic safety data for the first time. Compared with the limitations of traditional centralized data processing, without sharing the original data, this solution uses encrypted model parameter aggregation technology to break through the data island barrier, while meeting the compliance requirements of the Data Security Law and the Personal Information Protection Law;
[0036] 2. High-fidelity counterfactual scenario generation capabilities:
[0037] By deeply integrating the generative adversarial network (GAN) and the attention mechanism, this solution can generate counterfactual data highly consistent with the real built environment (such as virtual scenarios like road network structure adjustment and land use change), significantly improving the reliability and scenario coverage of causal effect verification, and overcoming the defects of high distortion and insufficient diversity of data generated by traditional interpolation methods;
[0038] 3. Robust causal inference and confounding factor control:
[0039] Traditional methods (such as instrumental variable method and ordinary least squares method) are sensitive to confounding factors and rely on strong assumptions. The double robust learning framework of this solution realizes a double correction mechanism in causal effect estimation by integrating inverse probability weighting (IPW) and non-linear regression model (GBDT), effectively reducing the bias caused by omitted variables or model misspecification, and improving the generalization of the conclusion;
[0040] 4. Advantages of multi-source heterogeneous data fusion:
[0041] Integrate multi-dimensional information such as satellite remote sensing data (such as dynamic monitoring of night lights), POI distribution, and traffic accident records to construct a built environment index system with enhanced spatio-temporal features. Compared with the limitations of single data sources in existing technologies, this solution realizes the collaborative analysis of high-dimensional data through federated feature extraction and cross-modal alignment technology. Description of the Drawings
[0042] Figure 1 It is a schematic diagram of the method flow of the embodiment of the present invention;
[0043] Figure 2 It is a schematic diagram of the feature extraction of satellite remote sensing data and built environment data in the embodiment of the present invention;
[0044] Figure 3This is the architecture diagram of the federated learning in the embodiment of the present invention;
[0045] Figure 4 This is the schematic diagram of GAN counterfactual generation in the embodiment of the present invention. Detailed implementation manners
[0046] In order to more clearly understand the above objects, features and advantages of the present invention, the following further describes the present invention with reference to the accompanying drawings and embodiments. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention may be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0047] Embodiment, as Figure 1 stated, this embodiment proposes a method for analyzing the causal effect between the built environment and traffic accidents based on double-robust learning, including the following steps:
[0048] Step A: Collect multi-source data and perform federated preprocessing and feature alignment on it; use federated learning to achieve cross-regional data collaborative analysis, and combine differential privacy encryption to ensure data compliance;
[0049] Step B: Construct a spatio-temporal causal dynamic weighted GBDT prediction model and train and optimize it; deeply integrate the spatio-temporal attention mechanism, double-robust causal constraints and regional adaptive splitting strategy;
[0050] Step C: On the basis of Step B, introduce a generative adversarial network to generate high-fidelity counterfactual scenarios, and couple the double-robust learning framework to quantify the conditional average treatment effect of the built environment on traffic accident risks;
[0051] Step D: Finally, verify the causal effect between the built environment and traffic accidents, and generate an output comprehensive analysis report and a causal effect quantification table.
[0052] Specifically, to better understand the solution of the present invention, the following details the specific implementation steps:
[0053] Step A: Collect multi-source data and perform federated preprocessing and feature alignment on it;
[0054] Step 1: Collect multi-source data
[0055] Collecting multi-source data is the basis for constructing the verification of the causal effect between the built environment and traffic accidents. Among them, the multi-source data includes traffic accident data, satellite remote sensing data, built environment data, etc.
[0056] 1. Traffic accident data:
[0057] Obtain the traffic accident records from the traffic police department of Q City from 2021 to 2024, including information such as the accident time, location, and severity. The sample size is expected to be no less than 22,400. For the traffic accident data, perform de-identification, spatio-temporal coordinate system conversion (WGS84), and outlier filtering in sequence. Organize the processed data according to the standardized data structure to generate structured tabular data for subsequent work based on this tabular data.
[0058] 2. Satellite remote sensing data:
[0059] Combined with Figure 1 , in this embodiment, Sentinel-2 L1C, Landsat-9 L1 data, and NOAA VIIRS monthly night light products (excluding periods with a lunar phase > 80%) are obtained from Google Earth Engine and USGS Earth Explorer. Perform preprocessing such as atmospheric correction, radiometric calibration, and calibration on the obtained data, unify the spatial resolution, and perform spatio-temporal fusion. Downscale the VIIRS night light data to a 10m resolution by calculating spectral indices and extracting texture features. Divide the study area into 5×5km grids (WGS84 UTM projection), stratifiedly extract 200 sample units, count the accident frequency in the 500m buffer zone of the traffic accident points, and finally integrate a multi-dimensional dataset for the correlation modeling between the built environment and traffic safety.
[0060] 3. Built environment data:
[0061] Based on the open-source data of OpenStreetMap (OSM), extract the road network and multi-category points of interest (POIs) to construct a built environment database. Perform conventional processing on the extracted data, including correcting road geometry errors, classifying road grades, quantifying road density, calculating road network connectivity and accessibility indices, and analyzing the spatial characteristics of POIs. Use a 100 - 1000m gradient buffer zone to analyze the POI density attenuation law, and fuse the Sentinel-2 image boundaries to construct a "road - POI - land use" collaborative matrix. Ensure the data quality through three-level verification, and generate tabular data of a multi-scale built environment quantification index system to provide structured data support for the subsequent causal effect research between the built environment and traffic accidents.
[0062] Step 2: Federated preprocessing and feature alignment
[0063] Federated preprocessing and feature alignment are key steps to ensure the effective collaboration of multi-source data in the federated learning framework. Through feature alignment, the heterogeneity between different data sources can be eliminated, ensuring the consistency and comparability of the data. Integrate multi-region data (such as traffic accident data from the traffic police department of Q City and satellite remote sensing data) through the federated learning framework. The original data remains local, and only the encrypted model parameters are shared.
[0064] Satellite data with high-dimensional space features and tabular data of traffic accidents and built environment with structured indicators are extremely different in terms of feature dimensions and semantics. Direct splicing or simple weighting will lead to information redundancy or loss. The data distribution of federal nodes varies significantly. The traditional FedAvg algorithm averages and aggregates model parameters according to the sample size, which easily causes the global model to bias towards nodes with high sample sizes. Federated learning requires that local data is not shared, and the calculation of attention weights depends on the global feature distribution. However, traditional methods require centralized access to the data of each node, violating the privacy principle. Therefore, how to dynamically capture the cross-regional feature correlation of multi-modal data and adaptively allocate fusion weights in a federated learning environment without sharing the original data is an urgent problem to be solved currently.
[0065] There is a non-linear synergy effect between satellite data and tabular data. The attention mechanism explicitly models this interaction relationship through similarity calculation, enhancing the model's ability to capture complex causal relationships. Traditional centralized attention calculation requires global access to data, violating the privacy principle of federated learning. In this embodiment, dynamic fusion is achieved without exposing the original data through encrypted weight transmission and localized calculation.
[0066] Specifically:
[0067] Introduce the multi-head self-attention mechanism (Multi-head Self-Attention) into the fusion layer of the federated model, and extract query (Query), key (Key), and value (Value) matrices from the satellite data branch and the tabular data branch respectively.
[0068] Dynamically allocate feature weights through attention scores, capture the synergistic effect of the cross-modal interaction "RS (remote sensing) × road network density" on accident risk, and construct a spatio-temporal feature fusion matrix (Q, K, V). Calculate the original attention weights at the local node and transmit the gradients using the Paillier homomorphic encryption technology; inject Laplace noise (ε = 0.5) at the central server to achieve differential privacy protection. Introduce a regularization compensation model:
[0069] ;
[0070] Among them, is the overall optimization objective function;
[0071] is the loss function for traffic accident risk prediction;
[0072] is a hyperparameter that controls the regularization constraint strength. It is determined through cross-validation in the experiment (0.001 - 0.1);
[0073] is the attention weight of the i-th sample in the j-th federal region;
[0074] is the global average weight of the j-th federal region.
[0075] This model suppresses noise perturbations through the regional variance penalty term (Var(w j )) to break through the linear fusion limitation of the traditional federated learning framework, and for the first time realizes the non-linear collaborative modeling of multi-modal features in the encrypted domain, providing a new paradigm for complex causal inference in privacy protection scenarios.
[0076] 1. Horizontal Federated Learning
[0077] Horizontal federated learning realizes the collaborative analysis of cross-regional data by sharing encrypted model parameters among multiple participants. Each participant trains the model locally and aggregates the model parameters through the federated learning framework to ensure data privacy.
[0078] In the design of the federated learning architecture, City Q is divided into 7 federal nodes (Area A - Area G). Each node trains the model independently, and the central server is responsible for aggregating the encrypted model parameters. The communication uses the gRPC encrypted channel for data transmission to ensure data privacy. The model design adopts a dual-branch neural network structure: the tabular data branch uses a three-layer perceptron (MultilayerPerceptron, MLP) to process accident features, and the satellite data branch extracts spatial features through the lightweight MobileNetV3-Small (a lightweight convolutional neural network), and introduces an attention gating mechanism to dynamically fuse multi-modal data. The KL divergence is used to quantify the similarity of node feature distributions, and an adaptive aggregation model is constructed: ;
[0079] The model adapts to the data characteristics of different regions (for example, Area A in City Q focuses on POI distribution, and Area B focuses on terrain texture, etc.).
[0080] The improved FedAvg algorithm is used to update the global model, and global model distillation is performed once every 10 rounds of aggregation to compress the model scale. The formula is:
[0081] ;
[0082] where is the output of the current global large model, is the output of the lightweight model. After distillation, the lightweight model is used as the new global model for subsequent training.
[0083] Node similarity evaluation: Calculate the KL divergence between the data distribution of each client and the global distribution :
[0084] ;
[0085] Dynamic weight assignment:
[0086] ;
[0087] Weighted aggregation formula:
[0088] ;
[0089] In terms of privacy protection, the client uses Paillier encryption for gradients and injects Gaussian noise ( = 1e-3) and Laplace noise ( = 0.5) to achieve hybrid differential privacy (( , )-DP, = 1e-5). Security tests are carried out through simulated membership inference attacks (accuracy ≤ 55%) and parameter inversion attacks (reconstructed image PSNR < 20dB). Rényi differential privacy is used to quantify the privacy leakage risk, ensuring the privacy security and computational efficiency of the model in cross-regional collaborative modeling.
[0090] 2. Encrypted feature alignment
[0091] Adopt a two-layer processing architecture: First, scale multi-source data to a standard normal distribution with a mean of 0 and a standard deviation of 1 through Z-score standardization to eliminate the dimension difference; then use principal component analysis (PCA) for feature dimensionality reduction, compressing the feature dimension to 1 / 3 of the original space while retaining 95% of the information volume. Verify the alignment effect by constructing a feature covariance matrix, ensuring that the mean deviation of the standardized data is less than 0.05 and the standard deviation dispersion is controlled within 0.1. Achieve non-linear alignment of multi-modal data through this method, laying a data foundation for subsequent spatio-temporal causal modeling.
[0092] 3. Differential privacy encryption
[0093] In the research process of this solution, it involves the statistical analysis of the average severity of traffic accidents in a specific area and the calculation of the total amount of a certain type of built environment characteristics. In the data processing system, a function that performs specific query operations on a data set and realizes corresponding calculation functions is called a query function. This function plays a key role in the differential privacy encryption link, and its main function is to extract valuable information from the original data, providing a data foundation for subsequent data analysis, model training, etc.
[0094] Global sensitivity calculation: Calculate the global sensitivity of the query function.
[0095] ;
[0096] Among them, x and x′ are adjacent data sets, f is the query function.
[0097] Laplace noise addition: Add Laplace noise to the query result.
[0098] ;
[0099] Among them, is the privacy budget, set to 0.5. is the Laplace noise.
[0100] Determine the noise injection intensity by calculating the global sensitivity of the query function, and then add Laplace noise to the query result to achieve privacy protection. Ensure the differential privacy effect by verifying that the difference between the query result after noise addition and the original value is less than the privacy budget ε. On this basis, verify the impact of the privacy protection measure on the model performance through a model accuracy comparison experiment. Finally, input the standardized feature set after federal preprocessing into the spatio-temporal causal dynamic weighted GBDT model to complete the multi-modal data fusion modeling.
[0101] Step B: Construct a spatio-temporal causal dynamic weighted GBDT prediction model and train and optimize it, specifically including the following steps:
[0102] Step 3: Construct a spatio-temporal causal dynamic weighted GBDT prediction model
[0103] In causal inference, the Gradient Boosting Decision Tree (GBDT) can be used to estimate the Conditional Average Treatment Effect (CATE), that is, the average effect of the treatment variable on the outcome variable given the confounding factors. Spatio-temporal causal dynamic weighting means that by dynamically adjusting the weights of the model, the heterogeneity of the built environment features in time and space can be captured, thereby improving the accuracy of causal effect estimation.
[0104] Traditional GBDT uses a unified splitting strategy and cannot dynamically capture the regional specificity or heterogeneity of sub-populations, resulting in large prediction errors in high-heterogeneity regions (such as the urban-rural fringe). Moreover, the CATE estimation of traditional GBDT depends on the local fitting of a single tree, and although the dynamic splitting strategy can improve the regional adaptability, it does not explicitly constrain the structural relationship between the treatment variable T and the outcome Y. Although traditional GBDT can handle high-dimensional data, in causal inference, its ability to handle confounding factors is limited, especially when there are complex interaction relationships between the confounding factors and the treatment variable.
[0105] How to capture this regional specificity and improve the accuracy of CATE estimation; how to ensure that GBDT preferentially selects confounding factors related to treatment effects during splitting while avoiding introducing biases; and how to extract dynamic weights from regional features and use them as weighted coefficients for node splitting to better capture regional specificity; are all among the key research contents of this solution. For this reason, this embodiment proposes a spatio-temporal causal dynamic weighted GBDT prediction model (ST-DW-GBDT), an integrated learning strategy that deeply integrates the spatio-temporal attention mechanism, double-robust causal constraints, and regional adaptive splitting strategy, which largely solves the problems of traditional GBDT in highly heterogeneous regions. Specifically, the spatio-temporal causal dynamic weighted GBDT prediction model includes:
[0106] 1. Spatio-temporal attention gating module (ST-AGM):
[0107] Introduce a spatio-temporal attention gating module to dynamically capture regional specificity and temporal evolution laws.
[0108] Encode geographical grids and time series into spatio-temporal feature vectors:
[0109] ;
[0110] Among them, is the spatio-temporal feature dimension, contains 8 types of socioeconomic indicators (such as population density, night light index), is the time series (seasonal migration, etc.).
[0111] Dynamically calculate regional weights through the multi-head attention mechanism:
[0112] ;
[0113] ;
[0114] Among them, is the input feature, is the learnable parameter, is the attention head dimension.
[0115] Generate dynamic regional weights through the dual-channel gating mechanism:
[0116] ;
[0117] Among them, is the weight matrix, is the bias term, is the Sigmoid activation function.
[0118] 2. Regional Adaptive Splitting Strategy (RASS)
[0119] The traditional GBDT splitting criterion does not consider regional heterogeneity, while ST-DW-GBDT proposes a regional adaptive splitting strategy to dynamically adjust the calculation of the splitting gain.
[0120] Weighted splitting gain formula:
[0121] ;
[0122] where, is the spatio-temporal weight of the th region, is the entropy of region , is the number of splitting directions.
[0123] Regional smoothing constraint:
[0124] To prevent the tree structure from oscillating due to weight fluctuations, a smoothing constraint is introduced:
[0125] ;
[0126] where β is the smoothing coefficient, and the optimal solution is obtained through experiments.
[0127] 3. Double Robust Causal Constraint (DRCC)
[0128] The traditional GBDT does not explicitly constrain the causal effect estimation, while ST-DW-GBDT introduces a double robust causal constraint to ensure the robustness of the CATE estimation.
[0129] Double robust loss function:
[0130] ;
[0131] where, is the treatment variable, is the outcome variable, and are the counterfactual prediction values, is the propensity score.
[0132] Customized total loss:
[0133] ;
[0134] where, and are the regularization coefficients, which are determined by cross-validation.
[0135] The training optimization process of the spatio-temporal causal dynamic weighted GBDT prediction model is as follows:
[0136] 1. Feature screening
[0137] (1)Data preparation
[0138] Use the dataset after federal preprocessing, feature alignment, and privacy encryption in step A as the model input.
[0139] The dataset is divided into: training set: 70% (spatial stratified sampling), validation set: 15%, test set: 15%;
[0140] (2)Initial feature screening
[0141] Perform pre-screening based on the Pearson correlation coefficient and retain the features in the target variable Secondly, eliminate the low-variance features with variance through variance threshold analysis to eliminate the interference of data noise. Combining with the expert knowledge in the field of traffic engineering, list the population density gradient, night light intensity, and land use mix index as core features. Finally, through redundancy analysis, use a combination of VIF test (variance inflation factor > 10) and correlation coefficient matrix (r > 0.8) to identify and eliminate the impact of multicollinearity. Eliminate redundant feature combinations such as GDP and night light intensity, traffic flow and the number of public transportation stops, and commercial land area and commercial facility density.
[0142] (3)Train the initial GBDT model
[0143] First, perform model configuration and parameter initialization. Use MSE as the loss function for regression problems, and at the same time determine the optimal combination of the number of trees, maximum depth, and learning rate through cross-validation combined with grid search. Then carry out model training. To prevent overfitting, set the subsampling rate. During the training process, use the early stopping mechanism. When the validation set error does not decrease for 5 consecutive rounds, the training stops. Finally, calculate the feature importance based on the split gain to evaluate the role of each feature in the model.
[0144] Feature importance calculation, based on split gain:
[0145] ;
[0146] : The set of split nodes of the th tree
[0147] : Indicator function (feature is used for splitting = 1)
[0148] (4)Secondary screening based on feature importance
[0149] After completing the feature importance calculation, perform secondary feature screening.
[0150] Set the importance threshold and retention criteria: importance , and sort them in descending order of importance, then select the top 20 features. Next, based on the correlation matrix, redundant features are removed, and the correlation coefficients between features are calculated , if > 0.7, then remove the features with lower importance. Through these steps, the final feature subset is generated as the feature set for subsequent modeling.
[0151] (5) Model validation and tuning
[0152] The iterative optimization process of the Spatiotemporal Causal Dynamic Weighted GBDT model (ST-DW-GBDT) is as follows: Based on the feature subset (Top20) obtained from the secondary screening, nested cross-validation (5-fold outer + 3-fold inner) is used for model training, where the outer validation is used for performance evaluation, and the inner loop performs hyperparameter optimization (Bayesian search, the number of trees is 100 - 500, the learning rate is 0.01 - 0.3, and the maximum depth is 3 - 8).
[0153] The model uses AUC-ROC to evaluate the classification efficiency, F1-Score to measure the ability to balance positive and negative samples, and CATE estimation bias to verify the accuracy of causal inference. When the AUC-ROC of the validation set is lower than the preset threshold (such as 0.85) or the CATE bias exceeds 15%, a dynamic adjustment mechanism for feature screening parameters is triggered: by adjusting the feature importance threshold k and the redundant feature removal threshold r, a new feature subset is generated for re-modeling. This closed-loop optimization strategy optimizes and improves the robustness of the model in the traffic accident risk prediction task while maintaining the stability of the feature space dimension (≤20 dimensions).
[0154] 2. Hyperparameter tuning
[0155] Hyperparameter tuning is a key step in improving model performance. The hyperparameter (such as tree depth, learning rate) combination space of the Spatiotemporal Causal Dynamic Weighted GBDT prediction model is huge. Traditional hyperparameter tuning methods (such as grid search, SHA) need to traverse all possible parameter combinations, with high computational cost and long time consumption. In the federated learning framework, multi-node collaborative training requires rapid iteration of model parameters, and traditional methods cannot meet the real-time requirements.
[0156] In this embodiment, ASHA is applied to model optimization, and the optimized model is called "Hyper - GBDT". ASHA is a hyperparameter optimization algorithm proposed based on the Successive Halving Algorithm (SHA). The SHA algorithm randomly initializes multiple groups of hyperparameter combinations, evenly allocates budgets and evaluates them, screens according to the validation set loss value, eliminates half of the poorly performing combinations in each round, and iterates until the optimal combination is found. ASHA combines asynchronous parallelism with the successive halving strategy (eliminating half of the inefficient combinations in each round), quickly focuses on the high - performance parameter region, and accelerates convergence to the optimal solution.
[0157] Compared with traditional methods, ASHA significantly improves the utilization rate of computing resources through asynchronous parallel execution, shortening the debugging time by one - third; it can adapt to complex scenarios such as cluster learning, dynamically allocate budgets to optimize key parameters, and enhance the generalization ability of the model; it expands the parameter search space, overcomes the limitations of traditional methods, and ensures finding the global optimal solution with an efficient elimination mechanism.
[0158] In order to achieve an ideal accuracy value (AUC - ROC≥0.85, MAE≤0.1), the spatio - temporal causal dynamic weighted GBDT prediction model in this embodiment needs to be quickly optimized within the joint learning framework. The asynchronous ASHA model is naturally adapted to the distributed joint learning architecture, can efficiently complete the setting of hyperparameters, and ensure the accuracy of subsequent causal inference (step 5). ASHA has significant advantages in terms of performance, resource utilization rate, and result quality, and is the main optimization tool to support the technical solution of the present invention.
[0159] The specific operations are as follows: The data is divided into a training set, a validation set, and a test set according to the ratio of 70%, 15%, and 15%. Set the initial hyperparameters: the number of neurons, the learning rate, the batch size, and the dropout rate. Set the ASHA algorithm parameters: the number of hyperparameter combinations is 32, the minimum budget is 10, the maximum budget is 100, the decay factor is 3, and the minimum early stopping rate is 0.2.
[0160] Use the ASHA algorithm to optimize the hyperparameters of the spatio - temporal causal dynamic weighted GBDT prediction model. Randomly initialize multiple groups of hyperparameter combinations, evenly allocate budgets and evaluate them. By comparing the validation set loss values, select the well - performing hyperparameter combinations and eliminate the poorly performing combinations. Repeat the iteration until the optimal hyperparameter combination is found. Finally, use the optimized hyperparameter combination to retrain the spatio - temporal causal dynamic weighted GBDT prediction model.
[0161] 3. Federated Cross - Validation
[0162] Federated cross-validation evaluates the robustness and generalization ability of the model by performing cross-validation among multiple participating parties. Each participating party conducts model training and validation locally, and the central server aggregates the validation results. Five-fold cross-validation (K = 5) is used to evaluate the model performance. The training set is divided into K subsets. Each time, K - 1 subsets are used as the training set, and the remaining 1 subset is used as the validation set. This is repeated K times, and the performance metrics of the model on each validation set are calculated. Metrics such as AUC-ROC, F1-Score, mean squared error (MSE), MAE (mean absolute error), and R² score are calculated.
[0163] Step 4: Whether the accuracy meets the standard
[0164] Evaluation metrics:
[0165] AUC-ROC: Used to evaluate the ability of the model to distinguish between positive and negative samples, especially in classifying high-risk and low-risk areas in traffic accident risk classification. The target value is ≥ 0.85. Each federated node calculates the area under the ROC curve based on the local test set data. The central server aggregates the AUC-ROC values of each node through weighted average (the weight is the proportion of the sample size of each node).
[0166] If the global AUC-ROC < 0.85: Re-execute feature screening (Step 3.1), increase the information gain threshold, and screen the top 20 features. Adjust the GBDT hyperparameters and use the ASHA algorithm to re-search for the optimal combination.
[0167] F1-Score is the harmonic mean of precision and recall, and the target value is ≥ 0.8. Each node calculates precision and recall based on the confusion matrix, and then calculates the F1-Score. Global aggregation uses sample size weighted average, and the formula is the same as that of AUC-ROC.
[0168] If the global F1-Score < 0.8: Introduce class weights in GBDT training (high-risk sample weight = 3, low-risk = 1) to balance the class impact. Dynamically adjust the classification threshold (from 0.5 to 0.3) to optimize recall. Through the federated learning framework, migrate some low-risk samples from high-sample-size nodes to low-sample-size nodes.
[0169] MAE: Measures the average absolute deviation between the model's predicted traffic accident risk value and the true value, and the target value is ≤ 0.1. Each node calculates the MAE of the local test set. Global aggregation uses weighted average to aggregate the results of each node, and the weight is the proportion of the node's test set samples.
[0170] If the global MAE > 0.1: Increase spatial interaction features (such as road density × POI density) to enhance the ability to capture non-linear relationships. Through horizontal federated learning, use the model parameters of high-precision nodes (MAE ≤ 0.08) to guide the training of low-precision nodes.
[0171] The R² score (coefficient of determination) is used to measure the goodness of fit of the model to the data. In this study, the target value R² ≥ 0.7 is set. This means that it is expected that the model can explain 70% or more of the variation in traffic accident risk data, thereby ensuring that the model has a good fit to the data and has a high explanatory ability. Each federated node calculates the R² score based on the local test set data, and the central server aggregates the R² scores of each node through weighted average to obtain the global R² score.
[0172] Only when AUC-ROC ≥ 0.85, F1-Score ≥ 0.8, MAE ≤ 0.1, and R² ≥ 0.7 are all satisfied simultaneously, it is determined that the accuracy meets the standard and proceed to step 5 (doubly robust causal inference). If any of the indicators fails to meet the standard, trigger the adjustment mechanism.
[0173] Adjustment priority:
[0174] Optimize MAE first: Since MAE directly reflects the prediction error and affects the accuracy of causal effect estimation.
[0175] Optimize F1-Score second: Ensure the reliability of high-risk area identification.
[0176] Optimize AUC-ROC last: Improve the overall classification performance.
[0177] Perform at most 3 rounds of adjustments. If the standard is still not met, it is necessary to re-check the data quality (step 1) or the federated learning framework (step 2).
[0178] After the accuracy meets the standard, transfer the risk weights and feature importance scores output by the GBDT model to step 5 (doubly robust causal inference) for inverse probability weighting (IPW) and CATE estimation. When the standard is not met, feedback to step 3 (GBDT model construction) to form a closed-loop optimization. The risk prediction value output by the GBDT model is used as the conditional variable of the generative adversarial network to guide the generator to generate counterfactual scenarios consistent with the real data distribution.
[0179] Step C: Introduce a generative adversarial network to generate high-fidelity counterfactual scenarios, and couple the doubly robust learning framework to quantify the conditional average treatment effect of the built environment on traffic accident risk. The generated counterfactual data is combined with the real data to construct a causal validation dataset for causal effect estimation and significance verification of the doubly robust learning framework. Specifically:
[0180] Step 5: Initiate doubly robust learning for causal inference
[0181] In traditional causal analysis methods, methods such as instrumental variables and regression discontinuity rely on strong exogeneity assumptions and often fail due to variable selection bias in practical applications. On the other hand, standard regression models (such as GLMs, random forests) can handle high-dimensional data but cannot distinguish between confounding variables and true causal effects, which may lead to serious biases in estimating the conditional average effect of treatment.
[0182] Doubly Robust Learning (DRL) combines inverse probability weighting (IPW) and regression models to achieve double correction, reduce confounding bias, and improve the robustness of causal effect estimation. The core idea of DRL is to adjust the sample weights through inverse probability weighting while estimating the causal effect through a regression model.
[0183] Stage 1: Inverse Probability Weighting (IPW) is a commonly used causal inference method that estimates causal effects by adjusting sample weights to balance the influence of confounding factors. The core idea of IPW is to calculate the propensity score for each sample and use these scores to weight the samples so that the distributions of the treatment group and the control group on confounding factors tend to be balanced. Based on the data of the above treatment variables, outcome variables (traffic accident risks), and confounding factors (such as road density, land use change, nighttime light intensity, etc.), the data is divided into a training set (70%) and a test set (30%).
[0184] Estimate the propensity score of the treatment variable using a propensity score model:
[0185] ;
[0186] where is the treatment variable, are the covariates.
[0187] The form of the logistic regression model is:
[0188] ;
[0189] where is the weight vector, is the bias term.
[0190] For treatment group samples (i.e., = 1), the inverse probability weight is:
[0191] ;
[0192] For the control group samples (i.e., = 0), the inverse probability weights are as follows:
[0193] ;
[0194] Use the calculated weights to weight the samples to obtain the weighted dataset. Use the assign method in the Pandas library to add the weights to the dataset.
[0195] Phase 2: Causal effect estimation GBDT regression modeling. Use the weighted dataset in Phase 1 to divide the data into a training set (70%) and a test set (30%).
[0196] Use the spatio-temporal causal dynamic weighted GBDT prediction model to train the causal effect estimation model. Set the model parameters, which are the same as above, and use the inverse probability weights as the sample weights.
[0197] Use the GBDT regression model to estimate the conditional average treatment effect (CATE):
[0198] ;
[0199] ;
[0200] where is the outcome variable (traffic accident risk), is the propensity score.
[0201] The loss function of the GBDT model is the mean squared error (MSE):
[0202] ;
[0203] where is the inverse probability weight, is the true value, is the predicted value.
[0204] Use the test set data to validate the performance of the model, calculate the mean squared error (MSE) and R² score of the model, compare the performance of the model on the training set and the test set, and ensure the generalization ability of the model. Calculate the propensity score of each sample through the logistic regression model , check the distribution of the propensity scores to ensure that they are between 0 and 1. Calculate the inverse probability weight of each sample. Check the distribution of the weights to ensure its reasonableness. Estimate the conditional average treatment effect and analyze the impact of different built environment characteristics on traffic accidents.
[0205] Step 6: Generative Adversarial Network (GAN)
[0206] In this solution, the spatio-temporal causal dynamic weighted GBDT model in Step B and the Generative Adversarial Network (GAN) in Step 6 are deeply coordinated, which is achieved through feature space mapping, causal constraint coupling, and a closed-loop verification mechanism. The risk weight matrix and feature importance map output by GBDT provide causal constraints for the counterfactual generation of GAN, and the high-fidelity counterfactual data generated by GAN serves as the key dataset for the federated verification of GBDT. The two optimize the causal effect estimation iteratively through a two-way feedback mechanism, forming a closed-loop system of "causal modeling - counterfactual generation - verification and optimization", significantly improving the robustness of CATE estimation.
[0207] FedGAN data augmentation uses GAN to generate high-fidelity counterfactual data to support causal effect verification. The generator and discriminator are adversarially trained to make the generated counterfactual data close to the real data distribution. Introducing a spatial attention mechanism can improve the quality of the counterfactual data generated by the generator, which adjusts the generator output by calculating attention weights to make the generated counterfactual data closer to the real data in terms of spatial features.
[0208] 1. Generator Design and Training
[0209] The generator is one of the core components of GAN. By learning the distribution of real data, the generator maps random noise and conditional variables to the data space to generate counterfactual scenarios. In specific implementation, inputting real traffic accident data and built environment features, the generator generates counterfactual scenarios (such as virtual data after the road network structure adjustment in a certain area) based on the spatial attention mechanism.
[0210] Network Structure Design:
[0211] Input layer: Random noise vector has a dimension of 100, and the conditional variable has a dimension of 10.
[0212] Hidden layer: Use two layers of MLP, with the number of neurons in each layer being 256 and 128 respectively, and the activation function is selected as ReLU.
[0213] Attention layer: Introduce a multi-head self-attention module to enhance the generator's ability to extract spatial features.
[0214] Output layer: The output dimension is the same as that of the real data, and the activation function is selected as Tanh.
[0215] The generator parameters are initialized using the He initialization method, and the objective of its loss function is to maximize the misjudgment probability of the discriminator for the generated data. In practical applications, with the input of real traffic accident data and built environment features, the generator can generate counterfactual scenarios based on the spatial attention mechanism, such as virtual data after the road network structure adjustment in a certain area. Then, the generator is trained using the training set data, setting the number of training epochs to 1000 and the batch size to 64 to ensure that the generator can generate counterfactual data close to the real data distribution. During the training process, the generator is continuously optimized using the feedback from the discriminator. To facilitate tracking and evaluating the performance of the model, the model is saved every 100 epochs and verified using the test set data. Finally, using the trained generator, inputting a random noise vector and conditional variables , counterfactual data in the same format as the real data can be generated.
[0216] 2. Generation of Counterfactual Data
[0217] Counterfactual data generation is one of the core tasks of GAN. Through the generator, counterfactual samples highly similar to the real data distribution can be generated for verifying causal effects. The key to generating counterfactual data lies in ensuring the authenticity and diversity of the generated data. Briefly, the generator learns the distribution characteristics of the real data to generate high-quality counterfactual samples to support the accuracy and reliability of causal inference.
[0218] 3. Discriminator Design and Optimization
[0219] The discriminator, as another core component of GAN, is mainly responsible for distinguishing real data from generated data. During the adversarial training process, the generator continuously generates data closer to the real data, and the discriminator also continuously improves its discrimination ability. To optimize the discriminator performance, its loss function is used to minimize the misjudgment probability of misclassifying real data as generated data and generated data as real data. The quality of the generated data is evaluated using the KL divergence to ensure the minimum distribution difference between the generated data and the real data. This iterative optimization mechanism enables the generator to generate more realistic and diverse counterfactual data, thereby improving the performance and robustness of the overall model.
[0220] Step 7: Data Verification
[0221] Use the generated counterfactual scenarios to simulate the impact of built environment changes on traffic accidents, and construct a causal verification dataset by combining real data. By calculating the KL divergence between the generated data and the real data, evaluate the consistency between the generated data and the real data, with the target value limited to 0.3 and below; by comparing statistical indicators such as the mean and standard deviation, ensure that the generated data is close to the real data. At the same time, evaluate its performance through the classification accuracy of the discriminator for real and generated data, and ensure that the classification accuracy for real data is higher than that for generated data. After the above evaluations, compare the generated counterfactual data with the real data to verify the authenticity and diversity of the counterfactual data, and ensure that the generated counterfactual data can reflect the impact of different built environment characteristics on traffic accidents.
[0222] After verifying the consistency and reliability of the verification dataset, it enters the quantitative analysis stage of the conditional average treatment effect (CATE). If the data verification fails to meet the preset standards, the attention mechanism in the generative adversarial network (GAN) needs to be adjusted to enhance the quality and authenticity of the counterfactual samples output by the generator. Specifically, by integrating multi-head self-attention units, strengthen the generator's ability to identify and simulate spatial features, and then generate counterfactual samples that are closer to the actual data distribution.
[0223] Step D, finally, test the causal effect between the built environment and traffic accidents, and generate a comprehensive analysis report and a causal effect quantification table. Specifically:
[0224] Step 8: Estimate CATE and cross-validate robustness
[0225] Use the double-robust learning framework combined with the counterfactual data generated by GAN to estimate the conditional average treatment effect (CATE), and through cross-validation, verify the significance of the causal effect (p-value < 0.05).
[0226] Cross-validation is an effective method to evaluate the robustness and generalization ability of a model. By dividing the dataset into multiple subsets and alternately using different subsets as the training set and the validation set, the performance of the model on different data subsets can be evaluated, thus verifying the robustness of the model. In this embodiment, the stability of the model is still evaluated through 5-fold cross-validation to ensure that the causal effect estimation error is controlled within 15%.
[0227] Step 9: Whether the cause is significant
[0228] To observe whether the causal effect is significant, it can be evaluated through statistical tests and confidence interval estimation. The significance level is set at 0.05. If the p-value is less than 0.05, the causal effect is considered significant. The analysis of variance (ANOVA) is used to test the significance of the causal effect, and the F-distribution is used to calculate the p-value of the causal effect. If the confidence interval of the causal effect does not contain 0, the causal effect is also considered significant. The bootstrap method is used to estimate the confidence interval of the causal effect. The bootstrap method is a resampling technique that estimates the distribution of a statistic by randomly sampling (with replacement) from the original data.
[0229] Step 10: End signal;
[0230] (1) Output report: When the significance is established, the system integrates the data of the entire experimental cycle, generates a comprehensive analysis report and a causal effect quantification table, accurately quantifies the causal effects of various physical characteristics in the urban built environment on traffic accident risks, clarifies the direction and intensity of the impacts of each characteristic on accident risks, and proposes targeted planning strategies. Through the optimization of the built environment, it is expected to reduce the accident incidence rate in high-risk areas by 10% - 15%; provide data-driven decision-making basis for urban traffic planning, and avoid blind infrastructure investment.
[0231] (2) Adjust DRL parameters: If the significance threshold is not reached, the system will start the parameter optimization program of the double-robust estimation method (DRL). Specifically, it will optimize the covariate selection strategy of the inverse probability weighted estimator (IPW) and the parameter configuration combination of the result model function form through the system, with the focus on reducing potential confounding bias. In the inverse probability weighting (IPW) module, it is necessary to adjust the complexity of the propensity score estimation model (such as the regularization coefficient λ) to ensure meeting the overlap assumption; in the regression model part, the selection of the base learner and the feature engineering strategy should be optimized to reduce the confounding bias and improve the prediction accuracy of the model. By iteratively optimizing the DRL parameters, the robustness and statistical power of the causal effect estimation can be effectively improved, providing a more reliable quantitative basis for subsequent decisions.
[0232] The method adopted in this embodiment constructs an adaptive closed-loop optimization system. This system uses distributed cross-validation (5-fold federated validation) and dynamic parameter adjustment (asynchronous successive halving algorithm ASHA) to iteratively optimize the model accuracy (required to reach AUC-ROC≥0.85, F1-Score≥0.8) and the significance of the causal effect. During operation, through the feedback mechanism, the system can automatically trigger operations such as re-screening of features, weight balancing, and GAN attention optimization, thereby forming a closed-loop system of "modeling - verification - tuning". This closed-loop system can ensure that the system still has good stability and generalization ability in complex scenarios.
[0233] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention in any other form. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. A method for analyzing the causal effect between the built environment and traffic accidents based on double-robust learning, characterized in that It includes the following steps: Step A: Collect multi-source data, perform federal preprocessing and feature alignment on it, achieve cross-regional data collaborative analysis through federated learning, and combine differential privacy encryption to ensure data compliance; Step B: Construct a spatio-temporal causal dynamic weighted GBDT prediction model and train and optimize it, deeply integrating the spatio-temporal attention mechanism, dual robust causal constraints, and regional adaptive splitting strategy; Step C: On the basis of Step B, introduce a generative adversarial network to generate high-fidelity counterfactual scenarios, and couple the dual robust learning framework to quantify the conditional average treatment effect CATE of the built environment on traffic accident risks; Step D: Finally, test the causal effect between the built environment and traffic accidents, and generate a comprehensive analysis report and a causal effect quantification table.
2. The method for analyzing the causal effect between the built environment and traffic accidents based on double-robust learning according to claim 1, wherein: In the said Step A, the multi-source data includes traffic accident data, satellite remote sensing data, and built environment data; the traffic accident data includes the accident occurrence time, location, and severity; after preprocessing the satellite remote sensing data, a multi-dimensional data set including spectral features, texture parameters, night light intensity, and population density gradient is obtained to support the correlation modeling between the built environment and traffic safety; The built environment data includes road networks and multi-category points of interest; a multi-scale built environment quantification index system is formed through three-level verification.
3. The method for analyzing the causal effect between the built environment and traffic accidents based on double robust learning according to claim 1, wherein: In the said Step A, when performing federal preprocessing and feature alignment, a multi-head self-attention mechanism is introduced into the fusion layer of the federal model, and the feature weights are dynamically allocated through attention scores to capture the collaborative influence of the cross-modal interaction "remote sensing × road network density" on accident risks, specifically including: (1) Horizontal federated learning: Share encrypted model parameters among multiple participants, and dynamically adjust node weights in combination with KL divergence to achieve cross-regional data collaborative analysis and adaptive fusion; (2) Encrypted feature alignment: Use the Z-score normalization method to normalize the feature values to a distribution with a mean of 0 and a standard deviation of 1; (3) Differential privacy encryption: Calculate the global sensitivity of the query function and add Laplace noise to the query result.
4. The method for analyzing the causal effect between the built environment and traffic accidents based on double robust learning according to claim 1, wherein: In the said Step B, the spatio-temporal causal dynamic weighted GBDT prediction model includes: Spatio-temporal attention gating module: Dynamically capture regional specificity and temporal evolution laws, and encode geographical grids and time series into spatio-temporal feature vectors, dynamically calculate regional weights through the multi-head attention mechanism, and generate dynamic regional weights through the dual-channel gating mechanism; Regional adaptive splitting module: Propose a regional adaptive splitting strategy, dynamically adjust the splitting gain, and introduce a smoothing constraint; Dual robust causal constraint module: Introduce dual robust causal constraints to ensure the robustness of the conditional average treatment effect CATE estimation; Then, evaluate the robustness and generalization ability of the spatio-temporal causal dynamic weighted GBDT prediction model through feature screening, hyperparameter tuning, and federal cross-validation, and optimize the model through iteration.
5. The method for analyzing the causal effect between the built environment and traffic accidents based on double robust learning according to claim 1, wherein: The said Step C is specifically implemented in the following way: Step C1: Start dual robust learning for causal inference: Achieve dual correction by combining inverse probability weighting and regression models, and use the spatio-temporal causal dynamic weighted GBDT prediction model to estimate the conditional average treatment effect CATE; Step C2: Generate high-fidelity counterfactual data through a generative adversarial network: Input real traffic accident data and built environment features, and the generator generates counterfactual data based on the spatial attention mechanism; Step C3: Compare the generated counterfactual data with the real data to verify the authenticity and diversity of the counterfactual data, ensuring that the generated counterfactual data can reflect the impact of different built environment characteristics on traffic accidents; further, conduct a quantitative analysis of the conditional average treatment effect (CATE).
6. The method for analyzing the causal effect between the built environment and traffic accidents based on double robust learning according to claim 1, wherein: In the said Step D, verify the significance of the causal effect by estimating the conditional average treatment effect (CATE) and combining cross-validation:
1. When the significance holds, integrate the data for the entire experimental cycle, generate a comprehensive analysis report and a table for quantifying the causal effect, and propose targeted planning strategies; 2. When the significance does not hold: Adjust the DRL parameters, initiate double-robust estimation, and re-optimize the spatio-temporal causal dynamic weighted GBDT prediction model.
Citation Information
Patent Citations
Machine learning architecture for quantifying and monitoring event-based risk
CA3172010A1
Private data protection method and system based on homomorphic encryption and federated learning
CN119513919A