Introducing Aspects of Creativity in Automatic Poetry Generation (2019)

Abstract: Poetry Generation involves teaching systems to automatically generate text that resembles poetic work. A deep learning system can learn to generate poetry on its own by training on a corpus of poems and modeling the particular style of language. In this paper, we propose taking an approach that fine-tunes GPT-2, a pre-trained language model, to our downstream task of poetry generation. We extend prior work on poetry generation by introducing creative elements. Specifically, we generate poems that express emotion and elicit the same in readers, and poems that use the language of dreams—called dream poetry. We are able to produce poems that correctly elicit the emotions of sadness and joy 87.5 and 85 percent, respectively, of the time. We produce dreamlike poetry by training on a corpus of texts that describe dreams. Poems from this model are shown to capture elements of dream poetry with scores of no less than 3.2 on the Likert scale. We perform crowdsourced human-evaluation for all our poems. We also make use of the Coh-Metrix tool, outlining metrics we use to gauge the quality of text generated.

## introduction many natural language processing tasks require the generation of human-like language. some tasks, such as image and video captioning and automatic weather and sports reporting, convert nontextual data to text. some others, such as summarization and machine translation, convert one text to another. there are additional tasks that aim to produce text, given a topic or a few keywords such as story generation, joke generation, and poetry generation, among others. poetry generation produces creative content, and delivers the content in an aesthetically pleasing manner, usually following a specific structure. thus, in addition to generating text as if in a story, the lines produced usually have a certain length, quite frequently there is a rhyming scheme as well as rhythm, and organization into structures such as couplets, quatrains, quintets, and stanzas. among other tools, creativity comes from unusual usage of words through effects such as alliteration, assonance, and elision; use of metaphors, symbolism, and other linguistic devices; licensing of underlying imagery with expressed feelings, sentiments, and emotions. work in natural language generation can be traced to pioneering rule-based simulations of chatbots such as the "psychotherapist" eliza @xcite and paranoid schizophrenia-suffering parry @xcite . surveys such as @xcite @xcite have described the progress in natural language generation over 50 years. of late, the use of deep learning has produced enviable progress in natural language generation, especially in topics such as machine translation @xcite , image captioning @xcite and dialogue generation @xcite . this paper discusses the automatic generation of natural-sounding poems that are creative. creativity comes in many hues, and we experiment with a few established ways of creative expression in poetry generation. first, we generate poetry that can potentially evoke a response from the readers or hearers in terms of emotions and feelings they generate. additionally, we choose the idea of mimicking the language of dreams as another form of creative expression due to its longstanding history in poetry. dream poetry dates back to medieval times where famous fourteenth century authors, like chaucer, experimented using dreams as the structure for an image or picture they wished to paint with a poem @xcite . a dream poem is said to be characterized by the 'i' of the poem and its substance of a dream or a vision included @xcite . to the best of our knowledge, prior work on poetry generation, whether using deep learning or not, has not explored the incorporation of emotion-eliciting phraseology or elements of creativity such as dream poetry. our research provides the following contributions: this paper is organized as follows. section 2 presents related work. section 3 discusses our approach to creative text generation including pre-processing steps, architecture used, and approaches to training. section 4 discusses our experiments and results. finally, we present evaluation of our research in section 5, followed by conclusions and future work in section 6. ## related work early methods for poetry generation made use of template-oriented and rule-based techniques. these approaches often required a large amount of feature picking and knowledge of syntactic and semantic rules in a language @xcite . other methods treated poetry generation as special cases of machine translation or summarization tasks @xcite . we believe that forcing a model to adhere to specific rules or templates, or summarizing or translating a given text to generate new poetry is unlikely to lead to the artistically expressive quality we seek to generate. more recently, deep learning methods have become prevalent in natural language generation, including poetry generation. @xcite for instance, used convolutional (cnn) and recurrent neural networks (rnn) to generate chinese poetry. rnns allow for shortterm memory of the language to be maintained by inputting the generated output of a network cell back into itself, essentially building context. @xcite used long short-term memory (lstm) units, which are advanced gated versions of rnns, to the task of poetry generation. @xcite attempted to address the style issue by training the networks using particular poets and controlling for style in chinese poetry. they found that with enough training data, adequate results could be achieved. problems related to poetic structure were addressed by @xcite . they generated rhythmic poetry by training the network on only a single type of poetry to ensure produced poems adhered to a single rhythmic structure. it was found in human evaluations that while the poems produced were rated to be of lower quality than human produced poems, they were indistinguishable from human produced poems. @xcite took the lstm approach one step further with the deepspeare model by employing an attention mechanism to model interactions among generated words. they also use three neural networks, one for rhythm, one for rhyming and another for word choice in their quest to generate shakespeare-like sonnets. @xcite developed a deep neural architecture called the transformer that did away with any sort of need for recurrence. the transformer also employed an elaborate attention mechanism that has been shown to be useful in natural language tasks. @xcite used this architecture in their generative pretrained transformer 2 (gpt-2) model. gpt-2 is capable of many downstream tasks like text generation but to our knowledge, research has not been published using the gpt-2 model specifically for poetry generation. on a slightly different but related note, natural language generation influenced by multi-modal input was attempted by @xcite to generate song lyrics in the style of specific artists by fusing outputs coming from lyrical inputs processed by an rnn and audio clips processed by a cnn. text generation has also been influenced, in a cross domain manner, through images. the works of @xcite have shown that coupled visual-poetic embeddings can be used to pick out poetic clues in images, which in turn can be used to inspire the generated text. though influenced natural language generation in and of itself is not a novel idea, we feel our attempt to style text with the intent of eliciting particular emotions provides a creative way to explore this subtask. ## approach our goal is to successfully demonstrate the introduction of creative flair in automatic poetry generation in two exemplar ways: explicit show of emotion and the use of language that is predominantly first person with dream-like imagery. to enable the expression of emotion in generated poems, our work involves a preliminary step of scoring a corpus of downloaded poems for emotion to produce subsets of poems that express one of eight different identified emotions. this step is followed by the actual generation of poems by fine-tuning the pre-trained gpt-2 natural language model. we train eight separate models for eight different emotions, each on a sub-corpus predominantly demonstrating a particular emotion. to generate poems that use dream-like language, we create a text corpus composed of a large number of dream transcriptions created in first person by actual viewers of dreams. in this case, we apply transfer learning by fine-tuning the pre-trained gpt-2 on the dream corpus, followed by training again on poetry. we evaluate the generated poems using automated techniques as well as humans. a high-level overview of the emotion elicitation portion of our project is shown in figure 1 . to create a corpus of poems based on the emotions they elicit, we make use of the emolex dic-tionary @xcite . emolex is a word-level emotion lexicon that associates english words with the eight different emotion categories we wish to explore. each poem (or book of poems) in our dataset is given a score that is the total of the associated emotion scores in emolex for each word. the maximum emotion word score is taken and the poem is labeled under that emotion category. we create eight such datasets, one corresponding to each emotion category supported by emolex. this approach allows us to to train multiple models on our split dataset. ## evaluation in the first crowd-sourced analysis of our emotioneliciting poetry we presented four poems from each category (of the five data-represented emotion categories) to ten human reviewers with undergraduate level educational backgrounds. all reviewers are native speakers of english. poems presented were randomly selected from the top 20 emolex scored poems out of a pool of 1,000 generated poems. these reviewers were asked to rate each poem based on the emotions elicited within we have reached the peak of the highest mountain in the world the mountain of dreams. ## conclusion & future work in this paper we influenced automatic natural language generation to create poetry through the use of classified emotion poems and dream text. to do so, we first leveraged a word-level emotion lexicon to construct a meaning for emotion-eliciting text and used that text to train separate language models. next, we gathered data of dream records and employed transfer learning in attempts to generate dream-like poetry. the work reported in this paper seeks to create art in the form of auto-generated poetry while opening the door to more projects involving emotion-eliciting text-based tasks and influenced creative neural generation. we would like to thank the reviewers for their feedback on this project. comments and suggestions from reviewers -both those that the were incorporated into this article and those on which we will report in future work -provide invaluable insight as to improving our results. importantly, our continuing research involves gathering a more comprehensive human-evaluation with a larger number of reviewers and poems to be judged. we also wish to gather data for the underrepresented emotion categories, leading, ideally, to a more robust language model for each emotion. our work thus far provides a baseline for introducing emotions into generated text via a word-level lexicon, but we wish to employ other tools -segment-level lexicons, for example -in an attempt to better capture the contextual dependencies of emotion. additionally, the word-level baseline we have produced focuses on generating single-emotion text. we are interested in examining poems of multiple emotions and different levels of intensity to expand on this study. finally, we wish to seek out additional forms of replicating creativity that artists incorporate in their work.