mlsanityData to 14 Oct 2026

AutoSpec: Safety Rule Evolution for LLM Agents via Inductive Logic Programming

arXiv 2606.24245 ↗First posted 23 Jun 2026cs.SE cs.AI cs.CRcited by 0

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

Abstract (arXiv)

Large language model (LLM) agents increasingly automate complex tasks by integrating language models with external tools and environments. However, their autonomy poses significant safety risks: agents may execute destructive commands, leak sensitive data, or violate domain constraints. Existing safety approaches face a fundamental tradeoff: hand-crafted rules are interpretable but brittle, with overly conservative rules blocking safe operations (high false positives) while permissive rules miss unsafe behaviors (high false negatives). Neural classifiers lack the interpretability required for safety-critical deployments. We present AutoSpec, a framework that automatically evolves deployed expert-designed safety rules from user safe/unsafe annotations through counterexample-guided inductive synthesis (CEGIS) guided by inductive logic programming (ILP). Starting from the expert rules and a stream of annotated traces, AutoSpec iteratively evaluates rules, mines false-positive and false-negative counterexamples, uses ILP to learn which predicates discriminate them, generates candidate rule edits, and verifies candidates to select the best revision. The key insight is that ILP efficiently identifies predicates that appear frequently in false negatives but rarely in false positives (or vice versa), dramatically pruning the exponential search space of rule edits. This continues until convergence, producing interpretable rules that balance precision and recall. We evaluate AutoSpec on 291 execution traces spanning code execution and embodied agent domains. AutoSpec raises rule F1 to 0.98 and 0.93 across the two domains, achieving up to 94% false positive reduction while maintaining high recall, and converges within 4-5 iterations. The ILP-guided approach achieves up to 4.8x higher F1 than heuristic CEGIS. The learned rules are human-readable, auditable, and generalize to unseen scenarios.

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 17 of its 45 references that are in the map. First posted on arXiv 23 Jun 2026.

Builds on

17 of 45 references.

Closest ancestors · 5

Same direction, newest first

  1. 2026Taming Various Privilege Escalation in LLM-Based Agent Systems: A Mandatory Access Control Framework17 Jan
  2. 2025LLM Agents Should Employ Security Principles29 May
  3. 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agents12 Nov
  4. 2024Swiss Cheese Model for AI Safety: A Taxonomy and Reference Architecture for Multi-Layered Guardrails of Foundation Model Based Agents5 Aug
  5. 2024R-Judge: Benchmarking Safety Risk Awareness for LLM Agents18 Jan

Other references · 12

  1. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
  2. 2022Do As I Can, Not As I Say: Grounding Language in Robotic Affordancescited by 2,348
  3. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
  4. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
  5. 2022Red Teaming Language Models with Language Modelscited by 1,026
  6. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
  7. 2023Prompt Injection attack against LLM-integrated Applicationscited by 605
  8. 2025Which Agent Causes Task Failures and When? On Automated Failure Attribution of LLM Multi-Agent Systemscited by 185
  9. 2025Evaluation and Benchmarking of LLM Agents: A Surveycited by 152
  10. 2024Exploring the Robustness of Decision-Level Through Adversarial Attacks on LLM-Based Embodied Modelscited by 33
  11. 2020The ILASP system for Inductive Learning of Answer Set Programscited by 27
  12. 2024The Fusion of Large Language Models and Formal Methods for Trustworthy AI Agents: A Roadmapcited by 20

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026SHE: Trajectory-driven Safety Harness Evolution for LLM Agents
  2. 2025SafetyFlow: An Agent-Flow System for Automated LLM Safety Benchmarking
  3. 2024Concept-Guided LLM Agents for Human-AI Safety Codesign
  4. 2025AgenticEval: Toward Agentic and Self-Evolving Safety Evaluation of Large Language Models
  5. 2025AgentAlign: Navigating Safety Alignment in the Shift from Informative to Agentic Large Language Models
  6. 2026Discovering Agentic Safety Specifications from 1-Bit Danger Signals
  7. 2026EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents
  8. 2026Tool Specifications Matter: Uncovering and Mitigating Safety Risks in AI Agents