InfeRE: Step-by-Step Regex Generation via Chain of Inference
Shuai Zhang, Xiaodong Gu, Yuting Chen, Beijun Shen

TL;DR
InfeRE introduces a step-by-step inference approach for regex generation from natural language, improving accuracy and interpretability over previous autoregressive methods by decomposing the process and using ensemble decoding.
Contribution
The paper proposes a novel chain-of-inference paradigm for regex generation, enhancing robustness and performance compared to existing single-pass models.
Findings
Achieves 16.3% and 14.7% improvements in DFA@5 accuracy on two datasets.
Outperforms state-of-the-art approaches and TRANX by significant margins.
Demonstrates the effectiveness of step-by-step inference and ensemble decoding in regex generation.
Abstract
Automatically generating regular expressions (abbrev. regexes) from natural language description (NL2RE) has been an emerging research area. Prior studies treat regex as a linear sequence of tokens and generate the final expressions autoregressively in a single pass. They did not take into account the step-by-step internal text-matching processes behind the final results. This significantly hinders the efficacy and interpretability of regex generation by neural language models. In this paper, we propose a new paradigm called InfeRE, which decomposes the generation of regexes into chains of step-by-step inference. To enhance the robustness, we introduce a self-consistency decoding mechanism that ensembles multiple outputs sampled from different models. We evaluate InfeRE on two publicly available datasets, NL-RX-Turk and KB13, and compare the results with state-of-the-art approaches and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Mathematics, Computing, and Information Processing
