paper-with-me

홈 › Papers

Search-Based Regular Expression Inference on a GPU

2023-05-29 · Mojtaba Valizadeh, Martin Berger

Regular expression inference (REI) is a supervised machine learning and program synthesis problem that takes a cost metric for regular expressions, and positive and negative examples of strings as input. It outputs a regular expression that is precise (i.e., accepts all positive and rejects all negative examples), and minimal w.r.t. to the cost metric. We present a novel algorithm for REI over arbitrary alphabets that is enumerative and trades off time for space. Our main algorithmic idea is to implement the search space of regular expressions succinctly as a contiguous matrix of bitvectors. Collectively, the bitvectors represent, as characteristic sequences, all sub-languages of the infix-closure of the union of positive and negative examples. Mathematically, this is a semiring of (a variant of) formal power series. Infix-closure enables bottom-up compositional construction of larger from smaller regular expressions using the operations of our semiring. This minimises data movement and data-dependent branching, hence maximises data-parallelism. In addition, the infix-closure remains unchanged during the search, hence search can be staged: first pre-compute various expensive operations, and then run the compute intensive search process. We provide two C++ implementations, one for general purpose CPUs and one for Nvidia GPUs (using CUDA). We benchmark both on Google Colab Pro: the GPU implementation is on average over 1000x faster than the CPU implementation on the hardest benchmarks.

📄 PDF Abstract BibTeX arXiv:2305.18575

Code (1)

mojtabavalizadeh/paresy 공식 구현

Tasks

CPUGPUProgram Synthesis

Similar Papers 제목 키워드 기반

Bayesian Inference of Regular Expressions from Human-Generated Example Strings

2018-05-22 · Long Ouyang

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: learnin…

Bayesian Inference

Neuralizing Regular Expressions for Slot Filling

2021-11-01 · EMNLP 2021 11 · Chengyue Jiang, Zijian Jin, Kewei Tu

Neural models and symbolic rules such as regular expressions have their respective merits and weaknesses. In this paper, we study the integration of the two approaches for the slot filling task by converting regular expr…

slot-fillingSlot Filling

Learning Restricted Regular Expressions with Interleaving

2019-04-30 · Chunmei Dong, Yeting Li, Haiming Chen

The advantages for the presence of an XML schema for XML documents are numerous. However, many XML documents in practice are not accompanied by a schema or by a valid schema. Relax NG is a popular and powerful schema lan…

valid

FOREST: An Interactive Multi-tree Synthesizer for Regular Expressions

2020-12-28 · Margarida Ferreira, Miguel Terra-Neves, Miguel Ventura, Inês Lynce 외

Form validators based on regular expressions are often used on digital forms to prevent users from inserting data in the wrong format. However, writing these validators can pose a challenge to some users. We present FORE…

Enumerative SearchForm

Vietnamese Named Entity Recognition using Token Regular Expressions and Bidirectional Inference

2016-10-18 · Phuong Le-Hong

This paper describes an efficient approach to improve the accuracy of a named entity recognition system for Vietnamese. The approach combines regular expressions over tokens and a bidirectional inference method in a sequ…

named-entity-recognitionNamed Entity RecognitionNamed Entity Recognition (NER)