{"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/social-nce-contrastive-learning-of-socially","title":"Social NCE: Contrastive Learning of Socially-aware Motion Representations","arxiv_id":"2012.11717","date":"2020-12-21","proceeding":"ICCV 2021 10","authors":["Yuejiang Liu","Qi Yan","Alexandre Alahi"],"abstract":"Learning socially-aware motion representations is at the core of recent advances in multi-agent problems, such as human motion forecasting and robot navigation in crowds. Despite promising progress, existing representations learned with neural networks still struggle to generalize in closed-loop predictions (e.g., output colliding trajectories). This issue largely arises from the non-i.i.d. nature of sequential prediction in conjunction with ill-distributed training data. Intuitively, if the training data only comes from human behaviors in safe spaces, i.e., from \"positive\" examples, it is difficult for learning algorithms to capture the notion of \"negative\" examples like collisions. In this work, we aim to address this issue by explicitly modeling negative examples through self-supervision: (i) we introduce a social contrastive loss that regularizes the extracted motion representation by discerning the ground-truth positive events from synthetic negative ones; (ii) we construct informative negative samples based on our prior knowledge of rare but dangerous circumstances. Our method substantially reduces the collision rates of recent trajectory forecasting, behavioral cloning and reinforcement learning algorithms, outperforming state-of-the-art methods on several benchmarks. Our code is available at https://github.com/vita-epfl/social-nce.","url_abs":"https://arxiv.org/abs/2012.11717v3","url_pdf":"https://arxiv.org/pdf/2012.11717v3.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":"social-nce-contrastive-learning-of-socially","repo_url":"https://github.com/vita-epfl/social-nce","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"social-nce-contrastive-learning-of-socially","repo_url":"https://github.com/YuejiangLIU/social-nce-trajectron-plus-plus","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"social-nce-contrastive-learning-of-socially","repo_url":"https://github.com/qiyan98/social-nce-stgcnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"social-nce-contrastive-learning-of-socially","repo_url":"https://github.com/vita-epfl/social-nce-crowdnav","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"autonomous-driving","task_name":"Autonomous Driving"},{"task_slug":"autonomous-navigation","task_name":"Autonomous Navigation"},{"task_slug":"motion-forecasting","task_name":"Motion Forecasting"},{"task_slug":"trajectory-forecasting","task_name":"Trajectory Forecasting"},{"task_slug":"trajectory-prediction","task_name":"Trajectory Prediction"}],"methods":[{"method_slug":"infonce","method_name":"InfoNCE"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/trajectory-forecasting-on-trajnet","task":"Trajectory Forecasting","dataset":"TrajNet++","model":"Social NCE + Social LSTM","rank_in_archive_order":1,"of":3,"metrics":{"COL":"5.31","FDE":"1.14"},"uses_additional_data":false},{"leaderboard":"/sota/trajectory-prediction-on-ethucy","task":"Trajectory Prediction","dataset":"ETH/UCY","model":"Social-NCE + Trajectron++","rank_in_archive_order":5,"of":20,"metrics":{"ADE-8/12":"0.19","FDE-8/12":"0.40"},"uses_additional_data":false},{"leaderboard":"/sota/trajectory-prediction-on-trajnet","task":"Trajectory Prediction","dataset":"TrajNet++","model":"Social-NCE + Social-LSTM","rank_in_archive_order":1,"of":3,"metrics":{"COL":"5.31","FDE":"1.14"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2012.11717","atlas_url":"https://app.syntology.ai/?focus=2012.11717","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2012.11717"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/vita-epfl/social-nce","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qiyan98/social-nce-stgcnn","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/YuejiangLIU/social-nce-trajectron-plus-plus","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vita-epfl/social-nce-crowdnav","reach":{"status":"unanswered"}}],"summary":{"ran_fixture":3},"by_repo_kind":{"listed":{"samples":3,"ran":3,"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":3,"samples":[{"code_sha256_prefix":"c3ce38abe742f5a3","entry":"load_dataframe","repo":"YuejiangLIU/social-nce-trajectron-plus-plus","repo_kind":"listed","path":"benchmark.py","file_url":"https://github.com/YuejiangLIU/social-nce-trajectron-plus-plus/blob/HEAD/benchmark.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c3ce38abe742f5a3"}},{"code_sha256_prefix":"aa98437232ce88ee","entry":"relative","repo":"YuejiangLIU/social-nce-trajectron-plus-plus","repo_kind":"listed","path":"benchmark.py","file_url":"https://github.com/YuejiangLIU/social-nce-trajectron-plus-plus/blob/HEAD/benchmark.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"aa98437232ce88ee"}},{"code_sha256_prefix":"e44153671d3251bc","entry":"select","repo":"YuejiangLIU/social-nce-trajectron-plus-plus","repo_kind":"listed","path":"benchmark.py","file_url":"https://github.com/YuejiangLIU/social-nce-trajectron-plus-plus/blob/HEAD/benchmark.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e44153671d3251bc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}