mlsanityData to 14 Oct 2026

MAGS: Multi-agent Auto-formalization Guarantees Safety for Agentic Outputs

arXiv 2609.19391 ↗First posted 16 Sep 2026cs.AI cs.CR cs.SEcited by 0

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

LLM coding agents now generate complex programs at a scale that makes thorough human review increasingly difficult, raising the risk of safety and security failures. Common approaches, including fuzz testing, static analysis, and LLM-as-a-Verifier, can detect many failures but struggle to cover all possible edge cases. Formal verification addresses this by providing machine-checkable guarantees over specified properties, but traditionally demands substantial manual specification and proof engineering. We introduce a unified multi-agent framework, MAGS, that generates executable programs with formal safety guarantees, using Dafny as a verification-aware intermediate representation where safety properties can be mechanically checked. MAGS formalizes and freezes human-audited APIs and safety requirements, translates generated code into Dafny, repairs violations using verifier feedback, and compiles verified programs back into executable code. We evaluate MAGS on 100 CUDA kernels, 100 terminal scripts, and 20 robotic-arm tasks. Across all 220 examples, it achieves a 100% success rate in producing programs with non-trivial safety guarantees against frozen specifications. Independent safety and functional evaluations further show strong performance across all three domains, while revealing failures when the auto-formalized semantics do not fully capture the target behavior.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 11 of its 25 references that are in the map. First posted on arXiv 16 Sep 2026.

Builds on

11 of 25 references.

Closest ancestors · 1

Same direction, newest first

  1. 2025VeriGuard: Enhancing LLM Agent Safety via Verified Code Generation3 Oct

Other references · 10

  1. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  2. 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,017
  3. 2023Teaching Large Language Models to Self-Debugcited by 988
  4. 2024VLABench: A Large-Scale Benchmark for Language-Conditioned Robotics Manipulation with Long-Horizon Reasoning Taskscited by 175
  5. 2023A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challengescited by 75
  6. 2024DafnyBench: A Benchmark for Formal Software Verificationcited by 57
  7. 2024AutoVerus: Automated Proof Generation for Rust Codecited by 49
  8. 2025BaxBench: Can LLMs Generate Correct and Secure Backends?cited by 41
  9. 2024Densing Law of LLMscited by 40
  10. 2025ProofWright: Towards Agentic Formal Verification of CUDAcited by 9

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Toward Safe LLM Agents: A Survey of Specification, Verification, and Enforcement
  2. 2024AutoSafeCoder: A Multi-Agent Framework for Securing LLM Code Generation through Static Analysis and Fuzz Testing
  3. 2026AgentForge: Execution-Grounded Multi-Agent LLM Framework for Autonomous Software Engineering
  4. 2026When Passing Tests Hides Vulnerabilities: An Empirical Study of Silent Failures in Agentic Systems
  5. 2026LACUNA: Safe Agents as Recursive Program Holes
  6. 2026SABER: Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces
  7. 2026AxDafny: Agentic Verified Code Generation in Dafny
  8. 2026Agentic Model Checking