Self-Supervised Sentence Polishing by Adding Engaging Modifiers (2023)

Abstract: Teachers often guide students to improve their essays by adding engaging modifiers to polish the sentences. In this work, we present the first study on automatic sentence polishing by adding modifiers. Since there is no available dataset for the new task, we first automatically construct a large number of parallel data by removing modifiers in the engaging sentences collected from public resources. Then we fine-tune LongLM to reconstruct the original sentences from the corrupted ones. Considering that much overlap between inputs and outputs may bias the model to completely copy the inputs, we split each source sentence into sub-sentences and only require the model to generate the modified sub-sentences. Furthermore, we design a retrieval augmentation algorithm to prompt the model to add suitable modifiers. Automatic and manual evaluation on the auto-constructed test set and real human texts show that our model can generate more engaging sentences with suitable modifiers than strong baselines while keeping fluency. We deploy the model at http://coai.cs.tsinghua.edu.cn/static/polishSent/ . A demo video is available at https://youtu.be/Y6gFHOgSv8Y .

## introduction teachers' guidance is necessary for students to improve their essays in primary and secondary writing education. for example, teachers can point out potential logical errors and incoherence issues, and polish sentences to improve the engagingness of the essays. a typical way to polish sentences is to add engaging modifiers (e.g., from "i ate a pear" to "i ate a big pear enjoyably"), which usually are adjectives or adverbs that enhance the meaning of a sentence @xcite . since an essay usually contains tens of sentences, it is a heavy burden for teachers to polish each one. to reduce ## dataset construction we formulate our task as follows: given three consecutive sentences m, s, n , the model should output a polished sentence t that is more engaging than s while maintaining the original meaning of s and the coherence along with m and n . since there are no available data for this task, we construct a new dataset through automatic annotation. ## methodology an overview of our model is shown in figure 1 . we build our model on longlm large @xcite for the sentence polishing task, which is an encoder-decoder model pretrained on chinese novels with 1 billion parameters. considering the significant overlap between the source sentence s and the polished sentence t , we split s into several sub-sentences by commas and require the model to generate only the modified sub-sentences. we describe the detailed input-output format in §4.1. moreover, we retrieve relevant modifiers from the training corpus, which are taken as input for both training and inference to help the model find suitable modifiers. we show the retrieval augmentation algorithm in §4.2. ## demonstration we have deployed our model online to automatically polish the source sentence given its context. figure 2 shows a screenshot of our demo website. users need to enter the source sentence and its preceding and subsequent sentences. note that the source sentence is mandatory but its context can be empty. then users can submit the request and the result will be returned after a few seconds. we show the polished sentence at the bottom of the page, and the retrieved modifiers for reference. ## conclusion we propose a new task named sentence polishing, which requires polishing a given sentence while 504 maintaining fluency and coherence with the context. to this end, we construct about 160k parallel examples by removing modifiers in collected engaging sentences. then we fine-tune longlm to reconstruct the original sentences from the corrupted ones by generating the modified sub-sentences. we also propose a retrieval augmentation algorithm to retrieve engaging modifiers from the training set, which can help generate suitable modifiers. automatic and manual evaluation demonstrate strong performance of our model to generate engaging sentences. we have deployed our model online for public use. although we focus on adding modifiers in this paper, the perturbation-and-reconstruction framework can be potentially adapted to other polishing techniques such as adding metaphors, which is left as future work. moreover, although we train our model on collected chinese data, we believe the method can be easily transferred to other languages. a distance, the peach blossoms are dotted, like a group of petite and cute little girls. from a close point of view, this peach blossom is just like the girl who closes the moon and shy flowers, singing and dancing softly in the wind, and the feminine posture sways with the wind.) retrieved phrases: 沉闷的惊雷，贪婪地吮吸， 热情的迎春花，充分地展示，火辣辣的阳光... (dull thunder, greedily suck, enthusiastic spring flowers, fully show, fiery sunlight...)