Introduction
Classical Chinese poetry is a sophisticated art form that demands a delicate balance between rigid structural constraints—such as rhythm and line length—and "aesthetic wording." While deep learning models, particularly Recurrent Neural Networks (RNNs), have made significant progress in text generation, they often struggle with two core issues in poetry: the "boring" problem and thematic drift. RNNs tend to favor high-frequency characters, resulting in repetitive and trivial outputs. Furthermore, they often lack a global mechanism to anchor every line to the original theme, which can cause a poem to lose its thematic coherence as it progresses.
To address these challenges, researchers have developed CVAE-D, a novel architecture that combines a Conditional Variational Autoencoder (CVAE) with adversarial training. This approach allows the model to introduce "creative" word choices while using a discriminator to enforce strict thematic relevance to a given title.
Methodology: The CVAE-D Framework
The CVAE-D model consists of two primary components: a generator based on a CVAE and an adversarial discriminator.
The CVAE Generator
Unlike standard sequence-to-sequence encoders that map input to a single point, the CVAE maps the input (the previous line $L_{i-1}$ and the title $T$) to a distribution in a latent space. By sampling a latent variable $z$ from this distribution, the model introduces controlled "noise" or "inspiration." This mechanism encourages the decoder to utilize a more diverse and novel vocabulary, moving beyond the most statistically probable (and often mundane) character choices.
The Discriminator
To ensure that the creativity introduced by the CVAE does not lead to nonsense, the authors incorporate an adversarial discriminator. This component evaluates the interaction between a generated line and the poem's title. It calculates an interaction matrix and uses a Convolutional Neural Network (CNN) to determine if the line is thematically consistent. During training, the generator attempts to "fool" the discriminator, which forces the model to maintain a tight thematic bond throughout the poem.
Experimental Setup and Datasets
The model was trained on a massive corpus of classical Chinese poetry, including over 300,000 poems and 1.8 million individual lines from the Tang and Song Dynasties. The research focused primarily on the quatrain format (four lines, with 5 or 7 characters per line), using titles as the primary thematic anchor for each poem.
Key Insights and Results
The CVAE-D architecture achieves a "best of both worlds" scenario, balancing novelty with consistency:
- Latent Variables as Inspiration: The use of a CVAE allows the model to capture global semantic properties, providing a source of inspiration for varied expressions of the same theme.
- Thematic Anchoring: By back-propagating the discriminator's thematic score, the model learns which word choices are both novel and relevant.
- Performance: CVAE-D outperformed several baselines, including standard S2S and GANs. In automatic evaluations, it achieved a "Dist-1" score (vocabulary diversity) of 5.20, significantly higher than the 2.50 of standard S2S models. Human evaluations by experts also rated CVAE-D highest in consistency (2.58/3), poeticness (2.96/3), and overall quality (2.56/3).
Conclusion and Future Work
CVAE-D successfully addresses the trade-off between term novelty and thematic consistency in classical Chinese poetry generation. While the model shows great promise, the authors noted occasional instability in adversarial training. Future work will explore introducing more fine-grained attribute controls, such as specific emotional sentiments, and refining the optimization process to improve the robustness of the adversarial training.
Summary updated