Abstract
Information Extraction (IE) has traditionally been fragmented into specialized tasks like Named Entity Recognition and Relation Extraction, often requiring extensive annotated datasets. This paper introduces "Text Structuralization," a unified approach that leverages instruction-tuned Large Language Models (LLMs) to convert unstructured text into structured key-value pairs. By wrapping raw text in simple natural language instructions, models such as GPT-3 and FLAN-T5 demonstrate strong zero-shot performance across diverse domains and languages. Our findings highlight the emergence of structuralization capabilities as model scale increases, with the largest models achieving near-perfect structural integrity.
1. Introduction
The field of Information Extraction (IE) faces two primary challenges: task fragmentation and data scarcity. Most existing tools are specialized for specific sub-tasks and require significant human-annotated data, which is costly and demands domain expertise. To address these hurdles, we propose a unified task called Text Structuralization. This approach aims to create "generalist" models capable of identifying entities, relations, and events simultaneously and formatting them into structured data without the need for massive task-specific training sets.
2. Methodology
The proposed method utilizes an instruction-based framework to leverage the latent knowledge within LLMs. The core technique involves a simple template: Prefix + Text + Suffix. The Prefix specifies the extraction task (e.g., "Please extract information from text"), while the Suffix dictates the desired output format (e.g., "output as structured data").
We evaluated this approach across six major LLM families, including ChatGPT, GPT-3 (InstructGPT), FLAN-T5, GPT-NeoX, OPT, and GLM. To handle diverse data types, we utilized four primary datasets: Wikibio (biographies), WikitableT (Wikipedia sections), Rotowire (basketball reports), and Medical-NER (Chinese electronic medical records). Additionally, the ACE2005 benchmark was used to compare zero-shot performance against traditional supervised models.
3. Experimental Results and Analysis
Our experiments reveal several key insights into the behavior of instruction-tuned models for structuralization tasks.
3.1 Scaling and Instruction Effectiveness
A critical observation is the relationship between model scale and the effectiveness of instructions versus few-shot prompting. For GPT-3, few-shot prompting initially outperformed simple instructions at smaller scales. However, at the 175B parameter level, the performance gap closed, indicating that larger models can infer intent from instructions alone. Conversely, the "FLAN-T5 Paradox" showed that FLAN-T5 models often performed better with direct instructions than with few-shot prompts, likely due to their specific instruction-tuning history.
3.2 Zero-Shot Performance
On the ACE2005 benchmark, GPT-3 (davinci-003) achieved impressive zero-shot results, with an F1 score of 74.31% for NER and 46.95% for Event Extraction. While supervised state-of-the-art models still maintain a lead (e.g., ~91% for NER), the ability of LLMs to perform these tasks without any specific training data is significant. Furthermore, larger models demonstrated nearly perfect "Structure Degree" scores, consistently adhering to the requested key-value format.
3.3 Robustness and Generalization
Ablation studies confirmed that the models are robust to minor variations in instruction wording, provided both a prefix and a suffix are present. The method also demonstrated cross-lingual generalization; by translating instructions into Chinese, the models successfully extracted structured data from medical records.
4. Discussion and Conclusion
While promising, the instruction-based approach faces limitations. Performance tends to degrade as input text length increases, a phenomenon we term "instruction dilution." Additionally, while larger models are highly capable, they are often closed-source and computationally expensive. Future research should focus on maintaining instruction salience in long-form documents and improving the reasoning capabilities of open-source alternatives.
In conclusion, this work demonstrates that instruction-tuned LLMs can serve as powerful generalists for text structuralization. This shift toward natural language interaction for data organization simplifies the extraction process and reduces the reliance on specialized, data-hungry models.
Summary updated