Abstract
Pre-trained language models with structured semantic knowledge have demonstrated remarkable performance in a variety of downstream natural language processing tasks. The typical methods of integrating knowledge are designing different pre-training tasks and training from scratch, which requires high-end hardware, massive storage resources, and long computing times. Prompt learning is an effective approach to tuning language models for specific tasks, and it can also be used to infuse knowledge. However, most prompt learning methods accept one token as the answer, instead of multiple tokens. To tackle this problem, we propose the long-answer prompt learning method (KLAPrompt), with three different long-answer strategies, to incorporate semantic knowledge into pre-trained language models, and we compare the performance of these three strategies through experiments. We also explore the effectiveness of the KLAPrompt method in the medical field. Additionally, we generate a word sense prediction dataset (WSP) based on the Xinhua Dictionary and a disease and category prediction dataset (DCP) based on MedicalKG. Experimental results show that discrete answers with the answer space partitioning strategy achieve the best results, and introducing structured semantic information can consistently improve language modeling and downstream tasks.
Funding Information
  • National Natural Science Foundation of China (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)
  • Research Center for Computer Network (Shenzhen) Ministry of Education (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)
  • Beijing Academy of Artificial Intelligence (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)
  • Natural Science Foundation of Guangdong Province (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)
  • Basic Research Fund of Shenzhen City (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)
  • Major Key Project of PCL for Experiments and Applications (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)
  • Overseas Cooperation Research Fund of Tsinghua Shenzhen International Graduate School (62276154, 2023A1515012914, JCYJ20210324120012033, JSGG20210802154402007, PCL2021A06, HW2021008)