{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,18]],"date-time":"2026-07-18T15:34:05Z","timestamp":1784388845463,"version":"3.55.0"},"reference-count":38,"publisher":"Association for Computing Machinery (ACM)","issue":"3","license":[{"start":{"date-parts":[[2024,3,9]],"date-time":"2024-03-09T00:00:00Z","timestamp":1709942400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["62206246"],"award-info":[{"award-number":["62206246"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"DOI":"10.13039\/501100012226","name":"Fundamental Research Funds for the Central Universities","doi-asserted-by":"crossref","award":["226-2023-00138"],"award-info":[{"award-number":["226-2023-00138"]}],"id":[{"id":"10.13039\/501100012226","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Zhejiang Provincial Natural Science Foundation of China","award":["LGG22F030011"],"award-info":[{"award-number":["LGG22F030011"]}]},{"DOI":"10.13039\/100007834","name":"Ningbo Natural Science Foundation","doi-asserted-by":"crossref","award":["2021J190"],"award-info":[{"award-number":["2021J190"]}],"id":[{"id":"10.13039\/100007834","id-type":"DOI","asserted-by":"crossref"}]},{"name":"CAAI-Huawei MindSpore Open Fund, Yongjiang Talent Introduction Programme","award":["2021A-156-G"],"award-info":[{"award-number":["2021A-156-G"]}]},{"name":"CCF-Baidu Open Fund"},{"name":"Information Technology Center and State Key Lab of CAD&CG, Zhejiang University"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Asian Low-Resour. Lang. Inf. Process."],"published-print":{"date-parts":[[2024,3,31]]},"abstract":"<jats:p>Current generative knowledge graph construction approaches usually fail to capture structural knowledge by simply flattening natural language into serialized texts or a specification language. However, large generative language model trained on structured data such as code has demonstrated impressive capability in understanding natural language for structural prediction and reasoning tasks. Intuitively, we address the task of generative knowledge graph construction with code language model: given a code-format natural language input, the target is to generate triples which can be represented as code completion tasks. Specifically, we develop schema-aware prompts that effectively utilize the semantic structure within the knowledge graph. As code inherently possesses structure, such as class and function definitions, it serves as a useful model for prior semantic structural knowledge. Furthermore, we employ a rationale-enhanced generation method to boost the performance. Rationales provide intermediate steps, thereby improving knowledge extraction abilities. Experimental results indicate that the proposed approach can obtain better performance on benchmark datasets compared with baselines.<jats:xref ref-type=\"fn\"><jats:sup>1<\/jats:sup><\/jats:xref><\/jats:p>","DOI":"10.1145\/3641850","type":"journal-article","created":{"date-parts":[[2024,2,9]],"date-time":"2024-02-09T11:54:22Z","timestamp":1707479662000},"page":"1-16","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":65,"title":["CodeKGC: Code Language Model for Generative Knowledge Graph Construction"],"prefix":"10.1145","volume":"23","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-3287-5683","authenticated-orcid":false,"given":"Zhen","family":"Bi","sequence":"first","affiliation":[{"name":"Zhejiang University, Hangzhou, China and Zhejiang University - Ant Group Joint Laboratory of Knowledge Graph, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6822-0171","authenticated-orcid":false,"given":"Jing","family":"Chen","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China and Zhejiang University - Ant Group Joint Laboratory of Knowledge Graph, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0009-5658-3413","authenticated-orcid":false,"given":"Yinuo","family":"Jiang","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China and Zhejiang University\u2014Ant Group Joint Laboratory of Knowledge Graph, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1456-2202","authenticated-orcid":false,"given":"Feiyu","family":"Xiong","sequence":"additional","affiliation":[{"name":"Alibaba Group, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0001-5322-9816","authenticated-orcid":false,"given":"Wei","family":"Guo","sequence":"additional","affiliation":[{"name":"Alibaba Group, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5496-7442","authenticated-orcid":false,"given":"Huajun","family":"Chen","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China and Zhejiang University\u2014Ant Group Joint Laboratory of Knowledge Graph, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1970-0678","authenticated-orcid":false,"given":"Ningyu","family":"Zhang","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China and Zhejiang University\u2014Ant Group Joint Laboratory of Knowledge Graph, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2024,3,9]]},"reference":[{"key":"e_1_3_3_2_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.naacl-main.278"},{"key":"e_1_3_3_3_2","unstructured":"Mark Chen Jerry Tworek Heewoo Jun Qiming Yuan Henrique Ponde de Oliveira Pinto Jared Kaplan Harrison Edwards Yuri Burda Nicholas Joseph Greg Brockman Alex Ray Raul Puri Gretchen Krueger Michael Petrov Heidy Khlaaf Girish Sastry Pamela Mishkin Brooke Chan Scott Gray Nick Ryder Mikhail Pavlov Alethea Power Lukasz Kaiser Mohammad Bavarian Clemens Winter Philippe Tillet Felipe Petroski Such Dave Cummings Matthias Plappert Fotios Chantzis Elizabeth Barnes Ariel Herbert-Voss William Hebgen Guss Alex Nichol Alex Paino Nikolas Tezak Jie Tang Igor Babuschkin Suchir Balaji Shantanu Jain William Saunders Christopher Hesse Andrew N. Carr Jan Leike Joshua Achiam Vedant Misra Evan Morikawa Alec Radford Matthew Knight Miles Brundage Mira Murati Katie Mayer Peter Welinder Bob McGrew Dario Amodei Sam McCandlish Ilya Sutskever and Wojciech Zaremba. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374."},{"key":"e_1_3_3_4_2","unstructured":"Wenhu Chen Xueguang Ma Xinyi Wang and William W. Cohen. 2022. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv:2211.12588. Retrieved from https:\/\/arxiv.org\/abs\/2211.12588"},{"key":"e_1_3_3_5_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.findings-acl.5"},{"key":"e_1_3_3_6_2","volume-title":"Proceedings of the 11th International Conference on Language Resources and Evaluation, LREC 2018, Miyazaki, Japan, May 7\u201312, 2018","author":"ElSahar Hady","year":"2018","unstructured":"Hady ElSahar, Pavlos Vougiouklis, Arslen Remaci, Christophe Gravier, Jonathon S. Hare, Fr\u00e9d\u00e9rique Laforest, and Elena Simperl. 2018. T-REx: A large scale alignment of natural language with knowledge base triples. In Proceedings of the 11th International Conference on Language Resources and Evaluation, LREC 2018, Miyazaki, Japan, May 7\u201312, 2018. Nicoletta Calzolari, Khalid Choukri, Christopher Cieri, Thierry Declerck, Sara Goggi, K\u00f4iti Hasida, Hitoshi Isahara, Bente Maegaard, Joseph Mariani, H\u00e9l\u00e8ne Mazo, Asunci\u00f3n Moreno, Jan Odijk, Stelios Piperidis, and Takenobu Tokunaga (Eds.), European Language Resources Association (ELRA). Retrieved from http:\/\/www.lrec-conf.org\/proceedings\/lrec2018\/summaries\/632.html"},{"key":"e_1_3_3_7_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"e_1_3_3_8_2","unstructured":"Luyu Gao Aman Madaan Shuyan Zhou Uri Alon Pengfei Liu Yiming Yang Jamie Callan Graham Neubig. 2023. Pal: Program-aided language models. In International Conference on Machine Learning. PMLR 10764\u201310799."},{"key":"e_1_3_3_9_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.acl-long.499"},{"key":"e_1_3_3_10_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jbi.2012.04.008"},{"key":"e_1_3_3_11_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.naacl-main.342"},{"key":"e_1_3_3_12_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.acl-main.703"},{"key":"e_1_3_3_13_2","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2020.2981314"},{"key":"e_1_3_3_14_2","doi-asserted-by":"crossref","unstructured":"Yujia Li David H. Choi Junyoung Chung Nate Kushman Julian Schrittwieser R\u00e9mi Leblond Tom Eccles James Keeling Felix Gimeno Agustin Dal Lago Thomas Hubert Peter Choy Cyprien de Masson d\u2019Autume Igor Babuschkin Xinyun Chen Po-Sen Huang Johannes Welbl Sven Gowal Alexey Cherepanov James Molloy Daniel J. Mankowitz Esme Sutherland Robson Pushmeet Kohli Nando de Freitas Koray Kavukcuoglu and Oriol Vinyals. 2022. Competition-level code generation with AlphaCode. Science 378 6624 (2022) 1092\u20131097. arXiv:2203.07814. Retrieved from https:\/\/arxiv.org\/abs\/2203.07814","DOI":"10.1126\/science.abq1158"},{"key":"e_1_3_3_15_2","doi-asserted-by":"crossref","unstructured":"Tianyu Liu Yuchen Jiang Nicholas Monath Ryan Cotterell and Mrinmaya Sachan. 2022. Autoregressive structured prediction with language models. In EMNLP\u201922. 993\u20131005. arXiv:2210.14698. Retrieved from https:\/\/arxiv.org\/abs\/2210.14698","DOI":"10.18653\/v1\/2022.findings-emnlp.70"},{"key":"e_1_3_3_16_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.acl-long.217"},{"key":"e_1_3_3_17_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.acl-long.395"},{"key":"e_1_3_3_18_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/d18-1360"},{"key":"e_1_3_3_19_2","doi-asserted-by":"crossref","unstructured":"Aman Madaan Shuyan Zhou Uri Alon Yiming Yang and Graham Neubig. 2022. Language models of code are few-shot commonsense learners. In EMNLP\u201922. 1384\u20131403. arXiv:2210.07128. Retrieved from https:\/\/arxiv.org\/abs\/2210.07128","DOI":"10.18653\/v1\/2022.emnlp-main.90"},{"key":"e_1_3_3_20_2","volume-title":"Proceedings of the 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3\u20137, 2021","author":"Paolini Giovanni","year":"2021","unstructured":"Giovanni Paolini, Ben Athiwaratkun, Jason Krone, Jie Ma, Alessandro Achille, Rishita Anubhai, C\u00edcero Nogueira dos Santos, Bing Xiang, and Stefano Soatto. 2021. Structured prediction as translation between augmented natural languages. In Proceedings of the 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3\u20137, 2021. OpenReview.net. Retrieved from https:\/\/openreview.net\/forum?id=US-TP-xnXI"},{"key":"e_1_3_3_21_2","doi-asserted-by":"crossref","unstructured":"Shuofei Qiao Yixin Ou Ningyu Zhang Xiang Chen Yunzhi Yao Shumin Deng Chuanqi Tan Fei Huang and Huajun Chen. 2022. Reasoning with language model prompting: A survey. In Proceedings of the 61st Annual Meeting of the ACL (Volume 1: Long Papers). 5368\u20135393. arXiv:2212.09597. Retrieved from https:\/\/arxiv.org\/abs\/2212.09597","DOI":"10.18653\/v1\/2023.acl-long.294"},{"key":"e_1_3_3_22_2","article-title":"Exploring the limits of transfer learning with a unified text-to-text transformer","author":"Raffel Colin","year":"2020","unstructured":"Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research 21, 1 (2020), 5485\u20135551. Retrieved from http:\/\/jmlr.org\/papers\/v21\/20-074.html","journal-title":"Journal of Machine Learning Research"},{"key":"e_1_3_3_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/3488560.3498409"},{"key":"e_1_3_3_24_2","first-page":"1","volume-title":"Proceedings of the 8th Conference on Computational Natural Language Learning, CoNLL 2004, Held in Cooperation with HLT-NAACL 2004, Boston, Massachusetts, USA, May 6\u20137, 2004","author":"Roth Dan","year":"2004","unstructured":"Dan Roth and Wen-tau Yih. 2004. A linear programming formulation for global inference in natural language tasks. In Proceedings of the 8th Conference on Computational Natural Language Learning, CoNLL 2004, Held in Cooperation with HLT-NAACL 2004, Boston, Massachusetts, USA, May 6\u20137, 2004. Hwee Tou Ng and Ellen Riloff (Eds.), ACL, 1\u20138. Retrieved from https:\/\/aclanthology.org\/W04-2401\/"},{"key":"e_1_3_3_25_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.94"},{"key":"e_1_3_3_26_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.findings-acl.67"},{"key":"e_1_3_3_27_2","doi-asserted-by":"crossref","unstructured":"Xingyao Wang Sha Li and Heng Ji. 2022. Code4Struct: Code generation for few-shot structured prediction from natural language. In Proceedings of the 61st Annual Meeting of the ACL (Volume 1: Long Papers). 3640\u20133663.","DOI":"10.18653\/v1\/2023.acl-long.202"},{"key":"e_1_3_3_28_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.685"},{"key":"e_1_3_3_29_2","unstructured":"Jason Wei Yi Tay Rishi Bommasani Colin Raffel Barret Zoph Sebastian Borgeaud Dani Yogatama Maarten Bosma Denny Zhou Donald Metzler Ed H. Chi Tatsunori Hashimoto Oriol Vinyals Percy Liang Jeff Dean and William Fedus. 2022. Emergent abilities of large language models. arXiv preprint arXiv:2206.07682."},{"key":"e_1_3_3_30_2","unstructured":"Jason Wei Xuezhi Wang Dale Schuurmans Maarten Bosma Ed H. Chi Quoc Le and Denny Zhou. 2022. Chain of thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems 511 35 (2022) 24824\u201324837."},{"key":"e_1_3_3_31_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.acl-main.136"},{"key":"e_1_3_3_32_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.emnlp-main.519"},{"key":"e_1_3_3_33_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.acl-long.451"},{"key":"e_1_3_3_34_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.emnlp-main.1"},{"key":"e_1_3_3_35_2","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v35i16.17677"},{"key":"e_1_3_3_36_2","doi-asserted-by":"crossref","unstructured":"Siyu Yuan Deqing Yang Jiaqing Liang Zhixu Li Jinxi Liu Jingyue Huang and Yanghua Xiao. 2022. Generative entity typing with curriculum learning. In ENMLP\u201922. 3061\u20133073.","DOI":"10.18653\/v1\/2022.emnlp-main.199"},{"key":"e_1_3_3_37_2","unstructured":"Weizhe Yuan and Pengfei Liu. 2022. reStructured pre-training. arXiv preprint arXiv:2206.11147."},{"key":"e_1_3_3_38_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/n19-1306"},{"key":"e_1_3_3_39_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.naacl-main.5"}],"container-title":["ACM Transactions on Asian and Low-Resource Language Information Processing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3641850","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3641850","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T00:04:03Z","timestamp":1750291443000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3641850"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,3,9]]},"references-count":38,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2024,3,31]]}},"alternative-id":["10.1145\/3641850"],"URL":"https:\/\/doi.org\/10.1145\/3641850","relation":{},"ISSN":["2375-4699","2375-4702"],"issn-type":[{"value":"2375-4699","type":"print"},{"value":"2375-4702","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,3,9]]},"assertion":[{"value":"2023-04-17","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-01-09","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-03-09","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}