Key information extraction

Also known as: KIE · document information extraction

On this page 8

Key information extraction (KIE) is the Document AI task of identifying predefined fields in a document and returning their values as structured data, for example the invoice number, issue date, supplier name and total amount from a scanned invoice. Also called document information extraction, it combines text recognition, layout understanding and semantic labeling so that a value is linked to the correct field even when its position changes from one document to another.

KIE sits at the center of intelligent document processing. OCR turns pixels into text, layout analysis finds regions and reading order, and KIE decides which piece of text answers which business question. The output is typically a set of key-value pairs, often with a confidence score and the bounding box of each value.

How key information extraction works

A KIE pipeline converts a document image or PDF into a validated set of field values through several stages. Classic pipelines run each stage as a separate component, while modern end-to-end models merge some or all of them into a single network.

StageWhat it doesTypical output
PreprocessingDeskews, denoises and binarizes the imageClean page image
Text recognitionDetects and reads text with OCRWords with bounding boxes
Layout encodingCaptures position, font and visual contextTokens enriched with 2D features
Entity labelingAssigns each token to a field or to noneLabeled spans such as TOTAL or DATE
Linking and normalizationPairs keys with values and formats themKey-value pairs in a fixed schema
ValidationChecks rules, sums and formatsAccepted values or review flags
Stages of a typical KIE pipeline

Entity labeling is usually framed as token classification with BIO tags, while entity linking connects a printed key such as “Invoice date” to the value that belongs to it. Benchmarks such as FUNSD evaluate both labeling and linking on noisy scanned forms.

Approaches to extraction

KIE methods have moved from rules and templates toward learned, layout-aware models and, more recently, toward generative models that read the page directly. Each family trades accuracy, cost and flexibility differently.

ApproachHow it locates valuesStrengths and weaknesses
Template and zonal OCRFixed coordinates per document layoutPrecise on known forms, breaks on new layouts
Rules and regular expressionsKeywords and patterns in OCR textTransparent, but brittle with variation
Layout-aware language modelsText, position and image features combinedHigh accuracy, needs labeled training data
OCR-free modelsImage encoder decodes fields directlyNo OCR errors, heavier compute
LLM-based extractionPrompted model fills a JSON schemaTemplate-free, risk of invented values
Main families of KIE methods

LayoutLM and its successors add 2D position embeddings to a transformer so that the model learns that a number to the right of “Total” is likely the total. Donut and Pix2Struct represent the OCR-free document understanding line, generating structured output straight from pixels. Large multimodal language models enable template-free extraction with only a field schema and a few instructions, but require strict output validation.

Key information extraction targets a fixed set of named fields, which separates it from tasks that recover all text, all tables or answers to open questions. Real systems often chain several of these tasks.

TaskInput focusOutput
OCRAll characters on the pageUnstructured text with positions
Key information extractionSpecific business fieldsKey-value pairs in a schema
Table extractionGrid structuresRows, columns and cells
Line item extractionRepeated rows such as invoice itemsList of records per item
Document question answeringAny question about the pageFree-form answer span
KIE compared with neighboring tasks

Specialized variants include invoice data extraction, receipt understanding evaluated on the SROIE dataset, resume parsing and ID document OCR. They share the same core method but differ in field schemas, layout variability and regulatory sensitivity.

Measuring extraction quality

KIE quality is measured mainly at field level, because a document with one wrong total is unusable even if every other character is correct. Entity-level F1 score is the standard research metric, while production teams also track the share of documents processed without human touch.

MetricWhat it measuresPractical note
Field-level F1Precision and recall of extracted fieldsMain benchmark metric
Exact match accuracyShare of fields identical to ground truthStrict on formatting differences
Character error rateOCR errors per characterDiagnoses recognition, not labeling
Straight-through processing rateDocuments needing no human reviewCore business KPI
Calibration of confidenceAgreement of scores with real accuracyDrives review routing thresholds
Metrics used to evaluate KIE systems

Accuracy depends heavily on scan quality, layout diversity and field type. Well-printed invoices from known suppliers often exceed 95 percent field accuracy, while handwritten forms or low-resolution photos can fall far lower, so published benchmark scores rarely transfer directly to a new document population.

Designing a reliable KIE deployment

Reliable deployments treat extraction as a probabilistic step inside a controlled workflow, not as a final answer. The following practices reduce errors and audit risk.

  • Define a strict field schema with types, formats and allowed values.
  • Apply business rules, such as checking that line items sum to the total.
  • Route low-confidence fields to human review instead of whole documents.
  • Keep bounding boxes so reviewers can verify each value against the source.
  • Retrain or recalibrate when new suppliers or form versions appear.

Limitations and common failure modes

Typical failures include confusing similar fields, such as invoice date versus due date, misreading digits after poor OCR and missing values that span two lines or pages. Generative extractors add a distinct risk: they can produce plausible values that do not appear in the document, so every value should be grounded in located text.

Another common mistake is assuming a model trained on one document type generalizes to another. Domain shift in language, layout or scan quality is the main reason accuracy drops after deployment, and it is detected only when ongoing sampling and review are in place.

In plain words

Key information extraction lets a computer read a document and pick out the important details. It finds things like a name, a date or an amount to pay. Then it puts each detail into the right box in a database.

Think of an office clerk who copies data from paper forms into a system. KIE does the same job automatically. It works even when each form looks a little different. When it is unsure, a person checks that detail.

A real-world example

An accounts payable team at a manufacturing company receives about 8,000 supplier invoices per month as PDFs and scans from more than 600 suppliers. Clerks used to type twelve fields from each invoice into the finance system, including supplier tax ID, invoice number, dates, net amount, tax and total.

The team deployed a layout-aware KIE model fine-tuned on a few thousand labeled invoices, combined with rules that check whether net amount plus tax equals the total. Fields with confidence below a set threshold go to a reviewer, who sees the highlighted region on the page. After three months, about 70 percent of invoices passed straight through without manual edits, and average processing time per invoice fell from several minutes to under one minute for the rest.