Abstract
Generating classical Chinese poetry from images is a challenging cross-modal task requiring both semantic accuracy and stylistic consistency. Traditional methods often struggle with topic drift and the scarcity of parallel image-poem datasets. This paper introduces the Infilling-based Poetry Generation (IPG) framework, which explicitly separates "concrete" object extraction from "abstract" environmental context (season, time, weather). By utilizing an infilling-based model and a non-parallel training strategy, the system achieves superior consistency and poetic quality compared to existing baselines.
Introduction
Generating poetry from images is a complex cross-modal task that requires a model to translate visual cues into literary art. Previous attempts in this field have faced two primary hurdles:
- Topic Drift and Semantic Inconsistency: Models often fail to maintain a global understanding of an image. For instance, a model might detect "snow" but generate a poem about "spring flowers" due to a lack of contextual grounding.
- Data Scarcity: Training high-quality models typically requires large datasets of images paired with relevant poems. Such parallel data is difficult and expensive to curate manually.
To address these issues, researchers from Sichuan University developed the IPG framework, which extracts both physical objects (Concrete Information) and underlying atmosphere (Abstract Information) to guide a generation model trained on non-parallel data.
The IPG Framework
The IPG framework operates in two distinct stages: information extraction and poetry generation. This separation allows the model to handle specific objects and general moods differently, ensuring the final poem is both accurate to the scene and stylistically coherent.
1. Image Information Extraction
- Concrete Information: The system identifies modern objects in an image and maps them to ancient Chinese poetic terms using ShiXueHanYing, a classical phrase taxonomy from 1735. This ensures the vocabulary remains authentic to the classical style.
- Abstract Information: Three CNN classifiers (based on GoogleNet) predict the Season (e.g., winter), Time (e.g., daytime), and Weather (e.g., sunshine). These provide the "global" context that prevents topic drift.
2. Infilling-Based Poetry Generation
Instead of generating text from scratch, the model uses a "fill-in-the-blank" approach. It takes the concrete keywords and "infills" the rest of the poetic line around them using a bidirectional GRU (Gated Recurrent Unit) encoder-decoder with an attention mechanism.
The abstract information (Season, Time, Weather) is converted into one-hot vectors and concatenated with word embeddings. This "hard-codes" the atmospheric context into every character the model generates, ensuring that the mood of the poem matches the image.
Training Strategy
The "secret sauce" of this framework is its ability to learn from non-parallel data. The model learns how to "infill" blanks by practicing on a massive corpus of 3.3 million existing classical poems. Simultaneously, it learns to "see" by training on separate image datasets for season, time, and weather classification. By joining these two capabilities via shared labels, the system bypasses the need for expensive paired image-poem datasets.
Key Results
The IPG framework was compared against several baselines (RNNPG, PPG, WMPG, and BFPG) using both automatic and human metrics:
- Consistency (INFO Score): The researchers introduced the INFO score to measure how well the poem's abstract labels matched the image. IPG achieved 88.69%, vastly outperforming the best baseline (WMPG-H at 40.90%).
- Human Evaluation: 20 experts rated the poems on a scale of 1 to 10. The IPG model led in every category, including Poeticness (8.31) and Consistency (7.76), with an average score of 7.97.
Conclusion and Future Work
By decomposing image-to-poetry generation into concrete and abstract components, the IPG framework significantly improves thematic consistency and poetic quality. While currently limited by a fixed taxonomy and three abstract categories (Season, Time, Weather), future work could expand the model to capture more subtle environmental cues and specific emotions like joy or sadness, further bridging the gap between visual perception and literary expression.
Summary updated