To address the problems of high difficulty in acquiring and annotating bilingual Chinese and Russian poetry data and implementing style transfer in stylized poetry generation, a method for generating Russian-style Chinese modern poetry by fine-tuning a large language model via direct reward optimization (DRO) was proposed to reduce data collection difficulty and improve data utilization.Human evaluation of generated results indicates that the fine-tuned model outperforms the baseline model in terms of grammar, logic, rhetoric, innovation, depth, style, and human-likeness, with its scores reaching 98.0%, 96.2%, 99.2%, 98.4%, 98.1%, 96.0%, and 98.8% of the scores of Chinese versions of real Russian poets’ works, respectively.In terms of poetic imagery, the overlap rate of the top 50 high-frequency images between Russian poetry and fine-tuned model-generated poetry reaches 46%, which is 14.0% higher than that between Russian poetry and baseline model-generated poetry.Experimental results demonstrate that the proposed method can effectively generate Russian-style Chinese modern poetry.
诗歌生成从内容层面可分为按主题生成[2]、按诗体生成[3-5]、按诗人风格生成[6-7]、按指定语言生成[8-10];从方法层面又经历了基于规则模板生成[11-12]、基于统计模型生成[13-14]、基于传统神经网络生成[15-16]的发展历程.近几年,大语言模型(large language models,LLMs)[17-18]的推出使人工智能的发展迈入崭新篇章.但大语言模型作为通用模型,尚无法在所有专业层面都有契合用户期待的表现.而微调大语言模型,即利用特定领域的较小规模数据集和人类反馈进一步训练模型,能够将通用模型转为针对特定任务的专业性模型,让微调后的模型在专门领域上有更佳表现.在自然语言生成(natural language generation,NLG)领域,通过对大语言模型微调来生成特定语言的诗歌[8,19]也成为新的研究方向.而生成具有其他语言风格的中文诗具有特殊的意义:一方面,使用一种语言生成另一种语言风格的诗歌将两种语言以巧妙的方式融合,模糊了语言的界限,拓宽了表达的边界,让读者可以在母语环境中领略异域风情,打破不同文明的语言壁垒;另一方面,风格化的诗歌生成有助于特色语言风格的传播,其研究对少数文化的保护、延续与创新同样十分有益.
本研究正是在这一背景下展开的.俄文文学作品较为丰富,但受限于俄文的复杂程度和中文与俄文在句法上的巨大差异,中俄双语诗歌数据的获取与标注较为困难.通过目前较为先进的直接奖励优化(direct reward optimization,DRO)[26]方法对大语言模型进行微调,使其能够生成具有俄文风格的中文现代诗.该方法相比传统人类反馈强化学习(reinforcement learning from human feedback,RLHF)方法降低了数据收集难度,数据利用率更高,训练难度更低,在节省计算资源的同时,也提高了俄文风格对齐和微调的效率.
HanSong.China best science fiction collection in 2003[M].Chengdu: Sichuan People’s Publishing House, 2004: 53-86.
[3]
GhazvininejadM, ShiX, ChoiY J, et al.Generating topical poetry [C]//Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing.Austin,2016: 1183-1191.
[4]
ElOrabyM, AbdelgaberM, ElkarefN, et al.Generating classical Arabic poetry using pre-trained models[C]//Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP).Abu Dhabi, 2022: 53-62.
[5]
LiuZ Q, FuZ H, CaoJ, et al.Rhetorically controlled encoder-decoder for modern Chinese poetry generation [C]//Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.Florence, 2019:1992-2001.
[6]
ShaoG M, KobayashiY, KishigamiJ.Traditional Japanese haiku generator using RNN language model[C]//2018 IEEE 7th Global Conference on Consumer Electronics (GCCE).Nara, 2018: 263-264.
[7]
WangK, TianJ, GaoR, et al.The machine poetry generator imitating Du Fu’s styles[C]//2018 International Conference on Artificial Intelligence and Big Data (ICAIBD).Chengdu, 2018: 261-265.
[8]
ShihadehJ, AckermanM.EMILY: an Emily Dickinson machine [C]//Proceedings of the 11th International Conference on Computational Creativity (ICCC’20).Coimbra, 2020:243-246.
[9]
HämäläinenM, AlnajjarK, PoibeauT.Modern French poetry generation with RoBERTa and GPT-2 [C]// Proceedings of the 13th International Conference on Computational Creativity (ICCC 2022).Bozen-Bolzano, 2022:12-16.
[10]
AhmadS, JoglekarP.Urdu and Hindi poetry generation using neural networks[C]//Data Management, Analytics and Innovation.Singapore: Springer, 2023: 485-497.
[11]
HämäläinenM, AlnajjarK.Generating modern poetry automatically in Finnish[C]//Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).Hong Kong, 2019: 5999-6004.
[12]
GervásP.WASP: evaluation of different strategies for the automatic generation of Spanish verse [C]//Proceedings of the AISB’00 Symposium on Creative & Cultural Aspects of AI & Cognitive Science.Birminham, 2000:93-100.
[13]
OliveiraH G.PoeTryMe: a versatile platform for poetry generation [C]// Proceedings of Computational Creativity, Concept Invention, and General Intelligence (C3GI).Montpellier, 2012:21-26.
[14]
JiangL, ZhouM. Chinese couplets using a statistical MT approach[C]//Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008).Manchester, 2008: 377-384.
[15]
HeJ, ZhouM, JiangL.Generating Chinese classical poems with statistical machine translation models[C]//Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence.Toronto, 2012: 1650-1656.
[16]
YanR .i, Poet: automatic poetry composition through recurrent neural networks with iterative polishing schema [C]//Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence (IJCAI-16).New York, 2016:2238-2244.
[17]
HopkinsJ, KielaD.Automatically generating rhythmic verse with neural networks[C]//Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics.Vancouver, 2017: 168-178.
[18]
DevlinJ, ChangM W, LeeK, et al.BERT: pre-training of deep bidirectional transformers for language understanding[C]//Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.Minneapolis, 2019: 4171-4186.
[19]
RadfordA, WuJ, ChildR, et al.Language models are unsupervised multitask learners[EB/OL].(2019-02-14) [2025-03-01].
[20]
BeheittM E G, HmidaM B H. Ben Haj Hmida M.Automatic Arabic poem generation with GPT-2[C]//Proceedings of the 14th International Conference on Agents and Artificial Intelligence.Online, 2022: 366-374.
[21]
UllahI, UllahK, KhanH, et al.Pashto poetry generation: deep learning with pre-trained transformers for low-resource languages[J].PeerJ Computer Science, 2024, 10: e2163.
[22]
HuynhT M, BaoQ L.Vietnamese poem generation & the prospect of cross-language poem-to-poem translation.(2024-01-04) [2025-03-01].
[23]
TabassamM R, WaheedH, SafderI, et al.UPON: Urdu poetry generation using deep learning: a novel approach and evaluation[J].ACM Transactions on Asian and Low-Resource Language Information Processing, 2025, 24(1): 1-21.
[24]
YuC Y, ZangL, WangJ T, et al.CharPoet: a Chinese classical poetry generation system based on token-free LLM[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics. Bangkok,2024: 315-325.
[25]
HanZ H, LiuJ T, ZhangY B, et al.Copiously quote classics: improving Chinese poetry generation with historical allusion knowledge[J].Computer Speech & Language, 2025, 90: 101708.
[26]
RafailovR, SharmaA, MitchellE, et al.Direct preference optimization: your language model is secretly a reward model[C]//Proceedings of the 37th International Conference on Neural Information Processing Systems.New Orleans,2023: 53728-53741.
[27]
RichemondP H, TangY H, GuoD, et al.Offline regularised reinforcement learning for large language models alignment[EB/OL].(2024-03-29) [2025-03-01].
[28]
黎华.外国流派诗荟萃[M].天津: 百花文艺出版社, 1992.
[29]
LiHua.Collection of foreign poems in different schools[M].Tianjin: Baihua Literature and Art Publishing House, 1992.
Anna Andreyevna Akhmatova.You breathe the sun, breathe the moonI : selected lyric poems of Akhmatova [M].Translated by Yang Kai-xian.Guangzhou: Flower City Publishing House, 2017.
[35]
张会森, 汤雅茹.俄语语法[M].北京: 北京大学出版社, 2008: 231.
[36]
ZhangHui-sen, TangYa-ru.Russian grammar[M].Beijing: Peking University Press, 2008: 231.
TolstoyLev.Anna Karenina [M].Translated by Gao Hui-qun, Shi Guo-sheng.Shanghai: Shanghai Translation Publishing House, 2006: 516.
[39]
YangC, SunM S, YiX Y, et al.Stylistic Chinese poetry generation via unsupervised style disentanglement [C]//Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing.Brussels, 2018:3960-3969.