Papers › DiT: Self-supervised Pre-training for Document Image Transformer

DiT: Self-supervised Pre-training for Document Image Transformer

4 Mar 2022arXiv:2203.02378archive 2025-07-28

Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei

Image Transformer has recently achieved significant progress for natural image understanding, either using supervised (ViT, DeiT, etc.) or self-supervised (BEiT, MAE, etc.) pre-training techniques. In this paper, we propose \textbf{DiT}, a self-supervised pre-trained \textbf{D}ocument \textbf{I}mage \textbf{T}ransformer model using large-scale unlabeled text images for Document AI tasks, which is essential since no supervised counterparts ever exist due to the lack of human-labeled document images. We leverage DiT as the backbone network in a variety of vision-based Document AI tasks, including document image classification, document layout analysis, table detection as well as text detection for OCR. Experiment results have illustrated that the self-supervised pre-trained DiT model achieves new state-of-the-art results on these downstream tasks, e.g. document image classification (91.11 → 92.69), document layout analysis (91.0 → 94.9), table detection (94.23 → 96.55) and text detection for OCR (93.07 → 94.29). The code and pre-trained models are publicly available at \url{https://aka.ms/msdit}.

PaperPDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2203.02378")

Code

Syntology Ran 0 of 11 code samples harvested from 1 repository linked to this paper; 11 have no recorded run.

By repository: community (archive-listed): 11 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

microsoft/unilm officialpytorch report
huggingface/transformers mentioned on GitHubpytorch report
thibaultvt/Diard pytorchApache-2.0 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.

Code Syntology ran Syntology

11 samples harvested; 0 ran; 0 honoured the contract we drafted; 11 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

11unverified

Licence: 0 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from thibaultvt/Diard. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

cells_to_dataframe thibaultvt/Diard/modules/tables.py community (archive-listed) unverified Apache-2.0 (permissive) · 9cf91b6b320054a8 · report
get_cells thibaultvt/Diard/modules/tables.py community (archive-listed) unverified Apache-2.0 (permissive) · 97d74784c54ea294 · report
get_html_span_by_type thibaultvt/Diard/modules/export.py community (archive-listed) unverified Apache-2.0 (permissive) · 4acc3b8aed360e21 · report
get_layout_html thibaultvt/Diard/modules/export.py community (archive-listed) unverified Apache-2.0 (permissive) · 0babed10124ceff7 · report
get_layout_json_dims thibaultvt/Diard/load_from_json.py community (archive-listed) unverified Apache-2.0 (permissive) · e59657355a3639c1 · report
get_layouts_html thibaultvt/Diard/modules/export.py community (archive-listed) unverified Apache-2.0 (permissive) · 150d26752650ccb1 · report
get_ratio thibaultvt/Diard/modules/sections.py community (archive-listed) unverified Apache-2.0 (permissive) · 4777134b6ed19f10 · report
get_rows_and_columns thibaultvt/Diard/modules/tables.py community (archive-listed) unverified Apache-2.0 (permissive) · 07c58b9d07ef40c7 · report
map_jenks_labels thibaultvt/Diard/modules/sections.py community (archive-listed) unverified Apache-2.0 (permissive) · 58375cbcbe5207af · report
numbered_filenames_check thibaultvt/Diard/modules/document.py community (archive-listed) unverified Apache-2.0 (permissive) · fc8daa551fdc9c9e · report
overlap_check thibaultvt/Diard/modules/document.py community (archive-listed) unverified Apache-2.0 (permissive) · d0c31fd953920835 · report

Tasks

Document AIDocument Image ClassificationDocument Layout AnalysisImage ClassificationOptical Character Recognition (OCR)Table DetectionText Detectiondocument-image-classificationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Document Image Classification RVL-CDIP DiT-L Accuracy 92.69% #22 of 31 Archive leaderboard report
Document Image Classification RVL-CDIP DiT-L Parameters 304M #22 of 31 Archive leaderboard report
Document Image Classification RVL-CDIP DiT-B Accuracy 92.11% #26 of 31 Archive leaderboard report
Document Image Classification RVL-CDIP DiT-B Parameters 87M #26 of 31 Archive leaderboard report
Document Layout Analysis PubLayNet val DiT-L Figure 0.972 #7 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val DiT-L List 0.960 #7 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val DiT-L Overall 0.949 #7 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val DiT-L Table 0.978 #7 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val DiT-L Text 0.944 #7 of 15 Archive leaderboard report
Document Layout Analysis PubLayNet val DiT-L Title 0.893 #7 of 15 Archive leaderboard report
Table Detection ICDAR 2019 DiT-L (Cascade) Weighted Average F1-score 96.55 #1 of 2 Archive leaderboard report
Table Detection ICDAR 2019 DiT-B (Cascade) Weighted Average F1-score 96.14 #2 of 2 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.

Methods

Absolute Position EncodingsAdamAttentionAttention DropoutBPEDeiTDense ConnectionsDropoutFeedforward NetworkLabel SmoothingLayer NormalizationLinear LayerMAEMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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