用工具增强的推理框架,让小模型也能精准把自然语言转成时序逻辑公式。
ReasonSTL: Bridging Natural Language and Signal Temporal Logic via Tool-Augmented Process-Rewarded Learning

- 分三步:先推理、再调工具、最后生成公式,过程透明可追踪。
- 40亿参数模型在自动与人工评估中均达顶尖水平,比大模型更省钱。
- 适合需要隐私保护和低成本部署的工业级系统形式化设计场景。
信号时序逻辑(STL)是一种用于描述实时、连续信号时空需求的表达力强的形式语言,广泛应用于自主系统与信息物理系统的验证与合成。然而,实际应用中用户通常以自然语言表达需求,而非结构化的STL公式,导致自然语言到STL的翻译成为关键但具挑战性的任务。手动编写需时序逻辑知识,难以扩展;而调用商业大模型API则消耗大量令牌成本,并可能将敏感系统需求暴露给第三方服务,引发工业部署中的隐私问题。为此,本文提出 extsc{ReasonSTL}——一种基于本地开源模型的工具增强框架,通过显式推理、确定性工具调用与结构化公式构建实现自然语言到STL的生成。我们进一步引入过程奖励训练,同时监督工具使用路径与最终公式,并构建了 extsc{STL-Bench},一个基于真实信号的双语、计算感知基准。实验表明,使用 extsc{ReasonSTL}训练的40亿参数模型在自动指标与人工评估中均达到最先进水平,证明其为形式化规范起草提供了透明、低成本且隐私安全的替代方案。
原文摘要 · Abstract (English)
Signal Temporal Logic (STL) is an expressive formal language for specifying spatio-temporal requirements over real-valued, real-time signals. It has been widely used for the verification and synthesis of autonomous systems and cyber-physical systems. In practice, however, users often express their requirements in natural language rather than in structured STL formulas, making natural-language-to-STL translation a critical yet challenging task. Manual specification requires temporal-logic expertise and cannot scale, while prompting commercial LLM APIs incurs substantial token costs and may expose sensitive system requirements to third-party services, raising privacy concerns for industrial deployment. To address these challenges, we present \textsc{ReasonSTL}, a tool-augmented framework that adapts local open-source language models for natural-language-to-STL generation. \textsc{ReasonSTL} decomposes the translation process into explicit reasoning, deterministic tool calls, and structured formula construction. We further introduce process-rewarded training to supervise both tool-use trajectories and final formulas, together with \textsc{STL-Bench}, a bilingual, computation-aware benchmark grounded in real-world signals. Experiments show that a 4B model trained with \textsc{ReasonSTL} achieves state-of-the-art performance in both automatic metrics and human evaluations, demonstrating that \textsc{ReasonSTL} provides a transparent, low-cost, and privacy-preserving alternative for formal specification drafting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。