Analysing the Focus of a Hierarchical Attention Network: the Importance of Enjambments When Classifying Post-modern Poetry

Timo Baumann, Hussein Hussein, Burkhard Meyer-SickendiekInterspeech 2018

TL;DR

This paper investigates how a hierarchical attention network (HAN) classifies post-modern poetry styles, specifically focusing on the role of enjambments (lines that run over syntactically). Surprisingly, the model appears to classify poems effectively without explicitly focusing on enjambment lines, suggesting our philological understanding of these styles might need re-evaluation.

What Problem Does This Paper Address?

Modern and post-modern poetry often breaks from traditional metrical structures, embracing "free verse" with a spectrum of prosodic styles. This variability makes automatic classification challenging. A key feature of free verse is enjambment, where a sentence or phrase is split across lines, creating a specific rhythm and potential for tension when read aloud. While literary scholars believe enjambments are crucial for differentiating certain post-modern poetic styles, it's unclear if computational models can effectively leverage this feature, or if they rely on other cues. This paper aims to bridge this gap by analyzing a HAN's internal "focus" (attention) to see if it prioritizes enjambment when classifying poems characterized by it.

Methods

The authors employ a deep hierarchical attention network (HAN) for poetry style classification. This model integrates both textual and acoustic features.

  • Textual Encoding: Lines are processed character-by-character using a bidirectional RNN (GRU cells) with an attention mechanism. This allows the model to learn representations of lines and focus on important characters.
  • Acoustic Encoding: Speech features (MFCCs and fundamental frequency variation) are extracted and processed similarly to text, capturing aspects of recitation fluency. Pauses between lines are also encoded, as they can signal enjambment.
  • Hierarchical Structure: Line-level representations are then fed into a poem-level encoder, culminating in a classification layer.
  • Pre-training: To combat data sparsity, the model's character embeddings and encoders are pre-trained using an autoencoder approach to reconstruct original lines and acoustic features.
  • Training Procedure: A two-step training process is used: first, a line-by-line classifier is trained, followed by training the full poem-level classifier.

Datasets

The primary dataset consists of German poems from lyrikline.org.

  • Corpus: Approximately 2400 German poems were initially collected.
  • Manual Classification: A subset of 175 poems was manually classified by a philologist into six prosodic styles.
  • Audio Recordings: Corresponding audio recordings of these 175 poems, spoken by the original authors, were also collected, totaling about 52 hours.
  • Enjambment Annotation: For a subset of enjambment-dominated poems, lines were manually annotated as "enjambment," "non-enjambment," or "unclear" by two annotators.

Key Insights and Ideas

  • Model vs. Human Focus: The core finding is that while the HAN can classify poems into distinct prosodic styles, its internal attention mechanism doesn't disproportionately focus on enjambment lines, even when classifying poems known to be enjambment-heavy. This challenges the philological assumption that enjambments are the primary differentiating factor for these styles.
  • Enjambment Detection Capability: The model can accurately detect enjambments when trained specifically for that task, achieving a high f-measure (0.91) on clear cases. This suggests the model understands enjambment but doesn't prioritize it in the broader classification task.
  • Implicit vs. Explicit Enjambment: The paper explores whether the model learns an implicit notion of enjambment through its general training or if providing explicit enjambment labels improves classification. Neither approach led to a significant shift in the model's attention towards enjambment lines.
  • Data Sparsity Mitigation: The use of character-level embeddings and a hierarchical attention network, combined with pre-training, are crucial for handling the limited dataset size and the complex nature of poetic language.

Key Results

  • 6-Class Classification: The HAN achieved a weighted f-measure of 0.73 for classifying poems into six prosodic styles.
  • Enjambment-Dominated vs. Others: The model perfectly differentiated poems with enjambment-dominated styles from other free-verse styles (f-measure of 1.0).
  • Enjambment-Dominated Styles Differentiation: Classifying among the three enjambment-dominated styles yielded a lower performance (f-measure of 0.69), suggesting these styles are harder to distinguish from each other.
  • Enjambment Line Classification: The model achieved a high f-measure of 0.91 for identifying clear enjambment lines.
  • Relative Attention: The relative attention of the model on enjambment lines was 0.98, very close to 1, indicating an even distribution of attention across lines rather than a focus on enjambments.

Limitations and Future Work

  • Model Attention Behavior: The primary limitation is the model's lack of focused attention on enjambment lines, which contradicts literary theory. The authors suggest this could be due to the model encoding enjambments in a way that the attention mechanism doesn't easily reveal, or that enjambments might not be the sole or primary differentiator for these styles as assumed.
  • Philological Re-evaluation: The findings prompt a reconsideration of whether poetic styles are indeed primarily differentiated by enjambed lines, or if other features are more salient to computational models.
  • Future Work: The authors suggest further investigation into the model's internal parameters to understand how enjambments are encoded. They also propose exploring whether the model might attend to lines following an enjambment, rather than the enjambed line itself. Additionally, expanding the dataset and exploring different model architectures could be beneficial.

Summary updated

BibTeX
@inproceedings{baumann2018analysing,
  author = {Timo Baumann and Hussein Hussein and Burkhard Meyer-Sickendiek},
  title = {{Analysing the Focus of a Hierarchical Attention Network: the Importance of Enjambments When Classifying Post-modern Poetry}},
  booktitle = {Interspeech},
  year = {2018},
}
Figure