This project contains the source code and data for the paper titled "Adaptive Safety Performance Testing for Autonomous Vehicles with Adaptive Importance Sampling".
Note that data/ and results/ are publicly available on the Hugging Face Hub.
|- data/
|- figures/
|- results/
|- example_results/
|- utils/
|- __init__.py
|- comb_coef.py
|- config.py
|- evaluation.py
|- extnp.py
|- importance_function.py
|- index.py
|- state.py
|- surrogate_model.py
|- test.py
|- train.py
analyze_wall_clock_time.py
bootstrap_ADRL.py
bootstrap_NADE.py
bootstrap_NDE.py
find_dangerous_states.py
generate_NADE.py
README.md
requirements.txt
results_analysis_left_turn.ipynb
results_analysis_overtaking.ipynb
run_left_turn.sh
run_overtaking.sh
run_test.sh
run_time.sh
test_ADRL_time.py
test_ADRL.py
test_NADE.py
test_NDE.pyPlease create a new environment via conda and install the required packages as follows. Note that this project can be used on both Windows and Linux.
conda create -n adrl python=3.10
conda activate adrl
pip install -r requirements.txtThen install a CUDA version of PyTorch, e.g.,
pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117bash run_overtaking.shbash run_left_turn.shbash run_time.shFor development, to quickly check the pipeline, please use
bash run_test.shPlease run results_analysis_overtaking.ipynb for results analysis of overtaking scenarios and results_analysis_left_turn.ipynb for unprotected left-turn scenarios, respectively. The example results are provided in results/.
Any contributions are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Yang, J., Wang, Z., Wang, D., Zhang, Y., Lu, Q., & Feng, S. (2025). Adaptive safety performance testing for autonomous vehicles with adaptive importance sampling. Transportation Research Part C: Emerging Technologies, 179, 105256. https://www.doi.org/10.1016/j.trc.2025.105256
@article{yang2025adaptive,
title={Adaptive safety performance testing for autonomous vehicles with adaptive importance sampling},
author={Yang, Jingxuan and Wang, Zihang and Wang, Daihan and Zhang, Yi and Lu, Qiujing and Feng, Shuo},
journal={Transportation Research Part C: Emerging Technologies},
volume={179},
pages={1--19},
year={2025},
publisher={Elsevier}
}This code is licensed under the PolyForm Noncommercial License 1.0.0.
Jingxuan Yang ([email protected])
For help or issues using the code, please create an issue for this repository or contact Jingxuan Yang ([email protected]).
For general questions about the paper, please contact Shuo Feng ([email protected]).