Methods › Natural Language Processing › Reading Order Detection Models › LayoutReader
LayoutReader
Introduced by Zilong Wang et al. in LayoutReader: Pre-training of Text and Layout for Reading Order Detection
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
** LayoutReader** is a sequence-to-sequence model for reading order detection that uses both textual and layout information, where the layout-aware language model LayoutLM is leveraged as an encoder. The generation step in the encoder-decoder structure tis modified to generate the reading order sequence.
In the encoding stage, LayoutReader packs the pair of source and target segments into a contiguous input sequence of LayoutLM and carefully designs the self-attention mask to control the visibility between tokens. As shown in the Figure, LayoutReader allows the tokens in the source segment to attend to each other while preventing the tokens in the target segment from attending to the rightward context. If 1 means allowing and 0 means preventing, the detail of the mask M is as follows:
M_(i, j)= 1, if i<j or i, j ∈src 0, otherwise
where i, j are the indices in the packed input sequence, so they may be from source or target segments; i, j ∈ src means both tokens are from source segment.
In the decoding stage, since the source and target are reordered sequences, the prediction candidates can be constrained to the source segment. Therefore, we ask the model to predict the indices in the source sequence. The probability is calculated as follows:
𝒫(xₖ=i |x_(<k))=(exp(eᵢᵀ hₖ+bₖ))/(∑ⱼ exp(eⱼᵀ hₖ+bₖ))
where i is an index in the source segment; eᵢ and eⱼ are the i-th and j-th input embeddings of the source segment; hₖ is the hidden states at the k-th time step; bₖ is the bias at the k-th time step.
Papers archive 2025-07-28
1 shown of 1, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.
-
LayoutReader: Pre-training of Text and Layout for Reading Order Detection 26 Aug 2021 · 1 repository · arXiv:2108.11591
Tasks archive 2025-07-28
3 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
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