| 136 | 0 | 108 |
| 下载次数 | 被引频次 | 阅读次数 |
针对大模型存在知识表征缺陷、幻觉现象以及高质量知识数据稀缺等问题,文章设计了基于大模型的知识数据生成实验。实验基于知识图谱三元组设计预训练任务,将三元组符号连接成输入序列,适配Encoder-Decoder架构的BART与T5-PEGASUS模型进行端到端微调。实验详细阐述了微调框架的技术栈选型、多卡分布式部署方案及训练参数配置;采用ROUGE-L、BLEU、chrF++、BERTScore多维度评价指标验证实验效果。结果表明,EncoderDecoder架构模型在知识数据生成任务中表现优于Decoder架构,其中BART模型在信息覆盖完整性方面具有优势,T5-PEGASUS模型则在生成精准度上更优。实验为从知识图谱到文本生成任务提供了可复现的技术路径,有效缓解了高质量知识数据稀缺问题,对大模型在行业场景的可靠应用具有实践意义。
Abstract:[Objective] In the era of artificial intelligence(AI), large language models(LLMs) have demonstrated exceptional capabilities in natural language understanding and generation. However, two critical bottlenecks persist in their practical application: hallucination and the scarcity of high-quality domain-specific data. To address these challenges, this study designs a comprehensive experimental scheme for knowledge-to-text data generation. By leveraging the structured constraints of knowledge graphs, we transform triple-based knowledge into fluent and accurate natural language descriptions. This research provides a reliable, reproducible technical approach for improving the factual consistency of LLMs and expanding high-quality training corpora in specialized domains. [Methods] The study performs end-to-end LLM fine-tuning using a curated dataset of 14 231 triple-text pairs. The experimental methodology comprises several rigorous stages. First, data preprocessing is conducted. Knowledge triples(subjects, predicates, and objects) are serialized into specific input sequences to adapt to the model's vocabulary. The dataset is partitioned into training and test sets of 7 398 and 6 833 samples, respectively. Second, we use BART and T5-PEGASUS as the primary generation models, with GPT for comparative analysis. A distributed fine-tuning framework is implemented using torch.distributed and Distributed Data Parallel(DDP) to leverage multi-GPU computing resources. To optimize computational efficiency and reduce memory overhead, NVIDIA Apex is integrated for FP16 mixed-precision training. The training objective is guided by the cross-entropy loss function to minimize the discrepancy between the predicted sequences and the ground truth. Throughout the process, a real-time monitoring mechanism based on terminal logs tracks loss fluctuations and performance metrics. Finally, the model is evaluated using ROUGE-L, BLEU, chrF++, and BERTScore, providing a comprehensive assessment of both linguistic overlap and semantic similarity. [Results] The experimental results are as follows:(1) Models based on the encoder-decoder architecture outperform traditional decoder-only architectures in terms of structural-to-text transformation.(2) The BART model achieves a ROUGE-L score of 0.343 5 and a BERTScore of 0.887 2. Preserving the structural integrity of input triples achieves an optimal balance between information coverage and linguistic fluency.(3) Despite achieving a lower ROUGE-L of 0.135 0 due to its concise generation style, the T5-PEGASUS model attains a high BERTScore of 0.871 0, indicating superior semantic accuracy in short-text generation.(4) Real-time monitoring logs show that the implementation of DDP and mixed-precision training enables the training loss to converge from 0.169 8 to 0.123 8 within five epochs, demonstrating the efficiency of the proposed training framework.(5) Qualitative analysis of the generated samples confirms that the models can accurately synthesize multiple complex triples into coherent sentences while preserving key factual entities. [Conclusions] This study validates the effectiveness of fine-tuning pretrained encoder-decoder models with structured knowledge constraints for high-quality data generation. By integrating distributed training techniques and a rigorous evaluation framework, the proposed scheme overcomes the limitations of manual data annotation and mitigates the hallucination issues inherent in LLMs. In the optimized fine-tuning process, targeted loss function minimization and real-time monitoring ensure that the generated knowledge data is semantically rich and factually reliable. The proposed experimental paradigm for knowledge engineering and large-scale model optimization offers significant practical value for industrial AI deployment.
[1]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. Stroudsburg, USA:ACL, 2019:4171–4186.
[2]Farquhar S, Kossen J, Kuhn L, et al. Detecting hallucinations in large language models using semantic entropy[J]. Nature, 2024,630(8017):625–630.
[3]Agrawal G, Kumarage T, Alghamdi Z, et al. Can knowledge graphs reduce hallucinations in LLMs?:A survey[C]//Proceedings of the 2024 conference of the north American chapter of the association for computational linguistics:Human language technologies. Stroudsburg, USA:ACL, 2024:3947–3960.
[4]何静,陈逸然,戴田宇.基于谣言传播机制的大模型幻觉减轻策略[J].实验技术与管理, 2025, 42(2):96–103.He J, Chen Y R, Dai T Y. Large language model hallucination reduction strategy based on the rumor propagation mechanism[J]. Experimental Technology and Management, 2025, 42(2):96–103.(in Chinese)
[5]潘耀宗,刘凯,于柯远,等.基于检索增强生成的计算机实验指导平台设计与实践[J].实验技术与管理, 2025, 42(4):213–219.Pan Y Z, Liu K, Yu K Y, et al. Design and implementation of a computer experiment guidance platform enhanced by retrievalbased generation[J]. Experimental Technology and Management,2025, 42(4):213–219.(in Chinese)
[6]Koncel-Kedziorski R, Bekal D, Luan Y, et al. Text generation from knowledge graphs with graph transformers[C]//Proceedings of the 2019 conference of the north American chapter of the association for computational linguistics. Stroudsburg, USA:ACL, 2019:2284–2293.
[7]Liu J, Fan C F, Zhou F Y, et al. Syntax controlled knowledge graph-to-text generation with order and semantic consistency[C]//Findings of the association for computational linguistics:NAACL. Stroudsburg, USA:ACL, 2022:1278–1291.
[8]Ribeiro L F R, Zhang Y, Gardent C, et al. Modeling global and local node contexts for text generation from knowledge graphs[J]. Transactions of the Association for Computational Linguistics,2020, 8:589–604.
[9]Zhang H Q, Song H L, Li S Y, et al. A survey of controllable text generation using transformer-based pre-trained language models[J]. ACM Computing Surveys, 2024, 56(3):64.
[10]Li J Y, Tang T Y, Zhao W X, et al. Pre-trained language models for text generation:A survey[J]. ACM Computing Surveys,2024, 56(9):230.
[11]Song L F, Zhang Y, Wang Z G, et al. A graph-to-sequence model for AMR-to-text generation[C]//Proceedings of the 56th annual meeting of the association for computational linguistics.Stroudsburg, USA:ACL, 2018:1616–1626.
[12]Schmitt M, Ribeiro L F R, Dufter P, et al. Modeling graph structure via relative position for text generation from knowledge graphs[C]//Proceedings of the fifteenth workshop on graph-based methods for natural language processing. Stroudsburg,USA:ACL, 2021:10–21.
[13]Yang Z X F, Einolghozati A, Inan H, et al. Improving text-to-text pre-trained models for the graph-to-text task[C]//Proceedings of the 3rd international workshop on natural language generation from the semantic web. Stroudsburg, USA:ACL, 2020:107–116.
[14]Brown T B, Mann B, Ryder N, et al. Language models are few-shot learners[C]//Proceedings of the 34th international conference on neural information processing systems. Montreal,Canada:NeurIPS Foundation, 2020:1877–1901.
[15]Lewis M, Liu Y H, Goyal N, et al. BART:Denoising sequenceto-sequence pre-training for natural language generation,translation, and comprehension[C]//Proceedings of the 58th annual meeting of the association for computational linguistics.Stroudsburg, USA:ACL, 2020:7871–7880.
[16]Zhang T Y, Kishore V, Wu F, et al. BERTScore:Evaluating text generation with BERT[C]//Proceedings of the international conference on learning representations. Appleton, USA:ICLR,2020.
基本信息:
DOI:10.16791/j.cnki.sjg.2026.08.006
中图分类号:TP391.1;TP18
引用信息:
[1]袁莎,冯思雨.基于大模型的知识数据生成实验设计与实现[J].实验技术与管理,2026,43(08):43-50.DOI:10.16791/j.cnki.sjg.2026.08.006.
基金信息:
北京科技大学青年教师学科交叉研究项目(FRF-IDRY-25-034)
2025-05-13
2025
2025-07-14
2025
1
2026-07-02
2026-07-02
2026-07-02