###### Abstract
In contrast, machine learning techniques are able to overcome these limitations and achieve better performance [29]. One of the popular machine learning methods in real-time risk assessment of hazmat road transportation is the Bayesian network-based model [1; 3]. This method consists of an easy-to-update model and provides a more reliable and practical forecast [30]. However, contributing factors in the Bayesian network-based model are always discrete, meaning that it cannot accommodate various types of data from GPS tracking and dashboard cameras in road tankers carrying hazmat. In the literature, mechanical and structural problems with road tanks, road conditions, weather conditions, types of hazmat, and driver error are the main contributing factors reported to expose hazmat transportation to risk of accident occurrence [31; 32; 33; 34; 35]. These factors include discrete variables (e.g., weather), continuous variables (e.g., travel speed) and real-time images (e.g., fatigue driving behavior). Compared with other learning architectures, deep learning can model complex non-linear relationships using distributed and hierarchical feature representation [36; 37; 38]. It advances along the machine learning spectrum as researchers place fewer assumptions on the algorithm [39]. To handle contributing factors of varying data types, multimodal feature embedding (MFE) [40; 41; 42; 43] is integrated into the deep learning framework in this study. Due to the relatively low accident rate for hazmat road transportation, the sample size of accidents is relatively small such that the results are likely to be biased and sensitive to the noise and errors in samples. Hence, this paper develops a GRU-DNN model that incorporates a deep neural network (DNN) with gated recurrent unit (GRU), and then proposes an adversarial attack and an attack during training to increase the model's resiliency. The attack techniques are used to provide evidence (i.e., adversarial examples [44]) for the lack of robustness of a DNN. Defense approaches work in tandem with attack techniques to strengthen the DNN such that it can fend off adversarial attack or tell the difference between the incorrect inputs and the adversarial instances [45; 46]. To date, most applications of adversarial attack and defense have been concentrated on computer vision models [47]. Since the model developed in our study is based on DNN, the method of adversarial attack and defense can be applied to improve the robustness of risk assessment. From a technical point of view, adversarial attacks fall into three categories: using cost gradients, such as the fast gradient sign method (FGSM) [48], using gradients of the output with respect to DNN's input, such as the Jacobian saliency map-based attack (JSMA) attack [49], and directly formulating optimization problems to produce adversarial perturbations, such as DeepFool [50] and the Carlini & Wagner (C&W) attack [51]. The approaches for adversarial defenses include adversarial training [48, 52], dimensionality reduction [53], prediction similarity [54] and others [55, 56, 57]. The performances of the former three defense methods are compared in this paper. Consequently, the objective of this study is to evaluate the real-time risk of hazmat road transportation based on various types of data for contributing factors. To this end, a GRU-DNN model integrated with MFE is developed. The innovation and contribution of this paper mainly include three points: (1) this paper proposes a multi-model deep learning framework. A novel solution is proposed for the complex source of input variables in the analysis of hazardous materials transportation. (2) The variational autoencoder method is innovatively applied, so that multimodal data can be transformed into the same dimension for subsequent feature fusion. (3) Adversarial attack methods are adopted to improve the robustness of the model.