Most traffic accidents are caused by driver-related factors such as poor perception, aggressive decision-making, or improper maneuvering. Therefore, it is critical to evaluate and predict driving risks to provide drivers with timely feedback. However, risk assessment involves challenges related to a lack of labeled driving data and the presence of data imbalance in the description of different driving risk levels. To address these challenges, a cost-sensitive semi-supervised deep learning method is developed to obtain driving risk scores based on naturalistic vehicle trajectories. A convolutional neural network and a long short-term memory encoder/decoder network are embedded into a semi-supervised framework that uses only a small labeled dataset to label the remaining unlabeled data and produce a trained network model. As fixed weights cannot adapt to changes in the degree of class imbalance that occur over progressive semi-supervised learning iterations, an adaptive over-balanced cross-entropy loss function is developed to adaptively maintain an over-balanced state for the high-risk class to achieve cost-sensitive learning. The experimental results indicate that the accuracy of the proposed method in determining the current and future 2 s risk scores is 96.63% and 92.06%, respectively, thereby constituting the best comprehensive performance among existing machine learning methods. Moreover, the method is verified using a spatio-temporal diagram of driving risk-trajectory and a current–future risk score diagram. The findings demonstrate that the proposed method can be used to assess driving risks in a reliable and robust manner. © 2021 Elsevier Ltd