{"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/arxiv-2509-25727","title":"Boundary-to-Region Supervision for Offline Safe Reinforcement Learning","arxiv_id":"2509.25727","date":"2025-09-30","proceeding":"NeurIPS","authors":["Huikang Su","Dengyun Peng","Zifeng Zhuang","YuHan Liu","Qiguang Chen","Donglin Wang","Qinghe Liu"],"abstract":"Offline safe reinforcement learning aims to learn policies that satisfy predefined safety constraints from static datasets. Existing sequence-model-based methods condition action generation on symmetric input tokens for return-to-go and cost-to-go, neglecting their intrinsic asymmetry: return-to-go (RTG) serves as a flexible performance target, while cost-to-go (CTG) should represent a rigid safety boundary. This symmetric conditioning leads to unreliable constraint satisfaction, especially when encountering out-of-distribution cost trajectories. To address this, we propose Boundary-to-Region (B2R), a framework that enables asymmetric conditioning through cost signal realignment . B2R redefines CTG as a boundary constraint under a fixed safety budget, unifying the cost distribution of all feasible trajectories while preserving reward structures. Combined with rotary positional embeddings , it enhances exploration within the safe region. Experimental results show that B2R satisfies safety constraints in 35 out of 38 safety-critical tasks while achieving superior reward performance over baseline methods. This work highlights the limitations of symmetric token conditioning and establishes a new theoretical and practical approach for applying sequence models to safe RL. Our code is available at https://github.com/HuikangSu/B2R.","url_abs":"https://arxiv.org/abs/2509.25727","url_pdf":"https://arxiv.org/pdf/2509.25727","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2509.25727","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2509.25727"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/HuikangSu/B2R","reach":null}],"summary":{"ran":2,"ran_draft_wrong":1,"ran_violates":1,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":6,"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":0,"samples":[{"code_sha256_prefix":"8c62b5ebe75ad94f","entry":"BaseActor","repo":"HuikangSu/B2R","repo_kind":"found_in_text","path":"model/B2R.py","file_url":"https://github.com/HuikangSu/B2R/blob/HEAD/model/B2R.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8c62b5ebe75ad94f"}},{"code_sha256_prefix":"67e44afff973c336","entry":"MaskedCausalAttention","repo":"HuikangSu/B2R","repo_kind":"found_in_text","path":"model/B2R.py","file_url":"https://github.com/HuikangSu/B2R/blob/HEAD/model/B2R.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"67e44afff973c336"}},{"code_sha256_prefix":"2a9fa7e07b987077","entry":"apply_rotary_emb","repo":"HuikangSu/B2R","repo_kind":"found_in_text","path":"model/B2R.py","file_url":"https://github.com/HuikangSu/B2R/blob/HEAD/model/B2R.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2a9fa7e07b987077"}},{"code_sha256_prefix":"dbdbe67ef2907465","entry":"precompute_freqs_cis","repo":"HuikangSu/B2R","repo_kind":"found_in_text","path":"model/B2R.py","file_url":"https://github.com/HuikangSu/B2R/blob/HEAD/model/B2R.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dbdbe67ef2907465"}},{"code_sha256_prefix":"02c5aca56a7329fb","entry":"B2R","repo":"HuikangSu/B2R","repo_kind":"found_in_text","path":"model/B2R.py","file_url":"https://github.com/HuikangSu/B2R/blob/HEAD/model/B2R.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"02c5aca56a7329fb"}},{"code_sha256_prefix":"5f51ec4895241525","entry":"TransformerBlock","repo":"HuikangSu/B2R","repo_kind":"found_in_text","path":"model/B2R.py","file_url":"https://github.com/HuikangSu/B2R/blob/HEAD/model/B2R.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5f51ec4895241525"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_api"},"syntology_extracted_results":null}