Table of contents
This Information Extraction (IE) guide introduces our open-source industry-grade solution that covers the most widely-used application scenarios of Information Extraction. It features multi-domain, multi-task, and cross-modal capabilities and goes through the full lifecycle of data labeling, model training and model deployment. We hope this guide can help you apply Information Extraction techniques in your own products or models.
Information Extraction (IE) is the process of extracting structured information from given input data such as text, pictures or scanned document. While IE brings immense value, applying IE techniques is never easy with challenges such as domain adaptation, heterogeneous structures, lack of labeled data, etc. This PaddleNLP Information Extraction Guide builds on the foundation of our work in [Universal Information Extraction] (https://arxiv.org/abs/2203.12277) and provides an industrial-level solution that not only supports extracting entities, relations, events and opinions from plain text, but also supports cross-modal extraction out of documents, tables and pictures. Our method features a flexible prompt, which allows you to specify extraction targets with simple natural language. We also provide a few different domain-adapated models specialized for different industry sectors.
Highlights:
- Comprehensive Coverage๐: Covers various mainstream tasks of information extraction for plain text and document scenarios, supports multiple languages
- State-of-the-Art Performance๐: Strong performance from the UIE model series models in plain text and multimodal datasets. We also provide pretrained models of various sizes to meet different needs
- Easy to useโก: three lines of code to use our
Taskflow
for out-of-box Information Extraction capabilities. One line of command to model training and model deployment - Efficient Tuningโ: Developers can easily get started with the data labeling and model training process without a background in Machine Learning.
Multiple model selection, satisfying accuracy and speed, and adapting to different information extraction scenarios.
Model Name | Usage Scenarios | Supporting Tasks |
---|---|---|
uie-base uie-medium uie-mini uie-micro uie-nano |
For plain text The extractive model of the scene supports Chinese | Supports entity, relation, event, opinion extraction |
uie-base-en |
An extractive model for plain text scenarios, supports English | Supports entity, relation, event, opinion extraction |
uie-m-base uie-m-large |
An extractive model for plain text scenarios, supporting Chinese and English | Supports entity, relation, event, opinion extraction |
uie-x-base |
An extractive model for plain text and document scenarios, supports Chinese and English | Supports entity, relation, event, opinion extraction on both plain text and documents/pictures/tables |
The UIE model series uses the ERNIE 3.0 lightweight models as the pre-trained language models and was finetuned on a large amount of information extraction data so that the model can be adapted to a fixed prompt.
- Experimental results on Chinese dataset
We conducted experiments on the in-house test sets of the three different domains of Internet, medical care, and finance:
finance | healthcare | internet | ||||
---|---|---|---|---|---|---|
0-shot | 5-shot | 0-shot | 5-shot | 0-shot | 5-shot | |
uie-base (12L768H) | 46.43 | 70.92 | 71.83 | 85.72 | 78.33 | 81.86 |
uie-medium (6L768H) | 41.11 | 64.53 | 65.40 | 75.72 | 78.32 | 79.68 |
uie-mini (6L384H) | 37.04 | 64.65 | 60.50 | 78.36 | 72.09 | 76.38 |
uie-micro (4L384H) | 37.53 | 62.11 | 57.04 | 75.92 | 66.00 | 70.22 |
uie-nano (4L312H) | 38.94 | 66.83 | 48.29 | 76.74 | 62.86 | 72.35 |
uie-m-large (24L1024H) | 49.35 | 74.55 | 70.50 | 92.66 | 78.49 | 83.02 |
uie-m-base (12L768H) | 38.46 | 74.31 | 63.37 | 87.32 | 76.27 | 80.13 |
๐งพ๐uie-x-base (12L768H) | 48.84 | 73.87 | 65.60 | 88.81 | 79.36 | 81.65 |
0-shot means that no training data is directly used for prediction through paddlenlp.Taskflow
, and 5-shot means that each category contains 5 pieces of labeled data for model fine-tuning. Experiments show that UIE can further improve the performance with a small amount of data (few-shot).
- Experimental results on multimodal datasets
We experimented on the zero-shot performance of UIE-X on the in-house multi-modal test sets in three different domains of general, financial, and medical:
General | Financial | Medical | ||
---|---|---|---|---|
๐งพ๐uie-x-base (12L768H) | 65.03 | 73.51 | 84.24 |
The general test set contains complex samples from different fields and is the most difficult task.
Research stage
- At this stage, the target requirements are open and there is no labeled data. We provide a simple way of using Taskflow out-of-the-box with three lines of code, which allows you to build POC without any labeled data.
Data preparation stage
- We recommend finetuning your own information extraction model for your use case. We provide Label Studio labeling solutions for different extraction scenarios. Based on this solution, the seamless connection from data labeling to training data construction can be realized, which greatly reduces the time cost of data labeling and model customization.
Model fine-tuning and closed domain distillation
- Based on UIE's few-shot capabilities, it realizes low-cost model customization and adaptation. At the same time, it provides an acceleration solution for closed domain distillation to solve the problem of slow extraction speed.
Model Deployment
- Provide an HTTP deployment solution to quickly implement the deployment and launch of customized models.
- ๐งพTry our UIE-X demo on ๐ค HuggingFace Space:
-
UIE-X end-to-end document extraction industry application example
-
Customs declaration
-
Delivery Note (Need fine-tuning)
-
VAT invoice (need fine-tuning)
-
Form (need fine-tuning)
-
- Out of the box with Taskflow ๐ Text Extraction Taskflow User Guide ๐ Document Extraction Taskflow User Guide
- Quickly start text information extraction ๐ Text Information Extraction Guide
- Quickly open document information extraction ๐ Document Information Extraction Guide