{"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/graph-neural-networks-for-road-safety-1","title":"Graph Neural Networks for Road Safety Modeling: Datasets and Evaluations for Accident Analysis","arxiv_id":"2311.00164","date":"2023-10-31","proceeding":"NeurIPS 2023 11","authors":["Abhinav Nippani","Dongyue Li","Haotian Ju","Haris N. Koutsopoulos","Hongyang R. Zhang"],"abstract":"We consider the problem of traffic accident analysis on a road network based on road network connections and traffic volume. Previous works have designed various deep-learning methods using historical records to predict traffic accident occurrences. However, there is a lack of consensus on how accurate existing methods are, and a fundamental issue is the lack of public accident datasets for comprehensive evaluations. This paper constructs a large-scale, unified dataset of traffic accident records from official reports of various states in the US, totaling 9 million records, accompanied by road networks and traffic volume reports. Using this new dataset, we evaluate existing deep-learning methods for predicting the occurrence of accidents on road networks. Our main finding is that graph neural networks such as GraphSAGE can accurately predict the number of accidents on roads with less than 22% mean absolute error (relative to the actual count) and whether an accident will occur or not with over 87% AUROC, averaged over states. We achieve these results by using multitask learning to account for cross-state variabilities (e.g., availability of accident labels) and transfer learning to combine traffic volume with accident prediction. Ablation studies highlight the importance of road graph-structural features, amongst other features. Lastly, we discuss the implications of the analysis and develop a package for easily using our new dataset.","url_abs":"https://arxiv.org/abs/2311.00164v2","url_pdf":"https://arxiv.org/pdf/2311.00164v2.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":"graph-neural-networks-for-road-safety-1","repo_url":"https://github.com/virtuosoresearch/ml4roadsafety","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[{"method_slug":"graphsage","method_name":"GraphSAGE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2311.00164","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.00164"}},"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":"deterministic:regex_extraction","url":"https://github.com/VirtuosoResearch/ML4RoadSafety","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/virtuosoresearch/ml4roadsafety","reach":{"status":"ok"}}],"summary":{"ran":5,"ran_fixture":1,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"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":9,"samples":[{"code_sha256_prefix":"c65e1b82ba6db6a5","entry":"concat_files_one_subfolder","repo":"virtuosoresearch/ml4roadsafety","repo_kind":"official","path":"datasets/1_road_network_Harvard.py","file_url":"https://github.com/virtuosoresearch/ml4roadsafety/blob/HEAD/datasets/1_road_network_Harvard.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":"c65e1b82ba6db6a5"}},{"code_sha256_prefix":"1be64592d0f69840","entry":"concat_files_two_subfolder","repo":"virtuosoresearch/ml4roadsafety","repo_kind":"official","path":"datasets/1_road_network_Harvard.py","file_url":"https://github.com/virtuosoresearch/ml4roadsafety/blob/HEAD/datasets/1_road_network_Harvard.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":"1be64592d0f69840"}},{"code_sha256_prefix":"d83142b999c4605c","entry":"eval_hits","repo":"VirtuosoResearch/ML4RoadSafety","repo_kind":"official","path":"ml_for_road_safety/evaluators.py","file_url":"https://github.com/VirtuosoResearch/ML4RoadSafety/blob/HEAD/ml_for_road_safety/evaluators.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d83142b999c4605c"}},{"code_sha256_prefix":"67daec1e9c1b03a7","entry":"eval_mae","repo":"VirtuosoResearch/ML4RoadSafety","repo_kind":"official","path":"ml_for_road_safety/evaluators.py","file_url":"https://github.com/VirtuosoResearch/ML4RoadSafety/blob/HEAD/ml_for_road_safety/evaluators.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"67daec1e9c1b03a7"}},{"code_sha256_prefix":"24a30de439ff18c8","entry":"eval_rocauc","repo":"VirtuosoResearch/ML4RoadSafety","repo_kind":"official","path":"ml_for_road_safety/evaluators.py","file_url":"https://github.com/VirtuosoResearch/ML4RoadSafety/blob/HEAD/ml_for_road_safety/evaluators.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"24a30de439ff18c8"}},{"code_sha256_prefix":"215496ed7fb0bbd5","entry":"extract_nearest_street","repo":"virtuosoresearch/ml4roadsafety","repo_kind":"official","path":"datasets/3_extract_nearest_street.py","file_url":"https://github.com/virtuosoresearch/ml4roadsafety/blob/HEAD/datasets/3_extract_nearest_street.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":"215496ed7fb0bbd5"}},{"code_sha256_prefix":"18f0d2384d627b16","entry":"load_monthly_data","repo":"virtuosoresearch/ml4roadsafety","repo_kind":"official","path":"ml_for_road_safety/data_loaders.py","file_url":"https://github.com/virtuosoresearch/ml4roadsafety/blob/HEAD/ml_for_road_safety/data_loaders.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":"18f0d2384d627b16"}},{"code_sha256_prefix":"e7a60aa2233f86b6","entry":"load_yearly_data","repo":"virtuosoresearch/ml4roadsafety","repo_kind":"official","path":"ml_for_road_safety/data_loaders.py","file_url":"https://github.com/virtuosoresearch/ml4roadsafety/blob/HEAD/ml_for_road_safety/data_loaders.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":"e7a60aa2233f86b6"}},{"code_sha256_prefix":"7bbfe555fa39575f","entry":"load_static_edge_features","repo":"virtuosoresearch/ml4roadsafety","repo_kind":"official","path":"ml_for_road_safety/data_loaders.py","file_url":"https://github.com/virtuosoresearch/ml4roadsafety/blob/HEAD/ml_for_road_safety/data_loaders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7bbfe555fa39575f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}