arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.15840cs.LOcs.FL
收藏

基于大语言模型的自动安全合规线性时序逻辑生成:一种自监督框架

Automatic Generation of Safety-compliant Linear Temporal Logic via Large Language Model: A Self-supervised Framework

Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))

Junle Li, Siqi Chen, Jiakai Li, Meiqi Tian, Bingzhuo Zhong

AI总结:

本文提出AutoSafeLTL框架,利用大语言模型自动生成符合安全限制的LTL规范,通过语言包含检查与自动反例引导修改机制确保逻辑一致性和语义准确性。

摘要:

将自然语言描述的高层任务转换为线性时序逻辑(LTL)等形式化规范是向提供形式安全保证的网络物理系统(CPS)迈出的关键一步。虽然形式化规范本身对CPS施加的安全限制的合规性对于确保安全至关重要,但大多数现有工作仅关注自然语言与形式化规范之间的翻译一致性。在本文中,我们介绍了AutoSafeLTL,一种自监督框架,利用大语言模型(LLMs)自动生成功能符合一组安全限制的LTL规范,同时保持其逻辑一致性和语义准确性。关键见解是,我们的框架整合了语言包含检查与自动反例引导修改机制,以确保生成的LTL规范的安全合规性。具体而言,我们开发了1)一个LLM-as-Aligner,用于在生成的LTL规范与安全限制之间进行原子命题匹配,以强制语义对齐;以及2)一个LLM-as-Critic,通过解释来自语言包含检查的反例自动优化LTL规范。实验结果表明,我们的架构有效地保证了生成的LTL规范的安全合规性,实现了对施加的安全限制的0%违规率。这展示了我们的工作在结合AI和形式化验证技术方面的潜力,增强了安全意识的规范生成和AI及关键CPS应用的自动验证。

英文摘要:

Converting high-level tasks described by natural language into formal specifications like Linear Temporal Logic (LTL) is a key step towards providing formal safety guarantees over cyber-physical systems (CPS). While the compliance of the formal specifications themselves against the safety restrictions imposed on CPS is crucial for ensuring safety, most existing works only focus on translation consistency between natural languages and formal specifications. In this paper, we introduce AutoSafeLTL, a self-supervised framework that utilizes large language models (LLMs) to automate the generation of LTL specifications complying with a set of safety restrictions while preserving their logical consistency and semantic accuracy. As a key insight, our framework integrates Language Inclusion check with an automated counterexample-guided modification mechanism to ensure the safety-compliance of the resulting LTL specifications. In particular, we develop 1) an LLM-as-an-Aligner, which performs atomic proposition matching between generated LTL specifications and safety restrictions to enforce semantic alignment; and 2) an LLM-as-a-Critic, which automates LTL specification refinement by interpreting counterexamples derived from Language Inclusion checks. Experimental results demonstrate that our architecture effectively guarantees safety-compliance for the generated LTL specifications, achieving a 0% violation rate against imposed safety restrictions. This shows the potential of our work in synergizing AI and formal verification techniques, enhancing safety-aware specification generation and automatic verification for both AI and critical CPS applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑