close
Skip to main content
Log in

Counterfactual regret minimization for the safety verification of autonomous driving

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Rare safety-critical events remain a major challenge in autonomous vehicle testing. This paper proposes to use game theory to build a novel testing environment for autonomous vehicles. In this environment, a virtual agent based on counterfactual minimization (CFR) is used to accelerate testing and validate the safety performance of autonomous vehicles. The virtual agent updates the adversarial policies to be enforced by continuously accumulating regret values, thus increasing the probability of security-critical events occurring during the testing process. Finally, recognized metrics such as Time-to-Collision (TTC) and Minimum Safe Distance Factor (MSDF) are introduced to assess the quality of the scenario. Experimental results show that the virtual agent based on counterfactual minimization explicitly generates more safety-critical scenarios and accelerates the evaluation process by multiple orders of magnitude (\(10^{3}\) times faster).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+
from $39.99 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Algorithm 1
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data Availability

All of videos in this article have been uploaded in https://github.com/Wilianii/Game-Adversarial-Test

Code Availability

Confidential.

References

  1. LeCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521(7553):436–444. https://doi.org/10.1038/nature14539

    Article  MATH  Google Scholar 

  2. NHTSA (2019) National statistics[r]. America: NHTSA

  3. Kalra N, Paddock M (2016) S: Driving to safety: how many miles of driving would it take to demonstrate autonomous vehicle reliability? Trans Res Part A: Policy Pract 94:182–193. https://doi.org/10.1016/j.tra.2016.09.010

    Article  MATH  Google Scholar 

  4. Wang H, Shao W, Sun C, Yang K, Cao D, Li J (2024) A survey on an emerging safety challenge for autonomous vehicles: Safety of the intended functionality. Engineering 33:17–34. https://doi.org/10.1016/j.eng.2023.10.011

    Article  MATH  Google Scholar 

  5. Zhang Y, Hang P, Huang C, Lv C (2022) Human-like interactive behavior generation for autonomous vehicles: a bayesian game-theoretic approach with turing test. Advan Intell Syst 4(5):2100211. https://doi.org/10.1002/aisy.202100211

    Article  MATH  Google Scholar 

  6. Priisalu M, Pirinen A, Paduraru C, Sminchisescu C (2022) Generating scenarios with diverse pedestrian behaviors for autonomous vehicle testing. Conf Robot Learn 164(4):1247–1258

    Google Scholar 

  7. Hsu C-C, Kang L-W, Chen S-Y, Wang I-S, Hong C-H, Chang C-Y (2023) Deep learning-based vehicle trajectory prediction based on generative adversarial network for autonomous driving applications. Multimed Tool Appl 82(7):10763–10780. https://doi.org/10.1007/s11042-022-13742-x

    Article  MATH  Google Scholar 

  8. Xu Y, Zou Y, Sun J (2018) Accelerated testing for automated vehicles safety evaluation in cut-in scenarios based on importance sampling, genetic algorithm and simulation applications. J Intell Connected Vehicles 1(1):28–38. https://doi.org/10.1108/JICV-01-2018-0002

    Article  MATH  Google Scholar 

  9. Li Y, Liu F, Xing L, He Y, Dong C, Yuan C, Chen J, Tong L (2023) Data generation for connected and automated vehicle tests using deep learning models. Accident Anal Prevention 190:107192. https://doi.org/10.1016/j.aap.2023.107192

    Article  Google Scholar 

  10. Wei C, Hui F, Khattak AJ, Zhang Y, Wang W (2023) Controllable probability-limited and learning-based human-like vehicle behavior and trajectory generation for autonomous driving testing in highway scenario. Expert Syst Appl 227:120336. https://doi.org/10.1016/j.eswa.2023.120336

    Article  Google Scholar 

  11. Feng S, Yan X, Sun H, Feng Y, Liu HX (2021) Intelligent driving intelligence test for autonomous vehicles with naturalistic and adversarial environment. Nat Commun 12(1):748. https://doi.org/10.1038/s41467-021-21007-8

    Article  MATH  Google Scholar 

  12. Feng S, Sun H, Yan X, Zhu H, Zou Z, Shen S, Liu HX (2023) Dense reinforcement learning for safety validation of autonomous vehicles. Nature 615(7953):620–627. https://doi.org/10.1038/s41586-023-05732-2

    Article  MATH  Google Scholar 

  13. Lu C, Shi Y, Zhang H, Zhang M, Wang T, Yue T, Ali S (2022) Learning configurations of operating environment of autonomous vehicles to maximize their collisions. IEEE Trans Software Eng 49(1):384–402. https://doi.org/10.1109/TSE.2022.3150788

    Article  MATH  Google Scholar 

  14. Hu N, Zhao D (2023) Accident sequence based crash scene extraction and analysis for self-driving cars. Sci Technol Eng 23(11):4908–4916

    MathSciNet  MATH  Google Scholar 

  15. Shawky M (2020) Factors affecting lane change crashes. IATSS Res 44(2):155–161. https://doi.org/10.1016/j.iatssr.2019.12.002

    Article  Google Scholar 

  16. Zinkevich M, Johanson M, Bowling M, Piccione C (2007) Regret minimization in games with incomplete information. Advan Neural Inform Process Syst 20

  17. Lisy V, Davis T, Bowling M (2016) Counterfactual regret minimization in sequential security games. In: Proceedings of the AAAI conference on artificial intelligence, vol 30. https://doi.org/10.1609/aaai.v30i1.10051

  18. Davis T, Waugh K, Bowling M (2019) Solving large extensive-form games with strategy constraints. In: Proceedings of the AAAI conference on artificial intelligence, vol 33, pp 1861–1868. https://doi.org/10.1609/aaai.v33i01.33011861

  19. Johanson M, Bard N, Lanctot M, Gibson RG, Bowling M (2012) Efficient nash equilibrium approximation through monte carlo counterfactual regret minimization. Aamas:837–846. https://doi.org/10.1073/pnas.202471199

  20. Minderhoud MM, Bovy PH (2001) Extended time-to-collision measures for road traffic safety assessment. Accident Anal Prevention 33(1):89–97. https://doi.org/10.1016/S0001-4575(00)00019-1

    Article  Google Scholar 

  21. Cooper P (1984) Experience with traffic conflicts in canada with emphasis on post encroachment time techniques. In: International calibration study of traffic conflict techniques, pp 75–96. https://doi.org/10.1007/978-3-642-82109-7_8

  22. Zhang J, Wang J (2023) Deep adversarial reinforcement learning based incentive mechanism for content delivery in d2d-enabled mobile networks. Neurocomputing 544:126258. https://doi.org/10.1016/j.neucom.2023.126258

    Article  MATH  Google Scholar 

  23. Chen Y, Zhang L, Li S, Chen X, Pan G, Pan Z (2023) Rm-fsp: regret minimization optimizes neural fictitious self-play. Neurocomputing 549:126471. https://doi.org/10.1016/j.neucom.2023.126471

    Article  MATH  Google Scholar 

  24. Pek C, Manzinger S, Koschi M, Althoff M (2020) Using online verification to prevent autonomous vehicles from causing accidents. Nature Mach Intell 2(9):518–528. https://doi.org/10.1038/s42256-020-0225-y

    Article  Google Scholar 

  25. Seshia SA, Sadigh D, Sastry SS (2022) Toward verified artificial intelligence. Commun ACM 65(7):46–55. https://doi.org/10.1145/3503914

    Article  MATH  Google Scholar 

  26. Lee R, Kochenderfer MJ, Mengshoel OJ, Brat GP, Owen MP (2015) Adaptive stress testing of airborne collision avoidance systems. In: 2015 IEEE/AIAA 34th Digital Avionics Systems Conference (DASC), pp 6–21. https://doi.org/10.1109/DASC.2015.7311450

Download references

Acknowledgements

This work was supported by the National Natural Science Foundation of China under Grant 52131201.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yanqiang Li.

Ethics declarations

Conflict of interest

The authors declare no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix A

Appendix A

Counterfactual Regret Minimization(CFR)

Counterfactual minimization is solved using a regret matching algorithm. We need to consider the probability of reaching each information set given a player’s strategy; if the game is processed sequentially through a series of information sets, then the game’s state information and the probabilities of the sequence of players’ actions are passed forward, and the utility information is passed backward through the information sets. For each information set accessed recursively in the training iterations, the mixed strategy is computed according to the regret matching equation, which is given below in a series of notations and definitions:

$$\begin{aligned} v_i \left( \sigma ,h\right) =\sum _{h\in z ,\ \ z \in \mathcal {Z}}{\pi _{-i}^\sigma \left( h\right) }\pi ^\sigma (h, z )u_i( z ) \end{aligned}$$
(A1)

The counterfactual regret value for not taking action a in history is defined as:

$$\begin{aligned} r\left( h,a\right) =v_i\left( \sigma _{I\rightarrow a},h\right) -v_i\left( \sigma ,h\right) \end{aligned}$$
(A2)

The counterfactual regret value for not taking action a in information set I is:

$$\begin{aligned} r\left( I,a\right) =\sum _{h\in I}{r(h,a)} \end{aligned}$$
(A3)

Let \(r_i^t\left( I,a\right) \) be the regret value when player i adopts the strategy \(\sigma ^t\) in the information set I and does not adopt the action a. Define the cumulative counterfactual regret value as:

$$\begin{aligned} R_i^T\left( I,a\right) =\sum _{t=1}^{T}{r_i^t\left( I,a\right) } \end{aligned}$$
(A4)

When a player uses the strategy \(\sigma \), the difference between the value of action a and the expected value is always chosen to be the regret value of an action, which is then weighted by the probability that the other players will adopt the action to reach that node. Define the non-negative counterfactual regret value as \(R_i^{T,+}(I,a)=max(R_i^T(I,a),\ 0)\), then the update formula for the new strategy is as follows:

$$\begin{aligned} \sigma _i^{T+1}\left( I,a\right) = {\left\{ \begin{array}{ll} \frac{R_i^{T,+}(I,a)}{\sum _{a\in A(I)}{R_i^{T,+}(I,a)}}, & \text {if } \sum _{a\in A(I)}{R_i^{T,+}(I,a)}>0 \\ \frac{1}{|A(I)|}, & \text {otherwise}. \end{array}\right. } \end{aligned}$$
(A5)

For each information set, the equation is used to compute the probability of an action proportional to the value of positive cumulative regret.For each action, the CFR generates the next state in the game and calculates the utility value of each action by recursion. Regret values are computed from the return values, and finally the probability of occurrence at the current node is computed and returned.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wang, Y., Sun, P., Zhang, D. et al. Counterfactual regret minimization for the safety verification of autonomous driving. Appl Intell 55, 312 (2025). https://doi.org/10.1007/s10489-024-06194-3

Download citation

  • Accepted:

  • Published:

  • Version of record:

  • DOI: https://doi.org/10.1007/s10489-024-06194-3

Keywords

Profiles

  1. Pengchao Sun