Membership Testing for Semantic Regular Expressions
Yifei Huang, Matin Amini, Alexis Le Glaunec, Konstantinos Mamouras, Mukund Raghothaman
摘要
This paper is about semantic regular expressions (SemREs). This is a concept that was recently proposed by Chen et al. [9] in which classical regular expressions are extended with a primitive to query external oracles such as databases and large language models (LLMs). SemREs can be used to identify lines of text containing references to semantic concepts such as cities, celebrities, political entities, etc. The focus in their paper was on automatically synthesizing semantic regular expressions from positive and negative examples. In this paper, we study the membership testing problem:
(1) We present a two-pass NFA-based algorithm to determine whether a string
) time, assuming the oracle responds to each query in unit time. In common situations, where oracle queries are not nested, we show that this procedure runs in
Experiments with a prototype implementation of this algorithm validate our theoretical analysis, and show that the procedure massively outperforms a dynamic programming-based baseline, and incurs a ≈ 2× overhead over the time needed for interaction with the oracle. (2) We establish connections between SemRE membership testing and the triangle finding problem from graph theory, which suggest that developing algorithms which are simultaneously practical and asymptotically faster might be challenging. Furthermore, algorithms for classical regular expressions primarily aim to optimize their time and memory consumption. In contrast, an important consideration in our setting is to minimize the cost of invoking the oracle. We demonstrate an Ω(|𝑤 | 2 ) lower bound on the number of oracle queries necessary to make this determination.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Data Extraction via Semantic Regular Expression Synthesis 引用了 CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
- Data Extraction via Semantic Regular Expression Synthesis 引用了 Semantic programming by example with pre-trained models
- Data Extraction via Semantic Regular Expression Synthesis 引用了 Binding Language Models in Symbolic Languages
它引用的 Paper7
- CodeGen: An Open Large Language Model for Code with Multi-Turn Program SynthesisErik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu 等ICLR 2023 · 234 次引用
- Prompting Is Programming: A Query Language for Large Language ModelsLuca Beurer-Kellner, Marc Fischer, Martin T. VechevPLDI 2023 · 114 次引用
- Binding Language Models in Symbolic LanguagesZhoujun Cheng, Tianbao Xie, Peng Shi, Chengzu Li 等ICLR 2023 · 38 次引用
- Semantic programming by example with pre-trained modelsGust Verbruggen, Vu Le, Sumit GulwaniOOPSLA 2021 · 26 次引用
- Data Extraction via Semantic Regular Expression SynthesisQiaochu Chen, Arko Banerjee, Çagatay Demiralp, Greg Durrett 等OOPSLA 2023 · 24 次引用
相关 Paper
- Efficient Matching of Regular Expressions with Lookaround AssertionsKonstantinos Mamouras, Agnishom ChattopadhyayPOPL 2024 · 19 次引用
- Sparse Regular Expression MatchingPhilip Bille, Inge Li GørtzSODA 2024 · 2 次引用
- Automated Discovery of Test Oracles for Database Management Systems Using LLMsQiuyang Mang, Runyuan He, Suyang Zhong, Xiaoxuan Liu 等SIGMOD 2026 · 1 次引用
- Regular Path Query Evaluation Sharing a Reduced Transitive Closure Based on Graph ReductionInju Na, Yang-Sae Moon, Ilyeop Yi, Kyu-Young Whang 等ICDE 2022 · 10 次引用
- Non-neural Models Matter: a Re-evaluation of Neural Referring Expression Generation SystemsFahime Same, Guanyi Chen, Kees van DeemterACL 2022 · 13 次引用
