正确且最优:正则表达式推理挑战
Correct and Optimal: the Regular Expression Inference Challenge
AI总结:
论文提出正则表达式推理(REI)挑战,即从正负字符串示例中学习代价最小的正则表达式,并发布大规模数据集与多个基线,以推动代码和语言建模研究。
摘要:
我们提出将正则表达式推理(REI)作为面向代码/语言建模以及更广泛机器学习社区的一项挑战。REI是一个监督机器学习(ML)与程序优化任务,其问题是从示例中寻找最小正则表达式:给定两个有限字符串集合P和N以及一个代价函数cost(·),该任务要求生成一个表达式r,使其接受P中的所有字符串并拒绝N中的所有字符串,同时不存在另一个满足条件的表达式r′使得cost(r′)<cost(r)。REI作为挑战问题具有若干优势:(i)正则表达式广为人知、应用广泛,并且是代码的一种自然理想化形式;(ii)REI的渐近最坏情况复杂度已得到充分理解;(iii)REI只有少量易于理解的参数(例如P或N的基数、示例的字符串长度或代价函数),这使我们能够轻松微调REI的难度;(iv)REI强调优化,对于基于深度学习的机器学习而言仍是一个尚未解决的问题。最近,一种REI求解器利用程序综合技术在GPU上得到实现。这首次实现了针对复杂REI实例快速生成最小正则表达式。基于这一进展,我们生成并发布了首批面向REI的大规模数据集,并设计和评估了若干初始的启发式与机器学习基线。我们邀请社区参与并探索能够学习解决REI问题的机器学习方法。我们相信,REI方面的进展将直接转化为代码/语言建模方面的进展。
英文摘要:
We propose regular expression inference (REI) as a challenge for code/language modelling, and the wider machine learning community. REI is a supervised machine learning (ML) and program optimisation task, and poses the problem of finding minimal regular expressions from examples: Given two finite sets of strings $P$ and $N$ and a cost function $cost(\cdot)$, the task is to generate an expression $r$ that accepts all strings in $P$ and rejects all strings in $N$, while no other such expression $r'$ exists with $cost(r')<cost(r)$. REI has advantages as a challenge problem: (i) regular expressions are well-known, widely used, and a natural idealisation of code; (ii) REI's asymptotic worst-case complexity is well understood; (iii) REI has a small number of easy to understand parameters (e.g. $P$ or $N$ cardinality, string lengths of examples, or the cost function); this lets us easily finetune REI-hardness; (iv) REI, with its emphasis on optimisation, is an unsolved problem for deep learning based ML. Recently, an REI solver was implemented on GPUs, using program synthesis techniques. This enabled, for the first time, fast generation of minimal regular expressions for complex REI instances. Building on this advance, we generate and publish the first large-scale datasets for REI, and devise and evaluate several initial heuristic and machine learning baselines. We invite the community to participate and explore ML methods that learn to solve REI problems. We believe that progress in REI directly translates to progress in code/language modelling.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。