Shaer: Controlled Arabic Poetry Generation with Meter Subform and Semantic Conditioning

📄 arXiv: 2610.09756v1 📥 PDF

作者: Ahmad Abbas, Tamara Fakih, Nour Fakih, Ammar Mohanna

分类: cs.CL

发布日期: 2026-10-07

备注: 22 pages, 7 figures. Code: https://github.com/AhmaddAbbass/Shaer ; models and datasets: https://huggingface.co/Shaer-AI


💡 一句话要点

提出Shaer框架以解决阿拉伯诗歌生成的多重约束问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 阿拉伯诗歌生成 自然语言处理 韵律建模 语义条件生成 机器学习

📋 核心要点

  1. 现有的阿拉伯诗歌生成系统无法同时满足语义意图、韵律子形式和诗歌长度的联合建模需求。
  2. Shaer框架通过自然语言描述、韵律子形式和目标半行计数的联合条件生成,解决了多重约束问题。
  3. Shaer在基准韵律准确性上达到95.17%,相较于未调优的基础模型,提升幅度达到68.68个百分点。

📝 摘要(中文)

经典阿拉伯诗歌生成需要同时满足语义、语言和细粒度韵律约束。现有系统通常只能控制广泛的诗歌属性,而无法联合建模语义意图、韵律子形式和诗歌长度。本文提出了Shaer,一个可控的经典阿拉伯诗歌生成框架,能够基于自然语言描述、韵律子形式和目标半行计数进行联合条件生成。为支持此任务,我们构建了一个包含116,032首经典阿拉伯诗的丰富语料库,包含规范化的韵律子形式标签和自动生成的语义描述。实验结果显示,Shaer在基准韵律准确性、诗歌级韵律子形式准确性和确切计数准确性上均取得了显著提升。

🔬 方法详解

问题定义:本文旨在解决经典阿拉伯诗歌生成中,如何同时满足语义、韵律和长度等多重约束的问题。现有方法通常只能控制某一方面,导致生成的诗歌质量不高。

核心思路:Shaer框架的核心思路是通过联合条件生成,结合自然语言描述、韵律子形式和目标半行计数,从而实现对诗歌生成的精细控制。这样的设计使得生成的诗歌在语义和韵律上都能达到较高的质量。

技术框架:该框架包括数据预处理、模型训练和生成三个主要模块。首先,构建包含韵律子形式标签和语义描述的丰富语料库;其次,采用QLoRA对Yehia-7B模型进行有监督的微调;最后,通过生成模块输出符合条件的诗歌。

关键创新:Shaer的主要创新在于其能够同时考虑语义意图、韵律子形式和诗歌长度的联合建模,这在现有的诗歌生成系统中是前所未有的。

关键设计:在模型训练中,采用了基于QLoRA的微调策略,损失函数设计为完成目标生成,确保生成的诗歌在韵律和语义上均符合要求。

🖼️ 关键图片

img_0
img_1
img_2

📊 实验亮点

Shaer在基准韵律准确性上达到了95.17%,在诗歌级韵律子形式准确性上为91.75%,确切计数准确性为83.40%。与未调优的基础模型相比,分别提升了68.68、57.77和38.93个百分点,显示出其在诗歌生成领域的显著优势。

🎯 应用场景

Shaer框架的潜在应用领域包括文学创作、教育和文化传承等。它可以帮助作家和学生生成符合传统韵律的阿拉伯诗歌,促进阿拉伯文化的传播与发展。此外,该技术也可用于自动化内容生成,提升创作效率。

📄 摘要(原文)

Classical Arabic poetry generation requires simultaneously satisfying semantic, linguistic, and fine-grained prosodic constraints. Existing systems typically control broad poetic attributes but do not jointly model semantic intent, meter subform, and poem length. We present Shaer, a controllable Classical Arabic poetry generation framework jointly conditioned on natural-language descriptions, meter subforms, and target hemistich counts. To support this task, we construct an enriched corpus of 116,032 classical Arabic poems derived from Ashaar, containing normalized meter-subform labels and automatically generated, validated semantic descriptions. We then adapt Yehia-7B using QLoRA-based supervised fine-tuning with a completion-only objective. Our evaluation combines automatic assessment of base-meter conformity, requested-subform adherence, and length control with three LLM judges, blinded human evaluation, and memorization analysis. Shaer achieves 95.17% base-meter accuracy, 91.75% poem-level meter-subform accuracy, and 83.40% exact count accuracy. Relative to its untuned foundation model, these results represent gains of 68.68, 57.77, and 38.93 percentage points, respectively; Shaer also attains the highest base-meter accuracy among all evaluated systems. Multi-LLM evaluation and a blinded human assessment of top-ranked outputs further indicate competitive semantic and literary quality. Finally, analysis of all 3,481 test generations finds no exact copies from the training corpus or paired source poems. Code, models, and datasets are publicly available.