Transduce: learning transduction grammars for string transformation

Francis Frydman,Philippe Mangion
2023-12-14
Abstract:The synthesis of string transformation programs from input-output examples utilizes various techniques, all based on an inductive bias that comprises a restricted set of basic operators to be combined. A new algorithm, Transduce, is proposed, which is founded on the construction of abstract transduction grammars and their generalization. We experimentally demonstrate that Transduce can learn positional transformations efficiently from one or two positive examples without inductive bias, achieving a success rate higher than the current state of the art.
Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to automatically synthesize string transformation programs from input - output examples. Specifically, the authors propose a new algorithm, Transduce, which aims to efficiently learn positional transformations by constructing and generalizing abstract transduction grammars without inductive bias. This is different from existing methods, which usually rely on the combination of a restricted set of basic operators for inductive reasoning. ### Main problems and solutions in the paper 1. **Problem background**: - String transformation is an important area of automatic program synthesis, especially in commercial applications, such as the FlashFill feature in Microsoft Excel. - Existing methods rely on inductive bias, that is, selecting a set of basic operators to combine into the final program. Although this method is effective, it limits the learnable program space and may require more examples to successfully learn. 2. **Proposed new method**: - **Transduce algorithm**: This algorithm is based on the construction and generalization of abstract transduction grammars and can efficiently learn positional transformations without inductive bias. - **Experimental results**: The authors show through experiments that Transduce can learn positional transformations with a higher success rate than the current state - of - the - art methods with only one or two positive examples. Specifically, the success rate of Transduce is 88.64%, while that of FlashFill is 75%. 3. **Key concepts**: - **Rational Transduction**: Word transformation defined by a finite - state transducer or a rational relation. - **Transduction Grammar Rule**: It not only checks whether a word belongs to a rational language but also performs a given transformation on the word to generate a new word. - **Abstract Transduction Grammar Rule**: The first and last parameters in the rule are variables, and the intermediate parameters can be constants, bound variables, or anonymous variables. 4. **Workflow**: - **Learning phase**: It includes four steps: constructing transformation rules, abstracting transformation rules, encoding into integer sequences, and compressing and generalizing these sequences. - **Inference phase**: Construct corresponding transformation rules according to the length of the input list and execute them. 5. **Handling insertion and deletion**: - By introducing the concept of transduction constants, Transduce can handle the insertion and deletion operations of elements. ### Summary The main contribution of the paper is to propose a new algorithm, Transduce, which can efficiently learn string transformations without inductive bias, especially good at handling positional transformation tasks. Verified by experiments, Transduce is superior to existing methods such as FlashFill in terms of success rate and the number of required examples.