arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2205.11258cs.LGcs.AIcs.FLcs.PL
收藏

基于神经样本分裂的神经符号正则表达式合成框架

Neuro-Symbolic Regex Synthesis Framework via Neural Example Splitting

Kangwon National University(江原国立大学);Yonsei University(延世大学)

Su-Hyeon Kim, Hyunjoon Cheon, Yo-Sub Han, Sang-Ki Ko

摘要:

由于正则表达式(regex,简称regex)的实际重要性,已经有很多研究从正负字符串示例自动生成regex。我们解决的问题,学习正则表达式更快地从积极和消极的字符串依赖于一种新的方法称为“神经示例分裂”。我们的方法本质上是使用一个神经网络将每个示例字符串分成多个部分,该神经网络经过训练,可以将正字符串中的相似子串分组。这有助于更快地学习正则表达式,因此更准确,因为我们现在从几个短长度字符串中学习。我们提出了一个有效的正则表达式合成框架,称为'SplitRegex',合成子正则表达式从'分裂'积极的子字符串,并产生最终的正则表达式连接合成的子正则表达式。对于负样本,我们利用预先生成的subregex在subregex合成过程中,并执行负字符串的匹配。然后,最终的正则表达式变得与所有负数字符串一致。SplitRegex是一个用于学习目标正则表达式的分治框架;拆分(=divide)正字符串并推断多个部分的部分正则表达式,这比整个字符串推断准确得多,并在满足负字符串的同时连接(=conquer)推断的正则表达式。我们的经验表明,建议SplitRegex框架大大提高了以前的正则表达式合成方法在四个基准数据集。

英文摘要:

Due to the practical importance of regular expressions (regexes, for short), there has been a lot of research to automatically generate regexes from positive and negative string examples. We tackle the problem of learning regexes faster from positive and negative strings by relying on a novel approach called `neural example splitting'. Our approach essentially split up each example string into multiple parts using a neural network trained to group similar substrings from positive strings. This helps to learn a regex faster and, thus, more accurately since we now learn from several short-length strings. We propose an effective regex synthesis framework called `SplitRegex' that synthesizes subregexes from `split' positive substrings and produces the final regex by concatenating the synthesized subregexes. For the negative sample, we exploit pre-generated subregexes during the subregex synthesis process and perform the matching against negative strings. Then the final regex becomes consistent with all negative strings. SplitRegex is a divided-and-conquer framework for learning target regexes; split (=divide) positive strings and infer partial regexes for multiple parts, which is much more accurate than the whole string inferring, and concatenate (=conquer) inferred regexes while satisfying negative strings. We empirically demonstrate that the proposed SplitRegex framework substantially improves the previous regex synthesis approaches over four benchmark datasets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑