Zero-shot Sonnet Generation with Discourse-level Planning and Aesthetics Features

Yufei Tian, Nanyun Peng

Abstract

Generating high-quality poetry remains a significant challenge for artificial intelligence, requiring a delicate balance of logical coherence, strict formal constraints, and aesthetic depth. Traditional approaches rely on limited poetry datasets, often resulting in stylistic mimicry rather than genuine creativity. This paper introduces Zest, a hierarchical framework designed for zero-shot sonnet generation. By disentangling content planning from poetic form and leveraging non-poetic data such as news and stories, Zest produces Shakespearean sonnets that are technically precise and emotionally evocative. Our results demonstrate that Zest achieves 100% rhyme accuracy and significantly outperforms large-scale models like GPT-3 in human evaluations of coherence and poetic quality.

Introduction

The creation of a sonnet is a "boss level" task for AI, demanding the simultaneous satisfaction of three often-conflicting requirements: logical narrative flow over 14 lines, adherence to iambic pentameter and specific rhyme schemes (e.g., ABAB CDCD EFEF GG), and the inclusion of vivid imagery and metaphors.

Existing models typically train on small corpora of historical poetry, which limits their creative range and often leads to the reproduction of archaic styles. Zest addresses the "zero-shot" challenge: teaching a machine to write a sonnet without exposing it to a single line of existing poetry during training.

Methodology

The Zest framework utilizes a four-stage pipeline that separates the conceptual "what to say" from the structural "how to say it."

The Zest pipeline for zero-shot sonnet generation, illustrating the transition from content planning to meter-constrained decoding.
  1. Content Planning: A T5 model, trained on news summaries and short stories, generates a logical "sketch" consisting of three keywords per line. This ensures narrative continuity across the 14-line structure.
  2. Rhyme Pair Generation: Using the CMU Pronouncing Dictionary, the system identifies and selects rhyming words that align with the planned keywords for each required rhyme pair.
  3. Aesthetic Polishing: To enhance the "poetic flavor," Zest employs external knowledge bases (e.g., ConceptNet) and specialized modules to replace standard keywords with imagery and similes (e.g., transforming "bright" into "bright like diamond").
  4. Meter-Constrained Decoding: A GPT-Neo (2.7B) model generates the final lines. To ensure the rhyme fits naturally, the model generates text in reverse—from the rhyme word back to the start of the line. A custom filtering algorithm enforces iambic pentameter during this decoding process.

Experimental Setup

The models were trained using 4,500 CNN news summaries and 16,000 Reddit short stories, ensuring no poetic data influenced the generation process. Performance was evaluated against Hafez (a state-of-the-art model trained on lyrics) and Few-shot GPT-3. Metrics included technical accuracy (rhyme and meter) and human evaluation by English literature experts.

Results and Discussion

Zest demonstrates a superior ability to balance formal constraints with creative expression. Technical analysis shows that Zest achieves 100% accuracy in rhyme pairing, a stark contrast to GPT-3's 14% success rate.

Human evaluation results comparing Zest against baselines and human-written poetry across metrics like Discourse Coherence (DC), Poeticness (P), and Emotion (E).

Human evaluations confirm that Zest significantly outperforms both Hafez and GPT-3 in categories such as discourse coherence, poeticness, and emotional resonance. Experts noted that the model's reliance on three keywords per line results in a "poetic economy"—a condensed and impactful writing style characteristic of professional poetry.

Key insights from the development of Zest include:

  • Disentanglement: Separating logic from form prevents the "rambling" often seen in long-form AI text.
  • Aesthetics via Knowledge: Creativity can be engineered as a retrieval and refinement task using external knowledge modules.
  • Reverse Generation: Starting with the rhyme word effectively solves the difficulty of meeting terminal constraints.

Conclusion

Zest represents a significant advancement in zero-shot creative writing. While the model occasionally struggles with complex structural transitions like the "volta" or minor grammatical omissions due to strict meter constraints, it proves that high-quality poetry can be generated without poetic training data. Future work will explore extending this pipeline to multilingual contexts, potentially enabling poetry generation in low-resource languages.

Summary updated

BibTeX
@inproceedings{tian2022zero,
  author = {Yufei Tian and Nanyun Peng},
  title = {{Zero-shot Sonnet Generation with Discourse-level Planning and Aesthetics Features}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.262},
}
Figure