Skip to main content
QUICK REVIEW

[Paper Review] Modern French Poetry Generation with RoBERTa and GPT-2

Mika Hämäläinen, Khalid Alnajjar|Työväentutkimus Vuosikirja|Dec 6, 2022
Topic ModelingComputer Science27 references8 citations
TL;DR

This paper presents a novel encoder-decoder model for modern French poetry generation by fine-tuning CamemBERT (RoBERTa-based) as the encoder and GPT-2 as the decoder, incorporating rhyme modeling into beam search. Human evaluation shows strong performance, with an average understandability score of 3.79 out of 5, demonstrating effective generation of grammatically coherent and stylistically plausible modern French poetry.

ABSTRACT

We present a novel neural model for modern poetry generation in French. The model consists of two pretrained neural models that are fine-tuned for the poem generation task. The encoder of the model is a RoBERTa based one while the decoder is based on GPT-2. This way the model can benefit from the superior natural language understanding performance of RoBERTa and the good natural language generation performance of GPT-2. Our evaluation shows that the model can create French poetry successfully. On a 5 point scale, the lowest score of 3.57 was given by human judges to typicality and emotionality of the output poetry while the best score of 3.79 was given to understandability.

Motivation & Objective

  • To develop a neural poetry generation model that produces modern, free-form French poetry without strict metrical constraints.
  • To address the limitations of single-model approaches by combining RoBERTa’s strong language understanding with GPT-2’s generation capabilities.
  • To improve generation quality by conditioning beam search on phonetic rhyme (full, assonance, consonance) rather than relying solely on autoregressive generation.
  • To evaluate the model’s output using human annotators on key poetic qualities such as typicality, emotionality, and understandability.

Proposed method

  • Fine-tune a CamemBERT-based RoBERTa model as the encoder to capture contextual semantics of input prompts.
  • Use a GPT-2-based decoder to autoregressively generate poetry tokens from the encoded context.
  • Condition beam search on phonetic rhyme by computing IPA representations of words and enforcing similarity from the first vowel (full rhyme), vowel sequences (assonance), or consonant clusters (consonance).
  • Preprocess a curated corpus of 25,215 French poems and sonnets from Wikisource and a French sonnet dataset, splitting them into stanzas to standardize length.
  • Apply transfer learning by initializing the model with pretrained weights from Hugging Face’s model hub, avoiding training from scratch.
  • Use a hybrid training strategy where the encoder processes input prompts and the decoder generates verses sequentially, with each new verse conditioned on the previous one.

Experimental results

Research questions

  • RQ1Can a fine-tuned RoBERTa-GPT-2 hybrid model generate modern French poetry that is both coherent and stylistically appropriate?
  • RQ2How does incorporating phonetic rhyme constraints into beam search affect the quality and poetic authenticity of generated output?
  • RQ3What is the human perception of the generated poetry in terms of understandability, typicality, grammaticality, and emotional impact?
  • RQ4How do the individual strengths of RoBERTa (understanding) and GPT-2 (generation) combine to improve performance over single-model baselines?

Key findings

  • The model achieved a mean understandability score of 3.79 out of 5 in human evaluation, indicating strong grammatical and semantic coherence in generated poetry.
  • The lowest human evaluation score was 3.57 for typicality and emotionality, suggesting that while the poetry is coherent, it may not yet fully match the stylistic or emotional depth of human-authored modern poetry.
  • The model demonstrated robust generation of cohesive 4-verse poems, with each verse building logically on the previous one, as shown in the example outputs.
  • Despite strong performance, the model occasionally produced non-existent verb forms (e.g., 'effondrit' as a non-standard conjugation), indicating room for improvement in morphological accuracy.
  • The integration of rhyme modeling into beam search improved poetic form, though the exact impact on human perception was not quantified beyond overall evaluation scores.
  • The full evaluation results and generated poems are publicly released on Zenodo for reproducibility and further research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.