doi
stringlengths
10
10
chunk-id
stringlengths
1
4
chunk
stringlengths
1
1.66k
id
stringlengths
10
10
title
stringlengths
19
148
summary
stringlengths
345
1.92k
source
stringlengths
31
31
authors
list
categories
list
comment
stringlengths
4
284
journal_ref
stringclasses
14 values
primary_category
stringclasses
16 values
published
stringlengths
8
8
updated
stringlengths
8
8
references
list
1801.04871
35
meal=dinner, location=near the theatre)Find restaurant with meal is dinner and location is near the theatre.I want to get dinner at a restaurant near the theatre. S: request(cuisine, price range) Provide cuisine and price range.Do you have any preference for cuisine or price range? U: inform(cuisine=DontCare, price range=moderate, rating=high)Cuisine is I don’t care and price range is moderate and rating is high.I’m fine with any cuisine. Look for something moderately priced, but make sure it has a high rating. S: select(restaurant= fFirst Wok, Lucy’s Grillg, location=near the theatre)Select restaurant from First Wok, Lucy’s Grill with location is near the theatre.First Wok and Lucy’s Grill are some good options near the theatre. U: inform(intent=reserve restaurant, restaurant=First Wok, time=after the movie)Reserve restaurant with restaurant is First Wok and time is after the movie.First Wok sounds perfect. Can you reserve a table there for dinner after the movie? S: ack() confirm(restaurant=First
1801.04871
Building a Conversational Agent Overnight with Dialogue Self-Play
We propose Machines Talking To Machines (M2M), a framework combining automation and crowdsourcing to rapidly bootstrap end-to-end dialogue agents for goal-oriented dialogues in arbitrary domains. M2M scales to new tasks with just a task schema and an API client from the dialogue system developer, but it is also customizable to cater to task-specific interactions. Compared to the Wizard-of-Oz approach for data collection, M2M achieves greater diversity and coverage of salient dialogue flows while maintaining the naturalness of individual utterances. In the first phase, a simulated user bot and a domain-agnostic system bot converse to exhaustively generate dialogue "outlines", i.e. sequences of template utterances and their semantic parses. In the second phase, crowd workers provide contextual rewrites of the dialogues to make the utterances more natural while preserving their meaning. The entire process can finish within a few hours. We propose a new corpus of 3,000 dialogues spanning 2 domains collected with M2M, and present comparisons with popular dialogue datasets on the quality and diversity of the surface forms and dialogue flows.
http://arxiv.org/pdf/1801.04871
[ "Pararth Shah", "Dilek Hakkani-Tür", "Gokhan Tür", "Abhinav Rastogi", "Ankur Bapna", "Neha Nayak", "Larry Heck" ]
[ "cs.AI", "cs.CL" ]
11 pages, 4 figures
null
cs.AI
20180115
20180115
[ { "id": "1801.04871" }, { "id": "1709.00103" }, { "id": "1712.01815" }, { "id": "1705.06476" }, { "id": "1704.00057" } ]
1801.04871
36
movie.First Wok sounds perfect. Can you reserve a table there for dinner after the movie? S: ack() confirm(restaurant=First Wok, time=8pm, num people=2)OK. Confirm restaurant is First Wok and time is 8pm and num people is 2.Sure. Please confirm that it is a table for 2 at First Wok for 8pm. U: affirm() Agree. That is correct. S: notify success() Reservation confirmed. Your table has been reserved. U: thank you() good bye() Thank you and good bye. Thanks! That’s all for now. Figure 3: Contextual rewrite task interface for paraphrasing a dialogue outline with natural language.
1801.04871
Building a Conversational Agent Overnight with Dialogue Self-Play
We propose Machines Talking To Machines (M2M), a framework combining automation and crowdsourcing to rapidly bootstrap end-to-end dialogue agents for goal-oriented dialogues in arbitrary domains. M2M scales to new tasks with just a task schema and an API client from the dialogue system developer, but it is also customizable to cater to task-specific interactions. Compared to the Wizard-of-Oz approach for data collection, M2M achieves greater diversity and coverage of salient dialogue flows while maintaining the naturalness of individual utterances. In the first phase, a simulated user bot and a domain-agnostic system bot converse to exhaustively generate dialogue "outlines", i.e. sequences of template utterances and their semantic parses. In the second phase, crowd workers provide contextual rewrites of the dialogues to make the utterances more natural while preserving their meaning. The entire process can finish within a few hours. We propose a new corpus of 3,000 dialogues spanning 2 domains collected with M2M, and present comparisons with popular dialogue datasets on the quality and diversity of the surface forms and dialogue flows.
http://arxiv.org/pdf/1801.04871
[ "Pararth Shah", "Dilek Hakkani-Tür", "Gokhan Tür", "Abhinav Rastogi", "Ankur Bapna", "Neha Nayak", "Larry Heck" ]
[ "cs.AI", "cs.CL" ]
11 pages, 4 figures
null
cs.AI
20180115
20180115
[ { "id": "1801.04871" }, { "id": "1709.00103" }, { "id": "1712.01815" }, { "id": "1705.06476" }, { "id": "1704.00057" } ]
1801.04871
37
Figure 4: Dialogue quality evaluation task interface for rating the user and system turns of completed dialogues.
1801.04871
Building a Conversational Agent Overnight with Dialogue Self-Play
We propose Machines Talking To Machines (M2M), a framework combining automation and crowdsourcing to rapidly bootstrap end-to-end dialogue agents for goal-oriented dialogues in arbitrary domains. M2M scales to new tasks with just a task schema and an API client from the dialogue system developer, but it is also customizable to cater to task-specific interactions. Compared to the Wizard-of-Oz approach for data collection, M2M achieves greater diversity and coverage of salient dialogue flows while maintaining the naturalness of individual utterances. In the first phase, a simulated user bot and a domain-agnostic system bot converse to exhaustively generate dialogue "outlines", i.e. sequences of template utterances and their semantic parses. In the second phase, crowd workers provide contextual rewrites of the dialogues to make the utterances more natural while preserving their meaning. The entire process can finish within a few hours. We propose a new corpus of 3,000 dialogues spanning 2 domains collected with M2M, and present comparisons with popular dialogue datasets on the quality and diversity of the surface forms and dialogue flows.
http://arxiv.org/pdf/1801.04871
[ "Pararth Shah", "Dilek Hakkani-Tür", "Gokhan Tür", "Abhinav Rastogi", "Ankur Bapna", "Neha Nayak", "Larry Heck" ]
[ "cs.AI", "cs.CL" ]
11 pages, 4 figures
null
cs.AI
20180115
20180115
[ { "id": "1801.04871" }, { "id": "1709.00103" }, { "id": "1712.01815" }, { "id": "1705.06476" }, { "id": "1704.00057" } ]
2205.11503
0
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models Mirac Suzgun* Stanford University [email protected] Melas-Kyriazi* Oxford University [email protected] Jurafsky Stanford University [email protected] Abstract We propose a method for arbitrary textual style transfer (TST)—the task of transforming a text into any given style—utilizing generalpurpose pre-trained language models. Our method, Prompt-and-Rerank , is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity ,target style strength , and fluency . Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
1
while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.1 1 Introduction Textual style transfer (TST) refers to the task of transferring one stylistic aspect of a piece of text (e.g., sentiment attribute, formality, politeness, etc.) without changing its main semantic content, structure, or other attributes. Traditionally, the natural language generation (NLG) community has approached each instantiation of style transfer as a distinct task, designing and training specialized models on style-specific training corpora. For example, sentiment transfer has been studied extensively (Li et al. (2018); Sudhakar et al. (2019); Luo et al. (2019a), inter alia ). This paradigm has restricted TST research to a limited, simple set of style choices with parallel corpora, which can often be solved adequately by word replacement (e.g., replacing negative words with corresponding positive words for sentiment transfer). 1Our code, data, and results are available at https:// github.com/suzgunmirac/prompt-and-rerankSentiment Transfer
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
2
words for sentiment transfer). 1Our code, data, and results are available at https:// github.com/suzgunmirac/prompt-and-rerankSentiment Transfer Input the food was low quality and thrown together quickly with little flavor. [Neg] GPT-J-6B the food was delicious and prepared with a lot of care! [Pos] Input the staff is awesome and location is right in the heart of old town! [Pos] GPT-J-6B the staff is terrible and location is in the middle of nowhere! [Neg] Elizabethan!Modern English Translation Inputthou hast quar rell’d with a man for coughing in the street, because he hath wakened thy dog that hath lain asleep in the sun. [Elizabethan] GPT-J-6Byou have cursed a man because he’s coughed in the street, because he has woken your dog, which has been sleeping in the sun. [ModernEng] Input if thou art fickle, what dost thou with him that is renown’d for faith? [Elizabethan] GPT-J-6Bif you are fickle, then what are you doing with that person who is known for being reliable? [ModernEng] Fluency and Grammar Correction
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
3
being reliable? [ModernEng] Fluency and Grammar Correction Input Forexample, My cousin is 12years old. [Ungrammatical] GPT-J-6B For example, My cousin is twelve years old. [Grammatical] Formality Transfer Input r u talking about ur avatar? [Informal] GPT-J-6B are you talking about your avatar? [Formal] Table 1: Qualitative examples of few-shot style transfer on the YELP,SHAKESPEARE ,JFLEG , and GYAFC datasets. Coupling off-the-shelf “small” language models with our promptand-reranking method enables us to perform arbitrary textual style transfer without any model training or prompt-tuning. Compared to the extremely large language models (viz., ones with more than 100 billion parameters) used by Reif et al. (2022), our models obtain similar performance using almost two orders of magnitude less compute and memory. With the recent success of general-purpose language modeling (LM), it is, however, natural to ask whether one can tackle a more general formulation of style transfer: arbitrary TST, in which one aims to transform a reference text into an arbitrary style specified by the user at inference-time.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
4
of style transfer: arbitrary TST, in which one aims to transform a reference text into an arbitrary style specified by the user at inference-time. Inspired by the success of natural-language prompting in other domains (Radford et al., 2019; Petroni et al., 2019; Brown et al., 2020; Gao et al., 2021), we consider a prompting-based zero- and few-shot approach to arbitrary TST. Under this setup, we specify the desired type of style transfer problem using a natural-language prompt containing the source text (and optionally a few examples, in the few-shot case), and then use a pre-trained LM to generate the stylized target text. Thus, the source text may be transformed into any user-specified style without additional training or fine-tuning. Recent work (Reif et al., 2022) has found that extremely large language models (LLMs), namely the 175 billion-parameter GPT-3 (Brown et al., 2020)arXiv:2205.11503v1 [cs.CL] 23 May 2022 model and the proprietary 137 billion-parameter LLM model, are capable of sentiment and formality transfer. However, language models at this scale
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
5
model and the proprietary 137 billion-parameter LLM model, are capable of sentiment and formality transfer. However, language models at this scale are not accessible to most researchers and practitioners, even in inference-only settings, due to their large memory consumption and slow generation times. Thus far, to the best of our knowledge, there has not been any research on the capabilities of reasonably-sized models for style transfer domain, nor any systematic study of how the precise construction of the prompt affects model performance. Differently from past work, this present paper takes a first-principles approach to arbitrary TST using pretrained language models. We first mathematically formalize the task, showing how it can be formulated as the combination of textual similarity , target style strength , and fluency . This framework naturally leads us to propose a new method for arbitrary TST, which we call “ Prompt-and-Rerank .” Using this method, we demonstrate, for the first time, that it is possible to perform arbitrary TST using small language models; prior work indicated that only enormous (i.e., GPT-3-scale) language models were capable of this task. We summarize the main contributions and insights of this paper as follows: (i) We provide the
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
6
models were capable of this task. We summarize the main contributions and insights of this paper as follows: (i) We provide the first mathematical formalization of the arbitrary TST task. (ii) We propose Prompt-and-Rerank, a novel prompting-based method for arbitrary TST which follows naturally from our mathematical formulation. (iii) Our method matches and sometimes even exceeds state-of-the-art performance on arbitrary TST while using small language models such as GPT-2, which consume two orders of magnitude less memory and compute than prior work. (iv) We conduct a nuanced investigation of the influence of prompt design, such as task phrasing and delimiter-pair choice, on the quality of style transfer generations. (v) In order to encourage and facilitate further research in the area, we establish a set of benchmarks for arbitrary TST (including cleaned versions of the popular sentiment transfer datasets AMAZON andYELP) along with accompanying automatic evaluation metrics. 2 Background and Related Work Background. TST is a long-standing problem in NLP which encompasses many popular sub-tasks, such as sentiment and formality transfer. Prior to the advent of large-scale pre-training in recent years, it was common practice to consider each
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
7
such as sentiment and formality transfer. Prior to the advent of large-scale pre-training in recent years, it was common practice to consider each of these sub-tasks separately, and to train sepa-rate models on different supervised datasets for each task. These models generally performed well within the limited scope of their task, but failed to generalize to new tasks or to texts outside of their training distribution. Here we show that the modern paradigm of pre-training large models and then prompting (or fine-tuning) them can be applied to many sub-tasks of TST in a unified, zero-shot manner, even with relatively small Transformers. Related Work. Traditional approaches to TST can be broadly categorized into two families. The first family involves identifying and replacing distinctive style-related phrases (Li et al. (2018); Sudhakar et al. (2019); Wu et al. (2019); Madaan et al. (2020); Malmi et al. (2020); Reid and Zhong (2021), inter alia ). For example, Madaan et al. (2020) perform the task of politeness transfer by first identifying words with stylistic attributes using TF-IDF and then training a model to replace
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
8
(2020) perform the task of politeness transfer by first identifying words with stylistic attributes using TF-IDF and then training a model to replace or augment these stylistic words with ones associated with the target attribute. In general, these approaches perform well for very simple style edits (e.g., negating a sentence by adding the word not), but they struggle in scenarios that require more complex syntactic and semantic changes. The second family of approaches involves disentangling latent representations of style and content, such that a text can be encoded into a styleinvariant representation and then decoded in a desired style (Hu et al., 2017; Shen et al., 2017; Fu et al., 2018; Luo et al., 2019a). For example, Hu et al. (2017) encodes into and decodes from a styleagnostic latent space using a V AE alongside attribute discriminators. These approaches are often theoretically well-grounded, but they generally require large quantities of labeled data and struggle to scale beyond a small number of styles. Differently from these two families, one recent work (Reif et al., 2022) uses enormous pre-trained language models to tackle TST, an idea motivated by the remarkable performance of pre-trained LMs in other areas of NLP (Radford et al., 2019; Devlin
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
9
language models to tackle TST, an idea motivated by the remarkable performance of pre-trained LMs in other areas of NLP (Radford et al., 2019; Devlin et al., 2019; Yang et al., 2019; Liu et al., 2019). Specifically, they use LLM ,LLM-Dialog , and GPT3, each of which has over 100 billion parameters, to rewrite texts in a variety of styles. However, they perform minimal analysis of their prompting setup, deferring such analysis to future work, and they suggest that this prompting-based approach is only feasible with LLMs.2 2A note on terminology : We shall refer to GPT-3 (Brown 2 This paper presents a novel prompt-and-rerank approach to the general task of textual style transfer using pre-trained language models. Alongside our method, we present the first systematic study of prompt formulation and model size for the task of textual style transfer. Contrary to expectations, using our method we find that even small LMs are able to effectively perform arbitrary style transfer. In fact we match the performance of Reif et al. (2022) on multiple datasets using two orders of magnitude less memory and compute. 3 Method: Prompt-Based Arbitrary TST
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
10
(2022) on multiple datasets using two orders of magnitude less memory and compute. 3 Method: Prompt-Based Arbitrary TST This section begins with a mathematical formalization of the task of textual style transfer.3Our formalization elucidates the three underlying components of the task, namely text similarity ,target style strength , and fluency , and naturally leads us to Prompt-and-Rerank , our prompt-based re-ranking algorithm for solving TST. 3.1 Problem Formulation Letx2denote a text over a vocabulary , and Sthe set of all possible text style choices. Let us further use x(s1)2to denote a text xwritten in the styles12S. Informally speaking, the goal of TST is to transfer the style of a text x(s1)(usually, a sentence) from s1tos2without changing the main semantic content of the text. We can formally express this transformation via a function f: SS! , which takes an input text (sayx(s1)) and its corresponding style ( s1), as well as a target style ( s2), and outputs a modified version of the input written in the style of s2(namely,
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
11
as a target style ( s2), and outputs a modified version of the input written in the style of s2(namely, ~x(s2)).4Ideally, we would want the generated output~x(s2)=f(x(s1);s1;s2)to be “close” (both semantically and syntactically) to the ground-truth x(s2)as much as possible. The graphical models depicted in Figure 1 provide two different ways of formulating the task of et al., 2020) and similar models with 100 billion model parameters as large language models (LLMs), and the versions of GPT-2 and GPT-J—ranging from OpenAI’s GPT-2-Small (117M) to EleutherAI’s GPT-J-6B—which are two-to-three orders of magnitude smaller than GPT-3, as small language models (SLMs). 3Despite its important role in NLG, we are not aware of any prior formal statement of the (textual) style transfer problem. Here, we hope to solidify the problem formulation and illustrate the a connection between this problem formulation and the automatic metrics used in the field to evaluate TST models.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
12
illustrate the a connection between this problem formulation and the automatic metrics used in the field to evaluate TST models. 4In cases where the original style of the input text might not be known a priori, one can either estimate the style of the input using a statistical classifier or assume that the input is written in a neutral style.xs2 s1 ~x(s2)x(s1)xs2 s1 ~x(s2)x(s1) Figure 1: Two different but equally meaningful and valid interpretations of the textual style transfer task. Here xcan be thought as the universal (abstract) meaning of a text, x(s1)a rewrite of xin the style of s1. Depending on which graphical model one adheres to, x(s2)can be said to generated by xand s2(left model) or by x(s1)ands2(right model). In this paper, we follow the second interpretation. TST (and of machine translation for that matter). Both models have valid and meaningful implications and interpretations; the main generative difference between them is that the parents of ~x(s2)are xands2in the former (left), whereas the parents
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
13
xands2in the former (left), whereas the parents of~x(s2)arex(s1)ands2in the latter (right). Due to the inherent difficulty of collecting diverse supervised data for arbitrary TST, most prior studies considered a simplified version of the task, wherein the source ( s1) and target (s2) style choices are fixed beforehand. In this work, we consider a broad formulation of the task, make no assumptions about the source and target style choices a priori, and explain how one can leverage the power of off-the-shelf LMs to perform arbitrary TST. Given an input text x(s1)written in the style ofs1and the target style s2, we decompose the conditional likelihood of a generated output ~x(s2) into three terms:5 p(~x(s2)j[x(s1);s1];s2) (1) =p(~x(s2);[x(s1);s1];s2) p([x(s1);s1];s2) /p([x(s1);s1];[~x(s2);s2])
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
14
p([x(s1);s1];s2) /p([x(s1);s1];[~x(s2);s2]) =p([x(s1);s1]j[~x(s2);s2])p([~x(s2);s2]) =p([x(s1);s1]j[~x(s2);s2])| {z } textual similarityp(s2j~x(s2))| {z } transfer strengthp(~x(s2))|{z} fluency The first term, p([x(s1);s1]j[~x(s2);s2]), can be thought as a measure of textual similarity between the input text and the generated output. The second term,p(s2j~x(s2)), measures the transfer strength of the output (i.e., determines whether the output is written in the target style). The last term, p(~x(s2)), measures the overall fluency of the output. 5We make use of the brackets “ []” only to group relevant terms (e.g., x(s1);s1) together; they do not have any statistical
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
15
terms (e.g., x(s1);s1) together; they do not have any statistical significance in this context. 3 Output-1Output-2Output-3Output-4Output-5PromptLM(GPT-2) BERTScoreTextual SimilarityMLM (RoBERTa)Style ClassifierGPT-2-LargeFluencyxxxxxxxxxxRe-score and re-rank the outputs.Pick the highest scoring output.Given the input text, source style, andtarget style, write a proper prompt. Generate multiple outputsusing beam search.Output-3InputSource StyleTarget StyleFigure 2: An illustration of our Prompt-and-Rerank method. Given an input text and the style transformation, we first compose a prompt and feed it to a pretrained language model to generate multiple output texts—conditioned on the prompt—using beam search. We then re-score each candidate output along the three axes from Eq. (1): textual similarity ,style transfer strength , and fluency . We choose the candidate with the highest re-ranked score as our final output. 3.2 Prompt-and-Rerank for Arbitrary TST The problem formulation above naturally leads us to a method for (textual) style transfer, which we
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
16
3.2 Prompt-and-Rerank for Arbitrary TST The problem formulation above naturally leads us to a method for (textual) style transfer, which we denote Prompt-and-Rerank (P&R). The foundation of our method is use of prompt templates to convert TST into a natural-language generation problem. Formally, we use a predefined template2T to convert an input text x(s1)and the desired style transformation (i.e., s1!s2) into a natural-language prefix (x;s1;s2). The templateserves to not only contextualize the task for the model but also incorporate all the necessary conditional information (that is, input sentence, source style, and target style) in the input context. The precise design and composition of the templates is the topic of the following section (§4.2).6 Next, we feed the prompt into a pre-trained LM (e.g., GPT-2) and use the model to generate kdifferent outputs ~x(s2) kconditioned on the prompt, each sampled independently without updating any parameters of the model. These outputs are taken to be our candidate outputs for re-ranking.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
17
kconditioned on the prompt, each sampled independently without updating any parameters of the model. These outputs are taken to be our candidate outputs for re-ranking. Finally, we re-rank our kcandidate outputs according to the decomposition in Equation 1: preranking (~x(s2) ij[x(s1);s1];s2) (2) /p([x(s1);s1]j[~x(s2) i;s2])p(s2j~x(s2) i)p(~x(s2) i): And finally, we pick the output ~x(s2) i2~Xwith the highest re-ranking score. (Figure 2 provides an abstract illustration of our re-ranking algorithm.) All that remains is to describe how to calculate each term in the re-ranking pass. (i) To calculate the first (textual similarity) term, we avail ourselves of BERTScore (Zhang et al., 2020), which 6Additionally, in the few-shot case, where we have a number of few-shot exemplars, we convert these exemplars into meaningful prompts using the same template structure and prepend them to the main prompt.utilizes pre-trained contextual embeddings from
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
18
meaningful prompts using the same template structure and prepend them to the main prompt.utilizes pre-trained contextual embeddings from BERT to measure the cosine similarity between two texts.7We presume p([x(s1);s1]j[~x(s2);s2]) = BERTScore (x(s1);x(s2)). (ii) In order to calculate the second term, we deliberately turn a masked LM (MLM), in our case a pre-trained RoBERTa model, into a style classifier as follows: Given ~x(s2) i2~X(s2)andS=fs1;s2g, we convert ~x(s2) i into a “fill-in-the-blank” cloze statement via a predefined cloze template, that is, we rewrite it as “The following text is <mask> :[~x(s2) i].” We then query the MLM to predict the masked token,8but instead of looking at the probability distribution over the original model vocabulary, we restrict our attention to the elements in Sand thus consider the likelihood of the missing token being s1or
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
19
instead of looking at the probability distribution over the original model vocabulary, we restrict our attention to the elements in Sand thus consider the likelihood of the missing token being s1or s2. We then normalize these probabilities by l1normalization and get a proper probability distribution forp(s2j~x(s2)).9(iii) As for the last term, we use GPT-2-Large (774M) to determine the overall likelihood of each candidate text.10(iv) Afterwards, we compute the score for each candidate by multiplying (i), (ii), and (iii) accordingly; re-rank all the candidates; and pick the one with the highest score as the final output.11 Overall, our approach is model-agnostic, allow7Let us note that BERTScore is a symmetric function, i.e., BERTScore (x(s1);x(s2)) = BERTScore (x(s2);x(s1)). Furthermore, we acknowledge that BERTScore technically neglects the additional style information, but we believe that this is a reasonable simplification under our framework. 8One limitation of this framework is that it assumes the styles are associated with distinct tokens in the vocabulary. 9Of course, a more sophisticated normalization technique
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
20
8One limitation of this framework is that it assumes the styles are associated with distinct tokens in the vocabulary. 9Of course, a more sophisticated normalization technique can be employed in this setup, but this basic normalization method seemed to be sufficient in our experiments. 10Given a text x:=x1:tof lengtht, we calculate its probability under a model asp(x) =Qt i=1p(xijx<i) 11Since the calculation of (iii) penalizes long sequences or sequences involving rare words, we also consider the reranking method in which we ignore the fluency factor, assuming that the sentences generated by the models are always fluent, which, we are aware that, is a faulty assumption. 4 ing pre-trained LMs to be used out-of-the-box. Furthermore, our experiments show that with welldesigned prompts, one does notneed a massive language model for this approach to be successful. 4 Prompt Construction In practice, we found the specific syntax and semantics of the prompt template significantly impact model performance. Thus, we conducted a systematic investigation of the impact of different prompt design choices on the quality of TST generations. 4.1 Delimiter-Pairs
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
21
model performance. Thus, we conducted a systematic investigation of the impact of different prompt design choices on the quality of TST generations. 4.1 Delimiter-Pairs We experimented with ten different text boundary markers (delimiter pairs), which may be divided into two categories: those whose opening and closing markers are identical (known as indistinguishable delimiters), and those whose markers are different (known as complementary delimiters). Specifically, we considered two indistinguishable pairs (viz., quotes and dashes) and eight complementary pairs: (1) curly brackets fg, (2) square brackets [], (3) angle brackets hi, (4) parentheses (), (5) quotes "", (6) dashes ––, (7) triple angle bracketshhhiii , (8) bracket quotes i"", (9) asterisk quotes * "", and (10) double curly bracket ffgg .12In their experiments, Reif et al. (2022) uses only curly brackets.13 4.2 Prompt Phrasing We considered four manually-written template formatst2T for our discrete prompts: (a)Vanilla : “Here is a text: [d1][x(s1)][d2]Here
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
22
(a)Vanilla : “Here is a text: [d1][x(s1)][d2]Here is a rewrite of the text, which is [s2]:[d1]”, (b)Contrastive : “Here is a text, which is [s1]: [d1][x(s1)][d2]Here is a rewrite of the text, which is[s2]:[d1]”, (c)Negation-v1 : “Here is a text, which is [s1]: [d1][x(s1)][d2]Here is a rewrite of the text, which is not [s1]:[d1]”, and (d)Negation-v2 : “Here is a text, which is not [s2]:[d1][x(s1)][d2]Here is a rewrite of the text, which is [s2]:[d1]”. 12We use (8), (9), and (10) to emulate blockquotes, bullet points, and liquid tags in Markdown, respectively. 13We hypothesized that the complementary delimiter-pairs might yield better results than the indistinguishable ones, since
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
23
points, and liquid tags in Markdown, respectively. 13We hypothesized that the complementary delimiter-pairs might yield better results than the indistinguishable ones, since it is categorically easier for models to distinguish and understand where sentences start and end. We also speculated that delimiter-pairs that were more likely to be used as textseparators in the training data in various contexts (e.g., in code snippets) might yield better results.Note that [d1]and[d2]denote the opening and closing elements of the chosen delimiter-pair, respectively. In their experiments, Reif et al. (2022) exclusively made use of the vanilla setting, which only specifies the target style ( s2) in the second half of the prompt; however, we initially speculated that providing useful information about the source style ( s1) and creating a clear contrast between the source and target styles in the prompt semantics might help pre-trained LMs to have a better understanding of the underlying nature of the task and improve their performance; hence, we decided to look at the contrastive setting as well. As for the other two negation templates, we wanted to test how specifying the source style as the negation of the target style (viz., s1:=“nots2”) and vice
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
24
to test how specifying the source style as the negation of the target style (viz., s1:=“nots2”) and vice versa might affect the model performance.14 Example. Finally, to make our prompting setup more concrete, let us give a concrete and brief example of how we formulate a prompt. We consider thecontrastive template with curly brackets as our delimiter. If we have an input sentence x(s1)=“I love The Sound of Music ; it is the best movie ever!!” withs1=positive ands2=negative , then the prompt under this template would be “Here is a text, which is positive: {I love The Sound of Music ; it is the best movie ever!!} Here is a rewrite of the text, which is negative: {” The language model would then generate an output by autoregressively decoding after the last delimiter, to produce a sentence such as: “I hate The Sound of Music ; it is the worst movie ever!!}”15 4.3 Zero-Shot vs. Few-Shot Settings In recent years, LLMs, such as GPT-3, have proven themselves to be resourceful few-shot learners. In a few-shot learning setting, a model is presented
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
25
themselves to be resourceful few-shot learners. In a few-shot learning setting, a model is presented with a small set of illustrative examples, oftentimes along with a natural-language prompt describing the task, and expected to understand the underlying task and make accurate predictions without performing any gradient updates to the weights of the model at inference time. We wanted to explore how the number of demonstrations affects the performance of our models. To that end, we also tested the performances of our models under the zero-shot and four-shot settings. 14The last two formats might be useful especially when we do not have access to either the source or the target style. 15Table 8 in the Appendix provides a complete set of examples of prompts used in each task. 5 Dataset Styles Example Sentence-Pairs Test Set Size Yelp Restaurant Reviews Negative ever since joes has changed hands it’s just gotten worse and worse.1000(Zhang et al., 2015) Positive ever since joes has changed hands it’s gotten better and better. Amazon Product Reviews Negative if your bike had a kickstand on the plate it won’t lock down.1000(He and McAuley, 2016) Positive if your bike had a kickstand on the plate it would lock down.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
26
GYAFC Formality Dataset Informal and so what if it is a rebound relationship for both of you?1000(Rao and Tetreault, 2018) Formal what if it is a rebound relationship for both of you? Shakespearean English Dataset Elizabethan is rosaline, whom thou didst love so dear, so soon forsaken?599(Xu et al., 2012) Modern have you given up so quickly on rosaline, whom you loved so much? JFLEG Corpus Ungrammatical Forexample, My cousin is 12years old.747(Napoles et al., 2017) Grammatical For example, my cousin is 12 years old. Symbolic Manipulation Symbolic olive >cat1000(Ours ) English olive is greater than cat Table 2: Overview of the textual style transfer datasets used in this paper. 5 Experiments and Results 5.1 Datasets Differently from most previous work, which focused on single TST subtasks or datasets, we present experiments on a wide range of TST subtasks (also described in Table 2): •YELP: Sentiment transfer for Yelp reviews (Zhang et al., 2015). •AMAZON : Sentiment transfer for Amazon reviews (Li et al., 2018). •SHAKESPEARE : Elizabethan -to-modern
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
27
•AMAZON : Sentiment transfer for Amazon reviews (Li et al., 2018). •SHAKESPEARE : Elizabethan -to-modern translation for Shakespeare (Xu et al., 2012). •GYAFC : Formality transfer for Yahoo Answers responses (Li et al., 2018). •JFLEG : Grammar error correction for student essays (Napoles et al., 2017). •SYM: Symbol-to-natural-language translation on a new custom synthetic dataset. In the initial stages of our research, we noticed that all of these datasets, with the exception of SYM(which is synthetic), contain various tokenization issues (e.g., sentences sometimes contain extra white-space or have their punctuation marks separated out by spaces). We did not wish these tokenization artifacts to diminish the quality of our generations from general-purpose LMs—neither did we want this issue to negatively impact our evaluation scheme. To that end, we used a simple text-cleaning procedure to clean the texts.16 5.2 Evaluation Metrics Prior studies on style and sentiment transfer have typically evaluated models across three dimensions: content/meaning preservation (textual similarity), style transfer strength, and fluency (Mir et al., 2019; 16We release both the original and cleaned versions of the
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
28
content/meaning preservation (textual similarity), style transfer strength, and fluency (Mir et al., 2019; 16We release both the original and cleaned versions of the datasets alongside this paper to help facilitate future research. In the Appendix, we also present results for both the original and cleaned datasets.Briakou et al., 2021). We note that remarkably, these dimensions correspond exactly to the criteria that appear in Equation 1 in §3.1. Content Preservation. BLEU (Papineni et al., 2002) is the standard metric for measuring semantic content preservation. We use the SacreBLEU (sBLEU) implementation (Post, 2018) to compute both reference -BLEU ( r-sBLEU) and self-sBLEU (s-sBLEU) scores. Whereas r-sBLEU helps measure the distance of generated sentences from the ground-truth references, s-sBLEU indicates the degree to which the model directly copies the source. Transfer Strength. In order to determine whether outputs generated by a TST model have the attributes of their target styles, we follow the standard classifier-based approach: we train a (binary) style classifier on the corpus of interest and use it to estimate the fraction of generated outputs whose styles match their target styles.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
29
use it to estimate the fraction of generated outputs whose styles match their target styles. Fluency. To measure the fluency of generated texts, we compute their average token-level perplexity (PPL) using a pre-trained LM (in our case, GPT-2-Large). We note that, whilst this PPL-driven approach has the advantage of being automated and practical, it still contains considerable drawbacks, including biases towards shorter texts. 5.3 Model Choices. We used four GPT-2 models (Radford et al., 2019) of varying sizes (viz., GPT-2-Small (117M params), GPT-2-Medium (345M), GPT-2-Large (774M), and GPT-2-XL (1.6B)), GPT-Neo-1.3B Black et al. (2021), GPT-Neo-2.7B, and GPT-J-6B (Wang and Komatsuzaki, 2021). We highlight that none of these models were fine-tuned or prompt-tuned. 5.4 Results Here, we present a summary of our key findings. For our complete results, we encourage the reader
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
30
5.4 Results Here, we present a summary of our key findings. For our complete results, we encourage the reader to see the Appendix (especially, Tables 10-19). 6 Model Acc r-sBLEU s-sBLEU PPL SUPERVISED [1] CrossAlignment 0.73 7.8 18.3 217 [2] BackTrans 0.95 2.0 46.5 158 [3] MultiDecoder 0.46 13.0 39.4 373 [4] DeleteOnly 0.85 13.4 33.9 182 [4] DeleteAndRetrieve 0.90 14.7 36.4 180 [5] UnpairedRL 0.49 16.8 45.7 385 [6] DualRL 0.88 25.9 58.9 133 [7] ST (Multi-Class) 0.86 26.4 63.0 175 [7] ST (Conditional) 0.93 22.9 52.8 223 [8] B-GST 0.81 21.6 46.5 158 ZERO-ORFEW-SHOT INFERENCE ONLY [9] LLM Aug-0S-FirstChoice 0.85 5.3 9.2 33 [9] LLM 5S-FirstChoice 0.93 6.7 11.2 43
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
31
[9] LLM 5S-FirstChoice 0.93 6.7 11.2 43 [9] LLM Aug-0S-Best-sBLEU†0.63 19.8 45.1 55 [9] LLM 5S-Best-sBLEU†0.78 23.2 48.3 77 Ours (GPT-2-XL) 0.87 14.8 28.7 65 Ours (GPT-J-6B) 0.87 23.0 47.7 80 Table 3: A comparison of our Prompt-and-Rerank approach with supervised sentiment transfer methods and the ultralarge-scale prompting-based method of Reif et al. (2022) on theYELP-clean dataset. In order to compare fairly against previous studies, we applied our data-cleaning code to their publicly-available outputs and re-computed all evaluation metrics. References: [1] (Shen et al., 2017), [2] (Prabhumoye et al., 2018), [3] (Fu et al., 2018), [4] (Li et al., 2018), [5] (Xu et al., 2018), [6] (Luo et al., 2019b), [7] (Dai et al., 2019),
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
32
et al., 2018), [6] (Luo et al., 2019b), [7] (Dai et al., 2019), [8] (Sudhakar et al., 2019), [9] (Reif et al., 2022). Note on†: We used sBLEU to choose the best candidate, as opposed to BLEU that was used originally in (Reif et al., 2022). Dataset Model Accr-sBLEU s-sBLEU PPL AMAZON GPT-2-XL 0.70 11.5 17.2 77 P!N GPT-J-6B 0.65 21.5 31.4 70 AMAZON GPT-2-XL 0.56 13.2 19.9 50 N!P GPT-J-6B 0.52 19.3 29.3 58 YELP GPT-2-XL 0.87 14.8 28.7 65 P!N GPT-J-6B 0.87 23.0 47.7 80 YELP GPT-2-XL 0.72 12.0 25.3 55 N!P GPT-J-6B 0.65 20.2 44.6 58 SHAKE - GPT-2-XL 0.39 18.9 38.4 90
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
33
N!P GPT-J-6B 0.65 20.2 44.6 58 SHAKE - GPT-2-XL 0.39 18.9 38.4 90 SPEARE GPT-J-6B 0.78 21.9 31.8 81 JFLEGGPT-2-XL 35.9 74.8 91.5 76 GPT-J-6B 40.0 64.8 59.1 48 GYAFCGPT-2-XL 0.82 32.7 41.9 58 GPT-Neo-1.3B 0.85 36.4 49.6 68 SYMGPT-2-XL 0.56 68.5 - GPT-J-6B 0.74 81.9 - Table 4: Four-shot performances of GPT-2-XL and GPT-J across all style transfer tasks, using curly brackets as delimiters. Full results with all models and delimiter pairs are shown in the appendix. P!Nstands for the positive !negative direction, and vice-versa for N!P.for JFLEG, GLEU score is used in place of accuracy to measure grammar correction performance. Note that the r-sBLEU column is not bolded because it is not necessarily desirable to have a higher r-sBLEU.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
34
performance. Note that the r-sBLEU column is not bolded because it is not necessarily desirable to have a higher r-sBLEU. Table 3 juxtaposes our results on YELP with those of prior studies. Despite not training or finetuning, our method is competitive with prior models that were designed and trained specifically for these tasks. In fact, compared to supervised methods, our models almost always generate more fluent outputs, as measured by perplexity. Compared to Reif et al. (2022), who utilize the proprietary 137-billion-parameter LLM (LaMDA), we compareSetting Acc r-sBLEU s-sBLEU PPL Vanilla 78.0 14.7 31.0 58.5 Contrastive 79.5 13.4 27.0 59.5 Negation-v1 66.5 13.4 28.1 67.5 Negation-v2 52.0 18.0 40.6 69.0 Table 5: Four-shot performances of GPT-2-XL on the YELPclean dataset under different prompting protocols. We show the average of scores from P!NandN!Pdirections. A full table with all models is included in the Appendix. Across all models, the vanilla and contrastive prompting protocols tend
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
35
table with all models is included in the Appendix. Across all models, the vanilla and contrastive prompting protocols tend to yield the most favourable results. Delim. Acc r-sBLEU s-sBLEU PPL hi 49.5 17.4 40.8 45 * "" 55.0 12.0 29.8 37 i"" 53.0 10.7 25.4 35 fg 59.5 10.0 23.6 35 –– 54.5 6.4 16.5 24 ffgg 50.5 18.3 43.9 65 () 55.5 12.4 28.1 43 "" 60.5 8.8 20.4 31 [] 58.0 11.4 27.4 41 Table 6: Zero-shot performances of GPT-2-XL on the YELPclean dataset using different delimiter pairs. Full tables with all models for all datasets are included in the Appendix. on-par or favorably despite using much smaller models; we obtain better sBLEU scores than their “FirstChoice” setting (which uses a single output) and better accuracy scores than their “BestBLEU” oracle setting (which takes the best of 16 outputs, as measured by sBLEU score).
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
36
and better accuracy scores than their “BestBLEU” oracle setting (which takes the best of 16 outputs, as measured by sBLEU score). Table 4 presents a summary of our results across all seven TST datasets for GPT-2-XL and GPT-J. For full results including all models (GPT-2-Small to GPT-J), please refer to the Appendix. Broadly, we find that all models are capable of TST to a reasonable degree—with the larger models (e.g., GPT-2-XL, GPT-Neo-2.7B, GPT-J) often performing better than the smaller models. The only model that consistently performs poorly is GPT-2-Small: Its high s-sBLEU and low accuracy indicate that it copies long sections of the input (without changing its style) more often than the other models. Looking at individual tasks, we recognize that there remains substantial room for improvement on theJFLEG task: Most models underperformed a simple baseline that copied the input text without making any changes. The baseline achieved 37.2 GLEU, better than all models except GPT-J (which obtained 40.0). Finally, on our new synthetic task
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
37
making any changes. The baseline achieved 37.2 GLEU, better than all models except GPT-J (which obtained 40.0). Finally, on our new synthetic task SYM, we found that GPT-J performed significantly better than the rest: It achieved 74% accuracy17 whereas no other model exceeded 60% accuracy.18 17Accuracy is measured via exact-string-matching. 18When the models failed to generate the correct output, we found that a common failure case was copying the input words correctly but using the wrong logic (e.g., generating “less than” instead of “greater than”). 7 5.5 Further Analysis and Discussion Contrastive prompting generally improves style transfer quality. As shown in Table 5 (and Table 19 in the Appendix), amongst the four prompting protocols considered in this paper, contrastive prompting generally yielded the best accuracy, albeit not always the best sBLEU scores. Delimiter-pair choice has a large impact on model performance. Our systematic analysis of ten different delimiter-pairs shows that delimiter choice substantially affects the quality of generated outputs. Although there is not a single pair which performs best across all setups, certain delimiters, such as the curly brackets fg, square brackets [],
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
38
outputs. Although there is not a single pair which performs best across all setups, certain delimiters, such as the curly brackets fg, square brackets [], parentheses (), and quotes "", yielded consistently better results on both AMAZON andYELP (see Tables 9-12). We hypothesize that the strong performance of these markers is attributable to the fact that they are often used as text separators (or dividers) in different textual contexts, such as essays, dialogues, and code snippets, which compose part of the pre-training data of our models. Re-ranking method improves overall performance. We considered two re-ranking approaches, one in which we picked the generated output with the highest beam score and one in which we sampled three outputs from the model using beam search and then re-scored them according to three criteria discussed in §3.2. As shown in Tables 14 and 15, the re-ranking method can boost the sentiment accuracy by 10-30%. It often, but not always, leads to better sBLEU and fluency scores. Also, as Table 7 illustrates, if we have access to a classifier trained on paired data, it might be more convenient
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
39
Table 7 illustrates, if we have access to a classifier trained on paired data, it might be more convenient to use it in our style transfer accuracy measurements, instead of an MLM as a proxy-classifier, in the re-ranking process, as it empirically leads to higher accuracy and sBLEU scores. Analysis of bias and transfer performance in opposite directions. We find that pre-trained models have strong directional biases: None of the models performed the same when going in the negative!positive ( N!P) and positive!negative (P!N) directions on AMAZON andYELP. We offer three possible explanations for this phenomenon: (i) The inherent differences in the linguistic difficulty of the tasks, (ii) the potential biases in pre-training dataset(s), and (iii) the poor quality of annotations in certain style transfer directions. Regarding (i), a qualitative inspection of the sentiment transfer datasets illustrates that in someModel Setting Acc r-sBLEU s-sBLEU PPL GPT-2-XL (1558M)Top Choice 0.63 13.7 20.3 65 P&R RoBERTa 0.87 14.8 28.7 65 P&R Oracle Cl. 0.95 16.8 33.4 63
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
40
P&R RoBERTa 0.87 14.8 28.7 65 P&R Oracle Cl. 0.95 16.8 33.4 63 GPT-J-6B (6B)Top Choice 0.81 25.3 50.5 107 P&R RoBERTa 0.87 23.0 47.7 80 P&R Oracle Cl. 0.95 25.4 52.4 87 Table 7: Comparison of vanilla four-shot performance of GPT-2 XL and GPT-J-6B models on YELP-clean (P!N) under three settings: (1) choosing the output with the highest beam score (TC), (2) Prompt-and-Rerank with RoBERTa used as a zero-shot style classifier (P&R RoBERTa ), and (3) Promptand-Rerank with an oracle style classifier trained on paired data (P&R Oracle). For full results in YELP-clean, see Table 15. cases, good P!Nperformance can be achieved by simply adding a negation (e.g., “not”) into the text. Regarding (ii), it is possible that the webscraped pre-training data of these models contains more sentences that resemble the task of changing
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
41
text. Regarding (ii), it is possible that the webscraped pre-training data of these models contains more sentences that resemble the task of changing the sentiment from positive to negative than the reverse direction during their pre-training periods. Qualitatively, the GPT-2 models appear adept at negation; therefore, it may not be surprising that these models yield better results in the P!Ndirection. As for (iii), our inspection of the ground-truth data reveals that it contains some noisy labels and incorrect input-output pairs. Limitations. The primary limitation of our reranking method is that it involves generating multiple outputs from an autoregressive LM, which requires multiple forward passes. Additionally, our approach relies on having access to a pre-trained bi-directional MLM. Compared to a simple zeroshot approach, these elements could potentially add complexity to deploying this model in practice. 6 Conclusion In this paper, we propose a novel formal framework for textual style transfer. This framework naturally leads us to a new method, which we denote Prompt-and-Rerank , that utilizes general-purpose pretrained language models to transform text into in arbitrary styles. In our experiments, we use our method to demonstrate that off-the-shelf, pretrained “small” language models, such as GPT-2,
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
42
in arbitrary styles. In our experiments, we use our method to demonstrate that off-the-shelf, pretrained “small” language models, such as GPT-2, can perform arbitrary textual style transfer, without any additional model fine-tuning or prompt-tuning. Additionally, we conduct an extensive investigation prompt phrasing and delimiter choice on transfer quality. In total, we hope that our work makes further research in this area more accessible to a broad set of researchers, both by alleviating the computational constraints of hundred-billion-parameter language models and by establishing a standard set of clean datasets for arbitrary text style transfer. 8 7 Acknowledgments We would like to thank Dora Demszky, Esin Durmus, Tatsu Hashimoto, John Hewitt, Faisal Ladhak, Percy Liang, Nelson Liu, Shikhar Murty, Tolúl o.pé. Ògúnr è.mí, Isabel Papadimitriou, Ashwin Paranjape, Suproteem K. Sarkar, Stuart M. Shieber, Kyle Swanson, Rose Wang, and Tianyi Zhang for their help and support, constructive comments, and valuable suggestions. We also thank Sudha Rao for help with the navigation of the GYAFC dataset
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
43
help and support, constructive comments, and valuable suggestions. We also thank Sudha Rao for help with the navigation of the GYAFC dataset and Yunli Wang for sharing their data splits and classifiers for GYAFC that were used in their paper. Melas-Kyriazi gratefully acknowledges the support of the Rhodes Trust. References Sid Black, Leo Gao, Phil Wang, Connor Leahy, and Stella Biderman. 2021. GPT-Neo: Large Scale Autoregressive Language Modeling with MeshTensorflow. Eleftheria Briakou, Sweta Agrawal, Joel Tetreault, and Marine Carpuat. 2021. Evaluating the Evaluation Metrics for Style Transfer: A Case Study in Multilingual Formality Transfer. arXiv preprint arXiv:2110.10668 . Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-V oss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu,
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
44
Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual . Ning Dai, Jianze Liang, Xipeng Qiu, and Xuan-Jing Huang. 2019. Style Transformer: Unpaired Text Style Transfer without Disentangled Latent Representation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics , pages 5997–6007. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) ,
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
45
of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.Zhenxin Fu, Xiaoye Tan, Nanyun Peng, Dongyan Zhao, and Rui Yan. 2018. Style Transfer in Text: Exploration and Evaluation. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 32. Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making Pre-trained Language Models Better Few-shot Learners. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) , pages 3816–3830. Ruining He and Julian McAuley. 2016. Ups and Downs: Modeling the Visual Evolution of Fashion Trends with One-Class Collaborative Filtering. In proceedings of the 25th international conference on world wide web , pages 507–517. Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. 2017. Toward Controlled Generation of Text. In International
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
46
Salakhutdinov, and Eric P Xing. 2017. Toward Controlled Generation of Text. In International conference on machine learning , pages 1587–1596. PMLR. Di Jin, Zhijing Jin, Zhiting Hu, Olga Vechtomova, and Rada Mihalcea. 2021. Deep Learning for Text Style Transfer: A Survey. Computational Linguistics, pages 1–51. Kalpesh Krishna, John Wieting, and Mohit Iyyer. 2020. Reformulating Unsupervised Style Transfer as Paraphrase Generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP) , pages 737–762, Online. Association for Computational Linguistics. Guillaume Lample, Sandeep Subramanian, Eric Smith, Ludovic Denoyer, Marc’Aurelio Ranzato, and YLan Boureau. 2019. Multiple-Attribute Text Rewriting. In International Conference on Learning Representations . Juncen Li, Robin Jia, He He, and Percy Liang. 2018. Delete, Retrieve, Generate: a Simple Approach to Sentiment and Style Transfer. In Proceedings of the 2018 Conference of the North American Chapter of
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
47
Delete, Retrieve, Generate: a Simple Approach to Sentiment and Style Transfer. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers) , pages 1865–1874, New Orleans, Louisiana. Association for Computational Linguistics. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach. CoRR , abs/1907.11692. Fuli Luo, Peng Li, Pengcheng Yang, Jie Zhou, Yutong Tan, Baobao Chang, Zhifang Sui, and Xu Sun. 2019a. Towards Fine-Grained Text Sentiment Transfer. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics , pages 2013–2022. 9 Fuli Luo, Peng Li, Jie Zhou, Pengcheng Yang, Baobao Chang, Zhifang Sui, and Xu Sun. 2019b. A Dual Reinforcement Learning Framework for Unsupervised Text Style Transfer. arXiv preprint
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
48
Chang, Zhifang Sui, and Xu Sun. 2019b. A Dual Reinforcement Learning Framework for Unsupervised Text Style Transfer. arXiv preprint arXiv:1905.10060 . Aman Madaan, Amrith Setlur, Tanmay Parekh, Barnabás Póczos, Graham Neubig, Yiming Yang, Ruslan Salakhutdinov, Alan W Black, and Shrimai Prabhumoye. 2020. Politeness Transfer: A Tag and Generate Approach. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics , pages 1869–1881. Eric Malmi, Aliaksei Severyn, and Sascha Rothe. 2020. Unsupervised Text Style Transfer with Padded Masked Language Models. arXiv preprint arXiv:2010.01054 . Remi Mir, Bjarke Felbo, Nick Obradovich, and Iyad Rahwan. 2019. Evaluating Style Transfer for Text. arXiv preprint arXiv:1904.02295 . Courtney Napoles, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground Truth for Grammatical Error Correction Metrics. In Proceedings of the
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
49
Courtney Napoles, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground Truth for Grammatical Error Correction Metrics. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers) , pages 588–593. Courtney Napoles, Keisuke Sakaguchi, and Joel Tetreault. 2017. JFLEG: A fluency corpus and benchmark for grammatical error correction. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers , pages 229–234, Valencia, Spain. Association for Computational Linguistics. Kishore Papineni, Salim Roukos, Todd Ward, and WeiJing Zhu. 2002. BLEU: A method for Automatic Evaluation of Machine Translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics , pages 311–318. Fabio Petroni, Tim Rocktäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language Models as
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
50
Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language Models as Knowledge Bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLPIJCNLP) , pages 2463–2473. Matt Post. 2018. A Call for Clarity in Reporting BLEU Scores. In Proceedings of the Third Conference on Machine Translation: Research Papers , pages 186– 191, Brussels, Belgium. Association for Computational Linguistics. Shrimai Prabhumoye, Rafal Kocielnik, Mohammad Shoeybi, Anima Anandkumar, and Bryan Catanzaro. 2021. Few-shot Instruction Prompts for Pretrained Language Models to Detect Social Biases. arXiv preprint arXiv:2112.07868 .Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan Salakhutdinov, and Alan W Black. 2018. Style Transfer Through Back-Translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 866–876. Alec Radford, Jeffrey Wu, Rewon Child, David Luan,
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
51
866–876. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language Models are Unsupervised Multitask Learners. OpenAI blog , 1(8):9. Sudha Rao and Joel Tetreault. 2018. Dear Sir or Madam, May I Introduce the GYAFC Dataset: Corpus, Benchmarks and Metrics for Formality Style Transfer. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers) , pages 129–140, New Orleans, Louisiana. Association for Computational Linguistics. Machel Reid and Victor Zhong. 2021. LEWIS: Levenshtein Editing for Unsupervised Text Style Transfer. arXiv preprint arXiv:2105.08206 . Emily Reif, Daphne Ippolito, Ann Yuan, Andy Coenen, Chris Callison-Burch, and Jason Wei. 2022. A Recipe for Arbitrary Text Style Transfer with Large Language Models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) , pages 837– 848, Dublin, Ireland. Association for Computational
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
52
Linguistics (Volume 2: Short Papers) , pages 837– 848, Dublin, Ireland. Association for Computational Linguistics. Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. 2017. Style Transfer from Non-Parallel Text by Cross-Alignment. Advances in neural information processing systems , 30. Akhilesh Sudhakar, Bhargav Upadhyay, and Arjun Maheswaran. 2019. "Transforming" Delete, Retrieve, Generate Approach for Controlled Text Style Transfer. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) , pages 3269–3279. Ben Wang and Aran Komatsuzaki. 2021. GPTJ-6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/ kingoflolz/mesh-transformer-jax . Yunli Wang, Yu Wu, Lili Mou, Zhoujun Li, and Wenhan Chao. 2019. Harnessing Pre-Trained Neural Networks with Rules for Formality Style Transfer. InProceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
53
Networks with Rules for Formality Style Transfer. InProceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) , pages 3573– 3578, Hong Kong, China. Association for Computational Linguistics. 10 Yunli Wang, Yu Wu, Lili Mou, Zhoujun Li, and Wenhan Chao. 2020. Formality Style Transfer with Shared Latent Space. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2236–2249. Xing Wu, Tao Zhang, Liangjun Zang, Jizhong Han, and Songlin Hu. 2019. "Mask and Infill": Applying Masked Language Model to Sentiment Transfer. arXiv preprint arXiv:1908.08039 . Jingjing Xu, Xu Sun, Qi Zeng, Xiaodong Zhang, Xuancheng Ren, Houfeng Wang, and Wenjie Li. 2018. Unpaired Sentiment-to-Sentiment Translation: A Cycled Reinforcement Learning Approach. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 979–988.
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
54
Papers) , pages 979–988. Wei Xu, Alan Ritter, Bill Dolan, Ralph Grishman, and Colin Cherry. 2012. Paraphrasing for Style. In COLING, pages 2899–2914. Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. XLNet: Generalized Autoregressive Pretraining for Language Understanding. Advances in neural information processing systems , 32. Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020. BERTScore: Evaluating Text Generation with BERT. In International Conference on Learning Representations . Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-Level Convolutional Networks for Text Classification. Advances in neural information processing systems , 28:649–657. 11 A Appendix A.1 Additional Details about Datasets Previous TST studies have often chosen to focus on particular subtasks (such as changing the sentiment of a text from positive to negative) or particular datasets (such as YELPorAMAZON ). In contrast,
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
55
particular subtasks (such as changing the sentiment of a text from positive to negative) or particular datasets (such as YELPorAMAZON ). In contrast, in our experiments, we decided to focus on a variety of TST datasets, some of which are known and widely used datasets in the field and some of which are new and synthetic. In the first half of this section, we present and discuss these datasets.19 Yelp Sentiment Dataset. YELPis a subset of the Yelp Review Polarity Dataset that was first used by Zhang et al. (2015) for a text classification task. It consists restaurant and other business reviews from Yelp, along with a label—either positive ornegative—for each review. We used the version of the dataset that was curated by Li et al. (2018) in our experiments. The test set contains 500 positive and 500 negative samples, with one human reference (ground-truth) for each sample. Amazon Sentiment Dataset. AMAZON is similar to YELPin its nature, but it contains product reviews that were obtained from Amazon. Each review is labeled either positive ornegative . As before, we used the version of the dataset that was
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
56
reviews that were obtained from Amazon. Each review is labeled either positive ornegative . As before, we used the version of the dataset that was used by Li et al. (2018). The test set contains 500 positive and 500 negative sentences, with one human reference output for each sample. Shakespearean English Dataset. We additionally used a small subset of the dataset that was used by Xu et al. (2012) originally for phrase-based machine translation, and experimented with “translating” sentences written in Elizabethan English tomodern English. This small test set, which we callSHAKESPEARE , contains 599 paired sentences from William Shakespeare’s Romeo and Juliet , written in Elizabethan and modern English.20 GYAFC Formality Dataset. Grammarly’s Yahoo Answers Formality corpus ( GYAFC ; Rao and 19We chose these datasets to broaden the semantic diversity of the TST tasks and to establish benchmarks for new TST studies. We share both the original and clean versions of some of the widely-used but poorly-tokenized datasets, such asAMAZON andYELP. In doing so, we hope to help address the recent call-to-action on reproducibility in TST from Jin et al. (2021); they encouraged researchers to share their data
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
57
the recent call-to-action on reproducibility in TST from Jin et al. (2021); they encouraged researchers to share their data and evaluation codes in order to establish reliable benchmarks and facilitate easier comparison of new studies with existing work. We hope that our efforts will be a constructive step towards this goal. 20All the input sentences in SHAKESPEARE contain at least 10 and at most 25 words (inclusive).Tetreault (2018)) contains paired informal andformalsentences. Following Luo et al. (2019b), we used the samples from the “Family & Relationship” (F&R) domain and restricted our focus to the informal to formal direction. The test set contains 500 formal and 500 informal sentences. JFLEG Corpus. The JHU FLuency-Extended GUG ( JFLEG ) Corpus was introduced by Napoles et al. (2017) to train and evaluate models for automatic grammatical error correction. It contains paired grammatical andungrammatical sentences (with three error types—namely, awkward, orthographic, and grammatical). In our experiments, we focused on the ungrammatical to grammatical direction and used the publicly available test set that contains 747 sentences. Symbolic Manipulation Task. We designed
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
58
focused on the ungrammatical to grammatical direction and used the publicly available test set that contains 747 sentences. Symbolic Manipulation Task. We designed this small synthetic dataset to investigate how skillful the off-the-shelf SLMs are at writing symbolic expressions as natural English-language sentences. This dataset contains 1,000 example pairs, in which each input sample is written in a symbolic form (as either “ > ” or “ < ”, where and are two different single words from the animal color, fruit, and number categories) and its corresponding output is basically the spoken utterance in English. Remark. We realized that the original versions of all the aforementioned real-world TST datasets contain various tokenization issues (for instance, sentences sometimes contain extra whitespaces or have their puntuation marks separated out by spaces). We did not wish these tokenization artifacts to diminish the quality of our generations. To that end, we used a simple text-cleaning procedure to clean the texts before feeding them to our models.21 A.2 Additional Evaluation Metrics Here, we describe in greater detail the standard automatic evaluation metrics used in the assessment of the performance of TST models. Content Preservation. The standard metric for
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
59
Here, we describe in greater detail the standard automatic evaluation metrics used in the assessment of the performance of TST models. Content Preservation. The standard metric for measuring semantic content preservation (or textual similarity, as we call it) has been BLEU (Papineni et al., 2002): If reference (ground-truth) sentences are available, then reference -BLEU scores are calculated by comparing model outputs to human-written ground-truth outputs using n-grams. Some recent studies (Lample et al., 2019; Dai et al., 2019) further look at self-BLEU scores, compar21For the AMAZON andYELPdataset, we show the benefit of data-cleaning on overall performance. We also publicly release our text-cleaning code. 12 ing model outputs to input sentences—this is particularly done when reference sentences are not directly available. In our evaluations, we primarily used the SacreBLEU metric (Post, 2018)—as SacreBLEU has been shown to be a more reliable and accessible metric than BLEU—and considered both reference -SacreBLEU ( r-sBLEU) and selfSacreBLEU ( s-sBLEU) scores.22When evaluating the performances of models on the JFLEG corpus, we also used the sentence-level GLEU metric
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
60
the performances of models on the JFLEG corpus, we also used the sentence-level GLEU metric (Napoles et al., 2015), a variant of BLEU that was specifically designed for evaluating grammatical error correction (GEC) models. Transfer Strength. To determine whether outputs generated by a TST model have the attributes of their target styles, the most common approach has been to train a (binary) classifier on the training set of the corpus of focus, where the sentences are taken as the inputs and their corresponding styles as the labels, and then to use this trained classifier to predict the percentage of the generated outputs for which the styles predicted by the model match their target styles.23In our sentiment transfer experiments, we measured transfer strength (sentiment accuracy) by fine-tuning pre-trained RoBERTa classifiers (Liu et al., 2019) on the training data in each case. In our experiments on SHAKESPEARE , we used the RoBERTa-based Shakespeare classifier of Krishna et al. (2020). Finally, in our experiments onGYAFC , we fine-tuned a pre-trained RoBERTa
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
61
Krishna et al. (2020). Finally, in our experiments onGYAFC , we fine-tuned a pre-trained RoBERTa classifier on a subset of F&R examples.24 Fluency. With the emergence of successful LMs at our disposal, most recent TST models measure the fluency of their generated texts by computing perplexity (PPL) via a pre-trained LM like GPT2.25Whilst this PPL-driven approach has the advantage of being automated and practical, it still contains considerable drawbacks, among which biases towards short texts and more frequent tokens can be listed right away. In our evaluations, we reported the average token-level PPL of generated texts using GPT-2-Large (774M). 22We used the SacreBLEU metric implemented in Hugging Face’s Metrics library and lowered all the texts—both predictions and references—before calculating the scores. 23This method of measuring transfer accuracy demands access to either paired data for training a classifier or a pretrained classier that can accurately estimate the style of an input text. It is, therefore, difficult to measure transfer accuracy for arbitrary or unknown styles, because there may not
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
62
input text. It is, therefore, difficult to measure transfer accuracy for arbitrary or unknown styles, because there may not be any specific data to train a classifier. 24We release all our fine-tuned classifiers on our codebase. 25Early work used to measure fluency of sentences using ann-gram (typically trigram) Kneser-Ney language model.A.3 Full Results In the tables below, we include zero-shot results for the clean versions of AMAZON (Table 10) and YELP(Table 12), as well as the original versions ofAMAZON (Table 9) and YELP(Table 11). We also include four-shot results for the clean versions ofAMAZON (Table 13), YELP(Table 14), SHAKE SPEARE (Table 15), JFLEG (Table 16), GYAFC (Table 17), and S YM(Table 18). A.4 Further Discussion Sentiment Transfer. Table 14 and Table 15 show the results for the clean versions of AMAZON and YELP, respectively. In terms of sentiment accuracy, GPT-2-XL yielded the best performance on both datasets, achieving 70% (87%) positive !
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
63
YELP, respectively. In terms of sentiment accuracy, GPT-2-XL yielded the best performance on both datasets, achieving 70% (87%) positive ! negative accuracy and 56% (72%) negative !positive on AMAZON (YELP). In both cases, however, the sBLEU scores of GPT-2-XL were relatively lower than those of other models, indicating that it copied more from the source text. The GPT-Neo models had higher r-sBLEU and s-sBLEU scores than GPT-2-XL on both AMAZON andYELP, with only slightly worse accuracy scores. In the case ofYELP-clean especially, the GPT-Neo/J models achieved good balances of sentiment accuracy, textual similarity, and fluency. Shakespeare-to-Modern English Translation. As shown in Table 13, model performance generally improves with model size, with GPT-J-6B achieving almost 80% accuracy (according to the supervised classifier) and 21.9 r-sBLEU. Also notable is the difference between GPT-2-Small’s high s-sBLEU score and low classifier accuracy, relative to the other models. Together, these indicate that
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
64
s-sBLEU score and low classifier accuracy, relative to the other models. Together, these indicate that the model copies large parts of the input text more often than the other GPT models. Formality Transfer and Grammatical Error Correction . For GYAFC (Table 17), most models achieved accuracy scores above 80%, with increasing model size correlating with BLEU score. Notably, GPT-Neo-2.7B achieved an accuracy score of81% and and a r-sBLEU score of 50 in the informal to formal direction. For JFLEG (Table 16), on the other hand, most models failed to outperform a simple baseline, which automatically copied the input text without making any changes. This baseline achieves a GLEU score of 37.2, better than all models except GPT-J (which obtains 40.0). Broadly, there remains substantial room for improvement on JFLEG. 13 Symbolic Manipulation. Our final task is designed to measure the ability of these language models to copy and manipulate tokens under a refined synthetic experimental setup. With the exception of GPT-J, no model exceeded 60% accuracy on this synthetic dataset. GPT-J, by contrast, achieved 74% accuracy. A.5 Additional Qualitative Examples
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
65
this synthetic dataset. GPT-J, by contrast, achieved 74% accuracy. A.5 Additional Qualitative Examples We provide additional qualitative examples from our language models in Tables 21-24. A.6 Additional Related Work Here, we describe additional related work on different subtasks of textual style transfer that could not be included in the main component of the paper due to space constraints. These works can be broadly categorized into two families. The first family of approaches involves identifying and replacing distinctive style-related phrases (Li et al. (2018); Sudhakar et al. (2019); Wu et al. (2019); Madaan et al. (2020); Malmi et al. (2020); Reid and Zhong (2021), inter alia ). For instance, Madaan et al. (2020) tackle the task of politeness transfer with a two-step text-editing approach, first identifying words with stylistic attributes using a n-gram TF-IDF method and then training a model to replace or augment these stylistic words with ones associated with the target attribute. Similarly, Li et al. (2018) propose a simple approach to sentiment and style transfer based on the idea that these attributes can often be identified by certain distinctive phrases. They identify these
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
66
approach to sentiment and style transfer based on the idea that these attributes can often be identified by certain distinctive phrases. They identify these phrases, replace them with phrases associated with the target attribute, and combine them with an RNN to improve the fluency of the output text. Recently, Reid and Zhong (2021) propose to minimize the Levenshtein edit-distance between source and target texts, using a fine-tuned LM to make targeted edits. In general, these approaches perform well for very simple types of style transfer (e.g., negation by adding the word notto a sentence), but they struggle in scenarios that require more complex syntactic and semantic changes. The second family of approaches involves disentangling latent representations of style and content Hu et al. (2017); Shen et al. (2017); Fu et al. (2018); Luo et al. (2019a); Wang et al. (2020) seek to learn a style-invariant representation for a piece of text, such that it can then be decoded in an arbitrary style. For example, Hu et al. (2017) encoded sentences
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
67
a style-invariant representation for a piece of text, such that it can then be decoded in an arbitrary style. For example, Hu et al. (2017) encoded sentences into a style-agnostic space and then decode themin a style-specific manner using a variational autoencoder alongside attribute discriminators. Shen et al. (2017); Fu et al. (2018); Dai et al. (2019); Wang et al. (2019) improved upon this methodology through the use of cross-alignment, style embeddings, rule-based systems, and new architectures. While these approaches are often theoretically well-grounded, they generally require large quantities of labeled data and struggle with scaling beyond a small number of styles. A.7 Computational Details The computational cost of our experiments were quite low, as they only involve running inference on pre-trained models. All experiments were conducted on a single GPU. We usde an NVidia V100 for all experiments except those with GPT-J-6B, for which we used an RTX 8000 due to memory requirements. We estimate that all experiments for this paper consumed fewer than 30 GPU-days. A.8 License Details We will release all code for this experiment under an open-source license (MIT License). A.9 Language Details
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
68
A.8 License Details We will release all code for this experiment under an open-source license (MIT License). A.9 Language Details All datasets used for this paper are in English. A.10 Ethical Considerations Our work aims to advance the state of research on the task of arbitrary textual style transfer. As with many NLP applications, these methods may be used for negative purposes by malicious actors. For example, it would be possible to conceive of an instantiation of arbitrary textual style transfer which converts a non-sensationalist news headline into a sensationalist news headline, or one that converts a non-offensive piece of text into an offensive piece of text, in order to achieve a malicious goal. Our work also involves pretrained generalpurpose language models, which bring up lessobvious ethical considerations than those discussed above. Since these language models are trained on text scraped from the web, they have acquired some of the biases present in web text. Such biases may be extracted by certain forms of prompting; recent work (Prabhumoye et al., 2021) suggests that fewshot prompts can be used to detect social biases in pretrained language models. A large body of work is dedicated to understanding and de-biasing these models, but it is not the subject of our present work. 14
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
69
in pretrained language models. A large body of work is dedicated to understanding and de-biasing these models, but it is not the subject of our present work. 14 Dataset [Few-Shot Examples] and [Test-Time Input] AMAZONHere is a text, which is positive: {very small but it works great in the car.} Here is a rewrite of the text, which is negative: {very small and it works terribly in the car.} \n ### \n Here is a text, which is positive: {i really loved it and will use it alot.} Here is a rewrite of the text, which is negative: {i really disliked it and will not use it again.} \n ### \n Here is a text, which is positive: {it gets the job done and for the price you can t beat it.} Here is a rewrite of the text, which is negative: {it does not work well and it was expensive.} \n ### \n Here is a text, which is negative: {i will never buy anything from this brand again.} Here is a rewrite of the text, which is positive: {i will buy from this brand again.} \n ### \n Here is a text, which is
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
70
again.} Here is a rewrite of the text, which is positive: {i will buy from this brand again.} \n ### \n Here is a text, which is negative: {if your bike had a kickstand on the plate it won’t lock down. } Here is a rewrite of the text, which is positive: { YELPHere is a text, which is negative: {this place is awful!} Here is a rewrite of the text, which is positive: {this place is amazing!} \n ### \n Here is a text, which is positive: {definitely will buy another pair of socks from this store–they have the best socks ever} Here is a rewrite of the text, which is negative: {definitely will NOT buy another pair of socks from this store–they have the worst socks ever} \n ### \n Here is a text, which is negative: {my wife and i were disappointed by the quality of the service–also, the food was pretty tasteless} Here is a rewrite of the text, which is positive: {my wife and i were impressive by the quality of the service–also, the food was pretty delicious} \n ### \n Here is a text, which is
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
71
and i were impressive by the quality of the service–also, the food was pretty delicious} \n ### \n Here is a text, which is positive: {i loved their black tea and hot chocolate selections!} Here is a rewrite of the text, which is negative: {i hated their black tea and hot chocolate selections!} \n ### \n Here is a text, which is positive: {it’s small yet they make you feel right at home.} Here is a rewrite of the text, which is negative: { SHAKESPEAREHere is a text, which is written in old English: {what hast thou there?} Here is a rewrite of the text, which is written in modern English: {what have you got there?} \n ### \n Here is a text, which is written in old English: {what say’st thou, my dear nurse?} Here is a rewrite of the text, which is written in modern English: {what did you say, my dear nurse?} \n ### \n Here is a text, which is written in old English: {and how doth she?} Here is a rewrite of the text, which is written in modern English: {and how is she doing?} \n ### \n Here is a text, which is written in old English: {talk not to me, for i’ll
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
72
modern English: {and how is she doing?} \n ### \n Here is a text, which is written in old English: {talk not to me, for i’ll not speak a word.} Here is a rewrite of the text, which is written in modern English: {don’t talk to me, because i won’t answer you.} \n ### \n Here is a text, which is old English: {as mine on hers, so hers is set on mine, and all combined, save what thou must combine by holy marriage.} Here is a rewrite of the text, which is modern English: { GYAFC\n Here is a text, which is informal: {sorry but donnt know if i can do this alone.} Here is a rewrite of the text, which is formal: {I am sorry, but I don’t know if I can do this alone.} \n ### \n Here is a text, which is formal: {i am going to ask him to come to the concert with me, and i hope he accepts my invitation.} Here is a rewrite of the text, which is informal: {gonna ask him to come to the concert with me and hope he says yes :)} \n ### \n Here is a text, which is informal: {that
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
73
{gonna ask him to come to the concert with me and hope he says yes :)} \n ### \n Here is a text, which is informal: {that sucks man but u gotta move on} Here is a rewrite of the text, which is formal: {that is unfortunate, but you need to move on} \n ### \n Here is a text, which is formal: {and i am sorry that you and your girlfriend broke up last week.} Here is a rewrite of the text, which is informal: {and im sorry that u and ur girlfriend broke up last week...} \n ### \n Here is a text, which is formal: {i mean that you have to really be her friend.} Here is a rewrite of the text, which is informal: { JFLEG\n Here is a text, which is ungrammatical: {There are several reason.} Here is a rewrite of the text, which is grammatical: {There are several reasons.} \n ### \n Here is a text, which is ungrammatical: {To my surprize nothing happened.} Here is a rewrite of the text, which is grammatical: {To my surprise, nothing happened.} \n ### \n Here is a text, which is ungrammatical: {This is important thing.} Here is a rewrite of the text, which is grammatical: {This is an important
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
74
ungrammatical: {This is important thing.} Here is a rewrite of the text, which is grammatical: {This is an important thing.} \n ### \n Here is a text, which is ungrammatical: {Water is needed for alive.} Here is a rewrite of the text, which is grammatical: {Water is necessary to live.} \n ### \n Here is a text, which is ungrammatical: {New and new technology has been introduced to the society.} Here is a rewrite of the text, which is grammatical: { SYMHere is a text, which is symbolic: {apple > seven} Here is a rewrite of the text, which is English: {apple is greater than seven} \n ### \n Here is a text, which is symbolic: {tiger < robin} Here is a rewrite of the text, which is English: {tiger is less than robin} \n ### \n Here is a text, which is symbolic: {teal > green} Here is a rewrite of the text, which is English: {teal is greater than green} \n ### \n Here is a text, which is symbolic: {apple < dog} Here is a rewrite of the text, which is
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
75
{teal is greater than green} \n ### \n Here is a text, which is symbolic: {apple < dog} Here is a rewrite of the text, which is English: {apple is less than dog} \n ### \n Here is a text, which is symbolic: {yellow > gray} Here is a rewrite of the text, which is English: { Table 8: A complete list of example-prompts used in our few-shot experiments. Here, the color gray is used to highlight the examples used in our setups and the color teal an example test-time input in each specific TST task. 15 Positive!Negative Negative!Positive Model Delimiter-Pair Acc r-sBLEU s-sBLEU PPL Acc r-sBLEU s-sBLEU PPL GPT-2-Small (117M)hi 0.35 12.4 22.7 34 0.19 11.4 23.6 33 * "" 0.43 9.0 15.9 42 0.24 7.3 14.5 40 i"" 0.46 6.6 11.3 29 0.23 6.8 14.1 30 fg 0.33 14.1 26.4 35 0.18 15.0 31.3 39
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
76
fg 0.33 14.1 26.4 35 0.18 15.0 31.3 39 –– 0.40 6.8 12.6 29 0.17 6.5 13.8 26 ffgg 0.36 27.0 49.7 85 0.20 27.0 56.0 94 () 0.35 18.1 32.7 54 0.18 17.6 38.2 59 "" 0.45 8.2 14.2 32 0.21 8.4 16.2 33 [] 0.35 18.9 35.5 60 0.21 14.3 29.3 43 hhhiii 0.42 6.4 12.1 24 0.19 6.7 14.1 26 GPT-2-Medium (345M)hi 0.42 21.9 37.9 67 0.27 23.2 45.0 72 * "" 0.46 11.1 20.0 45 0.31 7.8 15.2 32 i"" 0.45 13.4 22.4 43 0.29 6.2 13.4 27 fg 0.44 21.6 38.2 73 0.26 19.1 37.1 67 –– 0.63 4.2 7.0 22 0.31 3.7 7.6 21
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
77
–– 0.63 4.2 7.0 22 0.31 3.7 7.6 21 ffgg 0.45 25.3 43.2 69 0.27 20.2 39.8 67 () 0.49 19.4 32.4 69 0.31 18.1 35.5 69 "" 0.47 11.3 19.2 35 0.28 9.2 17.5 34 [] 0.54 17.1 28.6 63 0.32 13.1 26.3 52 hhhiii 0.47 14.2 25.3 43 0.28 10.8 21.1 35 GPT-2-Large (774M)hi 0.38 25.5 43.7 52 0.24 27.8 58.0 73 * "" 0.39 27.1 46.7 72 0.25 22.9 47.0 60 i"" 0.39 27.1 46.9 66 0.23 26.5 53.7 70 fg 0.39 28.7 48.8 77 0.24 28.0 54.8 63 –– 0.50 8.8 15.4 22 0.22 6.5 13.3 18 ffgg 0.43 27.7 46.5 63 0.25 36.6 69.3 113
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
78
ffgg 0.43 27.7 46.5 63 0.25 36.6 69.3 113 () 0.41 22.2 38.9 48 0.26 22.9 45.1 59 "" 0.52 19.7 31.4 57 0.30 17.7 34.2 48 [] 0.44 22.0 36.8 53 0.26 19.4 38.7 44 hhhiii 0.47 13.1 21.9 28 0.28 12.2 24.6 25 GPT-2-XL (1558M)hi 0.40 26.3 43.0 81 0.31 25.9 48.2 82 * "" 0.42 22.7 39.3 60 0.29 17.6 33.3 44 i"" 0.43 20.8 35.1 54 0.29 17.9 34.0 47 fg 0.47 23.8 37.6 73 0.31 22.7 42.5 80 –– 0.56 5.6 9.0 19 0.28 4.3 7.8 18 ffgg 0.42 29.8 49.8 99 0.29 25.7 46.4 80
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
79
ffgg 0.42 29.8 49.8 99 0.29 25.7 46.4 80 () 0.45 16.4 28.8 41 0.28 17.8 33.6 53 "" 0.47 16.1 26.2 38 0.30 14.6 28.4 41 [] 0.46 19.2 30.8 60 0.32 16.4 31.4 52 hhhiii 0.51 9.0 13.9 25 0.37 7.4 12.7 26 GPT-Neo-1.3B (1.3B)hi 0.48 14.9 26.1 48 0.29 11.0 21.5 40 * "" 0.41 15.1 26.8 36 0.25 13.8 28.5 44 i"" 0.38 19.7 36.0 60 0.26 18.9 37.4 48 fg 0.48 11.0 18.7 32 0.30 8.8 16.6 31 –– 0.54 5.0 8.6 18 0.30 4.9 9.6 18 ffgg 0.49 15.3 25.0 47 0.31 13.6 24.6 42
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
80
ffgg 0.49 15.3 25.0 47 0.31 13.6 24.6 42 () 0.44 14.3 25.3 44 0.27 15.5 29.1 51 "" 0.39 19.5 33.4 50 0.25 15.8 31.4 37 [] 0.46 15.1 27.0 51.7 0.26 15.1 30.4 47 hhhiii 0.56 5.9 9.2 28 0.32 4.6 8.1 22 GPT-Neo-2.7B (2.7B)hi 0.43 20.0 36.1 53 0.27 22.2 43.8 59 * "" 0.37 26.2 46.7 65 0.21 26.8 54.1 65 i"" 0.37 26.1 45.9 68 0.22 23.6 50.7 60 fg 0.44 21.6 37.7 61 0.29 27.1 51.4 80 –– 0.56 4.4 7.7 15 0.23 4.0 8.2 14 ffgg 0.42 23.7 42.0 56 0.24 29.5 58.5 72
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
81
ffgg 0.42 23.7 42.0 56 0.24 29.5 58.5 72 () 0.44 19.7 32.9 48 0.27 21.1 40.9 64 "" 0.38 26.1 44.5 67 0.22 26.3 52.7 67 [] 0.48 20.3 35.6 67 0.25 22.4 42.9 58 hhhiii 0.45 14.1 24.8 32 0.22 21.0 42.1 55 GPT-J-6B (6B)hi 0.40 27.3 47.0 74 0.32 17.0 32.7 51 * "" 0.38 29.2 49.5 82 0.28 23.4 42.9 61 i"" 0.36 27.4 47.2 69 0.30 23.1 43.6 64 fg 0.41 27.8 47.6 80 0.32 24.9 45.6 78 –– 0.43 7.1 12.3 19 0.20 4.8 9.0 17 ffgg 0.29 30.4 54.9 72 0.29 26.8 51.1 76
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
82
ffgg 0.29 30.4 54.9 72 0.29 26.8 51.1 76 () 0.48 24.9 41.6 80 0.35 22.3 39.3 77 "" 0.39 28.6 47.3 69 0.31 23.0 42.4 64 [] 0.43 23.3 38.2 63 0.37 20.8 38.3 60 hhhiii 0.34 30.3 55.6 98 0.31 23.6 44.2 67 Table 9: Zero-shot performances of the off-the-shelf “small” language models from the GPT-2 and GPT-Neo/J families on the original version of the AMAZON dataset. Here, we also experimented with ten different delimiter-pairs, ranging from curly brackets to asterisk quotes: Overall, curly brackets fg, square brackets [], parentheses (), and quotes ""yielded consistently reliable and high-quality outputs. Most of the models could not go beyond 60% accuracy in the positive to negative direction and 35% accuracy in the negative to positive direction. As shown in Table 10, most models performed marginally better (in terms of
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
83
35% accuracy in the negative to positive direction. As shown in Table 10, most models performed marginally better (in terms of their accuracy, BLEU, and PPL scores) on the cleaner version of the dataset, suggesting that the original version might contain some tokenization-related (semantic) noises that might be preventing the models from performing well. 16 Positive!Negative Negative!Positive Model Delimiter-Pair Acc r-sBLEU s-sBLEU PPL Acc r-sBLEU s-sBLEU PPL GPT-2-Small (117M)hi 0.34 17.9 33.4 47 0.19 13.7 30.5 42 * "" 0.43 8.1 14.8 38 0.26 7.9 16.3 37 i"" 0.45 6.3 11.6 29 0.25 7.7 15.4 32 fg 0.31 18.9 34.9 49 0.18 17.7 38.1 48 –– 0.42 6.6 12.0 24 0.21 6.6 13.7 26 ffgg 0.28 30.4 56.7 90 0.19 28.4 60.9 81
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
84
ffgg 0.28 30.4 56.7 90 0.19 28.4 60.9 81 () 0.34 22.2 39.1 57 0.21 18.7 40.1 48 "" 0.46 8.7 15.9 35 0.27 7.3 14.9 34 [] 0.32 19.9 35.4 59 0.20 18.4 39.7 55 hhhiii 0.39 9.3 17.0 31 0.20 9.0 18.8 28 GPT-2-Medium (345M)hi 0.43 19.3 33.7 49 0.28 16.8 33.4 47 * "" 0.52 10.4 17.2 31 0.33 7.6 15.1 29 i"" 0.46 10.4 17.6 30 0.32 6.3 12.9 25 fg 0.48 21.9 36.7 68 0.32 20.1 38.0 57 –– 0.57 3.9 6.8 20 0.29 3.1 5.9 18 ffgg 0.45 23.3 40.1 62 0.31 21.2 41.1 64 () 0.45 19.9 33.1 50 0.32 17.6 35.3 58
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
85
() 0.45 19.9 33.1 50 0.32 17.6 35.3 58 "" 0.49 9.8 16.1 31 0.35 7.0 12.8 25 [] 0.50 15.7 25.9 42 0.30 13.2 26.1 46 hhhiii 0.48 8.8 14.8 26 0.31 10.1 19.2 30 GPT-2-Large (774M)hi 0.40 26.3 44.6 68 0.29 22.9 43.4 52 * "" 0.44 23.5 40.9 54 0.27 18.8 36.9 42 i"" 0.43 20.8 36.0 44 0.29 19.4 39.2 42 fg 0.44 28.6 49.1 70 0.28 26.0 51.2 55 –– 0.40 7.3 12.0 17 0.36 7.4 13.8 19 ffgg 0.43 31.0 53.1 90 0.29 31.3 60.0 79 () 0.39 23.0 39.1 51 0.26 23.3 45.3 61 "" 0.47 18.1 29.8 47 0.31 16.8 32.7 48
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
86
"" 0.47 18.1 29.8 47 0.31 16.8 32.7 48 [] 0.47 20.2 34.3 50 0.26 17.5 34.1 42 hhhiii 0.49 9.9 16.2 21 0.27 9.4 18.2 22 GPT-2-XL (1558M)hi 0.40 25.6 42.0 68 0.29 23.1 43.0 65 * "" 0.36 22.5 39.4 48 0.31 18.7 37.5 47 i"" 0.40 18.8 31.5 43 0.27 19.2 37.8 46 fg 0.46 21.5 35.4 59 0.32 22.3 41.4 70 –– 0.53 7.2 11.7 23 0.32 6.9 11.8 21 ffgg 0.45 25.7 43.2 81 0.31 24.8 45.4 72 () 0.48 19.3 30.7 52 0.30 17.8 33.4 53 "" 0.45 20.5 33.6 49 0.31 17.9 33.4 51
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
87
"" 0.45 20.5 33.6 49 0.31 17.9 33.4 51 [] 0.47 21.1 33.4 55 0.32 19.2 34.7 55 hhhiii 0.47 7.8 13.1 24 0.38 6.8 12.5 25 GPT-Neo-1.3B (1.3B)hi 0.50 11.4 20.1 38 0.30 10.6 19.7 34 * "" 0.38 15.0 25.0 37 0.26 11.9 22.4 31 i"" 0.40 12.6 22.1 35 0.26 11.3 22.2 29 fg 0.49 11.8 19.9 34 0.31 10.9 20.5 35 –– 0.50 4.1 6.8 18 0.25 4.4 8.5 18 ffgg 0.48 13.9 23.9 41 0.35 12.4 22.9 38 () 0.42 16.6 27.8 53 0.28 13.1 25.8 42 "" 0.45 13.8 24.8 36 0.30 12.4 24.7 32
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
88
"" 0.45 13.8 24.8 36 0.30 12.4 24.7 32 [] 0.46 16.7 28.1 45 0.26 14.7 28.5 43 hhhiii 0.57 3.4 5.8 20 0.36 3.1 5.5 18 GPT-Neo-2.7B (2.7B)hi 0.44 20.1 34.8 51 0.29 19.5 38.3 46 * "" 0.40 27.2 47.9 61 0.22 28.9 57.6 58 i"" 0.37 21.8 39.4 45 0.21 22.5 45.6 41 fg 0.48 21.4 36.5 55 0.28 23.7 45.9 57 –– 0.56 3.9 6.7 14 0.26 3.8 7.4 13 ffgg 0.43 21.2 36.2 44 0.27 28.0 55.7 56 () 0.48 17.0 28.7 42 0.32 19.5 36.8 52 "" 0.38 25.6 44.5 58 0.22 28.6 58.2 59
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
89
"" 0.38 25.6 44.5 58 0.22 28.6 58.2 59 [] 0.48 18.7 32.1 47 0.26 23.3 46.2 50 hhhiii 0.49 14.8 24.9 33 0.32 18.7 37.3 37 GPT-J-6B (6B)hi 0.40 25.0 43.4 66 0.35 20.1 35.7 56 * "" 0.42 26.8 44.8 60 0.33 23.5 41.9 56 i"" 0.39 29.3 50.3 65 0.31 24.2 44.8 64 fg 0.41 26.1 44.6 57 0.33 27.1 47.7 72 –– 0.46 5.9 9.7 17 0.23 4.6 8.6 17 ffgg 0.30 29.9 53.8 56 0.30 27.5 52.3 73 () 0.44 21.0 34.8 53 0.37 19.5 37.7 64 "" 0.41 27.8 45.7 63 0.34 25.3 45.2 62
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
90
"" 0.41 27.8 45.7 63 0.34 25.3 45.2 62 [] 0.45 20.1 34.0 53 0.36 20.8 37.7 65 hhhiii 0.39 28.3 47.4 66 0.32 25.6 47.2 66 Table 10: Zero-shot performances of the off-the-shelf “small” language models on the clean version of the AMAZON dataset (AMAZON -clean, in short). As before, none of the models could go beyond the 60% accuracy level, but most of them seem to have achieved slightly better perplexity scores in the clean version of the dataset than in the original version. 17 Positive!Negative Negative!Positive Model Delimiter-Pair Acc r-sBLEU s-sBLEU PPL Acc r-sBLEU s-sBLEU PPL GPT-2-Small (117M)hi 0.38 10.1 29.7 49 0.11 13.8 40.6 47 * "" 0.41 3.1 10.6 31 0.21 4.4 14.0 33 i"" 0.33 4.8 13.4 31 0.15 6.5 18.6 31
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
91
i"" 0.33 4.8 13.4 31 0.15 6.5 18.6 31 fg 0.36 8.4 23.3 35 0.15 7.8 23.5 34 –– 0.45 4.5 12.0 28 0.14 6.7 19.3 33 ffgg 0.37 13.4 38.9 62 0.11 16.6 49.1 54 () 0.36 8.0 25.2 42 0.13 10.9 32.7 46 "" 0.37 4.9 13.7 30 0.18 6.7 20.3 35 [] 0.36 6.8 20.7 38 0.12 8.7 25.2 31 hhhiii 0.43 2.1 5.8 17 0.09 2.1 6.4 17 GPT-2-Medium (345M)hi 0.55 9.9 27.0 44 0.31 10.3 28.2 38 * "" 0.64 7.4 17.5 40 0.38 7.2 16.7 33 i"" 0.52 5.5 15.3 26 0.31 5.8 14.8 26
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
92
i"" 0.52 5.5 15.3 26 0.31 5.8 14.8 26 fg 0.66 7.6 17.6 34 0.35 8.7 24.1 34 –– 0.69 4.6 11.3 30 0.36 5.0 12.3 27 ffgg 0.68 12.2 30.3 52 0.32 14.8 36.6 58 () 0.63 8.5 22.1 46 0.32 10.5 26.8 48 "" 0.66 5.1 13.1 29 0.41 6.3 15.2 30 [] 0.66 8.4 22.0 36 0.32 8.1 21.0 33 hhhiii 0.64 1.8 4.7 16 0.24 2.2 5.9 16 GPT-2-Large (774M)hi 0.65 14.5 36.8 54 0.22 17.3 46.7 38 * "" 0.61 13.8 33.7 43 0.27 15.8 44.4 45 i"" 0.57 16.2 44.0 59 0.27 18.7 51.4 53
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
93
i"" 0.57 16.2 44.0 59 0.27 18.7 51.4 53 fg 0.68 12.8 30.6 41 0.26 13.5 37.5 38 –– 0.64 8.9 22.3 31 0.24 9.7 26.3 25 ffgg 0.69 18.2 45.9 75 0.24 20.6 58.2 55 () 0.68 10.6 26.0 40 0.28 15.4 40.6 46 "" 0.74 12.0 25.9 44 0.34 14.3 34.7 42 [] 0.70 8.3 20.2 31 0.28 9.7 26.2 32 hhhiii 0.73 6.1 14.8 21 0.27 6.9 17.7 19 GPT-2-XL (1558M)hi 0.67 15.0 35.3 59 0.41 16.4 40.4 54 * "" 0.67 10.0 25.0 35 0.37 13.0 31.6 36 i"" 0.66 10.4 25.8 41 0.34 12.5 30.2 39
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
94
i"" 0.66 10.4 25.8 41 0.34 12.5 30.2 39 fg 0.78 9.7 21.1 41 0.41 12.1 30.1 40 –– 0.74 6.4 13.9 25 0.37 6.3 14.2 20 ffgg 0.67 17.2 38.9 61 0.35 18.8 49.2 66 () 0.72 8.6 18.5 35 0.40 12.4 28.3 42 "" 0.72 9.7 23.3 41 0.38 10.3 24.9 34 [] 0.72 9.2 22.0 35 0.41 10.1 23.5 31 hhhiii 0.70 4.0 9.5 18 0.39 4.6 11.0 17 GPT-Neo-1.3B (1.3B)hi 0.61 6.5 16.0 28 0.38 6.8 15.7 26 * "" 0.31 13.3 38.7 33 0.24 13.5 35.4 37 i"" 0.24 16.9 52.1 54 0.21 15.7 45.8 44
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
95
i"" 0.24 16.9 52.1 54 0.21 15.7 45.8 44 fg 0.66 3.2 8.4 19 0.38 5.3 12.2 21 –– 0.52 2.9 8.4 17 0.30 4.4 11.2 20 ffgg 0.60 9.1 23.6 35 0.39 8.5 21.2 30 () 0.59 6.8 18.6 34 0.27 11.1 31.1 47 "" 0.46 14.9 40.2 54 0.23 14.9 40.1 47 [] 0.57 8.1 20.8 38 0.36 8.4 22.1 33 hhhiii 0.68 1.3 3.8 17 0.38 1.9 4.1 16 GPT-Neo-2.7B (2.7B)hi 0.68 8.3 21.8 28 0.28 12.5 33.1 31 * "" 0.56 14.1 39.1 54 0.18 18.1 51.9 51 i"" 0.54 12.1 34.3 43 0.21 15.9 46.4 42
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]
2205.11503
96
i"" 0.54 12.1 34.3 43 0.21 15.9 46.4 42 fg 0.63 7.5 19.5 27 0.26 12.4 32.8 32 –– 0.63 3.4 8.5 16 0.26 3.7 9.8 14 ffgg 0.55 12.0 32.9 40 0.20 16.2 48.1 42 () 0.73 7.3 18.0 38 0.34 13.6 34.2 47 "" 0.55 12.6 33.2 42 0.17 15.4 45.9 42 [] 0.62 8.0 21.3 33 0.27 13.7 37.0 39 hhhiii 0.64 4.6 12.6 21 0.27 7.1 18.5 20 GPT-J-6B (6B)hi 0.60 14.9 37.6 52 0.44 14.4 33.0 51 * "" 0.57 16.2 41.0 57 0.36 16.1 37.1 49 i"" 0.52 16.4 43.3 62 0.32 17.2 42.6 56
2205.11503
Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models
We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.
http://arxiv.org/pdf/2205.11503
[ "Mirac Suzgun", "Luke Melas-Kyriazi", "Dan Jurafsky" ]
[ "cs.CL" ]
GitHub page: https://github.com/suzgunmirac/prompt-and-rerank. Project page: https://lukemelas.github.io/prompt-and-rerank/
null
cs.CL
20220523
20220523
[ { "id": "2110.10668" }, { "id": "2105.08206" }, { "id": "1904.02295" }, { "id": "2112.07868" }, { "id": "1905.10060" }, { "id": "2205.11503" }, { "id": "2010.01054" }, { "id": "1908.08039" } ]