《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (3): 794-800.DOI: 10.11772/j.issn.1001-9081.2024091251
收稿日期:
2024-09-05
修回日期:
2024-10-30
接受日期:
2024-10-31
发布日期:
2024-11-13
出版日期:
2025-03-10
通讯作者:
王中卿
作者简介:
盛坤(2000—),男,江苏扬州人,硕士研究生,CCF会员,主要研究方向:自然语言处理、通感隐喻
基金资助:
Received:
2024-09-05
Revised:
2024-10-30
Accepted:
2024-10-31
Online:
2024-11-13
Published:
2025-03-10
Contact:
Zhongqing WANG
About author:
SHENG Kun, born in 2000, M. S. candidate. His research interests include natural language processing, synaesthesia metaphor.
Supported by:
摘要:
中文通感隐喻分析任务是隐喻领域的一个特定细分任务。由于通感语料中感觉词的分布不均匀,中文通感隐喻数据集存在数据稀疏的问题。为解决这一问题,利用真实训练数据中的稀疏感觉词数据作为提示,并使用大语言模型生成额外的合成样本进行数据增强。为避免合成数据的引入造成的额外噪声影响模型性能,构建基于大语言模型的数据增强框架,并采用评分机制和标签误差优化机制减小合成数据和真实数据之间的分布差异。实验结果表明,所提框架可以生成高质量的合成数据来扩充数据集,在感觉词抽取和感觉领域分类任务上的总体F1值达到68.5%,比仅使用真实训练数据的基线模型T5(Text-To-Text Transfer Transformer)提升了2.7个百分点。
中图分类号:
盛坤, 王中卿. 基于大语言模型和数据增强的通感隐喻分析[J]. 计算机应用, 2025, 45(3): 794-800.
Kun SHENG, Zhongqing WANG. Synaesthesia metaphor analysis based on large language model and data augmentation[J]. Journal of Computer Applications, 2025, 45(3): 794-800.
感觉词 | 总数 | 示例 |
---|---|---|
视觉 | 92 | 清晰,苍老,透明 |
听觉 | 4 | 喧闹,和谐,吵 |
触觉 | 69 | 轻柔,尖锐,冰冷 |
味觉 | 20 | 苦,辛辣,甜美 |
嗅觉 | 2 | 香,臭 |
表1 感觉词分布
Tab. 1 Distribution of sensory words
感觉词 | 总数 | 示例 |
---|---|---|
视觉 | 92 | 清晰,苍老,透明 |
听觉 | 4 | 喧闹,和谐,吵 |
触觉 | 69 | 轻柔,尖锐,冰冷 |
味觉 | 20 | 苦,辛辣,甜美 |
嗅觉 | 2 | 香,臭 |
参数 | 取值 |
---|---|
学习率 | 10-4 |
批大小 | 16 |
优化器 | AdamW |
早停轮数 | 8 |
句子最大长度 | 256 |
标签最大长度 | 64 |
表2 模型参数设置
Tab. 2 Model parameter setting
参数 | 取值 |
---|---|
学习率 | 10-4 |
批大小 | 16 |
优化器 | AdamW |
早停轮数 | 8 |
句子最大长度 | 256 |
标签最大长度 | 64 |
模型 | 感觉词 | 原始感觉领域 | 通感感觉领域 | 总体 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | |
BERT | 70.1 | 67.7 | 68.9 | 82.4 | 82.5 | 82.4 | 83.7 | 82.1 | 82.9 | 65.4 | 60.4 | 62.8 |
PF-BERT | 69.8 | 67.6 | 68.7 | 84.3 | 84.4 | 84.3 | 82.3 | 84.5 | 83.4 | 62.3 | 64.7 | 63.5 |
T5 | 72.7 | 68.6 | 70.6 | 85.8 | 86.0 | 85.9 | 86.1 | 84.9 | 85.5 | 67.6 | 64.1 | 65.8 |
LLaMA2 | 71.9 | 66.9 | 69.3 | 83.5 | 83.5 | 83.5 | 81.9 | 84.1 | 83.0 | 65.3 | 60.9 | 63.0 |
MelBERT | 72.5 | 68.6 | 70.5 | 83.7 | 83.5 | 83.6 | 84.4 | 81.8 | 83.1 | 63.6 | 64.6 | 63.6 |
Radical | 72.7 | 69.4 | 71.0 | 86.2 | 86.2 | 87.4 | 86.8 | 68.1 | 66.1 | 67.1 | ||
GoldGen | 73.1 | 67.3 | 70.1 | 85.7 | 85.3 | 85.5 | 84.6 | 84.9 | 68.3 | 62.4 | 65.2 | |
EDA | 85.4 | 85.4 | 85.4 | 65.8 | ||||||||
CBERT | 73.6 | 68.4 | 70.9 | 85.7 | 86.0 | 86.4 | 85.8 | 86.1 | 66.2 | 67.2 | 66.7 | |
本文模型 | 74.4 | 70.7 | 72.5 | 87.0 | 86.8 | 86.9 | 87.5 | 86.7 | 87.1 | 70.8 | 68.5 |
表3 不同模型的性能比较 (%)
Tab. 3 Performance comparison of different models
模型 | 感觉词 | 原始感觉领域 | 通感感觉领域 | 总体 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | |
BERT | 70.1 | 67.7 | 68.9 | 82.4 | 82.5 | 82.4 | 83.7 | 82.1 | 82.9 | 65.4 | 60.4 | 62.8 |
PF-BERT | 69.8 | 67.6 | 68.7 | 84.3 | 84.4 | 84.3 | 82.3 | 84.5 | 83.4 | 62.3 | 64.7 | 63.5 |
T5 | 72.7 | 68.6 | 70.6 | 85.8 | 86.0 | 85.9 | 86.1 | 84.9 | 85.5 | 67.6 | 64.1 | 65.8 |
LLaMA2 | 71.9 | 66.9 | 69.3 | 83.5 | 83.5 | 83.5 | 81.9 | 84.1 | 83.0 | 65.3 | 60.9 | 63.0 |
MelBERT | 72.5 | 68.6 | 70.5 | 83.7 | 83.5 | 83.6 | 84.4 | 81.8 | 83.1 | 63.6 | 64.6 | 63.6 |
Radical | 72.7 | 69.4 | 71.0 | 86.2 | 86.2 | 87.4 | 86.8 | 68.1 | 66.1 | 67.1 | ||
GoldGen | 73.1 | 67.3 | 70.1 | 85.7 | 85.3 | 85.5 | 84.6 | 84.9 | 68.3 | 62.4 | 65.2 | |
EDA | 85.4 | 85.4 | 85.4 | 65.8 | ||||||||
CBERT | 73.6 | 68.4 | 70.9 | 85.7 | 86.0 | 86.4 | 85.8 | 86.1 | 66.2 | 67.2 | 66.7 | |
本文模型 | 74.4 | 70.7 | 72.5 | 87.0 | 86.8 | 86.9 | 87.5 | 86.7 | 87.1 | 70.8 | 68.5 |
模型 | 感觉词 | 原始感觉领域 | 通感感觉领域 | 总体评价 |
---|---|---|---|---|
本文模型 | 72.5 | 87.1 | 68.5 | |
-optimization | 70.8 | 85.9 | 66.7 | |
-score | 87.0 | 86.1 | ||
-optimization-score | 70.1 | 85.5 | 84.9 | 65.2 |
表4 消融实验结果 (%)
Tab. 4 Ablation experiment results
模型 | 感觉词 | 原始感觉领域 | 通感感觉领域 | 总体评价 |
---|---|---|---|---|
本文模型 | 72.5 | 87.1 | 68.5 | |
-optimization | 70.8 | 85.9 | 66.7 | |
-score | 87.0 | 86.1 | ||
-optimization-score | 70.1 | 85.5 | 84.9 | 65.2 |
类型 | 样本 | |
---|---|---|
真实样本 | 梅蕙丝听了之后冷冷地说,是真的。 | |
评分模块 | 夜深了,窗外吹来一阵凉风,像是一首悠扬的悲伤之歌,让人感到心里一阵冷冷的寒意。 | × |
标签误差优化 | 寒风呼啸,耳边传来凄凉的呜咽声,犹如冷冷的低语。 | × |
扩充数据 | 李雅琪冷冷的声音传来:“闭嘴!不要再说了!” |
表5 样例分析
Tab. 5 Sample analysis
类型 | 样本 | |
---|---|---|
真实样本 | 梅蕙丝听了之后冷冷地说,是真的。 | |
评分模块 | 夜深了,窗外吹来一阵凉风,像是一首悠扬的悲伤之歌,让人感到心里一阵冷冷的寒意。 | × |
标签误差优化 | 寒风呼啸,耳边传来凄凉的呜咽声,犹如冷冷的低语。 | × |
扩充数据 | 李雅琪冷冷的声音传来:“闭嘴!不要再说了!” |
1 | ONDISH P, COHEN D, LUCAS K W, et al. The resonance of metaphor: evidence for Latino preferences for metaphor and analogy[J]. Personality and Social Psychology Bulletin, 2019, 45(11): 1531-1548. |
2 | KÖVECSES Z. Metaphor: a practical introduction [M]. 2nd ed. New York: Oxford University Press, 2010. |
3 | LAKOFF G, JOHNSON M. Metaphors we live by [M]. Chicago: University of Chicago Press, 2008. |
4 | 徐盛桓. 隐喻研究认识论的前提性批判——“假物说”与“指事说”的理论意蕴[J]. 外语教学,2018,39(2):1-6. |
XU S H. Premised criticism of metaphor epistemology: understanding one kind of thing in terms of another and experiencing one kind of event in terms of another [J]. Foreign Language Education, 2018, 39(2): 1-6. | |
5 | TÜRKER R, ZHANG L, KOUTRAKI M, et al. Knowledge-based short text categorization using entity and category embedding [C]// Proceedings of the 2019 European Semantic Web Conference, LNCS 11503. Cham: Springer, 2019: 346-362. |
6 | ZHANG X, WU B. Short text classification based on feature extension using the n-gram model [C]// Proceedings of the 12th International Conference on Fuzzy Systems and Knowledge Discovery. Piscataway: IEEE, 2015: 710-716. |
7 | SHAMS R. Semi-supervised classification for natural language processing [EB/OL]. [2024-06-13]. . |
8 | RADFORD A, NARASIMHAN K, SALIMANS T, et al. Improving language understanding by generative pre-training [EB/OL]. [2024-08-11]. . |
9 | PURI R, SPRING R, SHOEYBI M, et al. Training question answering models from synthetic data [C]// Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2020: 5811-5826. |
10 | ULLMANN S. The principles of semantics [M]. 2nd ed. Oxford: Basil Blackwell & Mott, 1957. |
11 | STRIK LIEVERS F. Synaesthesia: a corpus-based study of cross-modal directionality [J]. Functions of Language, 2015, 22(1): 69-95. |
12 | ZHAO Q, HUANG C R, LONG Y. Synaesthesia in Chinese: a corpus-based study on gustatory adjectives in Mandarin [J]. Linguistics, 2018, 56(5): 1167-1194. |
13 | ZHONG Y, AHRENS K. “Prickly voice” or “smelly voice”? comprehending novel synaesthetic metaphors [C]// Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation. Stroudsburg: ACL, 2021: 71-79. |
14 | STRIK LIEVERS F, HUANG C R. A lexicon of perception for the identification of synaesthetic metaphors in corpora [C]// Proceedings of the 10th International Conference on Language Resources and Evaluation. Paris: European Language Resources Association, 2016: 2270-2277. |
15 | JIANG X, ZHAO Q, LONG Y, et al. Chinese synesthesia detection: new dataset and models [C]// Findings of the Annual Meeting of the Association for Computational Linguistics: ACL 2022. Stroudsburg: ACL, 2022: 3877-3887. |
16 | WEI J, ZOU K. EDA: easy data augmentation techniques for boosting performance on text classification tasks [C]// Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing. Stroudsburg: ACL, 2019: 6382-6388. |
17 | WU X, LV S, ZANG L, et al. Conditional BERT contextual augmentation [C]// Proceedings of the 2019 International Conference on Computational Science, LNCS 11539. Cham: Springer, 2019: 84-95. |
18 | ANABY-TAVOR A, CARMELI B, GOLDBRAICH E, et al. Do not have enough data? Deep learning to the rescue! [C]// Proceedings of the 34th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2020: 7383-7390. |
19 | KUMAR V, CHOUDHARY A, CHO E. Data augmentation using pre-trained Transformer models [C]// Proceedings of the 2nd Workshop on Life-long Learning for Spoken Language Systems. Stroudsburg: ACL, 2020: 18-26. |
20 | EDWARDS A, USHIO A, CAMACHO-COLLADOS J, et al. Guiding generative language models for data augmentation in few-shot text classification [C]// Proceedings of the 4th Workshop on Data Science with Human-in-the-Loop (Language Advances). Stroudsburg: ACL, 2022: 51-63. |
21 | YANG Y, MALAVIYA C, FERNANDEZ J, et al. Generative data augmentation for commonsense reasoning [C]// Findings of the Association for Computational Linguistics: EMNLP 2020. Stroudsburg: ACL, 2020: 1008-1025. |
22 | BROWN T B, MANN B, RYDER N, et al. Language models are few-shot learners [EB/OL]. [2024-04-23]. . |
23 | DEVLIN J, CHANG M W, LEE K, 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, Volume 1 (Long and Short Papers). Stroudsburg: ACL, 2019: 4171-4186. |
24 | RAFFEL C, SHAZEER N, ROBERTS A, et al. Exploring the limits of transfer learning with a unified text-to-text Transformer[J]. Journal of Machine Learning Research, 2020, 21: 1-67. |
25 | TANG D, QIN B, FENG X, et al. Effective LSTMs for target-dependent sentiment classification [C]// Proceedings of the 26th International Conference on Computational Linguistics: Technical Papers. Stroudsburg: ACL, 2016: 3298-3307. |
26 | LAFFERTY J D, McCALLUM A, PEREIRA F C N. Conditional random fields: probabilistic models for segmenting and labeling sequence data [C]// Proceedings of the 18th International Conference on Machine Learning. San Francisco: Morgan Kaufmann Publishers Inc., 2001: 282-289. |
27 | TOUVRON H, MARTIN L, STONE K, et al. LLaMA 2: open foundation and fine-tuned chat models [EB/OL]. [2024-04-29].. |
28 | HU E, SHEN Y, WALLIS P, et al. LoRA: low-rank adaptation of large language models [EB/OL]. [2024-04-24]. . |
29 | SU C, FUKUMOTO F, HUANG X, et al. DeepMet: a reading comprehension paradigm for token-level metaphor detection [C]// Proceedings of the 2nd Workshop on Figurative Language Processing. Stroudsburg: ACL, 2020: 30-39. |
30 | CHRISTOPHER C D, SCHÜTZE H. Foundations of statistical natural language processing [M]. Cambridge: MIT Press, 1999. |
[1] | 张学飞, 张丽萍, 闫盛, 侯敏, 赵宇博. 知识图谱与大语言模型协同的个性化学习推荐[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 773-784. |
[2] | 秦小林, 古徐, 李弟诚, 徐海文. 大语言模型综述与展望[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 685-696. |
[3] | 袁成哲, 陈国华, 李丁丁, 朱源, 林荣华, 钟昊, 汤庸. ScholatGPT:面向学术社交网络的大语言模型及智能应用[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 755-764. |
[4] | 董艳民, 林佳佳, 张征, 程程, 吴金泽, 王士进, 黄振亚, 刘淇, 陈恩红. 个性化学情感知的智慧助教算法设计与实践[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 765-772. |
[5] | 曹鹏, 温广琪, 杨金柱, 陈刚, 刘歆一, 季学纯. 面向测试用例生成的大模型高效微调方法[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 725-731. |
[6] | 徐月梅, 叶宇齐, 何雪怡. 大语言模型的偏见挑战:识别、评估与去除[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 697-708. |
[7] | 杨燕, 叶枫, 许栋, 张雪洁, 徐津. 融合大语言模型和提示学习的数字孪生水利知识图谱构建[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 785-793. |
[8] | 何静, 沈阳, 谢润锋. 大语言模型幻觉现象的识别与优化[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 709-714. |
[9] | 严雪文, 黄章进. 基于对比学习的小样本图像分类方法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 383-391. |
[10] | 富坤, 应世聪, 郑婷婷, 屈佳捷, 崔静远, 李建伟. 面向小样本节点分类的图数据增强方法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 392-402. |
[11] | 张嘉琳, 任庆桦, 毛启容. 利用全局-局部特征依赖的反欺骗说话人验证系统[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 308-317. |
[12] | 杨莹, 郝晓燕, 于丹, 马垚, 陈永乐. 面向图神经网络模型提取攻击的图数据生成方法[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2483-2492. |
[13] | 徐月梅, 胡玲, 赵佳艺, 杜宛泽, 王文清. 大语言模型的技术应用前景与风险挑战[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1655-1662. |
[14] | 汪炅, 唐韬韬, 贾彩燕. 无负采样的正样本增强图对比学习推荐方法PAGCL[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1485-1492. |
[15] | 郭洁, 林佳瑜, 梁祖红, 罗孝波, 孙海涛. 基于知识感知和跨层次对比学习的推荐方法[J]. 《计算机应用》唯一官方网站, 2024, 44(4): 1121-1127. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||