让AI把自然语言要求转成可验证的逻辑代码,确保准确可靠。
NeuroNL2LTL: A Neurosymbolic Framework for Natural Language Translation of Linear Temporal Logic
- 用中间结构化表示实现神经网络与形式逻辑的融合翻译
- 20万+需求测试中,28%语义等价且86%输出可验证为真
- 适合安全关键领域如自动驾驶、航天的开发者使用
将自然语言(NL)与线性时序逻辑(LTL)之间高效转换需要专业知识,限制了形式化验证在安全关键系统开发中的应用。模板方法牺牲表达能力换取可靠性;神经方法虽流畅但无正确性保证。我们提出NeuroNL2LTL,一种神经符号架构,统一学习型翻译与形式化验证。该框架通过一个结构保持映射的中间表示进行翻译,生成的规范经满足性与非平凡性检查,近似错误由最小编辑修复机制修正。核心创新是验证器在环训练:验证结果作为强化学习的奖励信号,使神经组件直接优化形式正确性。在涵盖航空航天、机器人、自动驾驶等十多个领域的20万+需求上,NeuroNL2LTL实现28%语义等价于参考规范,且86%输出通过可满足性验证。系统还能从LTL生成上下文相关的解释,使领域专家无需专业培训即可验证规范。本工作表明,形式化验证既可作为训练目标,也可作为运行时过滤器,使基于神经网络的工具可靠性来自逻辑保障而非统计信心。
原文摘要 · Abstract (English)
Effectively translating between natural language (NL) and formal logics like Linear Temporal Logic (LTL) requires expertise that limits formal verification's reach in safety-critical development. Template-based approaches sacrifice expressiveness for reliability; neural methods achieve fluency but provide no correctness guarantees. We present NeuroNL2LTL, a neurosymbolic architecture unifying learned translation with formal verification. NeuroNL2LTL routes translation through an intermediate representation whose mapping to LTL is structure-preserving by construction. Generated specifications undergo satisfiability and non-triviality checking; a minimal-edit repair mechanism corrects near-miss outputs before they reach downstream tools. The central innovation is verifier-in-the-loop training: verification outcomes serve as reward signals for reinforcement learning, producing neural components that optimize directly for formal correctness. On 200,000+ requirements spanning aerospace, robotics, autonomous vehicles, and ten additional domains, NeuroNL2LTL achieves 28\% semantic equivalence with reference specifications while ensuring 86\% of outputs are verified satisfiable. The system also generates contextually grounded explanations from LTL, enabling domain experts to validate specifications without specialized training. This work demonstrates that formal verification can function as both training objective and runtime filter for neural specification systems, allowing us to build neural-based tools whose reliability derives from logical guarantees rather than statistical confidence.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。