用Transformer从语义嵌入还原时序逻辑公式,实现符号知识的可逆学习。
Bridging Logic and Learning: Decoding Temporal Logic Embeddings via Transformers
- 基于Transformer的解码器,将时序逻辑公式嵌入还原为具体公式。
- 仅1轮训练即可生成有效公式,约10轮达到语义泛化效果。
- 还原结果更简洁且语义接近原始公式,适合需求挖掘等任务。
逻辑公式的连续表示可将符号知识融入数据驱动的学习算法中。若这些嵌入具有语义一致性(即语义相近的公式映射到邻近向量),则可在公式语义空间中直接进行连续学习与优化。然而,要将最优连续表示转化为具体要求,嵌入必须可逆。本文通过训练一个基于Transformer的仅解码器模型,来逆向解析信号时序逻辑(STL)公式的语义嵌入。利用STL语法构建小词汇表,实验表明该模型仅需1个训练周期即可生成有效公式,并在约10个周期内实现对逻辑语义的泛化。此外,模型能将给定嵌入还原为长度更短、嵌套更少但语义接近(或等价)于真实参考公式的表达式。我们在不同复杂度的训练公式上验证了方法的有效性,评估了训练数据对模型捕捉嵌入语义信息及分布外泛化能力的影响。最后,将模型应用于需求挖掘任务——从轨迹分类任务中推断STL规范,并直接在语义空间中完成优化。
原文摘要 · Abstract (English)
Continuous representations of logic formulae allow us to integrate symbolic knowledge into data-driven learning algorithms. If such embeddings are semantically consistent, i.e. if similar specifications are mapped into nearby vectors, they enable continuous learning and optimization directly in the semantic space of formulae. However, to translate the optimal continuous representation into a concrete requirement, such embeddings must be invertible. We tackle this issue by training a Transformer-based decoder-only model to invert semantic embeddings of Signal Temporal Logic (STL) formulae. STL is a powerful formalism that allows us to describe properties of signals varying over time in an expressive yet concise way. By constructing a small vocabulary from STL syntax, we demonstrate that our proposed model is able to generate valid formulae after only 1 epoch and to generalize to the semantics of the logic in about 10 epochs. Additionally, the model is able to decode a given embedding into formulae that are often simpler in terms of length and nesting while remaining semantically close (or equivalent) to gold references. We show the effectiveness of our methodology across various levels of training formulae complexity to assess the impact of training data on the model's ability to effectively capture the semantic information contained in the embeddings and generalize out-of-distribution. Finally, we deploy our model for solving a requirement mining task, i.e. inferring STL specifications that solve a classification task on trajectories, performing the optimization directly in the semantic space.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。