Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Learning to Generate Text in Arbitrary Writing Styles (2312.17242v2)

Published 28 Dec 2023 in cs.CL

Abstract: Prior work in style-controlled text generation has focused on tasks such as emulating the style of prolific literary authors, producing formal or informal text, and mitigating toxicity of generated text. Plentiful demonstrations of these styles are available, and as a result modern LLMs are often able to emulate them, either via prompting or discriminative control. However, in applications such as writing assistants, it is desirable for LLMs to produce text in an author-specific style on the basis of a potentially small writing sample. For example, someone writing in a particular dialect may prefer writing suggestions that retain the same dialect. We find that instruction-tuned LLMs can struggle to reproduce author-specific style demonstrated in a prompt. Instead, we propose to guide a LLM to generate text in a target style using contrastively-trained representations that capture stylometric features. Our approach (StyleMC) combines an author-adapted LLM with sequence-level inference to improve stylistic consistency, and is found to be effective in a variety of conditions, including unconditional generation and style transfer. Additionally, we find that the proposed approach can serve as an effective anonymization method, by editing a document to mask authorship while preserving the original meaning

Definition Search Book Streamline Icon: https://streamlinehq.com
References (44)
  1. Nicholas Andrews and Marcus Bishop. 2019. Learning invariant representations of social media users. 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 1684–1695, Hong Kong, China. Association for Computational Linguistics.
  2. Speecht5: Unified-modal encoder-decoder pre-training for spoken language processing. arXiv preprint arXiv:2110.07205.
  3. The pushshift reddit dataset.
  4. Olá, bonjour, salve! XFORMAL: A benchmark for multilingual formality style transfer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3199–3216, Online. Association for Computational Linguistics.
  5. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901.
  6. Evaluation of text generation: A survey. ArXiv, abs/2006.14799.
  7. Plug and play language models: A simple approach to controlled text generation. arXiv preprint arXiv:1912.02164.
  8. Toxicity in chatgpt: Analyzing persona-assigned language models.
  9. Compositional visual generation with energy based models. Advances in Neural Information Processing Systems, 33:6637–6647.
  10. Speaker anonymization using x-vector and neural waveform models. arXiv preprint arXiv:1905.13561.
  11. Gltr: Statistical detection and visualization of generated text. arXiv preprint arXiv:1906.04043.
  12. Exposing the implicit energy networks behind masked language models via metropolis–hastings. arXiv preprint arXiv:2106.02736.
  13. Steer: Unified style transfer with expert reinforcement. ArXiv, abs/2311.07167.
  14. Geoffrey E. Hinton. 2002. Training products of experts by minimizing contrastive divergence. Neural Comput., 14(8):1771–1800.
  15. Deep learning for text style transfer: A survey. Computational Linguistics, 48(1):155–2 05.
  16. CTRL: A conditional transformer language model for controllable generation. CoRR, abs/1909.05858.
  17. A deep metric learning approach to account linking. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5275–5287, Online. Association for Computational Linguistics.
  18. Gedi: Generative discriminator guided sequence generation.
  19. Reformulating unsupervised style transfer as paraphrase generation.
  20. Towards robust and privacy-preserving text representations. In Annual Meeting of the Association for Computational Linguistics.
  21. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing.
  22. Roberta: A robustly optimized bert pretraining approach.
  23. Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization.
  24. Politeness transfer: A tag and generate approach. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1869–1881, Online. Association for Computational Linguistics.
  25. Mix and match: Learning-free controllable text generationusing energy language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 401–415, Dublin, Ireland. Association for Computational Linguistics.
  26. Frederick Mosteller and David L Wallace. 1963. Inference in an authorship problem: A comparative study of discrimination methods applied to the authorship of the disputed federalist papers. Journal of the American Statistical Association, 58(302):275–309.
  27. Large dual encoders are generalizable retrievers. CoRR, abs/2112.07899.
  28. Training language models to follow instructions with human feedback.
  29. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155.
  30. Low-resource authorship style transfer with in-context learning.
  31. 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, Melbourne, Australia. Association for Computational Linguistics.
  32. Language models are unsupervised multitask learners.
  33. 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.
  34. A recipe for arbitrary text style transfer with large language models. CoRR, abs/2109.03910.
  35. Nils Reimers and Iryna Gurevych. 2019. Sentence-bert: Sentence embeddings using siamese bert-networks. arXiv preprint arXiv:1908.10084.
  36. Textsettr: Few-shot text style extraction and tunable targeted restyling.
  37. Learning universal authorship representations. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 913–919, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
  38. Transforming delete, retrieve, generate approach for controlled text style transfer.
  39. Clustering-friendly representation learning via instance discrimination and feature decorrelation. ArXiv, abs/2106.00131.
  40. MosaicML NLP Team. 2023. Introducing mpt-7b: A new standard for open-source, commercially usable llms.
  41. Can Authorship Representation Learning Capture Stylistic Features? Transactions of the Association for Computational Linguistics, 11:1416–1431.
  42. Same author or just same topic? towards content-independent style representations. In Proceedings of the 7th Workshop on Representation Learning for NLP, pages 249–268, Dublin, Ireland. Association for Computational Linguistics.
  43. Kevin Yang and Dan Klein. 2021. Fudge: Controlled text generation with future discriminators. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3511–3535.
  44. Opt: Open pre-trained transformer language models.
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Aleem Khan (6 papers)
  2. Andrew Wang (42 papers)
  3. Sophia Hager (4 papers)
  4. Nicholas Andrews (22 papers)
Citations (4)

Summary

We haven't generated a summary for this paper yet.