首个利用前缀查询的正则语言学习算法,提升安全解析器建模效率。
Example-Free Learning of Regular Languages with Prefix Queries
- 基于前缀查询改进经典L*算法,利用解析失败位置信息
- 理论与实验表明比传统方法更高效,减少查询次数
- 无需标签样本,适合真实安全场景中的无例学习
语言学习旨在推断准确表示形式语言的数学模型。许多学习算法通过向目标语言提出特定类型查询来实现。在网络安全领域,该技术用于建模程序输入解析器接受的语言。在此场景中,学习者只能通过执行解析器来查询自定义字符串,这限制了可使用的学习算法。大多数实际解析器不仅能判断字符串是否有效,还能指出解析失败的位置。这一额外信息可转化为一种称为前缀查询的新类型。值得注意的是,目前尚无语言学习算法利用前缀查询,尽管部分方法采用成员查询(即询问某字符串是否有效)。当这些方法用于学习解析器语言时,解析器提供的前缀信息未被利用。本文提出PL*,首个利用前缀查询的语言学习算法,是对经典L*算法的创新改进。我们从理论上和实证上证明,由于能利用前缀查询提供的额外信息,相比成员查询,PL*能够更高效地学习。此外,我们展示了如何将PL*适配到仅依赖前缀查询的实用场景中,即不访问任何标注样本或其他类型查询。实验证明,在此更受限设置下,PL*仍能准确学习一系列具有实际意义的语言。
原文摘要 · Abstract (English)
Language learning refers to the problem of inferring a mathematical model which accurately represents a formal language. Many language learning algorithms learn by asking certain types of queries about the language being modeled. Language learning is of practical interest in the field of cybersecurity, where it is used to model the language accepted by a program's input parser (also known as its input processor). In this setting, a learner can only query a string of its choice by executing the parser on it, which limits the language learning algorithms that can be used. Most practical parsers can indicate not only whether the string is valid or not, but also where the parsing failed. This extra information can be leveraged into producing a type of query we call the prefix query. Notably, no existing language learning algorithms make use of prefix queries, though some ask membership queries i.e., they ask whether or not a given string is valid. When these approaches are used to learn the language of a parser, the prefix information provided by the parser remains unused. In this work, we present PL*, the first known language learning algorithm to make use of the prefix query, and a novel modification of the classical L* algorithm. We show both theoretically and empirically that PL* is able to learn more efficiently than L* due to its ability to exploit the additional information given by prefix queries over membership queries. Furthermore, we show how PL* can be used to learn the language of a parser, by adapting it to a more practical setting in which prefix queries are the only source of information available to it; that is, it does not have access to any labelled examples or any other types of queries. We demonstrate empirically that, even in this more constrained setting, PL* is still capable of accurately learning a range of languages of practical interest.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。