{"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/safety-through-feedback-in-constrained-rl","title":"Safety through feedback in Constrained RL","arxiv_id":"2406.19626","date":"2024-06-28","proceeding":null,"authors":["Shashank Reddy Chirra","Pradeep Varakantham","Praveen Paruchuri"],"abstract":"In safety-critical RL settings, the inclusion of an additional cost function is often favoured over the arduous task of modifying the reward function to ensure the agent's safe behaviour. However, designing or evaluating such a cost function can be prohibitively expensive. For instance, in the domain of self-driving, designing a cost function that encompasses all unsafe behaviours (e.g. aggressive lane changes) is inherently complex. In such scenarios, the cost function can be learned from feedback collected offline in between training rounds. This feedback can be system generated or elicited from a human observing the training process. Previous approaches have not been able to scale to complex environments and are constrained to receiving feedback at the state level which can be expensive to collect. To this end, we introduce an approach that scales to more complex domains and extends to beyond state-level feedback, thus, reducing the burden on the evaluator. Inferring the cost function in such settings poses challenges, particularly in assigning credit to individual states based on trajectory-level feedback. To address this, we propose a surrogate objective that transforms the problem into a state-level supervised classification task with noisy labels, which can be solved efficiently. Additionally, it is often infeasible to collect feedback on every trajectory generated by the agent, hence, two fundamental questions arise: (1) Which trajectories should be presented to the human? and (2) How many trajectories are necessary for effective learning? To address these questions, we introduce \\textit{novelty-based sampling} that selectively involves the evaluator only when the the agent encounters a \\textit{novel} trajectory. We showcase the efficiency of our method through experimentation on several benchmark Safety Gymnasium environments and realistic self-driving scenarios.","url_abs":"https://arxiv.org/abs/2406.19626v3","url_pdf":"https://arxiv.org/pdf/2406.19626v3.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":"safety-through-feedback-in-constrained-rl","repo_url":"https://github.com/shshnkreddy/RLSF","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2406.19626","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.19626"}},"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/shshnkreddy/RLSF","reach":null}],"summary":{"ran":1,"ran_draft_wrong":2,"ran_fixture":1,"unverified":8},"by_repo_kind":{"official":{"samples":12,"ran":4,"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":12,"samples":[{"code_sha256_prefix":"f8d32bf33dff4c53","entry":"RolloutBuffer_PPO_lag","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"f8d32bf33dff4c53"}},{"code_sha256_prefix":"34fc1c160d02198e","entry":"batched_inf","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"34fc1c160d02198e"}},{"code_sha256_prefix":"afacbe0d7d9a41e5","entry":"compute_train_stats","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"afacbe0d7d9a41e5"}},{"code_sha256_prefix":"eea59308f3780233","entry":"gen_aug_states","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"eea59308f3780233"}},{"code_sha256_prefix":"61bc5c3a0320b9ea","entry":"Algorithm","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"61bc5c3a0320b9ea"}},{"code_sha256_prefix":"560aa2dfb0a27188","entry":"CNNStateIndependentPolicy","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"560aa2dfb0a27188"}},{"code_sha256_prefix":"b6b22a66653c0c54","entry":"Classifier_network","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"b6b22a66653c0c54"}},{"code_sha256_prefix":"cfbd6a0a577ba90c","entry":"PPO_continuous","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"cfbd6a0a577ba90c"}},{"code_sha256_prefix":"a4cb8de4018bf2bb","entry":"PPO_lag","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"a4cb8de4018bf2bb"}},{"code_sha256_prefix":"89cefdacf466af47","entry":"PREFIM","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"89cefdacf466af47"}},{"code_sha256_prefix":"c2567abd86d8eb58","entry":"StateIndependentPolicy","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"c2567abd86d8eb58"}},{"code_sha256_prefix":"59c2525415607d22","entry":"hinge_loss","repo":"shshnkreddy/RLSF","repo_kind":"official","path":"Sources/algo/prefim.py","file_url":"https://github.com/shshnkreddy/RLSF/blob/HEAD/Sources/algo/prefim.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":"59c2525415607d22"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}