Personalized Text Generation with Fine-Grained Linguistic Control (2024)

Abstract: As the text generation capabilities of large language models become increasingly prominent, recent studies have focused on controlling particular aspects of the generated text to make it more personalized. However, most research on controllable text generation focuses on controlling the content or modeling specific high-level/coarse-grained attributes that reflect authors’ writing styles, such as formality, domain, or sentiment. In this paper, we focus on controlling fine-grained attributes spanning multiple linguistic dimensions, such as lexical and syntactic attributes. We introduce a novel benchmark to train generative models and evaluate their ability to generate personalized text based on multiple fine-grained linguistic attributes. We systematically investigate the performance of various large language models on our benchmark and draw insights from the factors that impact their performance. We make our code, data, models, and benchmarks publicly available.

## introduction with the evolution of large language models (llms), applications involving text generation have become increasingly prominent @xcite . in recent years, there has been a flurry of writing and conversational assistants that harness the power of llms at each stage of the writing lifecycle @xcite . at the same time, there has been a significant emphasis on research that enables the generation of personalized text -text that reflects the author's style and content more accurately. for instance, figure 1 presents two movie reviews that are conveyed in different ways. the reviews differ linguistically in terms of the number of tokens and the distributions of adverbs, adjectives, and nouns. several works explore the personalization of various nlp tasks such as lexical simplification (lee figure 1 : an example highlighting the stylistic linguistic differences between two reviews about the oppenheimer movie. the bar chart indicates the frequencies of the adverbs (adv), nouns (noun), adjectives (adj), and the number of tokens (# tokens). the blue and red bars represent the frequencies based on the reviews written by author 1 and author 2, respectively. and yeung, 2018; @xcite , dialogue modeling @xcite @xcite @xcite , machine translation @xcite , grammatical error correction @xcite , summarization @xcite , and title generation @xcite among others. however, a key question remains unanswered: how effective are llms at personalizing the text they generate? while undoubtedly, there has been a lot of work on controllable text generation (e.g., using either control codes @xcite or adapters @xcite ), many of these works model the author's style either by using • benchmark we introduce a benchmark for the task of personalized text generation with fine-grained linguistic control. ## benchmark construction in this section, we discuss the construction process of our benchmark in terms of datasets, linguistic attributes, and evaluation metrics. ## models to evaluate our proposed benchmark and given the ubiquitous adoption of causal language models (clms) for various nlp tasks recently, we con-sider the models from the pythia scaling suite @xcite . the suite comprises eight models with sizes ranging from 70m to 1b parameters. all the models are based on the gpt-neo architecture @xcite , which is an opensource replication of @xcite . the models were pretrained using the pile dataset @xcite , an 825gb english dataset containing texts from 22 diverse sources, roughly broken down into five categories: academic writing, internet, prose, dialogue, and miscellaneous. all the pythia models were pretrained on the same data. in this work, we use the 70m, 160m, and 1b pythia models. ## experiments and results in this section, we present the results of various models along with an investigation into the model's sensitivity to the attributes. we also explore how the training sample size influences the model's performance. ## conclusion and future work we presented a novel benchmark to train and evaluate the ability of llms to generate personalized text based on multiple linguistic attributes. while existing research predominantly concentrates on content control or modeling specific writing style elements, our work stands out by focusing on nuanced stylistic attributes across diverse linguistic dimensions. we systematically investigate the performance of various llms and draw insights from the factors that drive such performance. we make our code, data, and pretrained models publicly available to encourage research on personalization and controlling llms. in future work, we plan to explore the use of other pretrained llms, and to extend the linguistic features that are covered in our benchmark.