2606.24245v1 Jun 23, 2026 cs.SE

AutoSpec: 귀납 논리 프로그래밍을 통한 LLM 에이전트의 안전 규칙 진화

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

Zongjie Li
Zongjie Li
Citations: 1,137
h-index: 21
Pingchuan Ma
Pingchuan Ma
Hong Kong University of Science and Technology
Citations: 1,200
h-index: 21
Yuguang Zhou
Yuguang Zhou
Citations: 16
h-index: 1
Shuai Wang
Shuai Wang
Citations: 193
h-index: 9
Zimo Ji
Zimo Ji
Citations: 57
h-index: 3
Zhaoyu Wang
Zhaoyu Wang
Citations: 28
h-index: 3
Zhantong Xue
Zhantong Xue
Citations: 3
h-index: 1
Xiaoqin Zhang
Xiaoqin Zhang
Citations: 0
h-index: 0

대규모 언어 모델(LLM) 에이전트는 언어 모델을 외부 도구 및 환경과 통합하여 복잡한 작업을 자동화하는 데 점점 더 많이 사용되고 있습니다. 그러나 이러한 자율성은 상당한 안전 위험을 초래합니다. 에이전트가 파괴적인 명령을 실행하거나, 민감한 데이터를 유출하거나, 특정 영역의 제약을 위반할 수 있습니다. 기존의 안전 방법은 근본적인 상충 관계에 직면합니다. 수동으로 작성된 규칙은 해석 가능하지만 취약하며, 지나치게 엄격한 규칙은 안전한 작업을 차단하는(높은 오탐) 반면, 너무 관대한 규칙은 위험한 동작을 놓칠 수 있습니다(높은 오류). 신경망 분류기는 안전이 중요한 환경에 필요한 해석 가능성이 부족합니다. 본 논문에서는 AutoSpec이라는 프레임워크를 소개합니다. AutoSpec은 사용자가 제공하는 안전/위험 여부 판단을 기반으로, 귀납 논리 프로그래밍(ILP)에 의해 안내되는 역예제 기반 귀납적 합성(CEGIS)을 통해 배포된 전문가가 설계한 안전 규칙을 자동으로 개선합니다. AutoSpec은 전문가 규칙과 주석이 달린 실행 로그를 초기 조건으로 시작하여, 반복적으로 규칙을 평가하고, 오탐 및 오류 사례의 역예제를 추출하며, ILP를 사용하여 이러한 역예제들을 구분하는 술어를 학습하고, 후보 규칙 수정 사항을 생성하며, 최적의 수정 사항을 선택하기 위해 후보 항목을 검증합니다. 핵심 아이디어는 ILP가 오탐에서는 드물게 나타나지만 오류 사례에서는 자주 나타나는 술어(또는 그 반대)를 효율적으로 식별하여, 규칙 수정의 기하급수적인 탐색 공간을 크게 줄이는 것입니다. 이 과정은 수렴할 때까지 반복되며, 정밀도와 재현율 간의 균형을 맞춘 해석 가능한 규칙을 생성합니다. AutoSpec은 코드 실행 및 로봇 에이전트 영역에 걸쳐 291개의 실행 로그를 사용하여 평가되었습니다. AutoSpec은 두 영역 모두에서 규칙의 F1 값을 각각 0.98과 0.93으로 향상시켰으며, 높은 재현율을 유지하면서 최대 94%의 오탐 감소 효과를 달성했으며, 4~5회 반복 내에 수렴했습니다. ILP 기반 접근 방식은 휴리스틱 CEGIS보다 최대 4.8배 더 높은 F1 값을 달성했습니다. 학습된 규칙은 사람이 읽기 쉽고 감사 가능하며, 새로운 시나리오에도 적용될 수 있습니다.

Original 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.

0 Citations
0 Influential
10.5 Altmetric
52.5 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!