Journal of Computer Applications ›› 2024, Vol. 44 ›› Issue (9): 2667-2673.DOI: 10.11772/j.issn.1001-9081.2023091302
• Artificial intelligence • Previous Articles Next Articles
Yuxin HUANG1,2, Jialong XU1,2, Zhengtao YU1,2(), Shukai HOU1,2, Jiaqi ZHOU1,2
Received:
2023-09-22
Revised:
2023-12-15
Accepted:
2023-12-25
Online:
2024-03-15
Published:
2024-09-10
Contact:
Zhengtao YU
About author:
HUANG Yuxin, born in 1983, Ph. D., associate professor. His research interests include information retrieval, natural language processing, text summarization.Supported by:
黄于欣1,2, 徐佳龙1,2, 余正涛1,2(), 侯书楷1,2, 周家啟1,2
通讯作者:
余正涛
作者简介:
黄于欣(1983—),男,河南洛阳人,副教授,博士,主要研究方向:信息检索、自然语言处理、文本摘要基金资助:
CLC Number:
Yuxin HUANG, Jialong XU, Zhengtao YU, Shukai HOU, Jiaqi ZHOU. Unsupervised text sentiment transfer method based on generation prompt[J]. Journal of Computer Applications, 2024, 44(9): 2667-2673.
黄于欣, 徐佳龙, 余正涛, 侯书楷, 周家啟. 基于生成提示的无监督文本情感转换方法[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2667-2673.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2023091302
类型 | 训练集样本数 | 验证集样本数 | 测试集样本数 |
---|---|---|---|
积极 | 266 041 | 2 000 | 500 |
消极 | 177 218 | 2 000 | 500 |
Tab. 1 Detailed information of Yelp dataset
类型 | 训练集样本数 | 验证集样本数 | 测试集样本数 |
---|---|---|---|
积极 | 266 041 | 2 000 | 500 |
消极 | 177 218 | 2 000 | 500 |
模型 | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore | |
---|---|---|---|---|---|---|---|---|
编辑类 模型 | DeleteOnly | 39.5 | 85.2 | 38.3 | 15.3 | 50.5 | 15.6 | 30.3 |
RetrieveOnly | 14.2 | 98.5 | 89.0 | 13.0 | 49.9 | 4.9 | 14.7 | |
DeleteRetrieve | 39.7 | 89.6 | 43.5 | 18.6 | 53.7 | 16.5 | 30.8 | |
TemplateBase | 47.2 | 82.7 | 34.8 | 13.5 | 51.4 | 20.0 | 33.3 | |
生成类 模型 | Multidecoder | 38.9 | 45.9 | 32.1 | 4.0 | 38.6 | 16.1 | 26.2 |
Adaptive Style Embedding | 40.9 | 84.3 | 21.4 | 8.7 | 41.9 | 14.3 | 28.9 | |
BackTranslation | 16.7 | 94.4 | 46.2 | 9.3 | 41.8 | 7.1 | 18.1 | |
UnpairedRL | 40.7 | 49.1 | 41.1 | 6.6 | 43.5 | 17.2 | 27.4 | |
CrossAlignment | 30.1 | 73.4 | 28.3 | 8.4 | 39.7 | 11.7 | 23.8 | |
GPTST | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
Tab. 2 Experimental results of unsupervised text sentiment transfer
模型 | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore | |
---|---|---|---|---|---|---|---|---|
编辑类 模型 | DeleteOnly | 39.5 | 85.2 | 38.3 | 15.3 | 50.5 | 15.6 | 30.3 |
RetrieveOnly | 14.2 | 98.5 | 89.0 | 13.0 | 49.9 | 4.9 | 14.7 | |
DeleteRetrieve | 39.7 | 89.6 | 43.5 | 18.6 | 53.7 | 16.5 | 30.8 | |
TemplateBase | 47.2 | 82.7 | 34.8 | 13.5 | 51.4 | 20.0 | 33.3 | |
生成类 模型 | Multidecoder | 38.9 | 45.9 | 32.1 | 4.0 | 38.6 | 16.1 | 26.2 |
Adaptive Style Embedding | 40.9 | 84.3 | 21.4 | 8.7 | 41.9 | 14.3 | 28.9 | |
BackTranslation | 16.7 | 94.4 | 46.2 | 9.3 | 41.8 | 7.1 | 18.1 | |
UnpairedRL | 40.7 | 49.1 | 41.1 | 6.6 | 43.5 | 17.2 | 27.4 | |
CrossAlignment | 30.1 | 73.4 | 28.3 | 8.4 | 39.7 | 11.7 | 23.8 | |
GPTST | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
提示方法 | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore |
---|---|---|---|---|---|---|---|
离散提示 | 7.1 | 10.9 | 88.2 | 0.9 | 19.0 | 1.8 | 5.9 |
连续提示 | 17.3 | 56.7 | 5.6 | 0.8 | 17.6 | 6.6 | 14.7 |
GPTST(生成提示) | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
Tab.3 Performance comparison of different prompting methods
提示方法 | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore |
---|---|---|---|---|---|---|---|
离散提示 | 7.1 | 10.9 | 88.2 | 0.9 | 19.0 | 1.8 | 5.9 |
连续提示 | 17.3 | 56.7 | 5.6 | 0.8 | 17.6 | 6.6 | 14.7 |
GPTST(生成提示) | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
模型 | 提示长度 | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore |
---|---|---|---|---|---|---|---|---|
模型1 | 1 | 34.3 | 87.1 | 25.7 | 12.2 | 42.5 | 12.5 | 31.0 |
模型2 | 3 | 39.9 | 83.2 | 23.8 | 13.6 | 42.9 | 13.9 | 32.9 |
模型3 | 5 | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
模型4 | 7 | 73.8 | 66.1 | 59.4 | 29.4 | 66.2 | 26.5 | 52.6 |
模型5 | 9 | 73.9 | 67.7 | 58.7 | 29.4 | 66.5 | 26.3 | 52.1 |
Tab. 4 Experimental results of different prompt lengths under proposed method
模型 | 提示长度 | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore |
---|---|---|---|---|---|---|---|---|
模型1 | 1 | 34.3 | 87.1 | 25.7 | 12.2 | 42.5 | 12.5 | 31.0 |
模型2 | 3 | 39.9 | 83.2 | 23.8 | 13.6 | 42.9 | 13.9 | 32.9 |
模型3 | 5 | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
模型4 | 7 | 73.8 | 66.1 | 59.4 | 29.4 | 66.2 | 26.5 | 52.6 |
模型5 | 9 | 73.9 | 67.7 | 58.7 | 29.4 | 66.5 | 26.3 | 52.1 |
α | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore |
---|---|---|---|---|---|---|---|
0.1 | 72.1 | 67.4 | 59.4 | 30.3 | 66.1 | 25.3 | 51.8 |
0.3 | 60.7 | 69.4 | 44.2 | 22.9 | 57.1 | 21.2 | 46.2 |
0.5 | 61.8 | 74.3 | 45.8 | 24.7 | 59.5 | 21.2 | 46.4 |
0.7 | 58.6 | 78.9 | 42.9 | 23.8 | 58.3 | 20.6 | 45.0 |
0.8 | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
Tab. 5 Experimental results of different harmonic weight parameter α
α | Content | Style | Fluency | Joint_score | GM | BLEU | BERTScore |
---|---|---|---|---|---|---|---|
0.1 | 72.1 | 67.4 | 59.4 | 30.3 | 66.1 | 25.3 | 51.8 |
0.3 | 60.7 | 69.4 | 44.2 | 22.9 | 57.1 | 21.2 | 46.2 |
0.5 | 61.8 | 74.3 | 45.8 | 24.7 | 59.5 | 21.2 | 46.4 |
0.7 | 58.6 | 78.9 | 42.9 | 23.8 | 58.3 | 20.6 | 45.0 |
0.8 | 56.6 | 79.7 | 42.8 | 23.4 | 57.8 | 19.7 | 44.0 |
模型 | 输出 | |
---|---|---|
编辑类模型 | DeleteOnly | this place is always |
RetrieveOnly | the place has definitely changed over the years, becoming a very pricey venue. | |
DeleteRetrieve | i would highly recommend this venue. | |
TemplateBase | ||
生成类模型 | Multidecoder | this is a new custard |
Adaptive Style Embedding | this is a great incredible fan and venue it is great. | |
BackTranslation | this is definitely a great place | |
UnpairedRL | this is a wonderful inspiration . | |
CrossAlignment | this is a wonderful shop . | |
GPTST | this is a great venue. | |
原始输入(积极) | this is a horrible venue. | |
目标输出(消极) | this is a great venue. |
Tab. 6 Examples of model output
模型 | 输出 | |
---|---|---|
编辑类模型 | DeleteOnly | this place is always |
RetrieveOnly | the place has definitely changed over the years, becoming a very pricey venue. | |
DeleteRetrieve | i would highly recommend this venue. | |
TemplateBase | ||
生成类模型 | Multidecoder | this is a new custard |
Adaptive Style Embedding | this is a great incredible fan and venue it is great. | |
BackTranslation | this is definitely a great place | |
UnpairedRL | this is a wonderful inspiration . | |
CrossAlignment | this is a wonderful shop . | |
GPTST | this is a great venue. | |
原始输入(积极) | this is a horrible venue. | |
目标输出(消极) | this is a great venue. |
1 | 陈可佳,费子阳,陈景强,等. 文本风格迁移研究综述[J]. 软件学报, 2022, 33(12): 4668-4687. |
CHEN K J, FEI Z Y, CHEN J Q, et al. Survey on text style transfer research [J]. Journal of Software, 2022, 33(12): 4668-4687. | |
2 | LI J, JIA R, HE H, et al. Delete, retrieve, generate: a simple approach to sentiment and style transfer [C]// Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). Stroudsburg: ACL, 2018: 1865-1874. |
3 | XU J, SUN X, ZENG Q, et al. Unpaired sentiment-to-sentiment translation: a cycled reinforcement learning approach [C]// Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2018: 979-988. |
4 | LI X L, LIANG P. Prefix-tuning: optimizing continuous prompts for generation [C]// Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Stroudsburg: ACL, 2021: 4582-4597. |
5 | RADFORD A, WU J, CHILD R, et al. Language models are unsupervised multitask learners [EB/OL]. [2023-11-03]. . |
6 | QIAO S, OU Y, ZHANG N, et al. Reasoning with language model prompting: a survey [C]// Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2023: 5368-5393. |
7 | WU X, ZHANG T, ZANG L, et al. Mask and infill: applying masked language model to sentiment transfer [C]// Proceedings of the 28th International Joint Conference on Artificial Intelligence. California: IJCAI.org, 2019: 5271-5277. |
8 | HU Z, YANG Z, LIANG X, et al. Toward controlled generation of text [C]// Proceedings of the 34th International Conference on Machine Learning. New York: JMLR.org, 2017: 1587-1596. |
9 | FU Z, TAN X, PENG N, et al. Style transfer in text: exploration and evaluation [C]// Proceedings of the 32nd AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2018: 663-670. |
10 | LAMPLE G, SUBRAMANIAN S, SMITH E M, et al. Multiple-attribute text rewriting [EB/OL]. (2023-05-06) [2023-08-17]. . |
11 | KRISHNA K, WIETING J, IYYER M. Reformulating unsupervised style transfer as paraphrase generation [C]// Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2020: 737-762. |
12 | RILEY P, CONSTANT N, GUO M, et al. TextSETTR: few-shot text style extraction and tunable targeted restyling [C]// Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Stroudsburg: ACL, 2021: 3786-3800. |
13 | LAMPLE G, CONNEAU A, DENOYER L, et al. Unsupervised machine translation using monolingual corpora only [EB/OL]. (2018-04-13) [2023-03-27].. |
14 | LUO F, LI P, ZHOU J, et al. A dual reinforcement learning framework for unsupervised text style transfer [C]// Proceedings of the 28th International Joint Conference on Artificial Intelligence. California: IJCAI.org, 2019: 5116-5122. |
15 | DENG M, TAN B, LIU Z, et al. Compression, transduction, and creation: a unified framework for evaluating natural language generation [C]// Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2021: 7580-7605. |
16 | POST M. A call for clarity in reporting BLEU scores [C]// Proceedings of the 3rd Conference on Machine Translation: Research Papers. Stroudsburg: ACL, 2018: 186-191. |
17 | ZHANG T, KISHORE V, WU F, et al. BERTScore: evaluating text generation with BERT [EB/OL]. (2020-02-24) [2023-04-18].. |
18 | PRABHUMOYE S, TSVETKOV Y, SALAKHUTDINOV R, et al. Style transfer through back-translation [C]// Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2018: 866-876. |
19 | SHEN T, LEI T, BARZILAY R, et al. Style transfer from non-parallel text by cross-alignment [C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2017: 6833-6844. |
20 | KIM H, SOHN K A. How positive are you: text style transfer using adaptive style embedding [C]// Proceedings of the 28th International Conference on Computational Linguistics. [S.l.]: International Committee on Computational Linguistics, 2020: 2115-2125. |
[1] | Jieru JIA, Jianchao YANG, Shuorui ZHANG, Tao YAN, Bin CHEN. Unsupervised person re-identification based on self-distilled vision Transformer [J]. Journal of Computer Applications, 2024, 44(9): 2893-2902. |
[2] | Junjie ZHU, Li YU, Shengwen LI, Changzheng ZHOU. Technology term recognition with comprehensive constituency parsing [J]. Journal of Computer Applications, 2024, 44(4): 1072-1079. |
[3] | Xiawuji, Heming HUANG, Gengzangcuomao, Yutao FAN. Survey of extractive text summarization based on unsupervised learning and supervised learning [J]. Journal of Computer Applications, 2024, 44(4): 1035-1048. |
[4] | Rui JIANG, Wei LIU, Cheng CHEN, Tao LU. Asymmetric unsupervised end-to-end image deraining network [J]. Journal of Computer Applications, 2024, 44(3): 922-930. |
[5] | Jingxin LIU, Wenjing HUANG, Liangsheng XU, Chong HUANG, Jiansheng WU. Unsupervised feature selection model with dictionary learning and sample correlation preservation [J]. Journal of Computer Applications, 2024, 44(12): 3766-3775. |
[6] | Yongjiang LIU, Bin CHEN. Pixel-level unsupervised industrial anomaly detection based on multi-scale memory bank [J]. Journal of Computer Applications, 2024, 44(11): 3587-3594. |
[7] | Pei ZHAO, Yan QIAO, Rongyao HU, Xinyu YUAN, Minyue LI, Benchu ZHANG. Multivariate time series anomaly detection based on multi-domain feature extraction [J]. Journal of Computer Applications, 2024, 44(11): 3419-3426. |
[8] | Nengbing HU, Biao CAI, Xu LI, Danhua CAO. Graph classification method based on graph pooling contrast learning [J]. Journal of Computer Applications, 2024, 44(11): 3327-3334. |
[9] | Wei TONG, Liyang HE, Rui LI, Wei HUANG, Zhenya HUANG, Qi LIU. Efficient similar exercise retrieval model based on unsupervised semantic hashing [J]. Journal of Computer Applications, 2024, 44(1): 206-216. |
[10] | Tian HE, Zongxin SHEN, Qianqian HUANG, Yanyong HUANG. Adaptive learning-based multi-view unsupervised feature selection method [J]. Journal of Computer Applications, 2023, 43(9): 2657-2664. |
[11] | Menglin HUANG, Lei DUAN, Yuanhao ZHANG, Peiyan WANG, Renhao LI. Prompt learning based unsupervised relation extraction model [J]. Journal of Computer Applications, 2023, 43(7): 2010-2016. |
[12] | Zhe XU, Zhihong WANG, Cunyu SHAN, Yaru SUN, Ying YANG. Unsupervised face forgery video detection based on reconstruction error [J]. Journal of Computer Applications, 2023, 43(5): 1571-1577. |
[13] | Mengting GE, Minghua WAN. Feature extraction model based on neighbor supervised locally invariant robust principal component analysis [J]. Journal of Computer Applications, 2023, 43(4): 1013-1020. |
[14] | Yu WANG, Yubo YUAN, Yi GUO, Jiajie ZHANG. Sentiment boosting model for emotion recognition in conversation text [J]. Journal of Computer Applications, 2023, 43(3): 706-712. |
[15] | Jianle CAO, Nana LI. Semantically enhanced sentiment classification model based on multi-level attention [J]. Journal of Computer Applications, 2023, 43(12): 3703-3710. |
Viewed | ||||||
Full text |
|
|||||
Abstract |
|
|||||