Style Knowledge Graph: Augmenting Text Style Transfer with Knowledge Graphs (2025)

Abstract: Text style transfer is the task of modifying the stylistic attributes of a given text while preserving its original meaning. This task has also gained interest with the advent of large language models. Although knowledge graph augmentation has been explored in various tasks, its potential for enhancing text style transfer has received limited attention. This paper proposes a method to create a Style Knowledge Graph (SKG) to facilitate and improve text style transfer. The SKG captures words, their attributes, and relations in a particular style, that serves as a knowledge resource to augment text style transfer. We conduct baseline experiments to evaluate the effectiveness of the SKG for augmenting text style transfer by incorporating relevant parts from the SKG in the prompt. The preliminary results demonstrate its potential for enhancing content preservation and style transfer strength in text style transfer tasks, while the results on fluency indicate promising outcomes with some room for improvement. We hope that the proposed SKG and the initial experiments will inspire further research in the field.

## introduction text style transfer (tst) is the task of modifying particular stylistic features of a text while preserving its original meaning. the task involves rewriting a text to match several stylistic attributes such as sentiment, formality, or politeness without changing the semantic meaning. with the emergence of large language models (llms), their application for tst gained attention primarily focused on prompting techniques @xcite that reduce the need for extensive parallel datasets. other approaches like fine-tuning @xcite , reinforcement learning @xcite , knowledge augmentation @xcite , and others (lai et al., 2024; pan et al., 2024) have also inspired recent research. knowledge graphs (kgs) provide a structured representation of knowledge that enables efficient organization and retrieval across various domains. by integrating structured knowledge from kgs, llms can provide more accurate and contextually relevant outputs. we believe that combining both structured knowledge representation in kgs and the generative capabilities of llms has the potential to improve text style transfer tasks. while augmentation with kgs has been explored for many tasks, to the best of our knowledge, its application in text style transfer remains relatively understudied. existing research is primarily focused on integrating knowledge base information to provide particular words for the desired style @xcite , similar sentences to the input to provide context @xcite or guidelines for the desired style @xcite . to combine the advantages of both approaches and facilitate further research in the field, we propose a style knowledge graph (skg) for text style transfer. the skg is designed to capture words, their attributes, and relations for various styles with the aim of providing a source of knowledge that can enhance text style transfer. to evaluate the effectiveness of the proposed skg we perform several prompting experiments where parts of the proposed skg, that are relevant to the particular input sentence, are provided in the prompt. an example of the used prompts is shown in the main contributions of the paper are: (1) we propose a knowledge graph for text style transfer, which we refer to as a style knowledge graph (skg). (2) we evaluate the effectiveness of augmenting text style transfer with skg via prompting. the rest of the paper is organized as follows. a brief introduction of previous text style transfer methods and knowledge augmentation is presented in section 2. the definition and creation process of skg is provided in section 3. the preliminary experiments and baseline results are presented in section 4 and section 5, respectively. section 6 concludes the paper. ## related work before the advent of llms, tst methods commonly employed encoder-decoder architectures @xcite , generative adversarial networks (gans) @xcite , and reinforcement learning (rl) @xcite . the methods based on encoder-decoder comprise an encoder to produce a style-neutral representation and a decoder to generate a sentence in the desired style, often augmented by additional components such as style classifiers @xcite @xcite , and style embeddings @xcite . gan-based approaches use a generator to produce a sentence in the target style trained with adversarial objectives @xcite @xcite . rl-based approaches use a reward-based system to generate sentences in the desired style, by using multi-part rewards combining content preservation, style change, and fluency @xcite . prompting techniques are among the first approaches for text style transfer with llms, that explore zero-shot and few-shot techniques. augmented zero-shot @xcite explores a vanilla prompt that specifies the target style augmented with a single set of exemplars within the prompt to include a variety of sentence rewriting operations instead of exemplars specific to the target style. in addition to the vanilla prompt, prompt&rerank @xcite explores a contrastive prompt to specify both the source and the target style that create a clear contrast between them, and two negation prompts to specify the target style as a negation of the source style and vice versa. several approaches focus on editing the input sentence via prompting. promptedit, assesses tst as a text classification task with the goal of generating candidate sentences with an edit-based search algorithm that employs insertion, deletion, and replacement as edit operations, and then determining a style score for them with an llm @xcite . pegf utilizes two-way prompting that first identifies stylistic words as words with a score higher than a particular threshold via an initial prompt and then edits those stylistic words via implicit or explicit masking with a second prompt @xcite . generative capabilities or edit-based techniques, our approach aims to provide structured knowledge in the form of word suggestions to assist the llm in the word choices for the output sentence. the combination of knowledge graphs and llms opens new directions for further research in the domain. ## results and discussion in this section, we present the main results for the proposed approach of augmenting text style transfer with skg which we hope to serve as a baseline for comparison of further research in the field. due to space limitations, we present only the results for formality transfer. for the results on the other datasets and results with other llms for the formality transfer task on the gyafc dataset, we encourage the reader to refer to the appendix. ## conclusion in this paper, we proposed a style knowledge graph for augmenting text style transfer using large language models. the skg captures words, their attributes, and relations in a particular style to provide additional information for the task. we conducted preliminary experiments with prompting where the relevant part of the skg was added as part of the prompt. the evaluation results demonstrated the potential of this method for enhancing content preservation and accuracy while highlighting areas for further improvement, particularly in fluency. we hope that this research will inspire further research in the field, extending beyond prompting to investigate new approaches and methodologies for text style transfer. skgs have the potential to augment other text generation tasks beyond text style transfer, for example by guiding the model to generate more coherent summaries based on the selection of key parts of the input. we hope that future research will further explore this direction for skgs for more context-aware and reliable text generation.