[Paper Review] Learning Semantic String Transformations from Examples
This paper presents a programming-by-example system that learns semantic string transformations by combining table lookups and syntactic manipulations, enabling non-programmers to automate complex data transformations in spreadsheets. The approach uses an inductive synthesis algorithm to infer correct transformations from just a few input-output examples, achieving high scalability and usability in real-world spreadsheet scenarios.
We address the problem of performing semantic transformations on strings, which may represent a variety of data types (or their combination) such as a column in a relational table, time, date, currency, etc. Unlike syntactic transformations, which are based on regular expressions and which interpret a string as a sequence of characters, semantic transformations additionally require exploiting the semantics of the data type represented by the string, which may be encoded as a database of relational tables. Manually performing such transformations on a large collection of strings is error prone and cumbersome, while programmatic solutions are beyond the skill-set of end-users. We present a programming by example technology that allows end-users to automate such repetitive tasks. We describe an expressive transformation language for semantic manipulation that combines table lookup operations and syntactic manipulations. We then present a synthesis algorithm that can learn all transformations in the language that are consistent with the user-provided set of input-output examples. We have implemented this technology as an add-in for the Microsoft Excel Spreadsheet system and have evaluated it successfully over several benchmarks picked from various Excel help-forums.
Motivation & Objective
- To address the challenge of enabling non-programmers to perform complex, semantically-aware string transformations in spreadsheets.
- To design a transformation language that combines semantic table lookups with syntactic string manipulations for expressive data processing.
- To develop an inductive synthesis algorithm that infers correct transformations from minimal input-output examples, improving usability for end-users.
- To evaluate the system on real-world benchmarks from Excel help forums, demonstrating practical applicability and scalability.
Proposed method
- The paper introduces a lookup transformation language (Lt) that enables semantic string transformations via relational table lookups.
- It extends Lt with syntactic transformations (e.g., string concatenation, regular expression operations) to form a more expressive language Lu.
- A synthesis algorithm is designed to infer all transformations in Lu that are consistent with a given set of input-output examples.
- The algorithm uses a language-theoretic approach to efficiently explore the space of possible transformations without relying on domain-specific knowledge.
- The system is implemented as an Excel add-in and evaluated on real-world examples from public help forums.
- The approach leverages QuickCode for syntactic transformations and integrates it with semantic lookup reasoning.
Experimental results
Research questions
- RQ1Can a programming-by-example system effectively learn semantic string transformations that require understanding of data types like dates, currencies, and relational table entries?
- RQ2How can a synthesis algorithm infer correct transformations from only a few input-output examples while handling both semantic lookups and syntactic manipulations?
- RQ3What is the scalability and practical effectiveness of such a system in real-world spreadsheet use cases?
- RQ4How does combining table lookups with syntactic string operations improve expressiveness compared to purely syntactic or semantic approaches?
Key findings
- The synthesis algorithm successfully learns correct semantic string transformations from as few as two to four input-output examples in real-world Excel scenarios.
- The system handles complex transformations involving multiple table lookups and string manipulations, such as computing price with markup, which cannot be addressed by purely syntactic tools.
- The approach scales well on typical spreadsheet-sized databases, enabling real-time performance for end-user applications.
- Evaluation on benchmarks from public Excel forums confirms the system’s practical utility and robustness across diverse data transformation tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.