Search-Based Regular Expression Inference on a GPU

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 nega...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:arXiv.org 2023-05
Hauptverfasser: Valizadeh, Mojtaba, Berger, Martin
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title arXiv.org
container_volume
creator Valizadeh, Mojtaba
Berger, Martin
description 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.
doi_str_mv 10.48550/arxiv.2305.18575
format Article
fullrecord <record><control><sourceid>proquest_arxiv</sourceid><recordid>TN_cdi_arxiv_primary_2305_18575</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2821120906</sourcerecordid><originalsourceid>FETCH-LOGICAL-a526-cb7a20989148b98b391d0dfbb6c2fb84c5738cd6cfee00e356621b9d9c720f103</originalsourceid><addsrcrecordid>eNotj1FLwzAUhYMgOOZ-gE8WfG69uWnS5FHH3AYDRedzSdJb7ZhtTazMf2_dfDocOJxzPsauOGS5lhJubTg03xkKkBnXspBnbIJC8FTniBdsFuMOAFAVKKWYMHwhG_x7em8jVckzvQ17G5LFoQ8UY9O1ybqtKVDrKRmNTZZPr5fsvLb7SLN_nbLtw2I7X6Wbx-V6frdJrUSVeldYBKMNz7Uz2gnDK6hq55TH2uncy0JoXylfEwGQkEohd6YyvkCoOYgpuz7VHoHKPjQfNvyUf2DlEWxM3JwSfeg-B4pf5a4bQjt-KlEj5-M8KPEL7ttOrA</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2821120906</pqid></control><display><type>article</type><title>Search-Based Regular Expression Inference on a GPU</title><source>arXiv.org</source><source>Free E- Journals</source><creator>Valizadeh, Mojtaba ; Berger, Martin</creator><creatorcontrib>Valizadeh, Mojtaba ; Berger, Martin</creatorcontrib><description>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.</description><identifier>EISSN: 2331-8422</identifier><identifier>DOI: 10.48550/arxiv.2305.18575</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Algorithms ; Benchmarks ; Computer Science - Artificial Intelligence ; Computer Science - Programming Languages ; Graphics processing units ; Inference ; Machine learning ; Mathematical analysis ; Power series ; Search process ; Sequences ; Supervised learning</subject><ispartof>arXiv.org, 2023-05</ispartof><rights>2023. This work is published under http://creativecommons.org/licenses/by-nc-nd/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><rights>http://creativecommons.org/licenses/by-nc-nd/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,776,780,881,27902</link.rule.ids><backlink>$$Uhttps://doi.org/10.1145/3591274$$DView published paper (Access to full text may be restricted)$$Hfree_for_read</backlink><backlink>$$Uhttps://doi.org/10.48550/arXiv.2305.18575$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Valizadeh, Mojtaba</creatorcontrib><creatorcontrib>Berger, Martin</creatorcontrib><title>Search-Based Regular Expression Inference on a GPU</title><title>arXiv.org</title><description>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.</description><subject>Algorithms</subject><subject>Benchmarks</subject><subject>Computer Science - Artificial Intelligence</subject><subject>Computer Science - Programming Languages</subject><subject>Graphics processing units</subject><subject>Inference</subject><subject>Machine learning</subject><subject>Mathematical analysis</subject><subject>Power series</subject><subject>Search process</subject><subject>Sequences</subject><subject>Supervised learning</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2023</creationdate><recordtype>article</recordtype><sourceid>BENPR</sourceid><sourceid>GOX</sourceid><recordid>eNotj1FLwzAUhYMgOOZ-gE8WfG69uWnS5FHH3AYDRedzSdJb7ZhtTazMf2_dfDocOJxzPsauOGS5lhJubTg03xkKkBnXspBnbIJC8FTniBdsFuMOAFAVKKWYMHwhG_x7em8jVckzvQ17G5LFoQ8UY9O1ybqtKVDrKRmNTZZPr5fsvLb7SLN_nbLtw2I7X6Wbx-V6frdJrUSVeldYBKMNz7Uz2gnDK6hq55TH2uncy0JoXylfEwGQkEohd6YyvkCoOYgpuz7VHoHKPjQfNvyUf2DlEWxM3JwSfeg-B4pf5a4bQjt-KlEj5-M8KPEL7ttOrA</recordid><startdate>20230529</startdate><enddate>20230529</enddate><creator>Valizadeh, Mojtaba</creator><creator>Berger, Martin</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20230529</creationdate><title>Search-Based Regular Expression Inference on a GPU</title><author>Valizadeh, Mojtaba ; Berger, Martin</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a526-cb7a20989148b98b391d0dfbb6c2fb84c5738cd6cfee00e356621b9d9c720f103</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2023</creationdate><topic>Algorithms</topic><topic>Benchmarks</topic><topic>Computer Science - Artificial Intelligence</topic><topic>Computer Science - Programming Languages</topic><topic>Graphics processing units</topic><topic>Inference</topic><topic>Machine learning</topic><topic>Mathematical analysis</topic><topic>Power series</topic><topic>Search process</topic><topic>Sequences</topic><topic>Supervised learning</topic><toplevel>online_resources</toplevel><creatorcontrib>Valizadeh, Mojtaba</creatorcontrib><creatorcontrib>Berger, Martin</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science &amp; Engineering Collection</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>Technology Collection (ProQuest)</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>Publicly Available Content Database</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection><collection>arXiv Computer Science</collection><collection>arXiv.org</collection><jtitle>arXiv.org</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Valizadeh, Mojtaba</au><au>Berger, Martin</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Search-Based Regular Expression Inference on a GPU</atitle><jtitle>arXiv.org</jtitle><date>2023-05-29</date><risdate>2023</risdate><eissn>2331-8422</eissn><abstract>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.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><doi>10.48550/arxiv.2305.18575</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier EISSN: 2331-8422
ispartof arXiv.org, 2023-05
issn 2331-8422
language eng
recordid cdi_arxiv_primary_2305_18575
source arXiv.org; Free E- Journals
subjects Algorithms
Benchmarks
Computer Science - Artificial Intelligence
Computer Science - Programming Languages
Graphics processing units
Inference
Machine learning
Mathematical analysis
Power series
Search process
Sequences
Supervised learning
title Search-Based Regular Expression Inference on a GPU
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-07T08%3A11%3A34IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_arxiv&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Search-Based%20Regular%20Expression%20Inference%20on%20a%20GPU&rft.jtitle=arXiv.org&rft.au=Valizadeh,%20Mojtaba&rft.date=2023-05-29&rft.eissn=2331-8422&rft_id=info:doi/10.48550/arxiv.2305.18575&rft_dat=%3Cproquest_arxiv%3E2821120906%3C/proquest_arxiv%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2821120906&rft_id=info:pmid/&rfr_iscdi=true