K now C oder- X : Boosting Multilingual Information Extraction via Code (2025)

Abstract: Empirical evidence indicates that LLMs exhibit spontaneous cross-lingual alignment. However, although LLMs show promising cross-lingual alignment in Information Extraction (IE), a significant imbalance across languages persists, highlighting an underlying deficiency. To address this, we propose KnowCoder-X, a powerful code LLM with advanced cross-lingual and multilingual capabilities for universal IE. Firstly, it standardizes the representation of multilingual schemas using Python classes, ensuring a consistent ontology across different languages. Then, IE across languages is formulated as a unified code generation task. Secondly, we conduct IE cross-lingual alignment instruction tuning on the translated instance prediction task to enhance the model’s cross-lingual transferability. During this phase, we also construct a high-quality and diverse bilingual IE parallel dataset with 257k samples, called ParallelNER, synthesized by our proposed robust three-stage pipeline, with manual annotation to ensure quality. Although without training in 29 unseen languages, KnowCoder-X surpasses ChatGPT by 30.17% and SoTA by 20.03%, thereby demonstrating superior cross-lingual IE capabilities. Comprehensive evaluations on 64 IE benchmarks in Chinese and English under various settings demonstrate that KnowCoder-X significantly enhances cross-lingual IE transfer through boosting the IE alignment. Our code and dataset are available at: https://github.com/ICT-GoKnow/KnowCoder.

## introduction cross-lingual information extraction (ie) focuses on automatically extracting structured information from texts in unseen languages, following manually designed schemas. cross-lingual schema understanding and representation have long been a chal- secondly, we introduce an ie cross-lingual alignment instruction tuning phase. we first propose a task that predicts target language instances, aiding in the alignment of the extraction process (see figure 1 for an example). using prediction tasks with parallel data to enhance multilingual alignment through instruction tuning is a widely adopted paradigm @xcite . the key challenge is ensuring that extracted instances maintain semantic consistency with their sourcelanguage counterparts while appearing in the target language sentence. unlike directly predicting complete ie parallel data, which focuses on aligning sentences, our method prioritizes the alignment of translated instances, which is the central goal of ie cross-lingual alignment. to use high-quality ie parallel data for the phase, we propose an automatic three-stage llm-based pipeline, which achieves 99% average faithfulness across 10 languages evaluated on the label projection benchmark wikiann @xcite . utilizing the pipeline, we construct a high-quality and diverse ner english-chinese parallel dataset parallelner, using the gpt-4o series model supplemented with manual annotation. by distilling the ie alignment capabilities of advanced proprietary models, the ie cross-lingual alignment phase enhances cross-lingual generalization in ie tasks. ultimately, we obtain the knowcoder-x through chinese and english ie instruction tuning. we evaluate the knowcoder-x on 64 benchmarks for the ner, relation extraction (re), event detection (ed), and event argument extraction (eae) tasks in chinese and english. knowcoder-x exhibits superior cross-lingual generalization across 29 unseen diverse languages, and surpasses chatgpt by 30.17% and sota by 20.03%. moreover, it achieved an impressive average improvement of 11.43% over the sota across 20 low-resource african languages. in the supervised evaluation, knowcoder-x consistently ranks within the top-2 results across 40 (of 42) benchmarks. notably, knowcoder-x achieves sota across all chinese ie benchmarks, effectively demonstrating the strength of knowledge transfer from english ie through our method. our contributions can be summarized as: ## code-based multilingual ie knowcoder-x formulates the ie tasks across various languages using a unified code generation framework. in this section, we introduce the instruction and completion of the proposed codebased multilingual ie. the instruction consists of two parts ( §3.1): (1) schema representation code across languages, including class definition and comments; (2) task prompts for completion. subsequently, we present the completion format ( §3.2). ## ie cross-lingual alignment knowcoder-x adopts a two-phase instruction tuning framework. the first phase is the ie crosslingual alignment phase, where we propose the task and data. subsequently, we conduct instruction tuning on chinese and english uie tasks with 46 ie datasets to obtain knowcoder-x. appendix h shows examples of instruction tuning data. appendix g shows the detailed dataset statistics. in this section, we introduce the ie cross-lingual alignment phase. first, we introduce the instruction and completion of the translated spans prediction task ( §4.1). to obtain high-quality ie parallel data for this training phase, we propose a threestage automatic pipeline for constructing ie parallel data ( §4.2) and creating parallelner ( §4.3). ## experimental results our extensive evaluation of ie cross-lingual transfer can be divided into two main dimensions: the cross-lingual evaluation for external-language transfer in unseen languages ( §6.1), and the supervised evaluation for internal-language transfer between english and chinese ( §6.2). we additionally conduct the zero-shot evaluation for internal language transfer. appendix d shows the results.