Key-value pair extraction is the identification of a label in a document, the key, and the binding of its associated data, the value, into a paired result. In a lease, "Base Rent: $32.50 PSF" becomes the key base_rent bound to the value 32.50. It is the mechanism that turns a labeled field on a page into a structured data point.
How Does Key-Value Pair Extraction Work?
Key-value pair extraction works by detecting the relationship between a label and its value using spatial position, text proximity, and semantic understanding, per Nutrient and Nanonets. After optical character recognition returns the text, the system finds a key such as "Commencement Date," then binds the nearby value to it and outputs a structured pair a database can load.
The task draws on named entity recognition to tag values by type, such as dates, amounts, or parties, and on object detection to read bounding boxes and layout. A key challenge is discovering pairs without predefined keys across diverse templates, the exact problem the KVP10k benchmark of 10,707 annotated business-document images was built to test, per IBM Research. Each pair carries a confidence score so uncertain bindings can be routed for review.
Component | Meaning |
Key | The label on the page, such as "Security Deposit" |
Value | The data bound to that label, such as $12,000 |
Spatial cue | The value's position relative to the key, often right or below |
Semantic cue | The value's type matching the key's expected type |
Confidence score | A 0 to 100% certainty estimate for the binding |
Why Key-Value Pair Extraction Matters
Key-value pair extraction matters because most of a lease or rent roll is labeled fields, and underwriting needs those pairings intact. A value with the wrong key, a security deposit read as base rent, corrupts the model even when every character is correct. The binding, not just the reading, is what carries meaning into a structured record.
Accuracy depends on document quality and layout. AI-powered tools reach 92 to 98% field-level accuracy on well-scanned documents with standard layouts, and typically 85 to 95% on previously unseen formats, per Docsumo and industry reporting. That gap is the operator's real exposure: a nonstandard lease with values scattered across custom clauses drives more mis-bound pairs, which is why low-confidence pairs are flagged rather than trusted.
Example
Key-value pair extraction is easiest to grade by counting pairs. A rent roll page lists 40 labeled fields across its columns and summary rows. The system extracts a key, a value, and a confidence score for each pair, and auto-accepts anything above a 90% threshold.
Metric | Value |
Labeled fields on the page | 40 |
Pairs extracted | 40 |
Pairs bound correctly | 37 |
Binding accuracy | 92.5% |
Pairs above 90% confidence | 35 |
Pairs flagged for review | 5 |
Review time at 1 min per pair | 5 minutes |
The system extracts all 40 pairs and binds 37 correctly, a 92.5% binding accuracy, with 3 values attached to the wrong key. Of the 40, 35 clear the 90% confidence threshold and pass automatically; the remaining 5 low-confidence pairs go to a reviewer, who resolves them in about 5 minutes. Reviewing the flagged pairs catches 2 of the 3 mis-bound values, since low confidence and mis-binding overlap but are not identical. The threshold and per-pair review time are illustrative inputs; the counts follow from them.
Variations and Edge Cases
Key-value pair extraction changes with how the key and value are arranged on the page. A label directly above its value is simple; a label shared across a row of values is not. The variants below shift binding accuracy and flag rate.
Variant | Treatment |
Adjacent pair | Value sits right of or below its key; high accuracy |
Tabular pair | Column header is the key for every value in the column |
Checkbox pair | Key with a marked box as its value; needs mark detection |
Implicit key | Value present with no visible label; must be inferred |
Many-to-one | Several values under one key, such as staged escalations |
Key-Value Pair Extraction vs Named Entity Recognition
Key-value pair extraction is often confused with named entity recognition, but they answer different questions. Named entity recognition tags a span of text as a type, marking "$32.50" as a monetary amount, without saying which field it fills. Key-value pair extraction goes further and binds that amount to a specific key, base_rent, producing a labeled pair.
Named entity recognition finds and types the values; key-value pair extraction assigns each to the field it belongs to. Extraction pipelines often use named entity recognition as a step inside key-value pair extraction, tagging candidate values before binding them to their keys.
Frequently Asked Questions
What is key-value pair extraction?Key-value pair extraction is the identification of a label, the key, in a document and the binding of its associated data, the value, into a structured pair. In a lease it turns "Base Rent: $32.50" into the key base_rent bound to the value 32.50, ready to load into a database.
How accurate is key-value pair extraction?AI-powered tools reach 92 to 98% field-level accuracy on well-scanned documents with standard layouts, and typically 85 to 95% on previously unseen formats, per Docsumo and industry reporting. Nonstandard layouts and degraded scans drive more mis-bound pairs, which are routed for review.
What is the difference between key-value pair extraction and named entity recognition?Named entity recognition tags a span of text as a type, such as a date or amount, without assigning it to a field. Key-value pair extraction binds that value to a specific key, producing a labeled pair. Pipelines often use named entity recognition as a step within key-value pair extraction.
Related Terms
Field Extraction
Named Entity Recognition
Optical Character Recognition
Structured Data Extraction
Confidence Score