Deep Poetry: A Chinese Classical Poetry Generation System

Yusen Liu, Dayiheng Liu, Jiancheng Lv

Abstract

Deep Poetry is a multi-modal, human-in-the-loop generation system designed to lower the barrier to composing Chinese classical poetry. By integrating a self-attention neural network trained on millions of ancient texts with image recognition and a specialized poetic phrase taxonomy, the system enables users to generate high-quality, rhyming verses from images, themes, or collaborative prompts. This approach shifts the paradigm from autonomous AI generation to a collaborative human-AI creative process.

Introduction

Chinese classical poetry is a cornerstone of cultural heritage, yet it remains notoriously difficult for modern writers to master. The art form requires strict adherence to complex rhythm, structure, and tonal patterns. While automated poetry generation has been explored, existing systems often suffer from three major limitations: rigidity in output, limited input modalities (usually text-only), and a lack of collaborative features that allow human poets to interact with the model. Deep Poetry addresses these challenges by providing a flexible, multi-modal assistant that captures "artistic conception" and supports human-authored prefixes.

System Architecture and Methods

The Deep Poetry architecture is divided into three primary stages: multi-modal input processing, neural generation, and a specialized screening mechanism.

Overview of the Deep Poetry system architecture, illustrating the flow from multi-modal inputs to the final screened poetry.

Multi-modal Input Processing

To bridge the gap between visual inspiration and poetic expression, the system utilizes the Clarifai API to identify themes within user-provided images. These themes are then expanded using ShiXueHanYing, a traditional poetic phrase taxonomy. This ensures that a literal image tag (e.g., "mountain") is translated into a rich set of poetically relevant phrases (e.g., "moon over the mountain") before the generation process begins.

The Poetry Generator

At the core of the system is a self-attention neural network, similar to the Transformer architecture, trained to generate poetry word-by-word. The generator supports multiple genres, including five- or seven-character quatrains and acrostic poetry. A key innovation is the support for human-authored prefixes; users can input a few characters, and the system completes the line or the entire poem, acting as a collaborative partner to overcome writer's block.

Screening Mechanism

To ensure technical accuracy, the system employs beam search to generate multiple candidates. A specialized screening layer then filters these outputs, discarding any verses that violate traditional rhyming rules or contain repetitive words, which are common failure points for standard neural models.

Datasets and Training

The model's linguistic depth is derived from a massive corpus of classical Chinese literature:

  • 200,000+ Poems: Establishing the structural and stylistic foundation of various genres.
  • 3 Million Ancient Prose Pieces: Providing a deep understanding of ancient grammar and vocabulary beyond poetic structures.
  • ShiXueHanYing: Serving as a specialized taxonomy for thematic mapping and phrase expansion.

Key Results and Accessibility

Deep Poetry successfully generates high-quality verses across several genres while maintaining strict adherence to classical rules. By mapping image tags to a specialized taxonomy, the system avoids the literalness of standard image captioning, instead tapping into the metaphorical language of classical literature.

To maximize accessibility, the system was deployed as a WeChat applet, placing sophisticated NLP tools into the hands of a broad audience. This deployment includes engagement features like word puzzles to foster interest in traditional culture and increase user retention.

Limitations and Future Work

While effective for quatrains and acrostics, future iterations of Deep Poetry aim to support more complex genres such as Song Ci or longer Lushi. Additionally, while the system uses thematic taxonomies to approximate "artistic conception," capturing the deep, subtle nuances of complex visual imagery remains an ongoing challenge for AI-driven creative assistants.

Summary updated

BibTeX
@inproceedings{liu2020deep,
  author = {Yusen Liu and Dayiheng Liu and Jiancheng Lv},
  title = {{Deep Poetry: A Chinese Classical Poetry Generation System}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i09.7100},
}
Figure