Papers › LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking

LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking

18 Apr 2022arXiv:2204.08387archive 2025-07-28

Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei

Self-supervised pre-training techniques have achieved remarkable progress in Document AI. Most multimodal pre-trained models use a masked language modeling objective to learn bidirectional representations on the text modality, but they differ in pre-training objectives for the image modality. This discrepancy adds difficulty to multimodal representation learning. In this paper, we propose LayoutLMv3 to pre-train multimodal Transformers for Document AI with unified text and image masking. Additionally, LayoutLMv3 is pre-trained with a word-patch alignment objective to learn cross-modal alignment by predicting whether the corresponding image patch of a text word is masked. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model for both text-centric and image-centric Document AI tasks. Experimental results show that LayoutLMv3 achieves state-of-the-art performance not only in text-centric tasks, including form understanding, receipt understanding, and document visual question answering, but also in image-centric tasks such as document image classification and document layout analysis. The code and models are publicly available at https://aka.ms/layoutlmv3.

PaperPDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

microsoft/unilm officialpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to UniLMv2: Pseudo-Masked Language Models for Unified Language Model Pre-Training (arXiv:2002.12804; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified), BEiT: BERT Pre-Training of Image Transformers (arXiv:2106.08254; that paper's own run record: 6 ran (of which 2 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 2 where Syntology's instrument failed) · 5 unverified), DeepNet: Scaling Transformers to 1,000 Layers (arXiv:2203.00555; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 3 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
huggingface/transformers mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Attention Is All You Need (arXiv:1706.03762; that paper's own run record: 610 ran (of which 293 constructed an object rather than computing a result; 529 with no instrument failure: 45 honoured, 15 violated, 469 with no contract checked; 81 where Syntology's instrument failed) · 336 unverified), HuggingFace's Transformers: State-of-the-art Natural Language Processing (arXiv:1910.03771; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 0 unverified), DeBERTa: Decoding-enhanced BERT with Disentangled Attention (arXiv:2006.03654; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 9 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
MindSpore-scientific-2/code-14 mindsporeSyntology: not harvested report
pwc-1/Paper-9 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to RandAugment: Practical automated data augmentation with a reduced search space (arXiv:1909.13719; that paper's own run record: 58 ran (of which 1 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 1 violated, 6 with no contract checked; 51 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Document AIDocument Image ClassificationDocument Layout AnalysisEntity LinkingImage ClassificationKey Information ExtractionKey-value Pair ExtractionLanguage ModelingLanguage ModellingMasked Language ModelingNamed Entity Recognition (NER)Question AnsweringRelation ExtractionRepresentation LearningSemantic entity labelingVisual Question AnsweringVisual Question Answering (VQA)cross-modal alignmentdocument-image-classificationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Document AI EPHOIE LayoutLMv3 Average F1 99.21 #1 of 1 Archive leaderboard report
Document Image Classification RVL-CDIP LayoutLMV3Large Accuracy 95.93% #4 of 31 Archive leaderboard report
Document Image Classification RVL-CDIP LayoutLMV3Large Parameters 368M #4 of 31 Archive leaderboard report
Document Image Classification RVL-CDIP LayoutLMv3BASE Accuracy 95.44% #9 of 31 Archive leaderboard report
Document Image Classification RVL-CDIP LayoutLMv3BASE Parameters 133M #9 of 31 Archive leaderboard report
Document Layout Analysis PubLayNet val LayoutLMv3-B Figure 0.970 #5 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val LayoutLMv3-B List 0.955 #5 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val LayoutLMv3-B Overall 0.951 #5 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val LayoutLMv3-B Table 0.979 #5 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val LayoutLMv3-B Text 0.945 #5 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val LayoutLMv3-B Title 0.906 #5 of 15 Archive leaderboard report
Entity Linking EC-FUNSD LayoutLMv3 (large) F1 78.14 #5 of 8 Archive leaderboard report
Entity Linking EC-FUNSD LayoutLMv3 (base) F1 67.47 #8 of 8 Archive leaderboard report
Key Information Extraction CORD LayoutLMv3 Large F1 97.46 #3 of 9 Archive leaderboard report
Key Information Extraction EPHOIE LayoutLMv3 Average F1 99.21 #1 of 1 Archive leaderboard report
Key-value Pair Extraction RFUND-EN LayoutLMv3 key-value pair F1 57.66 #7 of 13 Archive leaderboard report
Key-value Pair Extraction SIBR LayoutLMv3_base_chinese key-value pair F1 73.51 #4 of 7 Archive leaderboard report
Named Entity Recognition (NER) CORD-r LayoutLMv3 F1 82.72 #3 of 4 Archive leaderboard report
Named Entity Recognition (NER) FUNSD-r LayoutLMv3 F1 78.77 #2 of 4 Archive leaderboard report
Relation Extraction FUNSD LayoutLMv3 large F1 80.35 #4 of 9 Archive leaderboard report
Semantic entity labeling EC-FUNSD LayoutLMv3 (large) F1 83.88 #4 of 8 Archive leaderboard report
Semantic entity labeling EC-FUNSD LayoutLMv3 (base) F1 82.30 #8 of 8 Archive leaderboard report
Semantic entity labeling FUNSD LayoutLMv3 Large F1 92.08 #5 of 15 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections