{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/on-adversarial-robustness-of-trajectory","title":"On Adversarial Robustness of Trajectory Prediction for Autonomous Vehicles","arxiv_id":"2201.05057","date":"2022-01-13","proceeding":"CVPR 2022 1","authors":["Qingzhao Zhang","Shengtuo Hu","Jiachen Sun","Qi Alfred Chen","Z. Morley Mao"],"abstract":"Trajectory prediction is a critical component for autonomous vehicles (AVs) to perform safe planning and navigation. However, few studies have analyzed the adversarial robustness of trajectory prediction or investigated whether the worst-case prediction can still lead to safe planning. To bridge this gap, we study the adversarial robustness of trajectory prediction models by proposing a new adversarial attack that perturbs normal vehicle trajectories to maximize the prediction error. Our experiments on three models and three datasets show that the adversarial prediction increases the prediction error by more than 150%. Our case studies show that if an adversary drives a vehicle close to the target AV following the adversarial trajectory, the AV may make an inaccurate prediction and even make unsafe driving decisions. We also explore possible mitigation techniques via data augmentation and trajectory smoothing. The implementation is open source at https://github.com/zqzqz/AdvTrajectoryPrediction.","url_abs":"https://arxiv.org/abs/2201.05057v3","url_pdf":"https://arxiv.org/pdf/2201.05057v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"on-adversarial-robustness-of-trajectory","repo_url":"https://github.com/zqzqz/AdvTrajectoryPrediction","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"adversarial-attack","task_name":"Adversarial Attack"},{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"autonomous-vehicles","task_name":"Autonomous Vehicles"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"trajectory-prediction","task_name":"Trajectory Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2201.05057","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.05057"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zqzqz/AdvTrajectoryPrediction","reach":null}],"summary":{"ran":2,"ran_draft_wrong":6,"ran_honours":2,"ran_fixture":2,"ran_violates":1},"by_repo_kind":{"named_in_paper":{"samples":13,"ran":13,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":13,"samples":[{"code_sha256_prefix":"88e6cf078e13b084","entry":"BaseAttacker","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"88e6cf078e13b084"}},{"code_sha256_prefix":"d0e758edee0dd5f7","entry":"GradientAttacker","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d0e758edee0dd5f7"}},{"code_sha256_prefix":"7cef0c528bdf3a5f","entry":"add_flags","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7cef0c528bdf3a5f"}},{"code_sha256_prefix":"c490cc044589a2b6","entry":"ade","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c490cc044589a2b6"}},{"code_sha256_prefix":"35c2933b86472449","entry":"attack_loss","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"35c2933b86472449"}},{"code_sha256_prefix":"0b3e24f43eeccce4","entry":"fde","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0b3e24f43eeccce4"}},{"code_sha256_prefix":"bc44e46bc2cb174c","entry":"get_deviation","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bc44e46bc2cb174c"}},{"code_sha256_prefix":"19fe48e11c04f16f","entry":"get_metrics","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"19fe48e11c04f16f"}},{"code_sha256_prefix":"b6c8786b301ea7c4","entry":"get_unit_vector","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b6c8786b301ea7c4"}},{"code_sha256_prefix":"c5587ce1944f0767","entry":"hard_constraint","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c5587ce1944f0767"}},{"code_sha256_prefix":"0d82a1ca5493d23e","entry":"horizonal_distance","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0d82a1ca5493d23e"}},{"code_sha256_prefix":"48c3d63545ccb021","entry":"input_data_by_attack_step","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"48c3d63545ccb021"}},{"code_sha256_prefix":"c603edd4f0d94801","entry":"vertical_distance","repo":"zqzqz/AdvTrajectoryPrediction","repo_kind":"named_in_paper","path":"prediction/attack/gradient.py","file_url":"https://github.com/zqzqz/AdvTrajectoryPrediction/blob/HEAD/prediction/attack/gradient.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c603edd4f0d94801"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}