{"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/meta-secalign-a-secure-foundation-llm-against","title":"Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attacks","arxiv_id":"2507.02735","date":"2025-07-03","proceeding":null,"authors":["Sizhe Chen","Arman Zharmagambetov","David Wagner","Chuan Guo"],"abstract":"Prompt injection attacks pose a significant security threat to LLM-integrated applications. Model-level defenses have shown strong effectiveness, but are currently deployed into commercial-grade models in a closed-source manner. We believe open-source models are needed by the AI security community, where co-development of attacks and defenses through open research drives scientific progress in mitigation against prompt injection attacks. To this end, we develop Meta SecAlign, the first open-source and open-weight LLM with built-in model-level defense that achieves commercial-grade model performance. We provide complete details of our training recipe, which utilizes an improved version of the SOTA SecAlign defense. Evaluations on 9 utility benchmarks and 7 security benchmarks show that Meta SecAlign, despite being trained on a generic instruction-tuning dataset, confers security in unseen downstream tasks, including tool-calling and agentic web navigation, in addition general instruction-following. Our best model -- Meta-SecAlign-70B -- achieves state-of-the-art robustness against prompt injection attacks and comparable utility to closed-source commercial LLM with model-level defense.","url_abs":"https://arxiv.org/abs/2507.02735v1","url_pdf":"https://arxiv.org/pdf/2507.02735v1.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":"meta-secalign-a-secure-foundation-llm-against","repo_url":"https://github.com/facebookresearch/meta_secalign","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"instruction-following","task_name":"Instruction Following"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2507.02735","atlas_url":"https://app.syntology.ai/?focus=2507.02735","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2507.02735"}},"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/facebookresearch/meta_secalign","reach":null}],"summary":{"ran_draft_wrong":3},"by_repo_kind":{"official":{"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":"fe06fd3e6769d186","entry":"add_70B_default_model_arguments","repo":"facebookresearch/meta_secalign","repo_kind":"official","path":"secalign_plus_plus.py","file_url":"https://github.com/facebookresearch/meta_secalign/blob/HEAD/secalign_plus_plus.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":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"fe06fd3e6769d186"}},{"code_sha256_prefix":"cd44aba6b67ee334","entry":"add_8B_default_model_arguments","repo":"facebookresearch/meta_secalign","repo_kind":"official","path":"secalign_plus_plus.py","file_url":"https://github.com/facebookresearch/meta_secalign/blob/HEAD/secalign_plus_plus.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":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"cd44aba6b67ee334"}},{"code_sha256_prefix":"30984748e20ac480","entry":"parse_args","repo":"facebookresearch/meta_secalign","repo_kind":"official","path":"secalign_plus_plus.py","file_url":"https://github.com/facebookresearch/meta_secalign/blob/HEAD/secalign_plus_plus.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":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"30984748e20ac480"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}