Article

Generating Chinese Classical Poems with RNN Encoder-Decoder

Authors:
To read the full-text of this research, you can request a copy directly from the authors.

Abstract

We take the generation of Chinese classical poem lines as a sequence-to-sequence learning problem, and build a novel system based on the RNN Encoder-Decoder structure to generate quatrains (Jueju in Chinese), with a topic word as input. Our system can jointly learn semantic meaning within a single line, semantic relevance among lines in a poem, and the use of structural, rhythmical and tonal patterns, without utilizing any constraint templates. Experimental results show that our system outperforms other competitive systems. We also find that the attention mechanism can capture the word associations in Chinese classical poetry and inverting target lines in training can improve performance.

No full-text available

Request Full-text Paper PDF

To read the full-text of this research,
you can request a copy directly from the authors.

... As neural network demonstrates powerful ability for natural language representation (Bengio et al. 2003;Goldberg 2017), different neural network structures have been utilized for poem generation and shown great advances. The main structures are developed from vanilla recurrent neural network (Zhang and Lapata 2014) to bi-directional long short term memory network and bi-directional gated recurrent unit network Yi, Li, and Sun 2017). The poem generation is widely interpreted as a sequence-tosequence problem, which utilize the encoder-decoder framework to encode the previous sequence and generate the later sequence with the decoder (Wang, Luo, and Wang 2016;Yi, Li, and Sun 2017). ...
... The main structures are developed from vanilla recurrent neural network (Zhang and Lapata 2014) to bi-directional long short term memory network and bi-directional gated recurrent unit network Yi, Li, and Sun 2017). The poem generation is widely interpreted as a sequence-tosequence problem, which utilize the encoder-decoder framework to encode the previous sequence and generate the later sequence with the decoder (Wang, Luo, and Wang 2016;Yi, Li, and Sun 2017). To strengthen the relation between the encoder and decoder, the attention mechanism has been incorporated for poem generation (Wang, Luo, and Wang 2016;Zhang et al. 2017;Yi, Li, and Sun 2017). ...
... The poem generation is widely interpreted as a sequence-tosequence problem, which utilize the encoder-decoder framework to encode the previous sequence and generate the later sequence with the decoder (Wang, Luo, and Wang 2016;Yi, Li, and Sun 2017). To strengthen the relation between the encoder and decoder, the attention mechanism has been incorporated for poem generation (Wang, Luo, and Wang 2016;Zhang et al. 2017;Yi, Li, and Sun 2017). Besides, some tricks like working memory mechanism and salientclue mechanism have been proposed to improve the coherence in meanings and topics for poem generation. ...
Article
Full-text available
Owing to its unique literal and aesthetical characteristics, automatic generation of Chinese poetry is still challenging in Artificial Intelligence, which can hardly be straightforwardly realized by end-to-end methods. In this paper, we propose a novel iterative polishing framework for highly qualified Chinese poetry generation. In the first stage, an encoder-decoder structure is utilized to generate a poem draft. Afterwards, our proposed Quality-Aware Masked Language Model (QA-MLM) is employed to polish the draft towards higher quality in terms of linguistics and literalness. Based on a multi-task learning scheme, QA-MLM is able to determine whether polishing is needed based on the poem draft. Furthermore, QA-MLM is able to localize improper characters of the poem draft and substitute with newly predicted ones accordingly. Benefited from the masked language model structure, QA-MLM incorporates global context information into the polishing process, which can obtain more appropriate polishing results than the unidirectional sequential decoding. Moreover, the iterative polishing process will be terminated automatically when QA-MLM regards the processed poem as a qualified one. Both human and automatic evaluation have been conducted, and the results demonstrate that our approach is effective to improve the performance of encoder-decoder structure.
... Consequently, Baidu Translate was selected as the online translation system for our study. Previous work on poetry generation has utilized diverse human evaluation criteria such as fluency, coherence, meaningfulness, poeticness, overall quality, and adequacy (Manurung et al., 2012;Zhang and Lapata, 2014;Yan, 2016;Yi et al., 2017Yi et al., , 2018Seljan et al., 2020;Refaee, 2023). However, when translating English into Chinese, strict adherence to grammatical rules is not always necessary (Chen, 1993;Owen, 2003), and modern poetry often features discontinuous narration and a flexible combination of words (Awan and Khalida, 2015). ...
... For these reasons, appropriate line-breaking is also included in our evaluation criteria. Drawing from previous studies (Manurung et al., 2012;Zhang and Lapata, 2014;Yan, 2016;Yi et al., 2017Yi et al., , 2018Seljan et al., 2020;Refaee, 2023) and reflecting the unique elements of modern poetry, we have designed a new human evaluation framework specifically tailored for the translation of modern poetry. We assess candidate translations comprehensively, focusing on eight key aspects, ranging from overall impact to specific details: ...
... Previous work on poetry generation has utilized diverse human evaluation criteria such as fluency, coherence, meaningfulness, poeticness, overall quality, and adequacy (Manurung et al., 2012;Zhang and Lapata, 2014;Yan, 2016;Yi et al., 2017Yi et al., , 2018Seljan et al., 2020;Refaee, 2023). However, when translating English into Chinese, strict adherence to grammatical rules is not always necessary (Chen, 1993;Owen, 2003), and modern poetry often features discontinuous narration and a flexible combination of words (Awan and Khalida, 2015). ...
... For these reasons, appropriate line-breaking is also included in our evaluation criteria. Drawing from previous studies (Manurung et al., 2012;Zhang and Lapata, 2014;Yan, 2016;Yi et al., 2017Yi et al., , 2018Seljan et al., 2020;Refaee, 2023) and reflecting the unique elements of modern poetry, we have designed a new human evaluation framework specifically tailored for the translation of modern poetry. We assess candidate translations comprehensively, focusing on eight key aspects, ranging from overall impact to specific details: ...
Preprint
Full-text available
Machine translation (MT) has historically faced significant challenges when applied to literary works, particularly in the domain of poetry translation. The advent of Large Language Models such as ChatGPT holds potential for innovation in this field. This study examines ChatGPT's capabilities in English-Chinese poetry translation tasks, utilizing targeted prompts and small sample scenarios to ascertain optimal performance. Despite promising outcomes, our analysis reveals persistent issues in the translations generated by ChatGPT that warrant attention. To address these shortcomings, we propose an Explanation-Assisted Poetry Machine Translation (EAPMT) method, which leverages monolingual poetry explanation as a guiding information for the translation process. Furthermore, we refine existing evaluation criteria to better suit the nuances of modern poetry translation. We engaged a panel of professional poets for assessments, complemented evaluations by using GPT-4. The results from both human and machine evaluations demonstrate that our EAPMT method outperforms traditional translation methods of ChatGPT and the existing online systems. This paper validates the efficacy of our method and contributes a novel perspective to machine-assisted literary translation.
... Developing machines that reproduce artistic behaviours and learn to be creative is a long-standing goal of the scientific community in the context of Artificial Intelligence [1,2]. Recently, several researches focused on the case of the noble art of Poetry, motivated by success of Deep Learning approaches to Natural Language Processing (NLP) and, more specifically, to Natural Language Generation [3,4,5,6,7,8]. However, existing Machine Learning-based poem generators do not model the natural way poems are created by humans, i.e., poets usually do not create their compositions all in one breath. ...
... In order to show the quality of the detector module and that approaching text correction as shortest path problem is feasible, we created "corrupted" poems from real poems in the dataset by replacing one or more words in random positions with words sampled from the entire vocabulary V . 5 The agent operates in an environment where each episode starts with a corrupted poem, and it has to learn to reconstruct the original not-corrupted poem, selecting at each step which word to change. In this artificial setting we assume that, once the agent picks which word to substitute, a perfect prompter (oracle) will replace it with the ground truth, i.e. the word originally positioned there in the real poem. ...
Preprint
Writers, poets, singers usually do not create their compositions in just one breath. Text is revisited, adjusted, modified, rephrased, even multiple times, in order to better convey meanings, emotions and feelings that the author wants to express. Amongst the noble written arts, Poetry is probably the one that needs to be elaborated the most, since the composition has to formally respect predefined meter and rhyming schemes. In this paper, we propose a framework to generate poems that are repeatedly revisited and corrected, as humans do, in order to improve their overall quality. We frame the problem of revising poems in the context of Reinforcement Learning and, in particular, using Proximal Policy Optimization. Our model generates poems from scratch and it learns to progressively adjust the generated text in order to match a target criterion. We evaluate this approach in the case of matching a rhyming scheme, without having any information on which words are responsible of creating rhymes and on how to coherently alter the poem words. The proposed framework is general and, with an appropriate reward shaping, it can be applied to other text generation problems.
... Some cultures and styles also have particular semantic limitations or 'standards', for example, 'centrality' of certain topics in classical Japanese poetry, see (Maynard, 1994). We do not make attempts to address high-level semantic structure, however one can add some kind of pseudo-semantic rules to the model discussed further, say via some mechanism in line with (Ghazvininejad et al., 2016) or (Yi et al., 2017). The importance of phonetics in poetical texts was broadly discussed among Russian futuristic poets, see (Kruchenykh, 1923). ...
... In (Sutskever et al., 2011) and in (Graves, 2013) it is demonstrated that a character-based recurrent neural network with gated connections or LSTM networks respectively can generate texts that resemble news or Wikipedia articles. Chinese classical poetry due to its diverse and deeply studied structure is addressed in (He et al., 2012), (Yi et al., 2017), (Yan, 2016), (Yan et al., 2016), or (Zhang et al., 2017). In (Ghazvininejad et al., 2016) an algorithm generates a poem in line with a user-defined topic in (Potash et al., 2015) stylized rap lyrics are generated with LSTM trained on a rap poetry corpus. ...
... In [13] it was shown that comparable prosaic texts can be generated with LSTM networks as well. There are a number of works specifically focused on Chinese classical poetry generation, for example [14], [15], [16], [17], or [18], however interesting contributions in the area of generative poetry in languages other than Chinese or in a multilingual setting are relatively rare. One could mention the paper by [19] where an algorithm generates a poem in line with a topic given by the user and the paper by [20] in which the authors generate stylized rap lyrics with LSTM trained on a rap poetry corpus. ...
... Some cultures and styles also have particular semantic limitations or 'standards', for example, 'centrality' of certain topics in classical Japanese poetry, see [39]. We do not make attempts to address high-level semantic structure, however one can add some kind of pseudosemantic rules to our model, say via some mechanism in line with [19] or [15]. Instead, we suggest focusing on syntax and phonetics. ...
Preprint
Full-text available
This paper addresses the problem of stylized text generation in a multilingual setup. A version of a language model based on a long short-term memory (LSTM) artificial neural network with extended phonetic and semantic embeddings is used for stylized poetry generation. Phonetics is shown to have comparable importance for the task of stylized poetry generation as the information on the target author. The quality of the resulting poems generated by the network is estimated through bilingual evaluation understudy (BLEU), a survey and a new cross-entropy based metric that is suggested for the problems of such type. The experiments show that the proposed model consistently outperforms random sample and vanilla-LSTM baselines, humans also tend to attribute machine generated texts to the target author.
... These neural network-based approaches now dominate the field, with popular methods like Transformers [29], the GPT family [30][31][32][33], RoBERTa [34], LLaMA [35] and their applications such as Med-Bert [36], ChatGPT [37], and Gemini [38]. These methods have achieved impressive results in various text generation tasks, including image captioning [39], text summarizing [40], machine translation [41], script-writing [42], and even poetry composition [43]. ...
Article
Full-text available
The proliferation of text generation applications in social networks has raised concerns about the authenticity of online content. Large language models like GPTs can now produce increasingly indistinguishable text from human-written content. While learning-based classifiers can be trained to differentiate between human-written and machine-generated text, their robustness is often questionable. This work first demonstrates the vulnerability of pre-trained human-written text detectors to simple mutation-based adversarial attacks. We then propose a novel black-box defense strategy to enhance detector robustness on such attacks without requiring any knowledge about the attacking method. Our experiments demonstrate that the proposed black-box method significantly enhances detector performance in discerning human-authored from machine-generated text, achieving comparable results to white-box defense strategies.
... Classical poetry, as a flowing history, records the life experience and emotional experience of the forefathers and is a valuable crystallization of wisdom in the process of national development, which needs to be immersed, studied and inherited by future generations. However, the current teacher's explanation in the classroom of ancient poetry teaching is still limited to the obscure content, ignoring the overall cultural connotation and meaning of the poems [1][2], And students treat poems in class only to get the marks of memorizing and mimeographing in the test paper and mechanically memorize them, after reading a poem they don't understand the poet's state of mind at the time of creation, and they can't be integrated into the scene depicted by the poet, and they can't recognize the transcendental significance given to work by the context of the times [3][4]. ...
Article
Full-text available
Classical poetry embodies the essence of traditional Chinese culture, and its lyricism and infectiousness provide an ideal platform for educating about emotions. However, due to the West’s influence in modern times, the teaching of classical poetry has not expanded to include the emotional aspect. Therefore, this paper establishes the JSA model as the research model for recognizing emotions in classical poetry, based on an analysis of existing methods for recognizing emotions in Chinese literature. Upon scrutinizing the JSA model’s construction, we discovered that it overly relies on the distribution of emotions for theme generation. Consequently, this paper enhances the JSA model by situating the emotion layer between the theme layer and the word layer, builds the reverse JSA model, and employs Bayesian estimation to estimate the model’s parameters. In this paper, we use classical poems as an example to demonstrate how to analyze the sentiment of classical poems by recognizing tone auxiliaries. The improved JSA model’s emotion recognition effect closely aligns with the actual expression effect of the poems, demonstrating the effective application of the advanced JSA model in this paper for emotion recognition of classical poems.
... In recent times, there has been a growing exploration of the application of Natural Language Processing (NLP) techniques in the area of poetry generation. Notably, new methods of poetry generation have been suggested in different languages, such as employing memory networks [15], [16], Variational AutoEncoder (VAE) [17], reinforcement learning [18], and encoder-decoder transformer mechanism which is adapted by [19] for generating Chinese couplets. ...
Preprint
Full-text available
Recent advances in language models (LMs), have demonstrated significant efficacy in tasks related to the arts and humanities. While LMs have exhibited exceptional performance across a wide range of natural language processing tasks, there are notable challenges associated with their utilization on small datasets and their ability to replicate more creative human capacities. In this study, we aim to address these challenges by training a Persian classical poetry generation model using a transformer architecture on a specialized dataset with no pretraining. Additionally, we propose a novel decoding method to enhance coherence and meaningfulness in the generated poetry, effectively managing the tradeoff between diversity and quality. Furthermore, the results of our training approach and the proposed decoding method are evaluated through comprehensive set of automatic and human evaluations and showed its superior capability to generate coherent and meaningful poetry in compare to other decoding methods and an existing Persian large language model (LLM).
... For example, the GPT-2 model was trained on text scrapped from eight million web pages [2] and is able to generate human-like texts. Due to the high text generation performance, such methods are popular in image caption generation [31], automatic text summarization [32], machine translation [33], moving script-writing [34], poetry composition [35], etc. The vast majority of automatic text generation methods focus on content generation. ...
Preprint
Full-text available
Neural text detectors aim to decide the characteristics that distinguish neural (machine-generated) from human texts. To challenge such detectors, adversarial attacks can alter the statistical characteristics of the generated text, making the detection task more and more difficult. Inspired by the advances of mutation analysis in software development and testing, in this paper, we propose character- and word-based mutation operators for generating adversarial samples to attack state-of-the-art natural text detectors. This falls under white-box adversarial attacks. In such attacks, attackers have access to the original text and create mutation instances based on this original text. The ultimate goal is to confuse machine learning models and classifiers and decrease their prediction accuracy.
... (2) In our problem, the sequential correspondences between the inputs and outputs are of great importance. However, unlike common sequence to sequence problems [38,47], where there are rigorous input-output correspondences, human creations are much more flexible, and each input may influence multiple outputs. As exampled in Figure 1, image C, which plots the embracing between a couple of lovers, determines the third and fourth output sentences. ...
Preprint
Full-text available
AI creation, such as poem or lyrics generation, has attracted increasing attention from both industry and academic communities, with many promising models proposed in the past few years. Existing methods usually estimate the outputs based on single and independent visual or textual information. However, in reality, humans usually make creations according to their experiences, which may involve different modalities and be sequentially correlated. To model such human capabilities, in this paper, we define and solve a novel AI creation problem based on human experiences. More specifically, we study how to generate texts based on sequential multi-modal information. Compared with the previous works, this task is much more difficult because the designed model has to well understand and adapt the semantics among different modalities and effectively convert them into the output in a sequential manner. To alleviate these difficulties, we firstly design a multi-channel sequence-to-sequence architecture equipped with a multi-modal attention network. For more effective optimization, we then propose a curriculum negative sampling strategy tailored for the sequential inputs. To benchmark this problem and demonstrate the effectiveness of our model, we manually labeled a new multi-modal experience dataset. With this dataset, we conduct extensive experiments by comparing our model with a series of representative baselines, where we can demonstrate significant improvements in our model based on both automatic and human-centered metrics. The code and data are available at: \url{https://github.com/Aman-4-Real/MMTG}.
... Yi et al. (Yi et al., 2017) based their work on a sequence-to-sequence model (Cho et al., 2014) to generate Chinese poems. They built an encoderdecoder framework based on a bi-directional recurrent neural network (Bi-RNN) with an attention mechanism. ...
Conference Paper
Full-text available
Automatically generating poetry by computers is a challenging topic that requires the use of advanced deep learning techniques. While much attention has been given to English and Chinese poem generation, there are few significant efforts considering other languages. Generating poems in Arabic is a difficult task due to the complexity of the Arabic language grammatical structure. In this paper, we investigate the feasibility of training generative pre-trained language model GPT-2 to generate Arabic poems. The results of the experiments, which included the BLEU score as well as human assessments, confirmed the effectiveness of our proposed model. Both automatic and human evaluations show that our proposed model outperforms existing models in generating Arabic poetry.
... All the neural models mentioned above attempt to generate fluent and meaningful poems with rules in rhymes and tones, which can be learned from corpus patterns but there were no considerations on improving contexts throughout the poem generated. Most recently, researchers have suggested many new methods of poetry generation, such as employ memory networks [18] [19], Variational AutoEncoder (VAE) [20] and reinforcement learning [21]. Related to our work, a transformer-based language model, GPT2 [3] transformerbased language model is proven to be good at natural language generation, which performs very well on casual texts with context controlling. ...
Preprint
Full-text available
Automatic text generation has garnered growing attention in recent years as an essential step towards computer creativity. Generative Pretraining Transformer 2 (GPT2) is one of the state of the art approaches that have excellent successes. In this paper, we took the first step to investigate the power of GPT2 in traditional Vietnamese poetry generation. In the earlier time, our experiment with base GPT2 was quite good at generating the poem in the proper template. Though it can learn the patterns, including rhyme and tone rules, from the training data, like almost all other text generation approaches, the poems generated still has a topic drift and semantic inconsistency. To improve the cohesion within the poems, we proposed a new model SP-GPT2 (semantic poem GPT2) which was built on the top GPT2 model and an additional loss to constrain context throughout the entire poem. For better evaluation, we examined the methods by both automatic quantitative evaluation and human evaluation. Both automatic and human evaluation demonstrated that our approach can generate poems that have better cohesion without losing the quality due to additional loss. At the same time, we are the pioneers of this topic. We released the first computational scoring module for poems generated in the template containing the style rule dictionary. Additionally, we are the first to publish a Luc-Bat dataset, including 87609 Luc Bat poems, which is equivalent to about 2.6 million sentences, combined with about 83579 poems in other styles was also published for further exploration. The code is available at https://github.com/fsoft-ailab/Poem-Generator
... They compressed the previously generated Tang poetry into an input vector to guide the generation of the next Tang poetry, which was similar to the task of machine translation. Wang et al. [7,8] proposed a method to generate Tang poetry with a consistent theme using a recurrent neural network (RNN) with an attention mechanism. In the process of training and generating Tang poetry, this method focused on the important parts of each poem and the sentences with strong dependence, thereby improving the thematic consistency of all the Tang poems. ...
Article
Full-text available
Steganography based on generative adversarial networks (GANs) has become a hot topic among researchers. Due to GANs being unsuitable for text fields with discrete characteristics, researchers have proposed GAN-based steganography methods that are less dependent on text. In this paper, we propose a new method of generative lyrics steganography based on GANs, called GAN-GLS. The proposed method uses the GAN model and the large-scale lyrics corpus to construct and train a lyrics generator. In this method, the GAN uses a previously generated line of a lyric as the input sentence in order to generate the next line of the lyric. Using a strategy based on the penalty mechanism in training, the GAN model generates non-repetitive and diverse lyrics. The secret information is then processed according to the data characteristics of the generated lyrics in order to hide information. Unlike other text generation-based linguistic steganographic methods, our method changes the way that multiple generated candidate items are selected as the candidate groups in order to encode the conditional probability distribution. The experimental results demonstrate that our method can generate high-quality lyrics as stego-texts. Moreover, compared with other similar methods, the proposed method achieves good performance in terms of imperceptibility, embedding rate, effectiveness, extraction success rate and security.
... First, similar to Yi et al. (2017), we could follow line-to-line poem generation, where the network takes the previous line as prompt and generates a new line which, in turn, is the prompt for the next entry. We could also experiment with different architectures, such as Transformer (Vaswani et al., 2017), as well as training schemes. ...
Conference Paper
Full-text available
This paper proposes a generative language model called AfriKI. Our approach is based on an LSTM architecture trained on a small corpus of contemporary fiction. With the aim of promoting human creativity, we use the model as an authoring tool to explore machine-in-the-loop Afrikaans poetry generation. To our knowledge, this is the first study to attempt creative text generation in Afrikaans.
... First, similar to Yi et al. (2017), we could follow line-to-line poem generation, where the network takes the previous line as prompt and generates a new line which, in turn, is the prompt for the next entry. We could also experiment with different architectures, such as Transformer (Vaswani et al., 2017), as well as training schemes. ...
Preprint
Full-text available
This paper proposes a generative language model called AfriKI. Our approach is based on an LSTM architecture trained on a small corpus of contemporary fiction. With the aim of promoting human creativity, we use the model as an authoring tool to explore machine-in-the-loop Afrikaans poetry generation. To our knowledge, this is the first study to attempt creative text generation in Afrikaans.
... Generative poetry dates back as far as the work of Wheatley [13], along with other early generative mechanisms, and has various subfields at the moment. Generation of poems could be centered around specific literary tradition (see [14][15][16]); could be focused on the generation of topical poetry [17]; or could be centered around stylization that targets a certain author [18] or a genre [19]. For a taxonomy of generative poetry techniques, we address the reader to the work of Lamb et al. [20]. ...
Article
Full-text available
This paper revisits the receptive theory in the context of computational creativity. It presents a case study of a Paranoid Transformer—a fully autonomous text generation engine with raw output that could be read as the narrative of a mad digital persona without any additional human post-filtering. We describe technical details of the generative system, provide examples of output, and discuss the impact of receptive theory, chance discovery, and simulation of fringe mental state on the understanding of computational creativity.
... Human evaluation is necessary for poetry generation. In order to make our results more believable, we use four criteria for human evaluation following Yi et al. [37] and Wang et al. [25]: Fluency: it measures whether the poem reads smoothly and fluently. Coherence: it measures the relevance of adjacent lines in one poem. ...
Conference Paper
Full-text available
Chinese poetry is an important part of worldwide culture, and classical and modern sub-branches are quite different. The former is a unique genre and has strict constraints, while the latter is very flexible in length, optional to have rhymes, and similar to modern poetry in other languages. Thus, it requires more to control the coherence and improve the novelty. In this paper, we propose a generate-retrieve-then-refine paradigm to jointly improve the coherence and novelty. In the first stage, a draft is generated given keywords (i.e., topics) only. The second stage produces a "refining vector" from retrieval lines. At last, we take into consideration both the draft and the "refining vector" to generate a new poem. The draft provides future sentence-level information for a line to be generated. Meanwhile, the "refining vector" points out the direction of refinement based on impressive words detection mechanism which can learn good patterns from references and then create new ones via insertion operation. Experimental results on a collected large-scale modern Chinese poetry dataset show that our proposed approach can not only generate more coherent poems, but also improve the diversity and novelty.
... Generative poetry dates back as far as (Wheatley 1965) along with other early generative mechanisms and has various subfields at the moment. Generation of poems could be addressed following specific literary tradition, see (He, Zhou, and Jiang 2012;Yan et al. 2016;Yi, Li, and Sun 2017); could be focused on the generation of topical poetry (Ghazvininejad et al. 2016); could be centered around stylization that targets a certain author or a genre (Potash, Romanov, and Rumshisky 2015). For a taxonomy of generative poetry techniques, we address the reader to (Lamb, Brown, and Clarke 2017). ...
Preprint
Full-text available
This papers revisits the receptive theory in context of computational creativity. It presents a case study of a Paranoid Transformer - a fully autonomous text generation engine with raw output that could be read as the narrative of a mad digital persona without any additional human post-filtering. We describe technical details of the generative system, provide examples of output and discuss the impact of receptive theory, chance discovery and simulation of fringe mental state on the understanding of computational creativity.
... Most recently, the automatic poetry generation has received great attention, neural networks have made this task a great development, including recurrent neural network (Zhang and Lapata 2014), encoder-decoder sequence to sequence model (Yi, Li, and Sun 2017), and neural attentionbased model (Wang et al. 2016), etc. These studies are of great significance to entertainment and education. ...
Article
In this work, we demonstrate a Chinese classical poetry generation system called Deep Poetry. Existing systems for Chinese classical poetry generation are mostly template-based and very few of them can accept multi-modal input. Unlike previous systems, Deep Poetry uses neural networks that are trained on over 200 thousand poems and 3 million ancient Chinese prose. Our system can accept plain text, images or artistic conceptions as inputs to generate Chinese classical poetry. More importantly, users are allowed to participate in the process of writing poetry by our system. For the user's convenience, we deploy the system at the WeChat applet platform, users can use the system on the mobile device whenever and wherever possible.
... Human evaluation is necessary for poetry generation. In order to make our results more believable, we use four criteria for human evaluation following Yi et al. [37] and Wang et al. [25]: Fluency: it measures whether the poem reads smoothly and fluently. Coherence: it measures the relevance of adjacent lines in one poem. ...
Preprint
Chinese poetry is an important part of worldwide culture, and classical and modern sub-branches are quite different. The former is a unique genre and has strict constraints, while the latter is very flexible in length, optional to have rhymes, and similar to modern poetry in other languages. Thus, it requires more to control the coherence and improve the novelty. In this paper, we propose a generate-retrieve-then-refine paradigm to jointly improve the coherence and novelty. In the first stage, a draft is generated given keywords (i.e., topics) only. The second stage produces a "refining vector" from retrieval lines. At last, we take into consideration both the draft and the "refining vector" to generate a new poem. The draft provides future sentence-level information for a line to be generated. Meanwhile, the "refining vector" points out the direction of refinement based on impressive words detection mechanism which can learn good patterns from references and then create new ones via insertion operation. Experimental results on a collected large-scale modern Chinese poetry dataset show that our proposed approach can not only generate more coherent poems, but also improve the diversity and novelty.
... The model generates the first line using the keywords given by users, and the other lines are generated according to the first line. [13], [16], [20] use an Encoder-Decoder model with attention mechanism to generate poetry. Moreover, this model applies to the generation of Chinese Song iambics [12], which is a different genre in Chinese classical literature. ...
Preprint
In recent years, the automatic generation of classical Chinese poetry has made great progress. Besides focusing on improving the quality of the generated poetry, there is a new topic about generating poetry from an image. However, the existing methods for this topic still have the problem of topic drift and semantic inconsistency, and the image-poem pairs dataset is hard to be built when training these models. In this paper, we extract and integrate the Concrete and Abstract information from images to address those issues. We proposed an infilling-based Chinese poetry generation model which can infill the Concrete keywords into each line of poems in an explicit way, and an abstract information embedding to integrate the Abstract information into generated poems. In addition, we use non-parallel data during training and construct separate image datasets and poem datasets to train the different components in our framework. Both automatic and human evaluation results show that our approach can generate poems which have better consistency with images without losing the quality.
... Previous work on handling the shortcomings of MLE include length-normalizing sentence probability [6], future cost estimation [7], diversity-boosting objective function [8,2] or penalizing repeating tokens [9]. When it comes to poetry generation using generative text models, Zhang and Lapata [10], Yi et al. [11] and Wang et al. [12] use language modeling to generate Chinese poems. However, none of these methods provide feedback on the quality of the generated sample and hence, do not address the qualitative objective required for creative decoding. ...
Preprint
Generative models for text have substantially contributed to tasks like machine translation and language modeling, using maximum likelihood optimization (MLE). However, for creative text generation, where multiple outputs are possible and originality and uniqueness are encouraged, MLE falls short. Methods optimized for MLE lead to outputs that can be generic, repetitive and incoherent. In this work, we use a Generative Adversarial Network framework to alleviate this problem. We evaluate our framework on poetry, lyrics and metaphor datasets, each with widely different characteristics, and report better performance of our objective function over other generative models.
... Although we know of a growing number of automatic poetry generation studies Oliveira (2012); He et al (2012); Yan et al (2013); Zhang and Lapata (2014); Yi et al (2016); Wang et al (2016); Hopkins and Kiela (2017); Oliveira (2017), to date there are just three publications existing in the field of automatic poetry translation. Greene et al (2010) used a phrase-based machine translation approach to translate Italian poems to English translation lattices, searching these lattices for the best translation that obeys a given metrical pattern. ...
Article
Full-text available
The translation of poetry is a complex, multifaceted challenge: the translated text should communicate the same meaning, similar metaphoric expressions, and also match the style and prosody of the original poem. Research on machine poetry translation is existing since 2010, but for four reasons it is still rather insufficient: 1) The few approaches existing completely lack any knowledge about current developments in both lyric theory and translation theory. 2) They are based on very small datasets. 3) They mostly ignored the neural learning approach that superseded the long-standing dominance of phrase-based approaches within machine translation. 4) They have no concept concerning the pragmatic function of their research and the resulting tools. Our paper describes how to improve the existing research and technology for poetry translations in exactly these four points. With regards to 1) we will describe the ‘Poetics of Translation’. With regards to 2) we will introduce the Worlds largest corpus for poetry translations from lyrikline. With regards to 3) we will describe first steps towards a neural machine translation of poetry.With regards to 4) we will describe first steps towards the development of a poetry translation mapping system.
... is widely used to generate poems that can even confuse readers from telling them from poems written by human poets [8,9,12,37,41]. Previous works of poem generation mainly focus on style and rhythmic qualities of poems [12,35], while recent studies introduce topic as a condition for poem generation [8,9,35,41]. For a poem, topic is still a rather abstract concept without specific scenarios. ...
Conference Paper
Full-text available
Automatic generation of natural language from images has attracted extensive attention. In this paper, we take one step further to investigate generation of poetic language (with multiple lines) to an image for automatic poetry creation. This task involves multiple challenges, including discovering poetic clues from the image (e.g., hope from green), and generating poems to satisfy both relevance to the image and poeticness in language level. To solve the above challenges, we formulate the task of poem generation into two correlated sub-tasks by multi-adversarial training via policy gradient, through which the cross-modal relevance and poetic language style can be ensured. To extract poetic clues from images, we propose to learn a deep coupled visual-poetic embedding, in which the poetic representation from objects, sentiments \footnoteWe consider both adjectives and verbs that can express emotions and feelings as sentiment words in this research. and scenes in an image can be jointly learned. Two discriminative networks are further introduced to guide the poem generation, including a multi-modal discriminator and a poem-style discriminator. To facilitate the research, we have released two poem datasets by human annotators with two distinct properties: 1) the first human annotated image-to-poem pair dataset (with 8,292 pairs in total), and 2) to-date the largest public English poem corpus dataset (with 92,265 different poems in total). Extensive experiments are conducted with 8K images, among which 1.5K image are randomly picked for evaluation. Both objective and subjective evaluations show the superior performances against the state-of-the-art methods for poem generation from images. Turing test carried out with over 500 human subjects, among which 30 evaluators are poetry experts, demonstrates the effectiveness of our approach.
... (Wang et al. 2016a) applied the attention-based model. (Yi, Li, and Sun 2016) extended the approach into a quatrain generator with an input word as a topic. (Ghazvininejad et al. 2016) generated poems on a user-supplied topic with rhythmic and rhyme constraints. ...
Preprint
Full-text available
Vision is a common source of inspiration for poetry. The objects and the sentimental imprints that one perceives from an image may lead to various feelings depending on the reader. In this paper, we present a system of poetry generation from images to mimic the process. Given an image, we first extract a few keywords representing objects and sentiments perceived from the image. These keywords are then expanded to related ones based on their associations in human written poems. Finally, verses are generated gradually from the keywords using recurrent neural networks trained on existing poems. Our approach is evaluated by human assessors and compared to other generation baselines. The results show that our method can generate poems that are more artistic than the baseline methods. This is one of the few attempts to generate poetry from images. By deploying our proposed approach, XiaoIce has already generated more than 12 million poems for users since its release in July 2017. A book of its poems has been published by Cheers Publishing, which claimed that the book is the first-ever poetry collection written by an AI in human history.
Article
Chinese poetry, renowned for its elegance and simplicity, is a hallmark of Chinese culture. While neural networks have made significant advancements in generating poetry, balancing diversity with adherence to rigid structural formats remains a challenge. Research indicates that factors such as themes, emotions (e.g., happiness, sadness), and sentiments (e.g., positive, negative) play a crucial role in poetic creation, influencing both the diversity and quality of the generated content.In this paper, we propose MixSong, an autoregressive language model based on the Transformer architecture, designed to incorporate a wide range of conditional factors. MixSong utilizes adversarial training to integrate these factors, enabling the model to implicitly learn distributional information in the latent space. Additionally, we introduce several uniquely customized symbol sets, including paragraph identifiers, position identifiers, rhyme identifiers, tune identifiers, and conditional distinctive identifiers. These symbols help MixSong effectively capture and enforce the constraints necessary for generating high-quality poetry.Extensive experimental results demonstrate that MixSong significantly outperforms existing models in both automatic metrics and human evaluations, achieving notable improvements in both diversity and quality of the generated poetry.
Article
Chinese poetry generation has been a challenging part of natural language processing due to the unique literariness and aesthetics of poetry. In most cases, the content of poetry is topic-related. That is to say, specific thoughts or emotions are usually expressed regarding given topics. However, topic information is rarely taken into consideration in current studies about poetry generation models. In this paper, we propose a topic-enhanced Chinese poetry generation model called TPoet in which the topic model is integrated into the transformer-based auto-regressive text generation model. By feeding topic information to the input layer and heterogeneous attention mechanism, TPoet can implicitly learn the latent information of topic distribution. In addition, by setting multiple identifiers such as segment, rhyme, tone, etc., the model can explicitly learn the constraints of generated poems. Extensive experimental results show that the quality of TPoet-generated poems outperforms the current advanced models or systems, and the topic consistency and diversity in generated poems have been significantly improved as well.
Article
Full-text available
It is challenging to use unsupervised machine translation models to generate ancient poems. The current method has solved the problems of Under-translation and Over-translation caused by the huge length difference between the translated sentence pairs. However, the above method lacks guidance in generating intermediate vectors, and the denoising ability of the model is very poor. In this paper, we guide vector space distribution during training to improve the quality of the generated ancient poems and the convergence speed of the model. We also introduce the target language information while adding noise, which effectively avoids the recurrence of the Under-translation problem while improving the model's denoising ability. Experiment results on the VP dataset show that our model obtains state-of-the-art results with faster convergence speed. In addition to the BLEU scores, we also made a comparative analysis of ancient poetry sentences generated by different models. The analysis results show that the optimization method proposed in this paper is indeed helpful for generating high-quality ancient poems.
Article
Chinese poetry has been a favorite literary genre for thousands of years. Chinese ancient poetry is still being read and practiced, and many famous ancient Chinese poets are honored and adorned. Recently, deep learning has been widely adopted for poetry generation. In this paper, we present a new context-aware Chinese poetry generation method based on sequence-to-sequence framework. We generate a new concept called keyword team, which is a combination of all the keywords to capture the context of the Chinese poetry. Then we use the keyword, the keyword team and the previously generated lines to generate the present line in the poetry. We find that, by including keyword teams into the generation of the poetry, it can additionally perceive the keywords of preceding and succeeding lines to generate the present line, which can effectively improve the adhesion among the overall lines. The comprehensive evaluation results show that our proposed model outperforms many of the state-of-the-art poetry generation models.
Article
Gait recognition distinguishes one individual from others according to the natural patterns of human gaits. Gait recognition is a challenging signal processing technology for biometric identification due to the ambiguity of contours and the complex feature extraction procedure. In this work, we proposed a new model - the convolutional neural network (CNN) joint attention mechanism (CJAM) - to classify the gait sequences and conduct person identification using the CASIA-A and CASIA-B gait datasets. The CNN model has the ability to extract gait features, and the attention mechanism continuously focuses on the most discriminative area to achieve person identification. We present a comprehensive transformation from gait image preprocessing to final identification. The results from 12 experiments show that the new attention model leads to a lower error rate than others. The CJAM model improved the 3D-CNN, CNN-LSTM (long short-term memory), and the simple CNN by 8.44%, 2.94% and 1.45%, respectively.
Chapter
Recently, Chinese poetry generation gains many significant achievement with the development of deep learning. However, existing methods can not generate Chinese palindrome poetry. Besides, there is no public dataset of Chinese palindrome poetry. In this paper, we propose a novel Chinese palindrome poetry generation model, named Chinese Palindrome Poetry Generation Model (CPPGM), based on the universal seq2seq model and language model with specific beam search algorithms. In addition, the proposed model is the first to generate Chinese palindrome poetry automatically, and is applicable to other palindromes, such as palindrome couplets. Compared with several methods we propose, the experimental results demonstrate the superiority of CPPGM with machine evaluation as well as human judgment.
Chapter
Text is the most important and frequent way for people to exchange information and daily communication in today’s society; thus, text information hiding has great research value and practical significance. This paper explored a novel method of information hiding based on intelligent creation of Tang poem. Based on the construction of meaning intention vocabulary, and by using the recurrent neural network language model, the proposed steganography method can effectively generate carrier Tang poem which confidential information embedded in it. In our method, each line can hide 9-bit sensitive information. The hidden capacity of the five-character Tang poem is 11.25%. Experiments showed that this algorithm had relatively high carrying capacity and concealment.
Chapter
This paper presents a novel, syllable-structured Chinese lyrics generation model given a piece of original melody. Most previously reported lyrics generation models fail to include the relationship between lyrics and melody. In this work, we propose to interpret lyrics-melody alignments as syllable structural information and use a multi-channel sequence-to-sequence model with considering both phrasal structures and semantics. Two different RNN encoders are applied, one of which is for encoding syllable structures while the other for semantic encoding with contextual sentences or input keywords. Moreover, a large Chinese lyrics corpus for model training is leveraged. With automatic and human evaluations, results demonstrate the effectiveness of our proposed lyrics generation model. To the best of our knowledge, there is few previous reports on lyrics generation considering both music and linguistic perspectives. KeywordsNatural Language ProcessingNatural Language GenerationSeq2SeqLyrics generation
Preprint
This paper presents a novel, syllable-structured Chinese lyrics generation model given a piece of original melody. Most previously reported lyrics generation models fail to include the relationship between lyrics and melody. In this work, we propose to interpret lyrics-melody alignments as syllable structural information and use a multi-channel sequence-to-sequence model with considering both phrasal structures and semantics. Two different RNN encoders are applied, one of which is for encoding syllable structures while the other for semantic encoding with contextual sentences or input keywords. Moreover, a large Chinese lyrics corpus for model training is leveraged. With automatic and human evaluations, results demonstrate the effectiveness of our proposed lyrics generation model. To the best of our knowledge, there is few previous reports on lyrics generation considering both music and linguistic perspectives.
Conference Paper
In order to create a lyrics based on the characteristics of Korean, we reversed the K-pop lyrics data and use them as learning data. It transforms the incoming data to use certain elements of the sentence, such as predicates and conjunctions, as starting points of the string generation. The proposed song lyrics generation method considers the context between lyrics. Every time the model generates the lyric, the model goes through upper randomization based on a blank. It was confirmed that the lyrics generated using the reverse data, have a more natural context than the lyrics generated using the forward data. It is also possible to generate new lyrics similar to certain lyric structure.
Preprint
We provide code that produces beautiful poetry. Our sonnet-generation algorithm includes several novel elements that improve over the state-of-the-art, leading to rhythmic and inspiring poems. The work discussed here is the winner of the 2018 PoetiX Literary Turing Test Award for computer-generated poetry.
Article
Full-text available
Poetry is a unique artifact of the human language faculty, with its defining feature being a strong unity between content and form. Contrary to the opinion that the automatic generation of poetry is a relatively easy task, we argue that it is in fact an extremely difficult task that requires intelligence, world and linguistic knowledge, and creativity.
Article
Full-text available
Neural machine translation is a recently proposed approach to machine translation. Unlike the traditional statistical machine translation, the neural machine translation aims at building a single neural network that can be jointly tuned to maximize the translation performance. The models proposed recently for neural machine translation often belong to a family of encoder-decoders and consists of an encoder that encodes a source sentence into a fixed-length vector from which a decoder generates a translation. In this paper, we conjecture that the use of a fixed-length vector is a bottleneck in improving the performance of this basic encoder-decoder architecture, and propose to extend this by allowing a model to automatically (soft-)search for parts of a source sentence that are relevant to predicting a target word, without having to form these parts as a hard segment explicitly. With this new approach, we achieve a translation performance comparable to the existing state-of-the-art phrase-based system on the task of English-to-French translation. Furthermore, qualitative analysis reveals that the (soft-)alignments found by the model agree well with our intuition.
Conference Paper
Full-text available
A new recurrent neural network based language model (RNN LM) with applications to speech recognition is presented. Results indicate that it is possible to obtain around 50% reduction of perplexity by using mixture of several RNN LMs, compared to a state of the art backoff language model. Speech recognition experiments show around 18% reduction of word error rate on the Wall Street Journal task when comparing models trained on the same amount of data, and around 5% on the much harder NIST RT05 task, even when the backoff model is trained on much more data than the RNN LM. We provide ample empirical evidence to suggest that connectionist language models are superior to standard n-gram techniques, except their high computational (training) complexity.
Conference Paper
Full-text available
Part of the unique cultural heritage of China is the game of Chinese couplets (duìlián). One person challenges the other person with a sentence (first sentence). The other person then replies with a sentence (second sentence) equal in length and word segmentation, in a way that corresponding words in the two sentences match each other by obeying certain constraints on semantic, syntactic, and lexical relatedness. This task is viewed as a difficult problem in AI and has not been explored in the research community. In this paper, we regard this task as a kind of machine translation process. We present a phrase-based SMT approach to generate the second sentence. First, the system takes as input the first sentence, and generates as output an N-best list of proposed second sentences, using a phrase-based SMT decoder. Then, a set of filters is used to remove candidates violating linguistic constraints. Finally, a Ranking SVM is applied to rerank the candidates. A comprehensive evaluation, using both human judgments and BLEU scores, has been conducted, and the results demonstrate that this approach is very successful.
Conference Paper
Full-text available
As is well-known, cultures are rooted in their unique regions, histories and languages. Communication media have been developed to circulate these cultural characteristics. As a part of our research “Cultural Computing”, which means the translation of cultures using scientific methods representing essential aspects of Japanese culture[1], an interactive Renku poem generation supporting system was developed to study the reproduction of a traditional Japanese Renku by computer. This system extended the functionality of our previous Hitch-Haiku system to the Renku based on same association method and attached more cultural characteristics on it: the Renku verse displayed on the Japanese-style color pattern which represents the same season in Renku Kigo (seasonal reference) and the generated Renku verse including the information of sightseeing place.
Conference Paper
Deep Neural Networks (DNNs) are powerful models that have achieved excellent performance on difficult learning tasks. Although DNNs work well whenever large labeled training sets are available, they cannot be used to map sequences to sequences. In this paper, we present a general end-to-end approach to sequence learning that makes minimal assumptions on the sequence structure. Our method uses a multilayered Long Short-Term Memory (LSTM) to map the input sequence to a vector of a fixed dimensionality, and then another deep LSTM to decode the target sequence from the vector. Our main result is that on an English to French translation task from the WMT-14 dataset, the translations produced by the LSTM achieve a BLEU score of 34.7 on the entire test set, where the LSTM's BLEU score was penalized on out-of-vocabulary words. Additionally, the LSTM did not have difficulty on long sentences. For comparison, a strong phrase-based SMT system achieves a BLEU score of 33.3 on the same dataset. When we used the LSTM to rerank the 1000 hypotheses produced by the aforementioned SMT system, its BLEU score increases to 36.5, which beats the previous state of the art. The LSTM also learned sensible phrase and sentence representations that are sensitive to word order and are relatively invariant to the active and the passive voice. Finally, we found that reversing the order of the words in all source sentences (but not target sentences) improved the LSTM's performance markedly, because doing so introduced many short term dependencies between the source and the target sentence which made the optimization problem easier.
Article
Learning and generating Chinese poems is a charming yet challenging task. Traditional approaches involve various language modeling and machine translation techniques, however, they perform not as well when generating poems with complex pattern constraints, for example Song iambics, a famous type of poems that involve variable-length sentences and strict rhythmic patterns. This paper applies the attention-based sequence-to-sequence model to generate Chinese Song iambics. Specifically, we encode the cue sentences by a bi-directional Long-Short Term Memory (LSTM) model and then predict the entire iambic with the information provided by the encoder, in the form of an attention-based LSTM that can regularize the generation process by the fine structure of the input cues. Several techniques are investigated to improve the model, including global context integration, hybrid style training, character vector initialization and adaptation. Both the automatic and subjective evaluation results show that our model indeed can learn the complex structural and rhythmic patterns of Song iambics, and the generation is rather successful.
Article
Deep Neural Networks (DNNs) are powerful models that have achieved excellent performance on difficult learning tasks. Although DNNs work well whenever large labeled training sets are available, they cannot be used to map sequences to sequences. In this paper, we present a general end-to-end approach to sequence learning that makes minimal assumptions on the sequence structure. Our method uses a multilayered Long Short-Term Memory (LSTM) to map the input sequence to a vector of a fixed dimensionality, and then another deep LSTM to decode the target sequence from the vector. Our main result is that on an English to French translation task from the WMT-14 dataset, the translations produced by the LSTM achieve a BLEU score of 34.7 on the entire test set, where the LSTM's BLEU score was penalized on out-of-vocabulary words. Additionally, the LSTM did not have difficulty on long sentences. For comparison, a strong phrase-based SMT system achieves a BLEU score of 33.3 on the same dataset. When we used the LSTM to rerank the 1000 hypotheses produced by the aforementioned SMT system, its BLEU score increases to 36.5, which beats the previous state of the art. The LSTM also learned sensible phrase and sentence representations that are sensitive to word order and are relatively invariant to the active and the passive voice. Finally, we found that reversing the order of the words in all source sentences (but not target sentences) improved the LSTM's performance markedly, because doing so introduced many short term dependencies between the source and the target sentence which made the optimization problem easier.
Article
The prevailing metaphor used in the study of creative cognition is the metaphor of evolution (Gruber and Davis 1988). Naturally, AI experimenters have implemented algorithms based loosely or precisely on Darwinian models of information transfer and change over time in attempts to make machines more creative (Fogel and Owens 1966). Simulating an evolving systems model of creative expression raises the important technical issue of how to judge the fitness of the forms the system produces. The use of a neural network is an appropriate and fairly novel (see also Biles 1996 and Burton and Vladimirova, 1997) answer to the question of how a fuzzy and subjective measure can be captured and put to use. This technical paper proposes a plan for the design of a creative computational system of this kind, and documents a working prototype called Poevolve that embodies some of these features.
Article
The present paper presents an application that composes formal poetry in Spanish in a semiautomatic interactive fashion. Automatic Spanish Poetry Expert and Rewriting Application (ASPERA) is a forward reasoning rule-based system that obtains from the user basic style parameters and an intended message; applies a knowledge-based pre-processor to select the most appropriate metric structure for the user's wishes; and, by intelligent adaptation of selected examples from a corpus of verses, carries out a prose-to-poetry translation of the given message. In the composition process, ASPERA combines natural language generation and CBR techniques to apply a set of construction heuristics obtained from formal literature on Spanish poetry. If the user validates the poem draft presented by the system, the resulting verses are analysed and incorporated into the system data files.
Learning phrase representations using rnn encoder-decoder for statistical machine translation
  • Bengio
Bengio. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In Proceedings of the 2014
Chinese song iambics generation
  • Qixin Wang
  • Tianyi Luo
  • Dong Wang
  • Chao Xing
Qixin Wang, Tianyi Luo, Dong Wang, and Chao Xing. 2015. Chinese song iambics generation
Neural machine translation by jointly learning to align and translate
  • Yoshua Bengio
Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In Proceedings of the 2015 International Conference on Learning Representations, San Diego, CA.