Back to today's list

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

Pingchuan Ma, Zhaoyu Wang, Zimo Ji, Yuguang Zhou, Zhantong Xue, Zongjie Li, Shuai Wang, Xiaoqin Zhang

Published Jul 8, 2026Featured #4In the daily list Jun 26, 2026
Daily score69.8
Editorial review7.2
Relevance0.485
Freshness0.722

Why It Matters

What makes this one worth your time

This work is relevant for AI engineers and researchers focused on improving the safety and reliability of autonomous agents, as it offers a method to automatically refine safety rules, potentially reducing the risk of unsafe behaviors in deployed systems.

AutoSpec refines safety rules for LLM agents using inductive logic programming to enhance precision and recall.

Summary

The paper introduces AutoSpec, a framework that evolves safety rules for large language model agents using counterexample-guided inductive synthesis and inductive logic programming. It aims to improve the balance between precision and recall in safety rule enforcement by automatically refining expert-designed rules based on user annotations. The framework is evaluated on execution traces in code execution and embodied agent domains, showing significant improvements in rule F1 scores and false positive reduction.

Key contributions

  • Development of AutoSpec, a framework for evolving safety rules using CEGIS and ILP.
  • Demonstration of significant improvements in rule F1 scores and false positive reduction across multiple domains.
  • Provision of human-readable and auditable rules that generalize to unseen scenarios.

Notable insights

  • The use of inductive logic programming to efficiently identify predicates that differentiate false positives and negatives is a clever approach to rule refinement.
  • The iterative process of rule evaluation and refinement until convergence ensures that the resulting rules are both interpretable and effective.

Possible limitations

  • Not stated in the abstract

Abstract

arXiv:2606.24245v3 Announce Type: replace-cross Abstract: 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.