正则表达式的贝叶斯推理
Bayesian Inference of Regular Expressions from Human-Generated Example Strings
摘要:
在编程的例子,用户“写”程序生成少量的输入输出的例子,并要求计算机合成一致的程序。我们认为在这一领域的一个具有挑战性的问题:学习正则表达式(regexes)从正面和负面的例子字符串。这个问题是具有挑战性的,因为(1)用户生成的示例可能没有足够的信息来充分约束假设空间,以及(2)即使用户生成的示例原则上是信息丰富的,仍然有大量的搜索空间要检查。我们框架regex归纳推理的概率规则文法的问题,并提出了一种有效的推理方法,使用一种新的随机过程识别模型。这个模型使用正例作为支架,逐步“生长”一个语法。我们表明,这种方法与人类从例子中学习正则表达式的能力是有竞争力的。
英文摘要:
In programming by example, users "write" programs by generating a small number of input-output examples and asking the computer to synthesize consistent programs. We consider a challenging problem in this domain: learning regular expressions (regexes) from positive and negative example strings. This problem is challenging, as (1) user-generated examples may not be informative enough to sufficiently constrain the hypothesis space, and (2) even if user-generated examples are in principle informative, there is still a massive search space to examine. We frame regex induction as the problem of inferring a probabilistic regular grammar and propose an efficient inference approach that uses a novel stochastic process recognition model. This model incrementally "grows" a grammar using positive examples as a scaffold. We show that this approach is competitive with human ability to learn regexes from examples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。