{"about":{"non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","site":"https://codewithpapers.app","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/layoutlmv2-multi-modal-pre-training-for","title":"LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding","arxiv_id":"2012.14740","date":"2020-12-29","proceeding":"ACL 2021 5","authors":["Yang Xu","Yiheng Xu","Tengchao Lv","Lei Cui","Furu Wei","Guoxin Wang","Yijuan Lu","Dinei Florencio","Cha Zhang","Wanxiang Che","Min Zhang","Lidong Zhou"],"abstract":"Pre-training of text and layout has proved effective in a variety of visually-rich document understanding tasks due to its effective model architecture and the advantage of large-scale unlabeled scanned/digital-born documents. We propose LayoutLMv2 architecture with new pre-training tasks to model the interaction among text, layout, and image in a single multi-modal framework. Specifically, with a two-stream multi-modal Transformer encoder, LayoutLMv2 uses not only the existing masked visual-language modeling task but also the new text-image alignment and text-image matching tasks, which make it better capture the cross-modality interaction in the pre-training stage. Meanwhile, it also integrates a spatial-aware self-attention mechanism into the Transformer architecture so that the model can fully understand the relative positional relationship among different text blocks. Experiment results show that LayoutLMv2 outperforms LayoutLM by a large margin and achieves new state-of-the-art results on a wide variety of downstream visually-rich document understanding tasks, including FUNSD (0.7895 $\\to$ 0.8420), CORD (0.9493 $\\to$ 0.9601), SROIE (0.9524 $\\to$ 0.9781), Kleister-NDA (0.8340 $\\to$ 0.8520), RVL-CDIP (0.9443 $\\to$ 0.9564), and DocVQA (0.7295 $\\to$ 0.8672). We made our model and code publicly available at \\url{https://aka.ms/layoutlmv2}.","url_abs":"https://arxiv.org/abs/2012.14740v4","url_pdf":"https://arxiv.org/pdf/2012.14740v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/microsoft/unilm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/facebookresearch/data2vec_vision","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/huggingface/transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/MS-P3/code3/tree/main/layoutlmv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/MindSpore-scientific-2/code-14/tree/main/layoutlmv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/MindSpore-scientific/code-7/tree/main/LayoutLMv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/PaddlePaddle/PaddleNLP/tree/develop/paddlenlp/transformers/layoutlmv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/PaddlePaddle/PaddleOCR","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"layoutlmv2-multi-modal-pre-training-for","repo_url":"https://github.com/pwc-1/Paper-9/tree/main/layoutlmv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"document-image-classification","task_name":"Document Image Classification"},{"task_slug":"document-layout-analysis","task_name":"Document Layout Analysis"},{"task_slug":"key-information-extraction","task_name":"Key Information Extraction"},{"task_slug":"key-value-pair-extraction","task_name":"Key-value Pair Extraction"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"relation-extraction","task_name":"Relation Extraction"},{"task_slug":"semantic-entity-labeling","task_name":"Semantic entity labeling"},{"task_slug":"visual-question-answering-1","task_name":"Visual Question Answering"},{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":"document-understanding","task_name":"document understanding"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"fpn","method_name":"FPN"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"layoutlmv2","method_name":"LayoutLMv2"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"resnext","method_name":"ResNeXt"},{"method_slug":"resnext-block","method_name":"ResNeXt Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/document-image-classification-on-rvl-cdip","task":"Document Image Classification","dataset":"RVL-CDIP","model":"LayoutLMv2LARGE","rank_in_archive_order":6,"of":31,"metrics":{"Accuracy":"95.64%"},"uses_additional_data":false},{"leaderboard":"/sota/document-image-classification-on-rvl-cdip","task":"Document Image Classification","dataset":"RVL-CDIP","model":"LayoutLMv2BASE","rank_in_archive_order":12,"of":31,"metrics":{"Accuracy":"95.25%","Parameters":"200M"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-cord","task":"Key Information Extraction","dataset":"CORD","model":"LayoutLMv2LARGE","rank_in_archive_order":8,"of":9,"metrics":{"F1":"96.01"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-cord","task":"Key Information Extraction","dataset":"CORD","model":"LayoutLMv2BASE","rank_in_archive_order":9,"of":9,"metrics":{"F1":"94.95"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-kleister-nda","task":"Key Information Extraction","dataset":"Kleister NDA","model":"LayoutLMv2LARGE","rank_in_archive_order":1,"of":3,"metrics":{"F1":"85.2"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-kleister-nda","task":"Key Information Extraction","dataset":"Kleister NDA","model":"LayoutLMv2BASE","rank_in_archive_order":2,"of":3,"metrics":{"F1":"83.3"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-sroie","task":"Key Information Extraction","dataset":"SROIE","model":"LayoutLMv2LARGE (Excluding OCR mismatch)","rank_in_archive_order":1,"of":5,"metrics":{"F1":"97.81"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-sroie","task":"Key Information Extraction","dataset":"SROIE","model":"LayoutLMv2LARGE","rank_in_archive_order":3,"of":5,"metrics":{"F1":"96.61"},"uses_additional_data":false},{"leaderboard":"/sota/key-information-extraction-on-sroie","task":"Key Information Extraction","dataset":"SROIE","model":"LayoutLMv2BASE","rank_in_archive_order":4,"of":5,"metrics":{"F1":"96.25"},"uses_additional_data":false},{"leaderboard":"/sota/key-value-pair-extraction-on-rfund-en","task":"Key-value Pair Extraction","dataset":"RFUND-EN","model":"LayoutLMv2_base","rank_in_archive_order":12,"of":13,"metrics":{"key-value pair F1":"49.06"},"uses_additional_data":false},{"leaderboard":"/sota/relation-extraction-on-funsd","task":"Relation Extraction","dataset":"FUNSD","model":"LayoutLMv2 large","rank_in_archive_order":8,"of":9,"metrics":{"F1":"70.57"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-entity-labeling-on-funsd","task":"Semantic entity labeling","dataset":"FUNSD","model":"LayoutLMv2LARGE","rank_in_archive_order":12,"of":15,"metrics":{"F1":"84.2"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-entity-labeling-on-funsd","task":"Semantic entity labeling","dataset":"FUNSD","model":"LayoutLMv2BASE","rank_in_archive_order":14,"of":15,"metrics":{"F1":"82.76"},"uses_additional_data":false},{"leaderboard":"/sota/visual-question-answering-on-docvqa-test","task":"Visual Question Answering (VQA)","dataset":"DocVQA test","model":"LayoutLMv2LARGE","rank_in_archive_order":15,"of":33,"metrics":{"ANLS":"0.8672"},"uses_additional_data":false},{"leaderboard":"/sota/visual-question-answering-on-docvqa-test","task":"Visual Question Answering (VQA)","dataset":"DocVQA test","model":"LayoutLMv2BASE","rank_in_archive_order":25,"of":33,"metrics":{"ANLS":"0.7808"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2012.14740","atlas_url":"https://app.syntology.ai/?focus=2012.14740","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2012.14740"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2012.14740\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2012.14740"},"call":"get_concepts_for_paper(arxiv_id=\"2012.14740\")"}],"by_repo":[{"repo":"microsoft/unilm","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":4,"harvested_for":["2002.12804","2106.08254","2203.00555","2601.23174"],"harvested_for_calls":[{"arxiv_id":"2002.12804","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2002.12804"},"call":"get_harvested_code_for_paper(arxiv_id=\"2002.12804\")"},{"arxiv_id":"2106.08254","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2106.08254"},"call":"get_harvested_code_for_paper(arxiv_id=\"2106.08254\")"},{"arxiv_id":"2203.00555","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2203.00555"},"call":"get_harvested_code_for_paper(arxiv_id=\"2203.00555\")"},{"arxiv_id":"2601.23174","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2601.23174"},"call":"get_harvested_code_for_paper(arxiv_id=\"2601.23174\")"}]},{"repo":"facebookresearch/data2vec_vision","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2106.08254"],"harvested_for_calls":[{"arxiv_id":"2106.08254","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2106.08254"},"call":"get_harvested_code_for_paper(arxiv_id=\"2106.08254\")"}]},{"repo":"huggingface/transformers","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":4,"harvested_for":["1706.03762","1910.03771","2006.03654","2010.01057"],"harvested_for_calls":[{"arxiv_id":"1706.03762","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"1706.03762"},"call":"get_harvested_code_for_paper(arxiv_id=\"1706.03762\")"},{"arxiv_id":"1910.03771","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"1910.03771"},"call":"get_harvested_code_for_paper(arxiv_id=\"1910.03771\")"},{"arxiv_id":"2006.03654","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2006.03654"},"call":"get_harvested_code_for_paper(arxiv_id=\"2006.03654\")"},{"arxiv_id":"2010.01057","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2010.01057"},"call":"get_harvested_code_for_paper(arxiv_id=\"2010.01057\")"}]},{"repo":"MS-P3/code3","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2404.07413"],"harvested_for_calls":[{"arxiv_id":"2404.07413","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2404.07413"},"call":"get_harvested_code_for_paper(arxiv_id=\"2404.07413\")"}]},{"repo":"MindSpore-scientific-2/code-14","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"MindSpore-scientific/code-7","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"PaddlePaddle/PaddleNLP","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2301.03416"],"harvested_for_calls":[{"arxiv_id":"2301.03416","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2301.03416"},"call":"get_harvested_code_for_paper(arxiv_id=\"2301.03416\")"}]},{"repo":"PaddlePaddle/PaddleOCR","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2508.19944"],"harvested_for_calls":[{"arxiv_id":"2508.19944","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2508.19944"},"call":"get_harvested_code_for_paper(arxiv_id=\"2508.19944\")"}]},{"repo":"pwc-1/Paper-9","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["1909.13719"],"harvested_for_calls":[{"arxiv_id":"1909.13719","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"1909.13719"},"call":"get_harvested_code_for_paper(arxiv_id=\"1909.13719\")"}]}],"by_repo_harvested_for_is":"harvested_for: the arXiv ids (as Syntology's graph holds them) of every paper whose samples Syntology's graph links to this repository, in arXiv-id order, complete; the page names the first 3 and says how many more. A link only: it does not say the papers are the same work, that one copied the other, or that the code implements this paper's method; harvested_for_calls gives the get_harvested_code_for_paper call for each arXiv-shaped id among them","by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"7cca03afcf6bdae7efd9cc00ddbcb6b20e457f8a0e7c0b3e96126ca8bbeb3c2a","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}